diff options
author | Yang Tse <yangsita@gmail.com> | 2009-10-28 19:45:26 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-10-28 19:45:26 +0000 |
commit | 9cac6a46259f102af306840720b3af64d4b8c12a (patch) | |
tree | 831c0f65a2f425dabd2f55bfc3903e06e5f72480 /configure.ac | |
parent | a732ace461891719d27f4ed1e2d8a0e8399e047e (diff) | |
download | c-ares-9cac6a46259f102af306840720b3af64d4b8c12a.tar.gz c-ares-9cac6a46259f102af306840720b3af64d4b8c12a.tar.bz2 c-ares-9cac6a46259f102af306840720b3af64d4b8c12a.zip |
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 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 42ccd49..92db52e 100644 --- a/configure.ac +++ b/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) |