summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index b627a676ec..e5dff11c71 100644
--- a/configure.in
+++ b/configure.in
@@ -165,6 +165,14 @@ alpha*)
;;
esac
+dnl activate some gcc specific optimizations for gcc >= 4
+if test "$GCC" = "yes"; then
+ GCC_MAJOR_VERSION=`$CC --version | $SED -n '1s/[[^0-9]]*\([[0-9]]\+\)\.[[0-9]]\+\..*/\1/;1p'`
+ if test $GCC_MAJOR_VERSION -ge 4; then
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ fi
+fi
+
case $host_alias in
*solaris*)
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"