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