📄 configure.in
字号:
dnl Process this file with autoconf to produce a configure script.AC_INIT(README)dnl Set various version strings - taken gratefully from the GTk sources## Making releases:# MICRO_VERSION += 1;# INTERFACE_AGE += 1;# BINARY_AGE += 1;# if any functions have been added, set INTERFACE_AGE to 0.# if backwards compatibility has been broken,# set BINARY_AGE and INTERFACE_AGE to 0.#MAJOR_VERSION=0MINOR_VERSION=9MICRO_VERSION=1INTERFACE_AGE=0BINARY_AGE=0VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSIONAC_SUBST(MAJOR_VERSION)AC_SUBST(MINOR_VERSION)AC_SUBST(MICRO_VERSION)AC_SUBST(INTERFACE_AGE)AC_SUBST(BINARY_AGE)AC_SUBST(VERSION)# libtool versioningLT_RELEASE=$MAJOR_VERSION.$MINOR_VERSIONLT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`LT_REVISION=$INTERFACE_AGELT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`dnl Detect the canonical host and target build environmentAC_CANONICAL_HOSTAC_CANONICAL_TARGETAC_SUBST(LT_RELEASE)AC_SUBST(LT_CURRENT)AC_SUBST(LT_REVISION)AC_SUBST(LT_AGE)dnl Setup for automakeAM_INIT_AUTOMAKE(libfame, $VERSION)dnl Check for toolsAC_LIBTOOL_WIN32_DLLAM_PROG_LIBTOOLAC_PROG_MAKE_SETAC_PROG_CCAC_C_INLINEAC_C_CONSTAC_PROG_INSTALLdnl The alpha architecture needs special flags for binary portabilitycase "$target" in alpha*-*-linux*) if test x$ac_cv_prog_gcc = xyes; then CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall" fi ;; i386-*-*) if test x$ac_cv_prog_gcc = xyes; then CFLAGS="$CFLAGS -march=i386" fi ;; i486-*-*) if test x$ac_cv_prog_gcc = xyes; then CFLAGS="$CFLAGS -march=i486 -DHAS_BSWAP" fi ;; i?86-*-*) if test x$ac_cv_prog_gcc = xyes; then CFLAGS="$CFLAGS -march=i586 -DHAS_BSWAP" fi ;;esacdnl Set runtime shared library paths as needed case "$target" in *-*-linux*) FAME_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib" ;; *-*-freebsd*) FAME_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib" ;; *-*-solaris*) FAME_RLD_FLAGS="-R\${exec_prefix}/lib" ;;esacAC_SUBST(FAME_RLD_FLAGS)dnl See if we need to pass -lm for the math libraryAC_CHECK_LIB(m, sqrt, LIBS="$LIBS -lm")dnl Optimizeif test x$ac_cv_prog_gcc = xyes; then CFLAGS="$CFLAGS -Wall -fexpensive-optimizations -funroll-loops -ffast-math"dnl -fstrict-aliasing doesn't seem to be supported by gcc < 2.95 gcc_major_version=`$CC --version | \ sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gcc_minor_version=`$CC --version | \ sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gcc_micro_version=`$CC --version | \ sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` dnl ok, I must admit I don't know how to do or/and ;) if test $gcc_major_version -eq 2; then if test $gcc_minor_version -gt 94; then CFLAGS="$CFLAGS -fstrict-aliasing" fi fi if test $gcc_major_version -gt 2; then CFLAGS="$CFLAGS -fstrict-aliasing" fifidnl Check for debugging supportAC_ARG_ENABLE(debug,[ --enable-debug Include debugging support [default=no]], , enable_debug=no)if test x$enable_debug = xyes; then dnl See if electric fence is installed AC_CHECK_LIB(efence, malloc, LIBS="$LIBS -lefence")fidnl Check for profiling supportAC_ARG_ENABLE(profile,[ --enable-profile Include profiling support [default=no]], , enable_profile=no)if test x$enable_profile = xyes; then if test x$ac_cv_prog_gcc = xyes; then CFLAGS="$CFLAGS -pg" LIBS="$LIBS -pg" fifiif test x$enable_profile != xyes -a x$enable_debug != xyes; then if test x$ac_cv_prog_gcc = xyes; then CFLAGS="$CFLAGS -fomit-frame-pointer" fifidnl Check for MMX supportAC_ARG_ENABLE(mmx,[ --enable-mmx Enable MMX support [default=yes]], , enable_mmx=yes)if test x$enable_mmx = xyes; then if test x$ac_cv_prog_gcc = xyes; then enable_mmx=yes AC_MSG_CHECKING(for MMX support) AC_TRY_RUN([ main() { unsigned int flags = 0;#if defined(i386) && defined(__GNUC__) asm volatile ("push %%eax\n" "push %%ebx\n" "push %%ecx\n" "pushfl\n" "popl %%ecx\n" "movl %%ecx, %%edx\n" "xorl \$0x200000,%%edx\n" "pushl %%edx\n" "popfl\n" "pushfl\n" "popl %%edx\n" "xorl %%ecx, %%edx\n" "je 1f\n" "pushl %%ecx\n" "popfl\n" "movl \$1,%%eax\n" "cpuid\n" "1:\n" "pop %%ecx\n" "pop %%ebx\n" "pop %%eax\n" : "=d" (flags)); if(flags & (1 << 23)) { asm ("pxor %mm0, %mm0\n"); exit(0); }#endif exit(1); } ],[ have_mmx=yes ],[ have_mmx=no ],[ have_mmx=yes ]) if test x$have_mmx != xcross; then AC_MSG_RESULT($have_mmx) enable_mmx=$have_mmx else AC_MSG_RESULT(cross-compiling, assumed ok) enable_mmx=yes fi if test x$enable_mmx = xyes; then CFLAGS="$CFLAGS -DHAS_MMX" fi fifidnl Check for SSE supportAC_ARG_ENABLE(sse,[ --enable-sse Enable SSE support [default=no]], , enable_sse=no)if test x$enable_sse = xyes; then if test x$ac_cv_prog_gcc = xyes; then CFLAGS="$CFLAGS -DHAS_SSE" fifidnl Finally create all the generated filesAC_OUTPUT([libfame-configlibfame.speclibfame.m4Makefilesrc/Makefilesrc/fame_version.hdoc/Makefile])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -