From bdcccc1806105a5556cb13a0dd92db7a2de1a070 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sat, 5 Oct 2002 04:57:09 +0000 Subject: [PATCH] * configure.in: turn on -Werror by default. We're now clean. I'd like to stay that way. If we want, we can turn it off by default when we make the stable release, but I caught a lot of bugs this way. Accomodate libguile-ltdl -- therea are some ltdl things that are commented out now INCLTDL and LIBLTDL. I think we may not need them anymore, but I'll leave them until we're sure. We also killed off the libltdl dir and related options including the AC_CONFIG_SUBDIRS. I also added some explicit tests for some headers and functions that weren't listed but were in scmconfig.h.in. though this may have been unnecessary. --- configure.in | 47 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/configure.in b/configure.in index 1ac6d2c82..e55b02a58 100644 --- a/configure.in +++ b/configure.in @@ -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 @@ -150,13 +151,10 @@ AC_CYGWIN AC_MINGW32 AC_LIBTOOL_WIN32_DLL -AC_LIBLTDL_CONVENIENCE -AC_CONFIG_SUBDIRS(libltdl) - AC_PROG_INSTALL AC_PROG_CC AC_PROG_CPP -AC_LIBTOOL_DLOPEN +AC_PROG_AWK AC_AIX AC_ISC_POSIX @@ -164,9 +162,9 @@ AC_MINIX AM_PROG_CC_STDC -## Needed for building DLLs on Cygwin, before AM_PROG_LIBTOOL -AC_LIBTOOL_WIN32_DLL +AC_LIBTOOL_DLOPEN AM_PROG_LIBTOOL +AC_LIB_LTDL AC_CHECK_PROG(have_makeinfo, makeinfo, yes, no) AM_CONDITIONAL(HAVE_MAKEINFO, test "$have_makeinfo" = yes) @@ -264,7 +262,13 @@ 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 grp.h sys/utsname.h direct.h) + +AC_CHECK_HEADERS([io.h libc.h limits.h malloc.h memory.h string.h \ +regex.h rxposix.h rx/rxposix.h sys/dir.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 grp.h sys/utsname.h \ +direct.h]) + GUILE_HEADER_LIBC_WITH_UNISTD AC_TYPE_GETGROUPS @@ -306,11 +310,15 @@ if test "$MINGW32" = "yes" ; then fi AC_SUBST(EXTRA_DEFS) -AC_SUBST(INCLTDL) -AC_SUBST(LIBLTDL) +# FIXME: check to see if we still need these. +#AC_SUBST(INCLTDL) +#AC_SUBST(LIBLTDL) + AC_SUBST(DLPREOPEN) -AC_CHECK_FUNCS(ctermid ftime fchown getcwd geteuid gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer) +AC_CHECK_HEADERS([assert.h]) + +AC_CHECK_FUNCS([ctermid ftime fchown getcwd geteuid gettimeofday lstat mkdir mknod nice readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp index bcopy memcpy rindex]) AC_CHECK_HEADERS(crypt.h sys/resource.h sys/file.h) AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass sethostname gethostname) @@ -739,6 +747,15 @@ if test "$cross_compiling" = "yes"; then fi AC_SUBST(GUILE_FOR_BUILD) +# 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 ) @@ -750,8 +767,6 @@ case "$GCC" in CFLAGS="$CFLAGS -Wall -Wmissing-prototypes" ;; esac -AC_PROG_AWK - ## NOTE the code below sets LIBOBJS directly and so is now forbidden ## -- I'm disabling it for now in the hopes that the newer autoconf ## will DTRT -- if not, we need to fix up the sed command to match the @@ -824,6 +839,8 @@ AC_CONFIG_FILES([ libguile/guile-func-name-check libguile/guile-snarf-docs libguile/version.h + libguile-ltdl/Makefile + libguile-ltdl/upstream/Makefile ice-9/Makefile lang/Makefile lang/elisp/Makefile