summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2014-05-08 17:18:11 +0200
committerNiels Möller <nisse@lysator.liu.se>2014-05-08 17:18:11 +0200
commitb672e5530bd036eab6dd2aefbd0ab936517fbae4 (patch)
tree7a3da24860176325292ce9b62a82309a0287f625 /aclocal.m4
parent0eae25f0cb30509f294564ce25409f12591ebf73 (diff)
downloadnettle-b672e5530bd036eab6dd2aefbd0ab936517fbae4.tar.gz
When CC_FOR_BUILD is gcc, add -O flag.
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m423
1 files changed, 14 insertions, 9 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 98b399b6..4e23ef8d 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -513,16 +513,21 @@ elif test -n "$HOST_CC"; then
GMP_PROG_CC_FOR_BUILD_WORKS($HOST_CC,
[CC_FOR_BUILD=$HOST_CC],
[AC_MSG_ERROR([Specified HOST_CC doesn't seem to work])])
-elif test $cross_compiling = no ; then
- CC_FOR_BUILD="$CC"
else
- for i in cc gcc c89 c99; do
- GMP_PROG_CC_FOR_BUILD_WORKS($i,
- [CC_FOR_BUILD=$i
- break])
- done
- if test -z "$CC_FOR_BUILD"; then
- AC_MSG_ERROR([Cannot find a build system compiler])
+ if test $cross_compiling = no ; then
+ CC_FOR_BUILD="$CC"
+ else
+ for i in gcc cc c89 c99; do
+ GMP_PROG_CC_FOR_BUILD_WORKS($i,
+ [CC_FOR_BUILD=$i
+ break])
+ done
+ if test -z "$CC_FOR_BUILD"; then
+ AC_MSG_ERROR([Cannot find a build system compiler])
+ fi
+ fi
+ if test "$CC_FOR_BUILD" = gcc ; then
+ CC_FOR_BUILD="$CC_FOR_BUILD -O"
fi
fi