summaryrefslogtreecommitdiff
path: root/m4/cares-confopts.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/cares-confopts.m4')
-rw-r--r--m4/cares-confopts.m422
1 files changed, 12 insertions, 10 deletions
diff --git a/m4/cares-confopts.m4 b/m4/cares-confopts.m4
index f2ab45f..9d12a9b 100644
--- a/m4/cares-confopts.m4
+++ b/m4/cares-confopts.m4
@@ -1,7 +1,6 @@
#***************************************************************************
-# $Id$
#
-# Copyright (C) 2008 - 2010 by Daniel Stenberg et al
+# Copyright (C) 2008 - 2013 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
@@ -16,7 +15,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 9
+# serial 11
dnl CARES_CHECK_OPTION_CURLDEBUG
@@ -67,7 +66,7 @@ dnl variable want_debug value as appropriate.
AC_DEFUN([CARES_CHECK_OPTION_DEBUG], [
AC_BEFORE([$0],[CARES_CHECK_OPTION_WARNINGS])dnl
AC_BEFORE([$0],[CARES_CHECK_OPTION_CURLDEBUG])dnl
- AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
AC_MSG_CHECKING([whether to enable debug build options])
OPT_DEBUG_BUILD="default"
AC_ARG_ENABLE(debug,
@@ -132,7 +131,7 @@ dnl shell variable want_optimize value as appropriate.
AC_DEFUN([CARES_CHECK_OPTION_OPTIMIZE], [
AC_REQUIRE([CARES_CHECK_OPTION_DEBUG])dnl
- AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
AC_MSG_CHECKING([whether to enable compiler optimizer])
OPT_COMPILER_OPTIMIZE="default"
AC_ARG_ENABLE(optimize,
@@ -229,7 +228,7 @@ dnl shell variable want_warnings as appropriate.
AC_DEFUN([CARES_CHECK_OPTION_WARNINGS], [
AC_REQUIRE([CARES_CHECK_OPTION_DEBUG])dnl
AC_BEFORE([$0],[CARES_CHECK_OPTION_WERROR])dnl
- AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl
+ AC_BEFORE([$0],[XC_CHECK_PROG_CC])dnl
AC_MSG_CHECKING([whether to enable strict compiler warnings])
OPT_COMPILER_WARNINGS="default"
AC_ARG_ENABLE(warnings,
@@ -330,23 +329,26 @@ dnl -------------------------------------------------
dnl Depending on --enable-symbol-hiding or --disable-symbol-hiding
dnl configure option, and compiler capability to actually honor such
dnl option, this will modify compiler flags as appropriate and also
-dnl provide needed definitions for configuration file.
+dnl provide needed definitions for configuration and Makefile.am files.
dnl This macro should not be used until all compilation tests have
dnl been done to prevent interferences on other tests.
AC_DEFUN([CARES_CONFIGURE_SYMBOL_HIDING], [
AC_MSG_CHECKING([whether hiding of library internal symbols will actually happen])
+ CFLAG_CARES_SYMBOL_HIDING=""
+ doing_symbol_hiding="no"
if test x"$ac_cv_native_windows" != "xyes" &&
test "$want_symbol_hiding" = "yes" &&
test "$supports_symbol_hiding" = "yes"; then
- CFLAGS="$CFLAGS $symbol_hiding_CFLAGS"
- AC_DEFINE_UNQUOTED(CARES_SYMBOL_HIDING, 1,
- [Define to 1 to enable hiding of library internal symbols.])
+ doing_symbol_hiding="yes"
+ CFLAG_CARES_SYMBOL_HIDING="$symbol_hiding_CFLAGS"
AC_DEFINE_UNQUOTED(CARES_SYMBOL_SCOPE_EXTERN, $symbol_hiding_EXTERN,
[Definition to make a library symbol externally visible.])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
+ AM_CONDITIONAL(DOING_CARES_SYMBOL_HIDING, test x$doing_symbol_hiding = xyes)
+ AC_SUBST(CFLAG_CARES_SYMBOL_HIDING)
])