📄 configure.in
字号:
else if test "$ac_cv_sizeof_int" = "4"; then TEMP_CFLAGS="${TEMP_CFLAGS} -DTYPE_32BIT=\"int\"" else if test "$ac_cv_sizeof_long_int" = "4"; then TEMP_CFLAGS="${TEMP_CFLAGS} -DTYPE_32BIT=\"long int\"" fi fifiOPTIMIZECPU="yes"AC_ARG_WITH(optimizecpu,[ --without-optimizecpu Exclude autodetecting platform and cpu type. This will disable the compilation of gcc optimizing code by platform and cpu. ],OPTIMIZECPU="$withval")DEVELOPER_FLAGS="no"AC_ARG_WITH(developer-flags,[ --with-developer-flags Causes practically all of the possible gcc warning flags to be set. This may produce a large amount of warnings.],DEVELOPER_FLAGS="$withval")# Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTif test "${FreeBSD}" != ""; then OPTIMIZECPU=""fiif test "${OPTIMIZECPU}" = "yes"; then# Try to autodetect cpu typeCPU_NAME="unknown"CPU_TYPE="unknown"if test -e "/proc/cpuinfo" ; then intel[[30]]="-march=i386" intel[[32]]="-march=i386" intel[[34]]="-march=i386" intel[[40]]="-march=i486" intel[[41]]="-march=i486" intel[[42]]="-march=i486" intel[[43]]="-march=i486" intel[[44]]="-march=i486" intel[[45]]="-march=i486" intel[[47]]="-march=i486" intel[[48]]="-march=i486" intel[[51]]="-march=pentium" intel[[52]]="-march=pentium" intel[[54]]="-march=pentium-mmx" intel[[56]]="-march=pentium-mmx" intel[[61]]="-march=pentiumpro" intel[[63]]="-march=pentium2" intel[[65]]="-march=pentium2" intel[[66]]="-march=pentium2" intel[[67]]="-march=pentium3" intel[[68]]="-march=pentium3" intel[[610]]="-march=pentium3" intel[[611]]="-march=pentium3" intel[[150]]="-march=pentium4" intel[[151]]="-march=pentium4" intel[[152]]="-march=pentium4" intel[[154]]="-march=pentium4" intel[[614]]="-march=prescott" amd[[50]]="-march=i586" amd[[51]]="-march=i586" amd[[52]]="-march=i586" amd[[53]]="-march=i586" amd[[56]]="-march=k6" amd[[57]]="-march=k6" amd[[58]]="-march=k6-2" amd[[510]]="-march=k6-2" amd[[59]]="-march=k6-3" amd[[513]]="-march=k6-3" amd[[61]]="-march=athlon" amd[[62]]="-march=athlon" amd[[63]]="-march=athlon" amd[[64]]="-march=athlon" amd[[66]]="-march=athlon" amd[[67]]="-march=athlon" amd[[68]]="-march=athlon" amd[[610]]="-march=athlon" amd[[158]]="-march=athlon-xp" amd[[154]]="-march=k8" amd[[155]]="-march=athlon64" amd[[1543]]="-march=athlon64" amd[[1544]]="-march=athlon64" amd[[1565]]="-march=opteron" amd[[1572]]="-march=k8" via[[67]]="-march=c3" via[[68]]="-march=c3" via[[69]]="-march=i686" via[[610]]="-march=i686" CPU_TYPE="known" CPU_FAMILY=`cat /proc/cpuinfo | grep "cpu family" | head -n1` CPU_MODEL=`cat /proc/cpuinfo | grep model[[^\ ]] | head -n1` CPU_NAME=`cat /proc/cpuinfo | grep "model name" | head -n1` CPU_FLAGS=`cat /proc/cpuinfo | grep "flags" | head -n1` CPU_VENDOR=`cat /proc/cpuinfo | grep "vendor_id" | head -n1` CPU_FAMILY=${CPU_FAMILY#*: } CPU_MODEL=${CPU_MODEL#*: } CPU_NAME=${CPU_NAME#*: } CPU_FLAGS=${CPU_FLAGS#*: } CPU_VENDOR=${CPU_VENDOR#*: } if test "x${CPU_VENDOR}" = "xGenuineIntel" ; then CPU_OPTIONS=${intel[[$CPU_FAMILY$CPU_MODEL]]} fi if test "x${CPU_VENDOR}" = "xAuthenticAMD" ; then CPU_OPTIONS=${amd[[$CPU_FAMILY$CPU_MODEL]]} fi if test "x${CPU_VENDOR}" = "xCentaurHauls"; then CPU_OPTIONS=${via[[$CPU_FAMILY$CPU_MODEL]]} fi if test "x${CPU_OPTIONS}" = "x" ; then CPU_TYPE="unknown" fi CPU_EXT="" for i in $CPU_FLAGS ; do case $i in fpu) CPU_FPU="-mfpmath=387" ;; mmx) CPU_EXT="$CPU_EXT -mmmx" ;; sse) CPU_FPU="-mfpmath=sse -msse" ;; sse2) CPU_FPU="-mfpmath=sse -msse2" ;; sse3) CPU_FPU="-msse3" ;; 3dnow) CPU_EXT="$CPU_EXT -m3dnow" ;; esac done CPU_OPTIONS="$CPU_OPTIONS $CPU_FPU $CPU_EXT"fiif test "x${CPU_TYPE}" = "xunknown"; then CPU_TYPE=`( uname -p ) 2>&1` case $CPU_TYPE in i386) CPU_OPTIONS="-march=i386" ;; i486) CPU_OPTIONS="-march=i486" ;; Pentium2) CPU_OPTIONS="-march=pentium2" ;; Pentiumpro) CPU_OPTIONS="-march=pentiumpro" ;; Pentium*) CPU_OPTIONS="-march=pentium" ;; k6) CPU_OPTIONS="-march=k6" ;; k6-2) CPU_OPTIONS="-march=k6-2" ;; k6-3) CPU_OPTIONS="-march=k6-3" ;; "VIA C3 Ezra") CPU_OPTIONS="-march=c3" CPU_TYPE="known" ;; *) CPU_OPTIONS="" CPU_TYPE="unknown" ;; esac if test "x${CPU_TYPE}" = "xunknown"; then CPU_TYPE=`( uname -m ) 2>&1` case $CPU_TYPE in i386) CPU_OPTIONS="-march=i386" ;; i486) CPU_OPTIONS="-march=i486" ;; i586) CPU_OPTIONS="-march=i586" ;; i686) CPU_OPTIONS="-march=i686" ;; Pentium2) CPU_OPTIONS="-march=pentium2" ;; Pentiumpro) CPU_OPTIONS="-march=pentiumpro" ;; k6) CPU_OPTIONS="-march=k6" ;; k6-2) CPU_OPTIONS="-march=k6-2" ;; k6-3) CPU_OPTIONS="-march=k6-3" ;; *) CPU_OPTIONS="" ;; esac fifiecho "Detected CPU: $CPU_NAME"# Now we check if the compiler supports the detected cpuCOMPILER=$CCfor I in "$TMPDIR" "$TEMPDIR" "/tmp" ; do test "$I" && breakdoneTMPC="$I/cpu_test-$RANDOM-$$.c"TMPO="$I/cpu_test-$RANDOM-$$.o"cat > $TMPC << EOFint main(void) { return 0; }EOF( $COMPILER $CPU_OPTIONS -o $TMPO $TMPC ) 2>&1TMP="$?"rm -f $TMPOrm -f $TMPCif test "x${TMP}" = "x1" ; then CPU_OPTIONS="" echo "No CPU optimizations will be added"else echo "CPU optimization: $CPU_OPTIONS"fielse CPU_OPTIONS=""fiAC_MSG_CHECKING(for bswap instruction)AC_LINK_IFELSE([ AC_LANG_PROGRAM([ ], [unsigned int __x=0; register unsigned int __v; __asm("bswap %0" : "=r" (__v) : "0" (__x));]) ], [ TEMP_CFLAGS="${TEMP_CFLAGS} -DHAVE_BSWAP" AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) ])if test "${DEVELOPER_FLAGS}" = "yes"; then TEMP_CFLAGS="${TEMP_CFLAGS} -W -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wno-long-long"fiCFLAGS="${TEMP_CFLAGS} $UNAME_DEFS $CPU_OPTIONS"LIBS="${TEMP_LIBS}"LDFLAGS="${TEMP_LDFLAGS}"## Add the right exec path for rc scripts#if test $prefix = "NONE";then BIN_PATH="$ac_default_prefix" if test $exec_prefix = "NONE"; then BIN_PATH="$BIN_PATH/bin" else BIN_PATH="$BIN_PATH/$bindir" fi DOC_DIR="$ac_default_prefix/share/doc/${PACKAGE_NAME}-${PACKAGE_VERSION}"else if test $exec_prefix = "NONE";then BIN_PATH="$prefix/bin" else BIN_PATH="$prefix/$bindir" fi DOC_DIR="$prefix/share/doc/${PACKAGE_NAME}-${PACKAGE_VERSION}"fiAC_SUBST(DOC_DIR)AC_SUBST(BIN_PATH)AC_CONFIG_FILES([thread1.confthread2.confthread3.confthread4.confmotion-dist.confmotion.init-FreeBSD.shmotion.init-Debianmotion.init-RHmotion.specMakefile])AC_OUTPUTecho ""echo " *********************"echo " Configure status "echo " ${PACKAGE_NAME} ${PACKAGE_VERSION}"echo " *********************"echo if test "${Darwin}" != ""; then echo "OS : Darwin"elif test "${FreeBSD}" != ""; then echo "OS : *BSD" else echo "OS : Linux"fiif test "${PTHREAD_SUPPORT}" = "yes"; then echo "pthread Support: Yes"else echo "pthread Support: No" echo "**********************************************" echo "** Fatal Error YOU MUST HAVE pthread Support *" echo "**********************************************" fiif test "${JPEG_SUPPORT_MMX}" = "yes"; then echo "jpeg-mmx Support: Yes"elif test "${JPEG_SUPPORT}" = "yes"; then echo "jpeg Support: Yes"else echo "jpeg Support: No" echo "**********************************************" echo "** Fatal Error YOU MUST HAVE jpeg Support ***" echo "**********************************************"fiif test "${MJPEG_SUPPORT}" = "yes"; then echo "mjpeg Support: Yes"else echo "mjpeg Support: No"fiif test "${FreeBSD}" != ""; then if test "${BKTR}" = "yes"; then echo "BKTR included: Yes" else echo "BKTR included: No" fi if test "${PWCBSD}" = "yes"; then echo "PWCBSD include: Yes" else echo "PWCBSD include: No" fielse if test "${V4L}" = "yes"; then echo "V4L included: Yes" else echo "V4L included: No" fi if test x$SUPPORTED_V4L2 = xtrue; then echo "V4L2 supported: Yes" else echo "V4L2 supported: No" fifiif test "${FFMPEG_OK}" = "found"; then echo "FFmpeg Support: Yes"else echo "FFmpeg Support: No"fiif test "${MYSQL_SUPPORT}" = "yes"; then echo "MYSQL Support: Yes"else echo "MYSQL Support: No"fiif test "${PGSQL_SUPPORT}" = "yes"; then echo "PostgreSQL Support: Yes"else echo "PostgreSQL Support: No"fiecho echo "CFLAGS: $CFLAGS"echo "LIBS: $LIBS"echo "LDFLAGS: $LDFLAGS"echoecho "Install prefix: $prefix"echo
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -