Fix CFLAGS for configure

This commit is contained in:
Matt Johnston 2018-03-03 10:10:16 +08:00
parent ce1f9cdf7c
commit 8d0b48f165

View File

@ -15,6 +15,7 @@ if test -s "`which hg`" && test -d "$srcdir/.hg"; then
AC_MSG_NOTICE([Source directory Mercurial base revision $hgrev]) AC_MSG_NOTICE([Source directory Mercurial base revision $hgrev])
fi fi
ORIGCFLAGS="$CFLAGS"
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
@ -35,7 +36,7 @@ AC_DEFUN(DB_TRYADDCFLAGS,
}]) }])
# set compile flags prior to other tests # set compile flags prior to other tests
if test -z "$OLDCFLAGS" && test "$GCC" = "yes"; then if test -z "$ORIGCFLAGS" && test "$GCC" = "yes"; then
AC_MSG_NOTICE(No \$CFLAGS set... using "-Os -W -Wall" for GCC) AC_MSG_NOTICE(No \$CFLAGS set... using "-Os -W -Wall" for GCC)
CFLAGS="-Os -W -Wall" CFLAGS="-Os -W -Wall"
fi fi