summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2006-07-11 21:35:35 +0000
committerDan Fandrich <dan@coneharvesters.com>2006-07-11 21:35:35 +0000
commit10489879f731465f3d2105870e7533c2b355af5d (patch)
tree2a2050a14281dc1f3c96b70f5d4c9a0f596ad3f4 /configure.ac
parentfe22872d14c3b6b63ac27a9017ed9695ac3b932b (diff)
downloadcurl-10489879f731465f3d2105870e7533c2b355af5d.tar.gz
Enable --enable-hidden-symbols for SunPro C
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 17 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index c5486a387..55a442f31 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1962,29 +1962,42 @@ AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
dnl ************************************************************
dnl Enable hiding of internal symbols in library to reduce its size and
dnl speed dynamic linking of applications. This currently is only supported
-dnl on gcc >= 4.0
+dnl on gcc >= 4.0 and SunPro C.
dnl
AC_MSG_CHECKING([whether to enable hidden symbols in the library])
AC_ARG_ENABLE(hidden-symbols,
-AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library (gcc>=4)])
+AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library])
AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibility in library]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
;;
*)
+ AC_MSG_CHECKING([whether $CC supports it])
if test "$GCC" = yes ; then
- AC_MSG_CHECKING([whether $CC supports it])
if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
AC_MSG_RESULT(yes)
AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
AC_SUBST(CURL_HIDDEN_SYMBOLS)
+ AC_DEFINE(CURL_EXTERN_SYMBOL, [__attribute__ ((visibility ("default")))], [to make a symbol visible])
+ AC_SUBST(CURL_EXTERN_SYMBOL)
CFLAGS="$CFLAGS -fvisibility=hidden"
else
AC_MSG_RESULT(no)
fi
+
else
- AC_MSG_RESULT([no (not gcc)])
+ dnl Test for SunPro cc
+ if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
+ AC_SUBST(CURL_HIDDEN_SYMBOLS)
+ AC_DEFINE(CURL_EXTERN_SYMBOL, [__global], [to make a symbol visible])
+ AC_SUBST(CURL_EXTERN_SYMBOL)
+ CFLAGS="$CFLAGS -xldscope=hidden"
+ else
+ AC_MSG_RESULT(no)
+ fi
fi
;;
esac ],