aboutsummaryrefslogtreecommitdiff
path: root/src/aclocal.m4
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2004-02-14 00:34:15 +0000
committerKen Raeburn <raeburn@mit.edu>2004-02-14 00:34:15 +0000
commitf2ba7f5c3a0a4a3eb6d4b3215f5b355d97e30f18 (patch)
treead016b0928d702d8a30a0ac6127e78ffee0c865f /src/aclocal.m4
parenta53d6ec4fcc7d0fe0a0fa2bd36b85ad390555283 (diff)
downloadkrb5-f2ba7f5c3a0a4a3eb6d4b3215f5b355d97e30f18.zip
krb5-f2ba7f5c3a0a4a3eb6d4b3215f5b355d97e30f18.tar.gz
krb5-f2ba7f5c3a0a4a3eb6d4b3215f5b355d97e30f18.tar.bz2
aclocal.m4 (WITH_CC): Add -fno-common to CFLAGS on Darwin, unless -fcommon or
-fno-common is already given. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16081 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/aclocal.m4')
-rw-r--r--src/aclocal.m416
1 files changed, 16 insertions, 0 deletions
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index 3418761..0bcefa3 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -485,6 +485,22 @@ if test "$GCC" = yes ; then
CFLAGS="$CFLAGS -pedantic"
fi
fi
+ if test "`uname -s`" = Darwin ; then
+ # Someday this should be a feature test.
+ # One current (Jaguar = OS 10.2) problem:
+ # Archive library with foo.o undef sym X and bar.o common sym X,
+ # if foo.o is pulled in at link time, bar.o may not be, causing
+ # the linker to complain.
+ # Dynamic library problems too?
+ case "$CC $CFLAGS" in
+ *-fcommon*) ;; # why someone would do this, I don't know
+ *-fno-common*) ;; # okay, they're already doing the right thing
+ *)
+ AC_MSG_NOTICE(disabling the use of common storage on Darwin)
+ CFLAGS="$CFLAGS -fno-common"
+ ;;
+ esac
+ fi
fi
])dnl
dnl