comparison configure.ac @ 1416:33d90d219e03

Compile with -fno-strict-overflow if possible. Needed for curve25519-donna https://github.com/agl/curve25519-donna/issues/31
author Matt Johnston <matt@ucc.asn.au>
date Fri, 23 Jun 2017 21:31:25 +0800
parents 8d9bad0a1c86
children 4f17d75d027b 89f8c5960527
comparison
equal deleted inserted replaced
1412:a54b22f4058d 1416:33d90d219e03
7 7
8 AC_PREREQ(2.59) 8 AC_PREREQ(2.59)
9 AC_INIT 9 AC_INIT
10 AC_CONFIG_SRCDIR(buffer.c) 10 AC_CONFIG_SRCDIR(buffer.c)
11 11
12 OLDCFLAGS=$CFLAGS 12 OLDCFLAGS="$CFLAGS"
13 # Checks for programs. 13 # Checks for programs.
14 AC_PROG_CC 14 AC_PROG_CC
15 AC_PROG_MAKE_SET 15 AC_PROG_MAKE_SET
16 16
17 if test -z "$LD" ; then 17 if test -z "$LD" ; then
21 21
22 if test -z "$OLDCFLAGS" && test "$GCC" = "yes"; then 22 if test -z "$OLDCFLAGS" && test "$GCC" = "yes"; then
23 AC_MSG_NOTICE(No \$CFLAGS set... using "-Os -W -Wall" for GCC) 23 AC_MSG_NOTICE(No \$CFLAGS set... using "-Os -W -Wall" for GCC)
24 CFLAGS="-Os -W -Wall -Wno-pointer-sign" 24 CFLAGS="-Os -W -Wall -Wno-pointer-sign"
25 fi 25 fi
26
27 AC_MSG_CHECKING([if compiler '$CC' supports -fno-strict-overflow])
28 OLDCFLAGS="$CFLAGS"
29 CFLAGS="$CFLAGS -fno-strict-overflow"
30 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
31 [AC_MSG_RESULT(yes)],
32 [
33 AC_MSG_RESULT(no)
34 CFLAGS=$OLDCFLAGS
35 ]
36 )
26 37
27 # large file support is useful for scp 38 # large file support is useful for scp
28 AC_SYS_LARGEFILE 39 AC_SYS_LARGEFILE
29 40
30 # Host specific options 41 # Host specific options