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? # Do we want debugging?
if test "$WANT_DEBUG" = "1"; then if test "$WANT_DEBUG" = "1"; then
if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -g"
add="-g -Wall -Wundef -Wno-long-long" LAM_UNIQ(CFLAGS)
add="$add -Wmissing-prototypes -Wstrict-prototypes" AC_MSG_WARN([$add has been added to CFLAGS (--enable-debug)])
unset add
fi
# see if -Wno-long-double works... if test -d CVS -a "$GCC" = "yes" -a "$WANT_PICKY_COMPILER" = 1; then
CFLAGS_orig="$CFLAGS" add="-Wall -Wundef -Wno-long-long"
CFLAGS="$CFLAGS -Wno-long-double" add="$add -Wmissing-prototypes -Wstrict-prototypes"
AC_TRY_COMPILE([], [], add="$add -Wno-long-double")
CFLAGS="$CFLAGS_orig" # 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" CFLAGS="$CFLAGS $add"
LAM_UNIQ(CFLAGS) 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 unset add
fi fi