configure.in
branchstable-1.0
changeset 769 c9ff41dec8fa
parent 750 1a9776396bb6
child 966 816a83f04a27
--- a/configure.in	Sun Jan 01 12:31:34 2006 +0000
+++ b/configure.in	Thu Mar 23 06:49:01 2006 +0000
@@ -68,18 +68,39 @@
                 , enable_debug=no)
 if test x$enable_debug = xyes; then
   if test x$ac_cv_prog_cc_g = xyes; then
-    PHYSFSCFLAGS="-g -O0"
+    PHYSFSCFLAGS="$PHYSFSCFLAGS -g -O0"
   else
-    PHYSFSCFLAGS="-O0"
+    PHYSFSCFLAGS="$PHYSFSCFLAGS -O0"
   fi
   PHYSFSCFLAGS="$PHYSFSCFLAGS -Werror -Wall"
   AC_DEFINE([DEBUG], 1, [define if debug build is enabled])
   AC_DEFINE([DEBUG_CHATTER], 1, [define if debug chatter is enabled])
 else
-  PHYSFSCFLAGS="-O2"
+  PHYSFSCFLAGS="$PHYSFSCFLAGS -O2"
   AC_DEFINE([NDEBUG], 1, [define if debug build is disabled])
 fi
 
+dnl ---------------------------------------------------------------------
+dnl Have GCC's -fvisibility option?
+dnl ---------------------------------------------------------------------
+AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
+have_gcc_fvisibility=no
+visibility_CFLAGS="-fvisibility=hidden"
+save_CFLAGS="$CFLAGS"
+CFLAGS="$save_CFLAGS $visibility_CFLAGS"
+AC_TRY_COMPILE([
+int placeholder = 1;
+],[
+],[
+have_gcc_fvisibility=yes
+])
+AC_MSG_RESULT($have_gcc_fvisibility)
+CFLAGS="$save_CFLAGS"
+
+if test x$have_gcc_fvisibility = xyes; then
+    PHYSFSCFLAGS="$PHYSFSCFLAGS $visibility_CFLAGS"
+fi
+
 
 dnl ---------------------------------------------------------------------
 dnl Profile sorts, etc?