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,8 +32,14 @@ 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)
AC_MSG_WARN([$add has been added to CFLAGS (--enable-debug)])
unset add
fi
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" add="$add -Wmissing-prototypes -Wstrict-prototypes"
# see if -Wno-long-double works... # see if -Wno-long-double works...
@ -43,12 +49,10 @@ if test "$WANT_DEBUG" = "1"; then
CFLAGS="$CFLAGS_orig" 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