summaryrefslogtreecommitdiff
path: root/qdbm/configure.in
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-12-01 09:25:45 +0000
committerChris Wilson <chris+github@qwirx.com>2014-12-01 09:25:45 +0000
commit7b0113375b86770412922a4b7adb001e2e01c0d4 (patch)
treeb7ec59fb195cd020c55551008cb8f58ac00c1494 /qdbm/configure.in
parentff3e2f74c73b1575765ffb8b51a6ff8b076ca828 (diff)
Fix compile on FreeBSD 10 with Clang.
Clang doesn't recognise the -fforce-addr and -fno-force-addr compiler flags that qdbm tries to use.
Diffstat (limited to 'qdbm/configure.in')
-rw-r--r--qdbm/configure.in17
1 files changed, 8 insertions, 9 deletions
diff --git a/qdbm/configure.in b/qdbm/configure.in
index 9a6f4c40..ee8da2e1 100644
--- a/qdbm/configure.in
+++ b/qdbm/configure.in
@@ -178,17 +178,16 @@ if uname | egrep -i 'Linux' > /dev/null 2>&1 &&
then
MYOPTS="-minline-all-stringops"
fi
-if uname | egrep -i 'SunOS' > /dev/null 2>&1
-then
- MYOPTS="-O1 -fno-omit-frame-pointer -fno-force-addr"
-fi
-if uname | egrep -i 'BSD' > /dev/null 2>&1
-then
- MYOPTS="-O1 -fno-omit-frame-pointer -fno-force-addr"
-fi
-if gcc --version | egrep -i '^2\.(8|9)' > /dev/null 2>&1
+
+if uname | egrep -iq 'FreeBSD' && cc -v 2>&1 | egrep -iq ' clang '; then
+ MYOPTS="-O1 -fno-omit-frame-pointer"
+elif uname | egrep -iq 'SunOS' || \
+ uname | egrep -iq 'BSD' || \
+ gcc --version | egrep -iq '^2\.(8|9)'
then
MYOPTS="-O1 -fno-omit-frame-pointer -fno-force-addr"
+else
+ MYOPTS="-O1 -fno-omit-frame-pointer -fforce-addr"
fi
# Linker