1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-01 18:00:23 +02:00

* configure.in: rearrange things so that --enable-error-on-warning

uses GUILE_ERROR_ON_WARNING as an indicator and actually set the
value of CFLAGS to include -Werror at the end of configure.in so
it doesn't break any of the non-Werror clean configure tests.
Add check for assert.h since it's used in config.h.in.
This commit is contained in:
Rob Browning 2002-10-27 07:01:26 +00:00
parent aae8783bd3
commit 8ce8525026

View file

@ -43,15 +43,16 @@ AC_CONFIG_SUBDIRS(guile-readline)
#
#--------------------------------------------------------------------
GUILE_ERROR_ON_WARNING="yes"
AC_ARG_ENABLE(error-on-warning,
[ --enable-error-on-warning treat compile warnings as errors],
[case "${enableval}" in
yes | y) CFLAGS="${CFLAGS} -Werror"; enable_compile_warnings=no ;;
no | n) ;;
yes | y) GUILE_ERROR_ON_WARNING="yes" ;;
no | n) GUILE_ERROR_ON_WARNING="no" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
esac])
AC_ARG_ENABLE(debug-freelist,
[ --enable-debug-freelist include garbage collector freelist debugging code],
if test "$enable_debug_freelist" = y || test "$enable_debug_freelist" = yes; then
@ -221,7 +222,7 @@ AC_HEADER_STDC
AC_HEADER_DIRENT
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(io.h libc.h limits.h malloc.h memory.h string.h regex.h rxposix.h rx/rxposix.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/stdtypes.h sys/types.h sys/utime.h time.h unistd.h utime.h pwd.h winsock2.h grp.h sys/utsname.h)
AC_CHECK_HEADERS([assert.h io.h libc.h limits.h malloc.h memory.h string.h regex.h rxposix.h rx/rxposix.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/stdtypes.h sys/types.h sys/utime.h time.h unistd.h utime.h pwd.h winsock2.h grp.h sys/utsname.h])
GUILE_HEADER_LIBC_WITH_UNISTD
AC_TYPE_GETGROUPS
@ -622,6 +623,15 @@ if test "${THREAD_PACKAGE}" != "" ; then
fi
fi
# Do this here so we don't screw up any of the tests above that might
# not be "warning free"
if test "${GUILE_ERROR_ON_WARNING}" = yes
then
CFLAGS="${CFLAGS} -Werror"
enable_compile_warnings=no
fi
## If we're using GCC, ask for aggressive warnings.
case "$GCC" in
yes )