1
1

- Only add -g if --enable-debug

- Add -Wall and whatnot if --enable-picky is on

This commit was SVN r238.
Этот коммит содержится в:
Jeff Squyres 2004-01-11 00:07:54 +00:00
родитель 2e28f4083a
Коммит 35a1ae1c46

Просмотреть файл

@ -32,23 +32,27 @@ CPPFLAGS="$CPPFLAGS -DLAM_BUILDING=1"
# Do we want debugging?
if test "$WANT_DEBUG" = "1"; then
if test "$GCC" = "yes"; then
add="-g -Wall -Wundef -Wno-long-long"
add="$add -Wmissing-prototypes -Wstrict-prototypes"
CFLAGS="$CFLAGS -g"
LAM_UNIQ(CFLAGS)
AC_MSG_WARN([$add has been added to CFLAGS (--enable-debug)])
unset add
fi
# see if -Wno-long-double works...
CFLAGS_orig="$CFLAGS"
CFLAGS="$CFLAGS -Wno-long-double"
AC_TRY_COMPILE([], [], add="$add -Wno-long-double")
CFLAGS="$CFLAGS_orig"
if test -d CVS -a "$GCC" = "yes" -a "$WANT_PICKY_COMPILER" = 1; then
add="-Wall -Wundef -Wno-long-long"
add="$add -Wmissing-prototypes -Wstrict-prototypes"
# see if -Wno-long-double works...
CFLAGS_orig="$CFLAGS"
CFLAGS="$CFLAGS -Wno-long-double"
AC_TRY_COMPILE([], [], add="$add -Wno-long-double")
CFLAGS="$CFLAGS_orig"
add="$add -Werror-implicit-function-declaration "
add="$add -Werror-implicit-function-declaration "
else
add="-g"
fi
CFLAGS="$CFLAGS $add"
LAM_UNIQ(CFLAGS)
AC_MSG_WARN([$add has been added to CFLAGS (--with-debug)])
AC_MSG_WARN([$add has been added to CFLAGS (developer copy)])
unset add
fi