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.
This commit is contained in:
Fred L. Drake, Jr. 2001-11-09 04:19:01 +00:00
parent 212aa11153
commit 8b8f94fc2c

View File

@ -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