# For the common developer case, if we're in a Subversion checkout and
# using the GNU compilers, turn on maximum warnings unless
# specifically disabled by the user.
AC_MSG_CHECKING([whether to enable "picky" compiler mode])
want_picky=0
if test -d "$srcdir/.svn" -a "$GCC" = "yes"; then
want_picky=1
fi
AC_ARG_ENABLE(picky,
AC_HELP_STRING([--disable-picky],
[When in Subversion checkouts of PLPA and compiling with gcc, the default is to enable maximum compiler pickyness. Using --disable-picky or --enable-picky overrides any default setting]))
if test "$enable_picky" = "yes"; then
if test "$GCC" = "yes"; then
AC_MSG_RESULT([yes])
want_picky=1
else
AC_MSG_RESULT([no])
AC_MSG_WARN([Warning: --enable-picky used, but is currently only defined for the GCC compiler set -- automatically disabled])
[When in Subversion checkouts of PLPA and compiling with gcc, the default is to debugging. Use --disable-debug or --enable-debug overrides any default setting]))
# Slightly different tests for whether we're in a svn checkout or not
want_debug=no
if test -d "$srcdir/.svn"; then
if test "$enable_debug" = "no"; then
value=0
msg="no"
else
value=1
msg="yes (default)"
fi
else
if test "$enable_debug" = "yes"; then
value=1
msg="yes"
else
value=0
msg="no (default)"
fi
fi
if test "$value" = "1"; then
CFLAGS="$CFLAGS -g"
fi
AC_DEFINE_UNQUOTED([PLPA_DEBUG], [$value], [Whether we're in debugging mode or not])