dnl -------------------------------------------------------------------------
SXE_CHECK_COMMAND_LINE
-AM_INIT_AUTOMAKE([foreign -Wall])
+test -z "$AUTOMAKE" || AUTOMAKE=automake
+
+AM_INIT_AUTOMAKE(m4_esyscmd([
+ automake_ver=`$AUTOMAKE --version 2>/dev/null | head -n1`
+ automake_major=`echo "$automake_ver" | sed -e 's/^.* \([0-9]*\).*/\1/'`
+ automake_minor=`echo "$automake_ver" | sed -e 's/^.* [0-9]*\.\([0-9]*\).*/\1/'`
+ if test "$automake_major" = "1" -a "$automake_minor" -lt "14"
+ then
+ echo "foreign -Wall"
+ else
+ echo "info-in-builddir foreign -Wall"
+ fi]))
+
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
SXE_CHECK_BUILDCHAIN
AC_SUBST(EGREP)
after_morecore_hook_exists=yes
AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no)
AC_MSG_CHECKING(whether __after_morecore_hook exists)
-AC_LINK_IFELSE([AC_LANG_SOURCE([[extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0]])],
+AC_LINK_IFELSE([AC_LANG_SOURCE([
+ [extern void (* __after_morecore_hook)();]
+ [main() {__after_morecore_hook = 0;}]
+ ])],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
after_morecore_hook_exists=no])
+if test "$after_morecore_hook_exists" = "yes" ; then
+ AC_DEFINE([HAVE_MORECORE_HOOK], [1], [Define if __after_morecore_hook is available])
+fi
+AC_SUBST(HAVE_MORECORE_HOOK)
+free_hook_exists=yes
+AC_MSG_CHECKING(whether __free_hook exists)
+AC_LINK_IFELSE([AC_LANG_SOURCE([
+ [extern void (* __free_hook)();]
+ [main() {__free_hook = 0;}]
+ ])],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)
+ free_hook_exists=no])
+if test "$free_hook_exists" = "yes" ; then
+ AC_DEFINE([HAVE_FREE_HOOK], [1], [Define if __free_hook is available])
+fi
+AC_SUBST(HAVE_FREE_HOOK)
if test "$system_malloc" = "yes" ; then
GNU_MALLOC=no
GNU_MALLOC_reason="
dnl make sure we can find Intrinsic.h
AC_CHECK_HEADER([X11/Intrinsic.h], [],
- [AC_MSG_ERROR([Unable to find X11 header files. Try using --x-includes=<path> if you know the path, or --with-x=no to disable X11 support.])])
+ [AC_MSG_ERROR([Unable to find X11 and/or Xt header files. Try using --x-includes=<path> if you know the path, or --with-x=no to disable X11 support.])])
dnl Check some more headers
AC_CHECK_HEADERS([X11/Intrinsic.h X11/StringDefs.h X11/Shell.h X11/ShellP.h],