AC_MSG_RESULT(${hardtop})
+# We don't support building in directories with spaces.
+case "$hardtop" in
+ *' '*) AC_MSG_ERROR([
+ The build system does not support building in a directory containing
+ space characters. Suggestion: move the build tree somewhere else.])
+ ;;
+esac
+
dnl --------------------------------------------------------------
dnl * Project specific configuration options
dnl --------------------------------------------------------------
withval=`cygpath -w ${withval} | sed -e 's@\\\\@/@g' `
fi
fi;
- CC="$withval"],
+ CC="$withval"
+ export CC
+ ],
[WhatGccIsCalled="gcc"]
)
AC_SUBST(WhatGccIsCalled)
dnl If gcc, make sure it's at least 2.1
dnl
FP_HAVE_GCC
+FP_MINGW_GCC
dnl ** figure out how to invoke cpp directly (gcc -E is no good)
AC_PROG_CPP
dnl ** Find find command (for Win32's benefit)
FP_PROG_FIND
+dnl ** Find sort command (for the benefit of Win32 environs)
+FP_PROG_SORT
+
dnl ** figure out how to do a BSD-ish install
AC_PROG_INSTALL
dnl ** check for DocBook toolchain
FP_CHECK_DOCBOOK_DTD
-FP_DIR_DOCBOOK_XSL([/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /usr/share/sgml/docbook/docbook-xsl-stylesheets* /usr/share/sgml/docbook/xsl-stylesheets* /opt/kde?/share/apps/ksgmltools2/docbook/xsl /usr/share/docbook-xsl /usr/share/sgml/docbkxsl])
+FP_DIR_DOCBOOK_XSL([/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /usr/share/sgml/docbook/docbook-xsl-stylesheets* /usr/share/sgml/docbook/xsl-stylesheets* /opt/kde?/share/apps/ksgmltools2/docbook/xsl /usr/share/docbook-xsl /usr/share/sgml/docbkxsl /usr/local/share/xsl/docbook /sw/share/xml/xsl/docbook-xsl])
FP_PROG_FO_PROCESSOR
dnl ** check for ghc-pkg command
dnl ** check if it is safe to include both <time.h> and <sys/time.h>
AC_HEADER_TIME
-dnl ** check for POSIX regex
-HavePosixRegex=NO
-AC_CHECK_HEADERS([regex.h], [AC_CHECK_FUNCS(regcomp, [HavePosixRegex=YES])])
-AC_SUBST(HavePosixRegex)
-
dnl ** how do we get a timezone name, and UTC offset ?
AC_STRUCT_TIMEZONE
fi
dnl ** check for math library
-AC_CHECK_LIB([m], [atan], [LIBS="-lm $LIBS"; LIBM="-lm"], [LIBM=])
+AC_CHECK_FUNC(atan,[fp_libm_not_needed=yes;LIBM=],[fp_libm_not_needed=dunno])
+if test x"$fp_libm_not_needed" = xdunno; then
+ AC_CHECK_LIB([m], [atan], [LIBS="-lm $LIBS"; LIBM="-lm"],[LIBM=])
+fi
AC_SUBST([LIBM])
dnl ################################################################
dnl ** check for leading underscores in symbol names
FP_LEADING_UNDERSCORE
-dnl ** check for ld, and whether ld has -x option
-AC_PATH_PROG(LdCmdRaw, ld)
-case $HostOS_CPP in
- mingw32)
- if test "${OSTYPE}" == "msys"
- then
- LdCmd=${LdCmdRaw}
- else
- LdCmd=`cygpath -w ${LdCmdRaw} | sed -e 's@\\\\@/@g' `
- fi
- ;;
- *) LdCmd=${LdCmdRaw}
- ;;
-esac
-AC_SUBST(LdCmd)
-FPTOOLS_LD_X
+dnl ** check for ld, whether it has an -x option, and if it is GNU ld
+FP_PROG_LD_X
+FP_PROG_LD_IS_GNU
+
+dnl ** check for Apple-style dead-stripping support
+dnl (.subsections-via-symbols assembler directive)
+
+
+AC_MSG_CHECKING(for .subsections_via_symbols)
+AC_TRY_COMPILE(,[__asm__ (".subsections_via_symbols");],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1],
+ [Define to 1 if Apple-style dead-stripping is supported.])
+ ],
+ [
+ AC_MSG_RESULT(no)
+ AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[0],
+ [Define to 1 if Apple-style dead-stripping is supported.])
+ ])
AC_CONFIG_FILES([mk/config.mk])
AC_CONFIG_COMMANDS([mk/stamp-h],[echo timestamp > mk/stamp-h])