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

📄 configure.in

📁 Apache官方在今天放出产品系列2.2的最新版本2.2.11的源码包 最流行的HTTP服务器软件之一
💻 IN
📖 第 1 页 / 共 5 页
字号:
dnl dnl Autoconf configuration file for APRdnl dnl Process this file with autoconf to produce a configure script.dnl Use ./buildconf to prepare build files and run autoconf for APR.AC_PREREQ(2.50)AC_INIT(build/apr_common.m4)AC_CONFIG_HEADER(include/arch/unix/apr_private.h)AC_CONFIG_AUX_DIR(build)dnl dnl Include our own M4 macros along with those for libtooldnl sinclude(build/apr_common.m4)sinclude(build/apr_network.m4)sinclude(build/apr_threads.m4)sinclude(build/apr_win32.m4)sinclude(build/apr_hints.m4)sinclude(build/libtool.m4)sinclude(build/ltsugar.m4)dnl Hard-coded inclusion at the tail end of apr_private.h:AH_BOTTOM([/* switch this on if we have a BeOS version below BONE */#if BEOS && !HAVE_BONE_VERSION#define BEOS_R5 1#else#define BEOS_BONE 1#endif/* * Include common private declarations. */#include "../apr_private_common.h"])dnl Save user-defined environment settings for later restorationdnlAPR_SAVE_THE_ENVIRONMENT(CPPFLAGS)APR_SAVE_THE_ENVIRONMENT(CFLAGS)APR_SAVE_THE_ENVIRONMENT(LDFLAGS)APR_SAVE_THE_ENVIRONMENT(LIBS)APR_SAVE_THE_ENVIRONMENT(INCLUDES)dnl Generate ./config.nice for reproducing runs of configurednlAPR_CONFIG_NICE(config.nice)AC_CANONICAL_SYSTEMecho "Configuring APR library"echo "Platform: $host"dnl Some initial steps for configuration.  We setup the default directorydnl and which files are to be configured.dnl Setup the directory macros now# Absolute source/build directoryapr_srcdir=`(cd $srcdir && pwd)`apr_builddir=`pwd`AC_SUBST(apr_srcdir)AC_SUBST(apr_builddir)if test "$apr_builddir" != "$apr_srcdir"; then  USE_VPATH=1  APR_CONFIG_LOCATION=buildelse  APR_CONFIG_LOCATION=sourcefiAC_SUBST(APR_CONFIG_LOCATION)# Libtool might need this symbol -- it must point to the location of# the generated libtool script (not necessarily the "top" build dir).#top_builddir="$apr_builddir"AC_SUBST(top_builddir)# Directory containing apr build macros, helpers, and make rules# NOTE: make rules (apr_rules.mk) will be in the builddir for vpath#apr_buildout=$apr_builddir/buildapr_builders=$apr_srcdir/buildAC_SUBST(apr_builders)MKDIR=$apr_builders/mkdir.shdnl Initialize mkdir -p functionality.APR_MKDIR_P_CHECK($apr_builders/mkdir.sh)# get our version informationget_version="$apr_builders/get-version.sh"version_hdr="$apr_srcdir/include/apr_version.h"APR_MAJOR_VERSION="`$get_version major $version_hdr APR`"APR_DOTTED_VERSION="`$get_version all $version_hdr APR`"AC_SUBST(APR_DOTTED_VERSION)AC_SUBST(APR_MAJOR_VERSION)echo "APR Version: ${APR_DOTTED_VERSION}"dnl Enable the layout handling code, then reparse the prefix-stylednl arguments due to autoconf being a PITA.APR_ENABLE_LAYOUT(apr)APR_PARSE_ARGUMENTSdnl Set optional CC hints here in case autoconf makes an inappropriate choice.dnl This allows us to suggest what the compiler should be, but stilldnl allows the user to override CC externally.APR_CC_HINTSdnl Do the various CC checks *before* preloading values. The preload codednl may need to use compiler characteristics to make decisions. This macrodnl can only be used once within a configure script, so this prevents adnl preload section from invoking the macro to get compiler info.AC_PROG_CCdnl PreloadAPR_PRELOADdnl These added to allow default directories to be used...DEFAULT_OSDIR="unix"echo "(Default will be ${DEFAULT_OSDIR})"apr_modules="file_io network_io threadproc misc locks time mmap shmem user memory atomic poll support random"dnl Checks for programs.AC_PROG_MAKE_SETAC_PROG_CPPAC_PROG_AWKAC_PROG_LN_SAC_PROG_RANLIBAC_PROG_INSTALLAC_CHECK_PROG(RM, rm, rm)AC_CHECK_PROG(AS, as, as)AC_CHECK_PROG(ASCPP, cpp, cpp)AC_CHECK_TOOL(AR, ar, ar)dnl Various OS checks that apparently set required flagsifdef([AC_USE_SYSTEM_EXTENSIONS], [AC_USE_SYSTEM_EXTENSIONS], [AC_AIXAC_MINIX])AC_ISC_POSIXAPR_EBCDICdnl this is our library nameAPR_LIBNAME="apr${libsuffix}"AC_SUBST(APR_LIBNAME)dnl prep libtooldnlecho "performing libtool configuration..."AC_ARG_ENABLE(experimental-libtool,[  --enable-experimental-libtool Use experimental custom libtool],  [experimental_libtool=$enableval],[experimental_libtool=no])case $host in*-os2*)    # Use a custom-made libtool replacement    echo "using aplibtool"    LIBTOOL="$srcdir/build/aplibtool"    gcc $CFLAGS $CPPFLAGS -o $LIBTOOL.exe $LIBTOOL.c    ;;*)    if test "x$LTFLAGS" = "x"; then        LTFLAGS='--silent'    fi    if test "$experimental_libtool" = "yes"; then        # Use a custom-made libtool replacement        echo "using jlibtool"        LIBTOOL="$apr_builddir/libtool"        LIBTOOL_SRC="$apr_srcdir/build/jlibtool.c"        $CC $CFLAGS $CPPFLAGS -o $LIBTOOL $LIBTOOL_SRC        eval `$apr_builddir/libtool --config | grep "^shlibpath_var=[[A-Z_]]*$"`        if test "x$shlibpath_var" = "x"; then            shlibpath_var=REPLACE_WITH_YOUR_SHLIBPATH_VAR        fi    else    dnl libtoolize requires that the following not be indentedAC_PROG_LIBTOOL        # get libtool's setting of shlibpath_var        eval `grep "^shlibpath_var=[[A-Z_]]*$" $apr_builddir/libtool`        if test "x$shlibpath_var" = "x"; then            shlibpath_var=REPLACE_WITH_YOUR_SHLIBPATH_VAR        fi    fi    ;;esacAC_ARG_WITH(installbuilddir, [  --with-installbuilddir=DIR location to store APR build files (defaults to '${datadir}/build')],  [ installbuilddir=$withval ], [ installbuilddir="${datadir}/build-${APR_MAJOR_VERSION}" ] )AC_SUBST(installbuilddir)AC_ARG_WITH(libtool, [  --without-libtool       avoid using libtool to link the library],  [ use_libtool=$withval ], [ use_libtool="yes" ] )if test "x$use_libtool" = "xyes"; then      lt_compile='$(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -o $@ -c $< && touch $@'      LT_VERSION="-version-info `$get_version libtool $version_hdr APR`"      link="\$(LIBTOOL) \$(LTFLAGS) --mode=link \$(LT_LDFLAGS) \$(COMPILE) \$(LT_VERSION) \$(ALL_LDFLAGS) -o \$@"      so_ext='lo'      lib_target='-rpath $(libdir) $(OBJECTS)'      export_lib_target='-rpath \$(libdir) \$(OBJECTS)'else      lt_compile='$(COMPILE) -o $@ -c $<'      link='$(AR) cr $(TARGET_LIB) $(OBJECTS); $(RANLIB) $(TARGET_LIB)'      so_ext='o'      lib_target=''      export_lib_target=''ficase $host in    *-solaris2*)        apr_platform_runtime_link_flag="-R"        ;;    *)        ;;esacAC_SUBST(lt_compile)AC_SUBST(link)AC_SUBST(so_ext)AC_SUBST(lib_target)AC_SUBST(export_lib_target)AC_SUBST(shlibpath_var)AC_SUBST(LTFLAGS)AC_SUBST(LT_LDFLAGS)AC_SUBST(LT_VERSION)dnl ----------------------------- Checks for compiler flagsnl=''echo "${nl}Check for compiler flags..."dnl AC_PROG_CC sets -g in CFLAGS (and -O2 for gcc) by default.dnl On OS/390 this causes the compiler to insert extra debuggerdnl hook instructions.  That's fine for debug/maintainer builds, not finednl otherwise.case $host in    *os390)        if test "$ac_test_CFLAGS" != set; then           APR_REMOVEFROM(CFLAGS,-g)        fi        ;;esacAC_ARG_ENABLE(debug,[  --enable-debug          Turn on debugging and compile time warnings],  [APR_ADDTO(CFLAGS,-g)   if test "$GCC" = "yes"; then     APR_ADDTO(CFLAGS,-Wall)   elif test "$AIX_XLC" = "yes"; then     APR_ADDTO(CFLAGS,-qfullpath)   fi])dnlAC_ARG_ENABLE(maintainer-mode,[  --enable-maintainer-mode  Turn on debugging and compile time warnings],  [APR_ADDTO(CFLAGS,-g)   if test "$GCC" = "yes"; then     APR_ADDTO(CFLAGS,[-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations])   elif test "$AIX_XLC" = "yes"; then     APR_ADDTO(CFLAGS,-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro)   fi])dnlAC_ARG_ENABLE(profile,[  --enable-profile        Turn on profiling for the build (GCC)],  if test "$GCC" = "yes"; then    APR_ADDTO(CFLAGS, -pg)    APR_REMOVEFROM(CFLAGS, -g)    if test "$host" = "i586-pc-beos"; then        APR_REMOVEFROM(CFLAGS, -O2)        APR_ADDTO(CFLAGS, -O1)        APR_ADDTO(LDFLAGS, -p)    fi  fi)dnlAC_ARG_ENABLE(pool-debug,  [  --enable-pool-debug[[=yes|no|verbose|verbose-alloc|lifetime|owner|all]]    Turn on pools debugging],  [ if test -z "$enableval"; then        APR_ADDTO(CPPFLAGS, -DAPR_POOL_DEBUG=1)    elif test ! "$enableval" = "no"; then        apr_pool_debug=1            for i in $enableval        do            flag=0                    case $i in            yes)                flag=1                ;;            verbose)                flag=2                ;;            lifetime)                flag=4                ;;            owner)                flag=8                ;;            verbose-alloc)                flag=16                ;;            all)                apr_pool_debug=31                ;;            *)                ;;            esac            if test $flag -gt 0; then                apr_pool_debug=`expr '(' $apr_pool_debug - $apr_pool_debug % \                    '(' $flag '*' 2 ')' ')' + $flag + $apr_pool_debug % $flag`            fi        done              APR_ADDTO(CPPFLAGS, -DAPR_POOL_DEBUG=$apr_pool_debug)    fi  ])if test "$host" = "i586-pc-beos"; then  AC_ARG_ENABLE(malloc-debug,[  --enable-malloc-debug   Switch on malloc_debug for BeOS],    APR_REMOVEFROM(CFLAGS, -O2)    APR_ADDTO(CPPFLAGS, -fcheck-memory-usage -D_KERNEL_MODE)  ) dnlfi# this is the place to put specific options for platform/compiler# combinationscase "$host:$CC" in    *-hp-hpux*:cc )	APR_ADDTO(CFLAGS,[-Ae +Z])	case $host in	  ia64-* )	    ;;          * )	    if echo "$CFLAGS " | grep '+DA' >/dev/null; then :	    else	      APR_ADDTO(CFLAGS,[+DAportable])	    fi 	    ;;        esac	;;    powerpc-*-beos:mwcc* )	APR_SETVAR(CPP,[mwcc -E])	APR_SETVAR(CC,mwcc)	APR_SETVAR(AR,ar)	;;esacAC_CACHE_CHECK([whether the compiler provides atomic builtins], [ap_cv_atomic_builtins],[AC_TRY_RUN([int main(){    unsigned long val = 1010, tmp, *mem = &val;    if (__sync_fetch_and_add(&val, 1010) != 1010 || val != 2020)        return 1;    tmp = val;    if (__sync_fetch_and_sub(mem, 1010) != tmp || val != 1010)        return 1;    if (__sync_sub_and_fetch(&val, 1010) != 0 || val != 0)        return 1;    tmp = 3030;    if (__sync_val_compare_and_swap(mem, 0, tmp) != 0 || val != tmp)        return 1;    if (__sync_lock_test_and_set(&val, 4040) != 3030)        return 1;    mem = &tmp;    if (__sync_val_compare_and_swap(&mem, &tmp, &val) != &tmp)        return 1;    __sync_synchronize();    if (mem != &val)        return 1;    return 0;}], [ap_cv_atomic_builtins=yes], [ap_cv_atomic_builtins=no], [ap_cv_atomic_builtins=no])])if test "$ap_cv_atomic_builtins" = "yes"; then    AC_DEFINE(HAVE_ATOMIC_BUILTINS, 1, [Define if compiler provides atomic builtins])ficase $host in    powerpc-405-*)        # The IBM ppc405cr processor has a bugged stwcx instruction.        AC_DEFINE(PPC405_ERRATA, 1, [Define on PowerPC 405 where errata 77 applies])        ;;    *)        ;;esacdnl Check the depend program we can useAPR_CHECK_DEPENDproc_mutex_is_global=0config_subdirs="none"INSTALL_SUBDIRS="none"OBJECTS_PLATFORM='$(OBJECTS_unix)'case $host in   i386-ibm-aix* | *-ibm-aix[[1-2]].* | *-ibm-aix3.* | *-ibm-aix4.1 | *-ibm-aix4.1.* | *-ibm-aix4.2 | *-ibm-aix4.2.*)       OSDIR="aix"       APR_ADDTO(LDFLAGS,-lld)       eolstr="\\n"       OBJECTS_PLATFORM='$(OBJECTS_aix)'       ;;   *-os2*)       APR_ADDTO(CPPFLAGS,-DOS2)       APR_ADDTO(CFLAGS,-Zmt)       AC_CHECK_LIB(bsd, random)       OSDIR="os2"       enable_threads="system_threads"       eolstr="\\r\\n"       file_as_socket="0"       proc_mutex_is_global=1       OBJECTS_PLATFORM='$(OBJECTS_os2)'       ;;   *beos*)       OSDIR="beos"       APR_ADDTO(CPPFLAGS,-DBEOS)       enable_threads="system_threads"       native_mmap_emul="1"       APR_CHECK_DEFINE(BONE_VERSION, sys/socket.h)       eolstr="\\n"       osver=`uname -r`       proc_mutex_is_global=1       OBJECTS_PLATFORM='$(OBJECTS_beos)'       case $osver in          5.0.4)             file_as_socket="1"             ;;          *)

⌨️ 快捷键说明

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