aboutsummaryrefslogtreecommitdiff
path: root/ares/m4/cares-confopts.m4
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-10-31 04:16:40 +0000
committerYang Tse <yangsita@gmail.com>2009-10-31 04:16:40 +0000
commitce6731baf186807eb8012afeb26c8a304ab8e3ad (patch)
treec64c07507f2395d1190f09d641ce41332b2468df /ares/m4/cares-confopts.m4
parent2c0b65d37b62e4a089d1816197126f5a3f36a09a (diff)
Symbol hiding configure options renamed to the hopefully less ambiguous
--enable-symbol-hiding and --disable-symbol-hiding as well as related macro names and some internal variables used for them. Related configuration file preprocessor symbols named to CARES_SYMBOL_HIDING and CARES_SYMBOL_SCOPE_EXTERN.
Diffstat (limited to 'ares/m4/cares-confopts.m4')
-rw-r--r--ares/m4/cares-confopts.m4104
1 files changed, 52 insertions, 52 deletions
diff --git a/ares/m4/cares-confopts.m4 b/ares/m4/cares-confopts.m4
index 241bb498e..438f9cdc7 100644
--- a/ares/m4/cares-confopts.m4
+++ b/ares/m4/cares-confopts.m4
@@ -16,7 +16,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 7
+# serial 8
dnl CARES_CHECK_OPTION_CURLDEBUG
@@ -92,46 +92,6 @@ AC_HELP_STRING([--disable-debug],[Disable debug build options]),
])
-dnl CARES_CHECK_OPTION_HIDDEN_SYMBOLS
-dnl -------------------------------------------------
-dnl Verify if configure has been invoked with option
-dnl --enable-hidden-symbols or --disable-hidden-symbols,
-dnl setting shell variable want_hidden_symbols value.
-
-AC_DEFUN([CARES_CHECK_OPTION_HIDDEN_SYMBOLS], [
- AC_BEFORE([$0],[CARES_CHECK_COMPILER_HIDDEN_SYMBOLS])dnl
- AC_MSG_CHECKING([whether to enable hiding symbols])
- OPT_HIDDEN_SYMBOLS="default"
- AC_ARG_ENABLE(hidden-symbols,
-AC_HELP_STRING([--enable-hidden-symbols],[Enable hiding of library internal symbols])
-AC_HELP_STRING([--disable-hidden-symbols],[Disable hiding of library internal symbols]),
- OPT_HIDDEN_SYMBOLS=$enableval)
- case "$OPT_HIDDEN_SYMBOLS" in
- no)
- dnl --disable-hidden-symbols option used.
- dnl This is an indication to not attempt hiding of library internal
- dnl symbols. Default symbol visibility will be used, which normally
- dnl exposes all library internal symbols.
- want_hidden_symbols="no"
- AC_MSG_RESULT([no])
- ;;
- default)
- dnl configure's hidden-symbols option not specified.
- dnl Handle this as if --enable-hidden-symbols option was given.
- want_hidden_symbols="yes"
- AC_MSG_RESULT([not specified (assuming yes)])
- ;;
- *)
- dnl --enable-hidden-symbols option used.
- dnl This is an indication to attempt hiding of library internal
- dnl symbols. This is only supported on some compilers/linkers.
- want_hidden_symbols="yes"
- AC_MSG_RESULT([yes])
- ;;
- esac
-])
-
-
dnl CARES_CHECK_OPTION_NONBLOCKING
dnl -------------------------------------------------
dnl Verify if configure has been invoked with option
@@ -220,6 +180,46 @@ AC_HELP_STRING([--disable-optimize],[Disable compiler optimizations]),
])
+dnl CARES_CHECK_OPTION_SYMBOL_HIDING
+dnl -------------------------------------------------
+dnl Verify if configure has been invoked with option
+dnl --enable-symbol-hiding or --disable-symbol-hiding,
+dnl setting shell variable want_symbol_hiding value.
+
+AC_DEFUN([CARES_CHECK_OPTION_SYMBOL_HIDING], [
+ AC_BEFORE([$0],[CARES_CHECK_COMPILER_SYMBOL_HIDING])dnl
+ AC_MSG_CHECKING([whether to enable hiding of library internal symbols])
+ OPT_SYMBOL_HIDING="default"
+ AC_ARG_ENABLE(symbol-hiding,
+AC_HELP_STRING([--enable-symbol-hiding],[Enable hiding of library internal symbols])
+AC_HELP_STRING([--disable-symbol-hiding],[Disable hiding of library internal symbols]),
+ OPT_SYMBOL_HIDING=$enableval)
+ case "$OPT_SYMBOL_HIDING" in
+ no)
+ dnl --disable-symbol-hiding option used.
+ dnl This is an indication to not attempt hiding of library internal
+ dnl symbols. Default symbol visibility will be used, which normally
+ dnl exposes all library internal symbols.
+ want_symbol_hiding="no"
+ AC_MSG_RESULT([no])
+ ;;
+ default)
+ dnl configure's symbol-hiding option not specified.
+ dnl Handle this as if --enable-symbol-hiding option was given.
+ want_symbol_hiding="yes"
+ AC_MSG_RESULT([yes])
+ ;;
+ *)
+ dnl --enable-symbol-hiding option used.
+ dnl This is an indication to attempt hiding of library internal
+ dnl symbols. This is only supported on some compilers/linkers.
+ want_symbol_hiding="yes"
+ AC_MSG_RESULT([yes])
+ ;;
+ esac
+])
+
+
dnl CARES_CHECK_OPTION_WARNINGS
dnl -------------------------------------------------
dnl Verify if configure has been invoked with option
@@ -293,24 +293,24 @@ AC_DEFUN([CARES_CHECK_NONBLOCKING_SOCKET], [
])
-dnl CARES_CONFIGURE_HIDDEN_SYMBOLS
+dnl CARES_CONFIGURE_SYMBOL_HIDING
dnl -------------------------------------------------
-dnl Depending on --enable-hidden-symbols or --disable-hidden-symbols
+dnl Depending on --enable-symbol-hiding or --disable-symbol-hiding
dnl configure option, and compiler capability to actually honor such
-dnl option, compiler flags will be modified as appropriate.
+dnl option, this will modify compiler flags as appropriate and also
+dnl provide needed definitions for configuration file.
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_HIDDEN_SYMBOLS], [
- AC_MSG_CHECKING([whether to actually hide library internal symbols])
+AC_DEFUN([CARES_CONFIGURE_SYMBOL_HIDING], [
+ AC_MSG_CHECKING([whether hiding of library internal symbols will actually happen])
if test x"$ac_cv_native_windows" != "xyes" &&
- test "$want_hidden_symbols" = "yes" &&
- test "$hidden_symbols_supported" = "yes"; then
- tmp_save_CFLAGS="$CFLAGS"
- CFLAGS="$tmp_save_CFLAGS $hidden_symbols_CFLAGS"
- AC_DEFINE_UNQUOTED(CARES_HIDDEN_SYMBOLS, 1,
+ 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.])
- AC_DEFINE_UNQUOTED(CARES_EXTERN_SYMBOL, $hidden_symbols_extern,
+ AC_DEFINE_UNQUOTED(CARES_SYMBOL_SCOPE_EXTERN, $symbol_hiding_EXTERN,
[Definition to make a library symbol externally visible.])
AC_MSG_RESULT([yes])
else