1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-06 12:10:28 +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, AC_ARG_ENABLE(error-on-warning,
[ --enable-error-on-warning treat compile warnings as errors], [ --enable-error-on-warning treat compile warnings as errors],
[case "${enableval}" in [case "${enableval}" in
yes | y) CFLAGS="${CFLAGS} -Werror"; enable_compile_warnings=no ;; yes | y) GUILE_ERROR_ON_WARNING="yes" ;;
no | n) ;; no | n) GUILE_ERROR_ON_WARNING="no" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
esac]) esac])
AC_ARG_ENABLE(debug-freelist, AC_ARG_ENABLE(debug-freelist,
[ --enable-debug-freelist include garbage collector freelist debugging code], [ --enable-debug-freelist include garbage collector freelist debugging code],
if test "$enable_debug_freelist" = y || test "$enable_debug_freelist" = yes; then if test "$enable_debug_freelist" = y || test "$enable_debug_freelist" = yes; then
@ -221,7 +222,7 @@ AC_HEADER_STDC
AC_HEADER_DIRENT AC_HEADER_DIRENT
AC_HEADER_TIME AC_HEADER_TIME
AC_HEADER_SYS_WAIT 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 GUILE_HEADER_LIBC_WITH_UNISTD
AC_TYPE_GETGROUPS AC_TYPE_GETGROUPS
@ -622,6 +623,15 @@ if test "${THREAD_PACKAGE}" != "" ; then
fi fi
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. ## If we're using GCC, ask for aggressive warnings.
case "$GCC" in case "$GCC" in
yes ) yes )