summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2006-06-12 20:33:04 +0000
committerDan Fandrich <dan@coneharvesters.com>2006-06-12 20:33:04 +0000
commit59582a9d9dccada1cdc492168e089dc91f17b4fe (patch)
tree4ba936dc78db87eb7859223ab4daa4fc7320eec6 /configure.ac
parent6246bbc6563eb328ee34df81bf99e95723dbea5e (diff)
downloadcurl-59582a9d9dccada1cdc492168e089dc91f17b4fe.tar.gz
Implemented --enable-hidden-symbols configure option to enable
-fvisibility=hidden on gcc >= 4.0. This reduces the size of the libcurl binary and speeds up dynamic linking by hiding all the internal symbols from the symbol table.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 41ebf6000..bb44612cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1954,6 +1954,29 @@ AC_HELP_STRING([--disable-cookies],[Disable cookies support]),
AC_MSG_RESULT(yes)
)
+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
+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([--disable-hidden-symbols],[Leave all symbols with default visibility in library]),
+[ case "$enableval" in
+ no)
+ AC_MSG_RESULT(no)
+ ;;
+ *) AC_MSG_RESULT(yes)
+ AC_DEFINE(CURL_HIDDEN_SYMBOLS, 1, [to enable hidden symbols])
+ AC_SUBST(CURL_HIDDEN_SYMBOLS)
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ ;;
+ esac ],
+ AC_MSG_RESULT(no)
+)
+
+dnl ************************************************************
if test "x$ws2" = "xyes"; then
dnl If ws2_32 is wanted, make sure it is the _last_ lib in LIBS (makes