aboutsummaryrefslogtreecommitdiff
path: root/ares/configure.ac
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-10-28 19:45:26 +0000
committerYang Tse <yangsita@gmail.com>2009-10-28 19:45:26 +0000
commit0d9f14f5c17e4a3888dedbc8d568a55979fc05f0 (patch)
tree876a88fbc370edca79dbd0a0ea3eef31a550a6ad /ares/configure.ac
parent9fced16efb544dc37fe54b8ed94622ed22dd55be (diff)
Initial step towards the ability to reduce c-ares exported symbols
based on the 'visibility' attribute for GNUC and __global for Sun compilers, taking also in account __declspec function decoration for Win32 and Symbian DLL's. Introducing configure options --enable-hidden-symbols and --disable-hidden-symbols following libcurl's naming.
Diffstat (limited to 'ares/configure.ac')
-rw-r--r--ares/configure.ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/ares/configure.ac b/ares/configure.ac
index 42ccd496d..92db52eb0 100644
--- a/ares/configure.ac
+++ b/ares/configure.ac
@@ -14,6 +14,7 @@ CARES_CHECK_OPTION_DEBUG
CARES_CHECK_OPTION_OPTIMIZE
CARES_CHECK_OPTION_WARNINGS
CARES_CHECK_OPTION_CURLDEBUG
+CARES_CHECK_OPTION_HIDDEN_SYMBOLS
CARES_CHECK_PATH_SEPARATOR_REQUIRED
@@ -110,6 +111,25 @@ esac
dnl libtool setup
AC_PROG_LIBTOOL
+AC_MSG_CHECKING([if we need CARES_BUILDING_LIB])
+case $host in
+ *-*-mingw*)
+ AC_DEFINE(CARES_BUILDING_LIB, 1, [when building c-ares library])
+ AC_MSG_RESULT(yes)
+ AC_MSG_CHECKING([if we need CARES_STATICLIB])
+ if test "X$enable_shared" = "Xno"
+ then
+ AC_DEFINE(CARES_STATICLIB, 1, [when not building a shared library])
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT(no)
+ ;;
+esac
+
dnl **********************************************************************
dnl platform/compiler/architecture specific checks/flags
dnl **********************************************************************
@@ -144,6 +164,7 @@ esac
CARES_CHECK_COMPILER_HALT_ON_ERROR
CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
+CARES_CHECK_COMPILER_HIDDEN_SYMBOLS
CARES_CHECK_NO_UNDEFINED
AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
@@ -876,6 +897,8 @@ fi
CARES_CHECK_OPTION_NONBLOCKING
CARES_CHECK_NONBLOCKING_SOCKET
+CARES_CONFIGURE_HIDDEN_SYMBOLS
+
CARES_PRIVATE_LIBS="$LIBS"
AC_SUBST(CARES_PRIVATE_LIBS)