From 8b8f94fc2c27b500d5e16d974556437a80293768 Mon Sep 17 00:00:00 2001 From: "Fred L. Drake, Jr." Date: Fri, 9 Nov 2001 04:19:01 +0000 Subject: [PATCH] Be more careful about deciding which filemap implementation to use for xmlwf. Part of SF patch #465018. Only add the -fexceptions option when the version of GCC we're using actually supports it. This relates to & partially solves SF bug #445893; see also SF bug #419585 for why the option was originally added. --- expat/configure.in | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/expat/configure.in b/expat/configure.in index 12b7472f..436e3a35 100644 --- a/expat/configure.in +++ b/expat/configure.in @@ -46,11 +46,19 @@ AC_PROG_CC AC_PROG_INSTALL if test "$GCC" = yes ; then - CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions" + dnl + dnl Be careful about adding the -fexceptions option; some versions of + dnl don't support it and it causes extra warnings that are only + dnl distracting; avoid. + dnl + OLDCFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes" + CFLAGS="$OLDCFLAGS -fexceptions" + AC_MSG_CHECKING(whether gcc accepts -fexceptions) + AC_TRY_COMPILE(,(void)1, + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no); CFLAGS="$OLDCFLAGS") fi -dnl Checks for libraries. - dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h unistd.h) @@ -70,7 +78,7 @@ dnl Checks for library functions. AC_FUNC_MEMCMP AC_FUNC_MMAP -if test -z "$HAVE_MMAP"; then +if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then FILEMAP_OBJ=unixfilemap.o else FILEMAP_OBJ=readfilemap.o -- 2.40.0