📄 configure.ac
字号:
esac#====================================================================================# Determine if the processor can do clipping on float to int conversions.if test x$ac_arg_cpu_clip = "xY" ; then AC_C_CLIP_MODEelse echo "checking processor clipping capabilities... disabled" ac_cv_c_clip_positive=0 ac_cv_c_clip_negative=0 fiAC_DEFINE_UNQUOTED(CPU_CLIPS_POSITIVE, ${ac_cv_c_clip_positive}, [Target processor clips on positive float to int conversion.])AC_DEFINE_UNQUOTED(CPU_CLIPS_NEGATIVE, ${ac_cv_c_clip_negative}, [Target processor clips on negative float to int conversion.])#====================================================================================# Target OS specific stuff.OS_SPECIFIC_CFLAGS=""OS_SPECIFIC_LINKS=""os_is_win32=0os_is_macosx=0case "$target_os" in darwin* | rhapsody*) os_is_macosx=1 OS_SPECIFIC_CFLAGS="-fpascal-strings -I/Developer/Headers/FlatCarbon" OS_SPECIFIC_LINKS="-framework CoreAudio" ;; mingw32*) os_is_win32=1 OS_SPECIFIC_LINKS="-lwinmm" ;; esacAC_DEFINE_UNQUOTED(OS_IS_WIN32, ${os_is_win32}, [Set to 1 if compiling for Win32])AC_DEFINE_UNQUOTED(OS_IS_MACOSX, ${os_is_macosx}, [Set to 1 if compiling for MacOSX])#====================================================================================# Check for ALSA.ALSA_LIBS=""AC_CHECK_HEADERS(alsa/asoundlib.h)if test x$ac_cv_header_alsa_asoundlib_h = xyes ; then ALSA_LIBS="-lasound" fi#====================================================================================# Test for sanity when cross-compiling.if test x$cross_compiling = xyes ; then AC_MSG_WARN([[******************************************************************]]) AC_MSG_WARN([[*** We are cross-compiling, so have to assume sizeof (short) == 2 ]]) AC_MSG_WARN([[*** and sizeof (int) == 4. If this is not the case there is no ]]) AC_MSG_WARN([[*** chance of this working. Please contact the mantainer. ]]) AC_MSG_WARN([[******************************************************************]]) fiif test $ac_cv_sizeof_short != 2 ; then AC_MSG_WARN([[******************************************************************]]) AC_MSG_WARN([[*** sizeof (short) != 2. ]]) AC_MSG_WARN([[******************************************************************]]) fiif test $ac_cv_sizeof_int != 4 ; then AC_MSG_WARN([[******************************************************************]]) AC_MSG_WARN([[*** sizeof (int) != 4 ]]) AC_MSG_WARN([[******************************************************************]]) fiif test $ac_cv_sizeof_float != 4 ; then AC_MSG_WARN([[******************************************************************]]) AC_MSG_WARN([[*** sizeof (float) != 4. ]]) AC_MSG_WARN([[******************************************************************]]) fiif test $ac_cv_sizeof_double != 8 ; then AC_MSG_WARN([[******************************************************************]]) AC_MSG_WARN([[*** sizeof (double) != 8. ]]) AC_MSG_WARN([[******************************************************************]]) fiif test x"$ac_cv_prog_autogen" = "xno" ; then AC_MSG_WARN([[Touching files in directory tests/.]]) touch tests/*.c tests/*.h fi#====================================================================================# Settings for the HTML documentation.htmldocdir=$prefix/share/doc/libsndfile1-dev/htmlif test $prefix = "NONE" ; then htmldocdir=/usr/local/share/doc/libsndfile1-dev/htmlelse htmldocdir=$prefix/share/doc/libsndfile1-dev/html fiif test x$ac_arg_bow_docs = "xY" ; then HTML_BGCOLOUR="white" HTML_FGCOLOUR="black"else HTML_BGCOLOUR="black" HTML_FGCOLOUR="white" fi#====================================================================================# Now use the information from the checking stage.if test x$ac_cv_c_compiler_gnu = xyes ; then CFLAGS="$CFLAGS -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wbad-function-cast -Wwrite-strings" # -Wpointer-arith -Wundef -Wmissing-declarations -Winline -Wconversion" if test "$ac_arg_gcc_opt" = "N" ; then temp_CFLAGS=`echo $CFLAGS | sed "s/O2/O0/"` CFLAGS=$temp_CFLAGS AC_MSG_WARN([[*** Compiler optimisations switched off. ***]]) fi # OS specific tweaks. case "$target_os" in darwin* | rhapsody*) # Disable -Wall, -pedantic and -Wshadow for Apple Darwin/Rhapsody. # System headers on these systems are broken. temp_CFLAGS=`echo $CFLAGS | sed "s/-Wall -pedantic//" | sed "s/-Wshadow//" | sed "s/-Waggregate-return//"` CFLAGS=$temp_CFLAGS SHLIB_VERSION_ARG="-Wl,-exported_symbols_list -Wl,\$(srcdir)/Symbols.darwin" ;; linux*) SHLIB_VERSION_ARG="-Wl,--version-script=\$(srcdir)/Symbols.linux" ;; *) ;; esac if test x$ac_arg_gcc_pipe != "xN" ; then CFLAGS="$CFLAGS -pipe" fi if test x$ac_arg_gcc_werror = "xyes" ; then CFLAGS="-Werror $CFLAGS" fi AC_DEFINE([COMPILER_IS_GCC],1, [Set to 1 if the compile is GNU GCC.]) GCC_MAJOR_VERSION=`$CC -dumpversion | sed "s/\..*//"` AC_DEFINE_UNQUOTED([GCC_MAJOR_VERSION],${GCC_MAJOR_VERSION}, [Major version of GCC or 3 otherwise.]) fiCFLAGS="$CFLAGS $OS_SPECIFIC_CFLAGS"if test x"$CFLAGS" = x ; then echo "Error in configure script. CFLAGS has been screwed up." exit fiAC_SUBST(htmldocdir)AC_SUBST(HTML_BGCOLOUR)AC_SUBST(HTML_FGCOLOUR)AC_SUBST(SHLIB_VERSION_ARG)AC_SUBST(SHARED_VERSION_INFO)AC_SUBST(OS_SPECIFIC_CFLAGS)AC_SUBST(OS_SPECIFIC_LINKS)AC_SUBST(ALSA_LIBS)AC_SUBST(ENABLE_EXPERIMENTAL_CODE)AC_SUBST(COMPILER_IS_GCC)AC_SUBST(GCC_MAJOR_VERSION)dnl The following line causes the libtool distributed with the source dnl to be replaced if the build system has a more recent version.AC_SUBST(LIBTOOL_DEPS)AC_CONFIG_FILES([ \ src/sndfile.h src/Makefile src/GSM610/Makefile src/G72x/Makefile \ man/Makefile examples/Makefile tests/Makefile \ doc/Makefile doc/libsndfile.css \ Win32/Makefile Win32/Makefile.mingw \ MacOS9/Makefile Octave/Makefile \ Makefile libsndfile.spec sndfile.pc \ ])AC_OUTPUT#====================================================================================AC_MSG_RESULT([-=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- Configuration summary : Version : ..................... ${VERSION} Experimental code : ........... ${ac_arg_experimental}])if test x$ac_cv_c_compiler_gnu = xyes ; then echo -e " Tools :\n" echo " Compiler is GCC : ............. ${ac_cv_c_compiler_gnu}" echo " GCC major version : ........... ${GCC_MAJOR_VERSION}" if test $GCC_MAJOR_VERSION -lt 3 ; then echo -e "\n ** This compiler version allows applications to write" echo " ** to static strings within the library." echo " ** Compile with GCC version 3.X to avoid this problem." fi fiif test $libdir = "\${exec_prefix}/lib" ; then libdir="$prefix/lib" fiif test $bindir = "\${exec_prefix}/bin" ; then bindir="$prefix/bin" fiAC_MSG_RESULT([[ Installation directories : Library directory : ........... $libdir Program directory : ........... $bindir Pkgconfig directory : ......... $libdir/pkgconfig HTML docs directory : ......... $htmldocdir]])if test x$prefix != "x/usr" ; then echo "Compiling some other packages against libsndfile may require" echo -e "the addition of \"$libdir/pkgconfig\" to the" echo -e "PKG_CONFIG_PATH environment variable.\n" fi#====================================================================================ifelse(dnl Do not edit or modify anything in this comment block. The arch-tag line is a file identity tag for the GNU Arch revision control system. arch-tag: 6391b316-6cfc-43c2-a18a-8defdc4ee359)dnl
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -