diff options
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 277 |
1 files changed, 0 insertions, 277 deletions
diff --git a/configure.in b/configure.in deleted file mode 100644 index 41fcfc534d00..000000000000 --- a/configure.in +++ /dev/null @@ -1,277 +0,0 @@ -dnl Autoconf file for Serf - -AC_PREREQ(2.50) -AC_INIT(context.c) - -AC_CONFIG_AUX_DIR(build) - -sinclude(build/apr_common.m4) -sinclude(build/find_apr.m4) - -AC_PREFIX_DEFAULT(/usr/local/serf) - -dnl Get the layout here, so we can pass the required variables to apr -APR_ENABLE_LAYOUT(Serf, []) - -dnl reparse the configure arguments. -APR_PARSE_ARGUMENTS - -APR_SAVE_THE_ENVIRONMENT(CPPFLAGS) -APR_SAVE_THE_ENVIRONMENT(CFLAGS) -APR_SAVE_THE_ENVIRONMENT(CXXFLAGS) -APR_SAVE_THE_ENVIRONMENT(LDFLAGS) -APR_SAVE_THE_ENVIRONMENT(LIBS) -APR_SAVE_THE_ENVIRONMENT(INCLUDES) - -APR_CONFIG_NICE(config.nice) - -nl=' -' -dnl Check that mkdir -p works -APR_MKDIR_P_CHECK($top_srcdir/build/mkdir.sh) -AC_SUBST(mkdir_p) - -dnl ## Run configure for packages Apache uses - -dnl shared library support for these packages doesn't currently -dnl work on some platforms - -AC_CANONICAL_SYSTEM - -orig_prefix="$prefix" - -echo $ac_n "${nl}Configuring Apache Portable Runtime library...${nl}" - -APR_FIND_APR("$srcdir/apr", "./apr", 1, 0 1 2) - -if test "$apr_found" = "no"; then - AC_MSG_ERROR([APR not found. Please read the documentation.]) -fi - -if test "$apr_found" = "reconfig"; then - APR_SUBDIR_CONFIG(apr, - [--prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir --datadir=$datadir --with-installbuilddir=$installbuilddir], - [--enable-layout=*|\'--enable-layout=*]) - dnl We must be the first to build and the last to be cleaned - SERF_BUILD_SRCLIB_DIRS="apr $SERF_BUILD_SRCLIB_DIRS" - SERF_CLEAN_SRCLIB_DIRS="$SERF_CLEAN_SRCLIB_DIRS apr" -fi - -APR_SETIFNULL(CC, `$apr_config --cc`) -APR_SETIFNULL(CPP, `$apr_config --cpp`) -APR_SETIFNULL(APR_LIBTOOL, `$apr_config --apr-libtool`) -APR_ADDTO(CFLAGS, `$apr_config --cflags`) -APR_ADDTO(CPPFLAGS, `$apr_config --cppflags`) -APR_ADDTO(LDFLAGS, `$apr_config --ldflags`) -SHLIBPATH_VAR=`$apr_config --shlib-path-var` -APR_BINDIR=`$apr_config --bindir` -APR_INCLUDES=`$apr_config --includes` -APR_VERSION=`$apr_config --version` -APR_CONFIG="$apr_config" - -APR_SETIFNULL(LTFLAGS, "--silent") -AC_SUBST(LTFLAGS) - -AC_SUBST(APR_LIBTOOL) -AC_SUBST(APR_BINDIR) -AC_SUBST(APR_INCLUDES) -AC_SUBST(APR_VERSION) -AC_SUBST(APR_CONFIG) - -APR_VERSION_MAJOR="`echo \"$APR_VERSION\" | sed 's,\..*,,'`" -APR_VERSION_NUM="`echo \"$APR_VERSION\" | \ - sed -e 's/[[^0-9\.]].*$//' \ - -e 's/\.\([[0-9]]\)$/.0\1/' \ - -e 's/\.\([[0-9]][[0-9]]\)$/.0\1/' \ - -e 's/\.\([[0-9]]\)\./0\1/; s/\.//g;'`" - -if test "$APR_VERSION_NUM" -ge "200000"; then - - APU_BINDIR="" - APU_INCLUDES="" - APU_VERSION="" - APU_CONFIG="" - -else - sinclude(build/find_apu.m4) - - echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}" - - ifdef([APR_FIND_APU], [ - APR_FIND_APU("$srcdir/apr-util", "./apr-util", 1, $APR_VERSION_MAJOR) - ], [AC_MSG_ERROR([APR-util required, but find_apu.m4 not present!])]) - - if test "$apu_found" = "no"; then - AC_MSG_ERROR([APR-util not found. Please read the documentation.]) - fi - - # Catch some misconfigurations: - case ${apr_found}.${apu_found} in - reconfig.yes) - AC_MSG_ERROR([Cannot use an external APR-util with the bundled APR]) - ;; - yes.reconfig) - AC_MSG_ERROR([Cannot use an external APR with the bundled APR-util]) - ;; - esac - - if test "$apu_found" = "reconfig"; then - APR_SUBDIR_CONFIG(apr-util, - [--with-apr=../apr --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir], - [--enable-layout=*|\'--enable-layout=*]) - dnl We must be the last to build and the first to be cleaned - SERF_BUILD_SRCLIB_DIRS="$SERF_BUILD_SRCLIB_DIRS apr-util" - SERF_CLEAN_SRCLIB_DIRS="apr-util $SERF_CLEAN_SRCLIB_DIRS" - fi - - APR_ADDTO(LDFLAGS, `$apu_config --ldflags`) - APU_BINDIR=`$apu_config --bindir` - APU_INCLUDES=`$apu_config --includes` - APU_VERSION=`$apu_config --version` - APU_CONFIG="$APU_BINDIR/apu-`echo ${APU_VERSION} | sed 's,\..*,,'`-config" -fi - -AC_SUBST(APU_BINDIR) -AC_SUBST(APU_INCLUDES) -AC_SUBST(APU_VERSION) -AC_SUBST(APU_CONFIG) - -dnl In case we picked up CC and CPP from APR, get that info into the -dnl config cache so that PCRE uses it. Otherwise, CC and CPP used for -dnl PCRE and for our config tests will be whatever PCRE determines. -AC_PROG_CC -AC_PROG_CPP -AC_PROG_INSTALL - -if test "x${cache_file}" = "x/dev/null"; then - # Likewise, ensure that CC and CPP are passed through to the pcre - # configure script iff caching is disabled (the autoconf 2.5x default). - export CC; export CPP -fi - -echo $ac_n "Configuring Serf...${nl}" - -dnl Absolute source/build directory -abs_srcdir=`(cd $srcdir && pwd)` -abs_builddir=`pwd` - -dnl get our version information -get_version="$abs_srcdir/build/get-version.sh" -version_hdr="$abs_srcdir/serf.h" -SERF_MAJOR_VERSION="`$get_version major $version_hdr SERF`" -SERF_DOTTED_VERSION="`$get_version all $version_hdr SERF`" - -AC_SUBST(SERF_MAJOR_VERSION) -AC_SUBST(SERF_DOTTED_VERSION) - -AC_SUBST(SERF_BUILD_SRCLIB_DIRS) -AC_SUBST(SERF_CLEAN_SRCLIB_DIRS) - -AC_ARG_WITH(openssl, - APR_HELP_STRING([--with-openssl=PATH],[Path to OpenSSL (eg. /usr/local/ssl)]), -[ - if test "$withval" = "yes"; then - AC_MSG_ERROR([--with-openssl requires a path]) - else - openssl_prefix=$withval - - if test "x$openssl_prefix" != "x" -a ! -d "$openssl_prefix"; then - AC_MSG_ERROR('--with-openssl requires a path to a directory') - fi - - APR_ADDTO(CPPFLAGS, "-I${openssl_prefix}/include") - if test -e "${openssl_prefix}/Makefile"; then - APR_ADDTO(LDFLAGS, "-L${openssl_prefix}") - APR_ADDTO(LDFLAGS, "-R${openssl_prefix}") - else - APR_ADDTO(LDFLAGS, "-L${openssl_prefix}/lib") - APR_ADDTO(LDFLAGS, "-R${openssl_prefix}/lib") - fi - fi -]) - -dnl Look for OpenSSL -AC_CHECK_HEADER([openssl/opensslv.h], [], - [AC_MSG_ERROR([We require OpenSSL; try --with-openssl])]) - -dnl Look for Kerberos 5 for GSSAPI -AC_ARG_WITH(gssapi, - APR_HELP_STRING([--with-gssapi=PATH],[build with GSSAPI support; needs krb5-config in PATH/bin (eg. /usr/lib/mit)]), -[ - if test "$withval" = "yes"; then - AC_MSG_ERROR([--with-gssapi requires a path]) - else - gssapi_prefix=$withval/ - - if test "x$gssapi_prefix" != "x" -a ! -d "$gssapi_prefix"; then - AC_MSG_ERROR('--with-gssapi requires a path to a directory') - fi - AC_MSG_CHECKING([for krb5-config]) - if test -x "$gssapi_prefix/bin/krb5-config"; then - krb5conf=$gssapi_prefix/bin/krb5-config - AC_MSG_RESULT([$krb5conf]) - AC_MSG_CHECKING([for gssapi support in krb5-config]) - if "$krb5conf" | grep gssapi > /dev/null; then - AC_MSG_RESULT([yes]) - GSSAPI_confopts=gssapi - else - AC_MSG_RESULT([no]) - GSSAPI_confopts= - fi - GSSAPI_cflags=`"$krb5conf" --cflags $GSSAPI_confopts` - GSSAPI_libs=`"$krb5conf" --libs $GSSAPI_confopts` - if test -z "$GSSAPI_confopts"; then - case "${host_os}" in - solaris*) - GSSAPI_cflags="$GSSAPI_cflags -I/usr/include/gssapi" - GSSAPI_libs="$GSSAPI_libs -lgss" - ;; - esac - fi - APR_ADDTO(CFLAGS, "$GSSAPI_cflags") - APR_ADDTO(CFLAGS, [-DSERF_HAVE_GSSAPI]) - APR_ADDTO(LDFLAGS, "$GSSAPI_libs") - AC_MSG_CHECKING([if gssapi works]) - AC_LINK_IFELSE([AC_LANG_SOURCE([[ -#include <gssapi.h> -int main() -{gss_init_sec_context(NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL);}]])], - lib_gssapi="yes", lib_gssapi="no") - if test "$lib_gssapi" = "yes"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - AC_MSG_ERROR([cannot find GSSAPI (Kerberos)]) - fi - else - AC_MSG_RESULT([no]) - AC_MSG_WARN([--with-gssapi specified but krb5-config not found]) - fi - - fi -]) - - -dnl CuTest requires libm on Solaris -AC_SEARCH_LIBS(fabs, m) - -libs="" -if test -n "$apu_config"; then - APR_ADDTO(libs, [`$apu_config --link-libtool --libs`]) -fi -APR_ADDTO(libs, [`$apr_config --link-libtool --libs` $LIBS]) - -APR_ADDTO(SERF_LIBS, [$libs]) -AC_SUBST(SERF_LIBS) - -APR_RESTORE_THE_ENVIRONMENT(CPPFLAGS, EXTRA_) -APR_RESTORE_THE_ENVIRONMENT(CFLAGS, EXTRA_) -APR_RESTORE_THE_ENVIRONMENT(CXXFLAGS, EXTRA_) -APR_RESTORE_THE_ENVIRONMENT(LDFLAGS, EXTRA_) -APR_RESTORE_THE_ENVIRONMENT(LIBS, EXTRA_) -APR_RESTORE_THE_ENVIRONMENT(INCLUDES, EXTRA_) - -AC_CONFIG_FILES([Makefile serf.pc]) -AC_CONFIG_COMMANDS([mkdir-vpath],[make mkdir-vpath]) - -AC_OUTPUT |
