From 80d4f1170c9ff0102abaae96205c74c21a74f82d Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 5 Jun 2009 13:17:55 +0000 Subject: [PATCH] c-ares' -no-undefined and --enable-curldebug adjustments --- m4/cares-compilers.m4 | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/m4/cares-compilers.m4 b/m4/cares-compilers.m4 index 09c59be..9c82948 100644 --- a/m4/cares-compilers.m4 +++ b/m4/cares-compilers.m4 @@ -16,7 +16,7 @@ #*************************************************************************** # File version for 'aclocal' use. Keep it a single number. -# serial 54 +# serial 55 dnl CARES_CHECK_COMPILER @@ -1077,8 +1077,10 @@ dnl Settings which depend on configure's curldebug given dnl option, and other additional configure pre-requisites. dnl Using the curl debug memory tracking feature in c-ares dnl is a hack that actually can only be used/enabled when -dnl c-ares is built as a static library directly in curl's -dnl CVS tree along with an equally configured libcurl. +dnl c-ares is built directly in curl's CVS tree, as a static +dnl library or as a shared one on those systems on which +dnl shared libraries support undefined symbols, along with +dnl an equally configured libcurl. AC_DEFUN([CARES_CHECK_CURLDEBUG], [ AC_REQUIRE([CARES_SHFUNC_SQUEEZE])dnl @@ -1146,6 +1148,7 @@ AC_DEFUN([CARES_CHECK_CURLDEBUG], [ fi # if test "$want_curldebug" = "yes"; then + dnl TODO: Verify if the BUILDING_LIBCURL definition is still required. AC_DEFINE(BUILDING_LIBCURL, 1, [when building as static part of libcurl]) CPPFLAGS="$CPPFLAGS -DCURLDEBUG" squeeze CPPFLAGS @@ -1155,13 +1158,18 @@ AC_DEFUN([CARES_CHECK_CURLDEBUG], [ dnl CARES_CHECK_NO_UNDEFINED dnl ------------------------------------------------- +dnl Checks if the -no-undefined flag must be used when +dnl building shared libraries. This is required on all +dnl systems on which shared libraries should not have +dnl references to undefined symbols. This check should +dnl not be done before AC-PROG-LIBTOOL. AC_DEFUN([CARES_CHECK_NO_UNDEFINED], [ AC_BEFORE([$0],[CARES_CHECK_CURLDEBUG])dnl - AC_MSG_CHECKING([if we need -no-undefined]) + AC_MSG_CHECKING([if shared libraries need -no-undefined]) need_no_undefined="no" case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc* | *-*-aix*) need_no_undefined="yes" ;; esac @@ -1170,11 +1178,6 @@ AC_DEFUN([CARES_CHECK_NO_UNDEFINED], [ elif test "x$allow_undefined_flag" = "xunsupported"; then need_no_undefined="yes" fi - case $compiler_id in - IBM_C | INTEL_UNIX_C | INTEL_WINDOWS_C | SUNPRO_C) - need_no_undefined="yes" - ;; - esac AC_MSG_RESULT($need_no_undefined) ]) -- 2.7.4