summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2013-01-23 16:54:33 +0100
committerYang Tse <yangsita@gmail.com>2013-01-23 18:20:33 +0100
commit14e78ad68b50cd472f0e9ce22c1dd9618e2109d6 (patch)
treeba5bafa9d777b63281875bb6093099ed4540a71b
parentb74bcad7144f23330f66c82ee608b09adcd02f7c (diff)
downloadc-ares-14e78ad68b50cd472f0e9ce22c1dd9618e2109d6.tar.gz
c-ares-14e78ad68b50cd472f0e9ce22c1dd9618e2109d6.tar.bz2
c-ares-14e78ad68b50cd472f0e9ce22c1dd9618e2109d6.zip
configure: use XC_CONFIGURE_PREAMBLE early checks
Some basic checks we make were placed early enough in generated configure script when using autoconf 2.5X versions. Newer autoconf versions expand these checks much further into the configure script, rendering them useless. Using XC_CONFIGURE_PREAMBLE fixes placement of early intended checks across all our autoconf supported versions.
-rw-r--r--configure.ac3
-rw-r--r--m4/cares-override.m417
-rw-r--r--m4/cares-system.m483
3 files changed, 2 insertions, 101 deletions
diff --git a/configure.ac b/configure.ac
index 84aa300..d1bb8bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,6 +4,7 @@ dnl Version not hardcoded here. Fetched later from ares_version.h
AC_INIT([c-ares], [-],
[c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares])
+XC_OVR_ZZ40
XC_OVR_ZZ50
XC_OVR_ZZ60
CARES_OVERRIDE_AUTOCONF
@@ -20,8 +21,6 @@ CARES_CHECK_OPTION_WERROR
CARES_CHECK_OPTION_CURLDEBUG
CARES_CHECK_OPTION_SYMBOL_HIDING
-CARES_CHECK_PATH_SEPARATOR_REQUIRED
-
dnl SED is mandatory for configure process and libtool.
dnl Set it now, allowing it to be changed later.
AC_PATH_PROG([SED], [sed], [not_found],
diff --git a/m4/cares-override.m4 b/m4/cares-override.m4
index 524a926..c7400fc 100644
--- a/m4/cares-override.m4
+++ b/m4/cares-override.m4
@@ -2,7 +2,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 7
+# serial 8
dnl CARES_OVERRIDE_AUTOCONF
dnl -------------------------------------------------
@@ -74,18 +74,3 @@ choke me
#endif
], [return $1 ();])])
-dnl Override Autoconf's PATH_SEPARATOR check
-dnl -------------------------------------------------
-dnl This is done to ensure that the same check is
-dnl used across different Autoconf versions and to
-dnl allow us to use this macro early enough in the
-dnl configure script.
-
-m4_defun([_AS_PATH_SEPARATOR_PREPARE],
-[CARES_CHECK_PATH_SEPARATOR
-m4_define([$0],[])])
-
-m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
-[CARES_CHECK_PATH_SEPARATOR
-m4_define([$0],[])])
-
diff --git a/m4/cares-system.m4 b/m4/cares-system.m4
deleted file mode 100644
index f0adc89..0000000
--- a/m4/cares-system.m4
+++ /dev/null
@@ -1,83 +0,0 @@
-#***************************************************************************
-# $Id$
-#
-# Copyright (C) 2008 - 2009 by Daniel Stenberg et al
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted, provided
-# that the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
-#
-#***************************************************************************
-
-# File version for 'aclocal' use. Keep it a single number.
-# serial 3
-
-
-dnl CARES_CHECK_PATH_SEPARATOR
-dnl -------------------------------------------------
-dnl Check and compute the path separator for us. This
-dnl path separator is the symbol used to diferentiate
-dnl or separate paths inside the PATH environment var.
-
-AC_DEFUN([CARES_CHECK_PATH_SEPARATOR], [
- if test -z "$cares_cv_PATH_SEPARATOR"; then
- if test -z "$PATH"; then
- AC_MSG_ERROR([PATH not set. Cannot continue without PATH being set.])
- fi
- dnl Directory count in PATH when using a colon separator.
- tst_dirs_col=0
- tst_save_IFS=$IFS; IFS=':'
- for tst_dir in $PATH; do
- IFS=$tst_save_IFS
- test -d "$tst_dir" && tst_dirs_col=`expr $tst_dirs_col + 1`
- done
- IFS=$tst_save_IFS
- dnl Directory count in PATH when using a semicolon separator.
- tst_dirs_sem=0
- tst_save_IFS=$IFS; IFS=';'
- for tst_dir in $PATH; do
- IFS=$tst_save_IFS
- test -d "$tst_dir" && tst_dirs_sem=`expr $tst_dirs_sem + 1`
- done
- IFS=$tst_save_IFS
- if test $tst_dirs_sem -eq $tst_dirs_col; then
- dnl When both counting methods give the same result we do not want to
- dnl chose one over the other, and consider auto-detection not possible.
- if test -z "$PATH_SEPARATOR"; then
- dnl Stop dead until user provides PATH_SEPARATOR definition.
- AC_MSG_ERROR([PATH_SEPARATOR not set. Cannot continue without it.])
- fi
- else
- dnl Separator with the greater directory count is the auto-detected one.
- if test $tst_dirs_sem -gt $tst_dirs_col; then
- tst_auto_separator=';'
- else
- tst_auto_separator=':'
- fi
- if test -z "$PATH_SEPARATOR"; then
- dnl Simply use the auto-detected one when not already set.
- PATH_SEPARATOR="$tst_auto_separator"
- fi
- fi
- cares_cv_PATH_SEPARATOR="$PATH_SEPARATOR"
- fi
- AC_SUBST([PATH_SEPARATOR])
- AC_SUBST([PATH])
-])
-
-
-dnl CARES_CHECK_PATH_SEPARATOR_REQUIRED
-dnl -------------------------------------------------
-dnl Use this to ensure that the path separator check
-dnl macro is only expanded and included once.
-
-AC_DEFUN([CARES_CHECK_PATH_SEPARATOR_REQUIRED], [
- AC_REQUIRE([CARES_CHECK_PATH_SEPARATOR])dnl
-])
-