aboutsummaryrefslogtreecommitdiff
path: root/ares/m4
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-05-28 14:38:04 +0000
committerYang Tse <yangsita@gmail.com>2009-05-28 14:38:04 +0000
commit9418c56fd3cd5df42e5d6aeeadc7686be9c4e041 (patch)
treeff640cb044af468373720616d77c708341e3b712 /ares/m4
parent7dbd502931529ea962e38af23614052cfb59b45f (diff)
c-ares' --enable-curldebug adjustments
Diffstat (limited to 'ares/m4')
-rw-r--r--ares/m4/cares-compilers.m446
1 files changed, 33 insertions, 13 deletions
diff --git a/ares/m4/cares-compilers.m4 b/ares/m4/cares-compilers.m4
index 7a65028a5..09c59be01 100644
--- a/ares/m4/cares-compilers.m4
+++ b/ares/m4/cares-compilers.m4
@@ -16,7 +16,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 53
+# serial 54
dnl CARES_CHECK_COMPILER
@@ -24,6 +24,7 @@ dnl -------------------------------------------------
dnl Verify if the C compiler being used is known.
AC_DEFUN([CARES_CHECK_COMPILER], [
+ AC_BEFORE([$0],[CARES_CHECK_NO_UNDEFINED])dnl
#
compiler_id="unknown"
compiler_num="0"
@@ -1095,20 +1096,13 @@ AC_DEFUN([CARES_CHECK_CURLDEBUG], [
supports_curldebug="no"
fi
if test "$supports_curldebug" != "no"; then
- if test "$enable_shared" = "yes"; then
- if test "x$allow_undefined" = "xno"; then
- supports_curldebug="no"
- elif test "x$allow_undefined_flag" = "xunsupported"; then
- supports_curldebug="no"
- elif test "x$need_no_undefined" = "xyes"; then
- supports_curldebug="no"
- fi
- if test "$supports_curldebug" = "no"; then
- AC_MSG_WARN([shared library does not support undefined symbols.])
- fi
+ if test "$enable_shared" = "yes" &&
+ test "$need_no_undefined" = "yes"; then
+ supports_curldebug="no"
+ AC_MSG_WARN([shared library does not support undefined symbols.])
fi
if test ! -f "$srcdir/../include/curl/curlbuild.h.dist"; then
- AC_MSG_WARN([source not embedded in curl's CVS tree.])
+ AC_MSG_WARN([c-ares source not embedded in curl's CVS tree.])
supports_curldebug="no"
elif test ! -f "$srcdir/../include/curl/Makefile.in"; then
AC_MSG_WARN([curl's buildconf has not been run.])
@@ -1159,6 +1153,32 @@ AC_DEFUN([CARES_CHECK_CURLDEBUG], [
])
+dnl CARES_CHECK_NO_UNDEFINED
+dnl -------------------------------------------------
+
+AC_DEFUN([CARES_CHECK_NO_UNDEFINED], [
+ AC_BEFORE([$0],[CARES_CHECK_CURLDEBUG])dnl
+ AC_MSG_CHECKING([if we need -no-undefined])
+ need_no_undefined="no"
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ need_no_undefined="yes"
+ ;;
+ esac
+ if test "x$allow_undefined" = "xno"; then
+ need_no_undefined="yes"
+ 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)
+])
+
+
dnl CARES_CHECK_PROG_CC
dnl -------------------------------------------------
dnl Check for compiler program, preventing CFLAGS and