Subject: c-ares 1.5.3 build issues/resolutions

c-ares 1.5.3 build issues/resolutions

From: Brad House <brad_at_mainstreetsoftworks.com>
Date: Fri, 26 Sep 2008 17:45:29 -0400

In configure.ac:

It appears as though a manual check for AR is being performed
which is infact causing issues if you want to use a different AR
than exists in your path, it's always overwriting it without ever
checking for the variable to have already been set. I'm not sure
why this check is being performed as it is one of the standard
checks autoconf does already, and in a more sane manner, I'd
suggest removing that block of code.

Then, similar checks are being done for GREP, EGREP, and SED,
you should instead use the AC_PROG_GREP, AC_PROG_EGREP,
and AC_PROG_SED macros as per:
http://www.gnu.org/software/automake/manual/autoconf/Particular-Programs.html

I've attached the relevant patch.

-Brad

Index: configure.ac
===================================================================
RCS file: /cvsroot/curl/curl/ares/configure.ac,v
retrieving revision 1.129
diff -u -r1.129 configure.ac
--- configure.ac 24 Sep 2008 19:13:02 -0000 1.129
+++ configure.ac 26 Sep 2008 21:44:14 -0000
@@ -8,47 +8,9 @@
 AM_CONFIG_HEADER([config.h])
 AM_MAINTAINER_MODE
 
-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],
- [$PATH:/usr/bin:/usr/local/bin])
-if test -z "$SED" || test "$SED" = "not_found"; then
- AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
-fi
-AC_SUBST([SED])
-
-dnl GREP is mandatory for configure process and libtool.
-dnl Set it now, allowing it to be changed later.
-AC_PATH_PROG([GREP], [grep], [not_found],
- [$PATH:/usr/bin:/usr/local/bin])
-if test -z "$GREP" || test "$GREP" = "not_found"; then
- AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
-fi
-AC_SUBST([GREP])
-
-dnl EGREP is mandatory for configure process and libtool.
-dnl Set it now, allowing it to be changed later.
-if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
- AC_MSG_CHECKING([for egrep])
- EGREP="$GREP -E"
- AC_MSG_RESULT([$EGREP])
-else
- AC_PATH_PROG([EGREP], [egrep], [not_found],
- [$PATH:/usr/bin:/usr/local/bin])
-fi
-if test -z "$EGREP" || test "$EGREP" = "not_found"; then
- AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
-fi
-AC_SUBST([EGREP])
-
-dnl AR is mandatory for configure process and libtool.
-dnl This is target dependant, so check it as a tool.
-AC_PATH_TOOL([AR], [ar], [not_found],
- [$PATH:/usr/bin:/usr/local/bin])
-if test -z "$AR" || test "$AR" = "not_found"; then
- AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
-fi
-AC_SUBST([AR])
+AC_PROG_SED
+AC_PROG_GREP
+AC_PROG_EGREP
 
 dnl Fetch c-ares version from ares_version.h
 VERSION=`$SED -ne 's/^#define ARES_VERSION_STR "\(.*\)"/\1/p' ${srcdir}/ares_version.h`
Received on 2008-09-26