⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 完整的RTP RTSP代码库
💻 IN
📖 第 1 页 / 共 3 页
字号:
{    dnl Check for Linux 2.4 unified input event interface support    AC_ARG_ENABLE(input-events,[  --enable-input-events   use Linux 2.4 unified input interface [default=yes]],                  , enable_input_events=yes)    if test x$enable_input_events = xyes; then        AC_MSG_CHECKING(for Linux 2.4 unified input interface)        use_input_events=no        AC_TRY_COMPILE([          #include <linux/input.h>        ],[          #ifndef EVIOCGNAME          #error EVIOCGNAME() ioctl not available          #endif        ],[        use_input_events=yes        ])        AC_MSG_RESULT($use_input_events)        if test x$use_input_events = xyes; then            CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS"        fi    fi}dnl See if we can use GNU pth library for threadsCheckPTH(){    dnl Check for pth support    AC_ARG_ENABLE(pth,[  --enable-pth            use GNU pth library for multi-threading [default=yes]],                  , enable_pth=yes)    if test x$enable_threads = xyes -a x$enable_pth = xyes; then        AC_PATH_PROG(PTH_CONFIG, pth-config, no)        if test "$PTH_CONFIG" = "no"; then            use_pth=no        else            PTH_CFLAGS=`$PTH_CONFIG --cflags`            PTH_LIBS=`$PTH_CONFIG --libs --all`            SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS"            SDL_LIBS="$SDL_LIBS $PTH_LIBS"            CFLAGS="$CFLAGS -DENABLE_PTH"            use_pth=yes        fi        AC_MSG_CHECKING(pth)        if test "x$use_pth" = xyes; then            AC_MSG_RESULT(yes)        else            AC_MSG_RESULT(no)        fi    fi}dnl See what type of thread model to use on Linux and SolarisCheckPTHREAD(){    dnl Check for pthread support    AC_ARG_ENABLE(pthreads,[  --enable-pthreads       use POSIX threads for multi-threading [default=yes]],                  , enable_pthreads=yes)    dnl This is used on Linux for glibc binary compatibility (Doh!)    AC_ARG_ENABLE(pthread-sem,[  --enable-pthread-sem    use pthread semaphores [default=yes]],                  , enable_pthread_sem=yes)    case "$target" in        *-*-bsdi*)            pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"            pthread_lib=""            ;;        *-*-darwin*)            pthread_cflags="-D_THREAD_SAFE"# causes Carbon.p complaints?#            pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"            ;;        *-*-freebsd*)            pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"            pthread_lib="-pthread"            ;;        *-*-netbsd*)            pthread_cflags="-I/usr/pkg/include -D_REENTRANT"            pthread_lib="-L/usr/pkg/lib -lpthread -lsem"            ;;        *-*-openbsd*)            pthread_cflags="-D_REENTRANT"            pthread_lib="-pthread"            ;;        *-*-solaris*)            pthread_cflags="-D_REENTRANT"            pthread_lib="-lpthread -lposix4"            ;;        *-*-sysv5*)            pthread_cflags="-D_REENTRANT -Kthread"            pthread_lib=""            ;;        *-*-irix*)            pthread_cflags="-D_SGI_MP_SOURCE"            pthread_lib="-lpthread"            ;;        *-*-aix*)            pthread_cflags="-D_REENTRANT -mthreads"            pthread_lib="-lpthread"            ;;        *-*-hpux11*)            pthread_cflags="-D_REENTRANT"            pthread_lib="-L/usr/lib -lpthread"            ;;        *-*-qnx*)            pthread_cflags=""            pthread_lib=""            ;;        *-*-osf*)            if test x$ac_cv_prog_gcc = xyes; then                pthread_cflags="-D_REENTRANT"                pthread_lib="-lpthread -lrt"            else                pthread_cflags="-pthread"                pthread_lib="-lpthread -lrt"            fi            ;;        *)            pthread_cflags="-D_REENTRANT"            pthread_lib="-lpthread"            ;;    esac    if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then        # Save the original compiler flags and libraries        ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"        # Add the pthread compiler flags and libraries        CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"        # Check to see if we have pthread support on this system        AC_MSG_CHECKING(for pthreads)        use_pthreads=no        AC_TRY_LINK([         #include <pthread.h>        ],[         pthread_attr_t type;         pthread_attr_init(&type);        ],[        use_pthreads=yes        ])        AC_MSG_RESULT($use_pthreads)        # Restore the compiler flags and libraries        CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"        # Do futher testing if we have pthread support...        if test x$use_pthreads = xyes; then            CFLAGS="$CFLAGS $pthread_cflags -DSDL_USE_PTHREADS"            LIBS="$LIBS $pthread_lib"            SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"            SDL_LIBS="$SDL_LIBS $pthread_lib"            # Check to see if recursive mutexes are available            AC_MSG_CHECKING(for recursive mutexes)            has_recursive_mutexes=no            AC_TRY_LINK([              #include <pthread.h>            ],[              pthread_mutexattr_t attr;              #if defined(linux) && !(defined(__arm__) && defined(QWS))              pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);              #else              pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);              #endif            ],[            has_recursive_mutexes=yes            ])            # Some systems have broken recursive mutex implementations            case "$target" in                *-*-darwin*)                    has_recursive_mutexes=no                    ;;                *-*-solaris*)                    has_recursive_mutexes=no                    ;;            esac            AC_MSG_RESULT($has_recursive_mutexes)            if test x$has_recursive_mutexes != xyes; then                CFLAGS="$CFLAGS -DPTHREAD_NO_RECURSIVE_MUTEX"            fi            # Check to see if pthread semaphore support is missing            if test x$enable_pthread_sem = xyes; then                AC_MSG_CHECKING(for pthread semaphores)                have_pthread_sem=no                AC_TRY_COMPILE([                  #include <pthread.h>                  #include <semaphore.h>                ],[                ],[                have_pthread_sem=yes                ])                AC_MSG_RESULT($have_pthread_sem)            fi            # Check to see if this is broken glibc 2.0 pthreads            case "$target" in                *-*-linux*)                    AC_MSG_CHECKING(for broken glibc 2.0 pthreads)                    glibc20_pthreads=no                    AC_TRY_COMPILE([                      #include <features.h>                      #if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)                      #warning Working around a bug in glibc 2.0 pthreads                      #else                      #error pthread implementation okay                      #endif /* glibc 2.0 */                    ],[                    ],[                    glibc20_pthreads=yes                    ])                    AC_MSG_RESULT($glibc20_pthreads)            esac        fi    fi    AC_MSG_CHECKING(whether semun is defined in /usr/include/sys/sem.h)    have_semun=no    AC_TRY_COMPILE([      #include <sys/types.h>      #include <sys/sem.h>    ],[      union semun t;    ],[    have_semun=yes    ])    AC_MSG_RESULT($have_semun)    if test x$have_semun = xyes; then        CFLAGS="$CFLAGS -DHAVE_SEMUN"    fi    # See if we can use GNU Pth or clone() on Linux directly    if test x$enable_threads = xyes -a x$use_pthreads != xyes; then        CheckPTH        if test x$use_pth != xyes; then            case "$target" in                *-*-linux*)                    use_clone=yes                    ;;            esac        fi    fi}# Note that we need to have either semaphores or to have mutexes and# condition variables to implement all thread synchronization primitivesdnl See if we can use sigaction() instead of signal()CheckSIGACTION(){    dnl Check for sigaction support    AC_ARG_ENABLE(sigaction,[  --enable-sigaction      use sigaction instead of signal [default=yes]],                  , enable_sigaction=yes)    if test x$enable_sigaction = xyes; then        AC_MSG_CHECKING(sigaction)        have_sigaction=no        AC_TRY_COMPILE([         #include <signal.h>        ],[         struct sigaction junk;         sigaction(0, &junk, &junk);        ],[        have_sigaction=yes        ])        AC_MSG_RESULT($have_sigaction)        if test x$have_sigaction = xyes; then            CFLAGS="$CFLAGS -DHAVE_SIGACTION"        fi    fi}dnl Check for the dlfcn.h interface for dynamically loading objectsCheckDLOPEN(){    AC_ARG_ENABLE(sdl-dlopen,[  --enable-sdl-dlopen     use dlopen for shared object loading [default=yes]],                  , enable_sdl_dlopen=yes)    if test x$enable_sdl_dlopen = xyes; then        AC_MSG_CHECKING(for dlopen)        use_dlopen=no        AC_TRY_COMPILE([         #include <dlfcn.h>        ],[        ],[        use_dlopen=yes        ])        AC_MSG_RESULT($use_dlopen)        if test x$use_dlopen = xyes; then            CFLAGS="$CFLAGS -DUSE_DLOPEN"            AC_CHECK_LIB(c, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS",               AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl",                  AC_CHECK_LIB(ltdl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -lltdl")))        fi    fi}dnl Set up the Atari LDG (shared object loader)CheckAtariLdg(){    AC_ARG_ENABLE(atari-ldg,[  --enable-atari-ldg      use Atari LDG for shared object loading [default=yes]],                  , enable_atari_ldg=yes)    if test x$video_gem = xyes -a x$enable_atari_ldg = xyes; then        AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes)        AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem)        if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then            CFLAGS="$CFLAGS -DENABLE_LDG"            SYSTEM_LIBS="$SYSTEM_LIBS -lldg -lgem"        fi    fi}dnl Check for altivec instruction support using gas syntaxCheckAltivec(){    AC_MSG_CHECKING(for GCC Altivec instruction support)    have_gcc_altivec=no    AC_TRY_COMPILE([    ],[        asm volatile ("mtspr 256, %0\n\t"                      "vand %%v0, %%v0, %%v0"                      :                      : "r" (-1));    ],[    have_gcc_altivec=yes    ])    if test x$have_gcc_altivec = xyes; then        CFLAGS="$CFLAGS -DGCC_ALTIVEC"    fi    AC_MSG_RESULT($have_gcc_altivec)}case "$target" in    *-*-linux*|*-*-gnu*|*-*-k*bsd*-gnu)        case "$target" in          *-*-linux*) ARCH=linux ;;          *-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;;          *-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;;          *-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;;          *-*-gnu*) ARCH=gnu ;; # must be last        esac                CheckDiskAudio        CheckDLOPEN                CheckOSS        CheckALSA        CheckARTSC        CheckESD        CheckNAS                                                        CheckInputEvents        CheckPTHREAD        CheckSIGACTION        CheckAltivec        # Set up files for the main() stub        # Set up files for the audio library        # We use the OSS and ALSA API's, not the Sun audio API        #if test x$enable_audio = xyes; then        #    CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"        #    AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"        #    AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"        #fi        # Set up files for the joystick library        # Set up files for the cdrom library        # Set up files for the thread library        # Set up files for the timer library        ;;    *-*-bsdi*)        ARCH=bsdi                CheckDiskAudio        CheckDLOPEN                CheckOSS        CheckARTSC        CheckESD        CheckNAS                        CheckPTHREAD        CheckSIGACTION        # Set up files for the audio library        # We use the OSS and ALSA API's, not the Sun audio API        #if test x$enable_audio = xyes; then        #    CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"        #    AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"        #    AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"        #fi        # Set up files for the joystick library        # (No joystick support yet)        # Set up files for the cdrom library        # Set up files for the thread library        # Set up files for the timer library        ;;    *-*-freebsd*)        ARCH=freebsd                CheckDiskAudio        CheckDLOPEN        CheckVGL                CheckOSS        CheckARTSC        CheckESD        CheckNAS                        CheckPTHREAD        CheckSIGACTION        # Set up files for the audio library        # We use the OSS and ALSA API's, not the Sun audio API        #if test x$enable_audio = xyes; then        #    CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"        #    AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"        #    AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"        #fi        # Set up files for the cdrom library        # Set up files for the thread library        # Set up files for the timer library        ;;    *-*-netbsd*)        ARCH=netbsd                CheckDiskAudio        CheckDLOPEN                CheckOSS        CheckARTSC        CheckESD        CheckNAS                CheckPTHREAD        CheckSIGACTION        # Set up files for the audio library

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -