The patch below makes XEmacs 21.4.6 build with autoconf 2.53.
I believe Andreas Schwab <schwab(a)suse.de> and/or
Werner Fink <werner(a)suse.de> made this patch.
--- xemacs-21.4.4/configure.in
+++ xemacs-21.4.4/configure.in 2002/04/04 13:15:06
@@ -1,5 +1,5 @@
dnl Define our own header notice with own copyright
-define([AC_INIT_NOTICE],
+define([XE_AC_INIT_NOTICE],
[#### Configuration script for XEmacs. Largely divergent from FSF.
#### Guess values for system-dependent variables and create Makefiles.
#### Generated automatically using autoconf version] AC_ACVERSION [
@@ -43,6 +43,13 @@
### If configure fails after disturbing the status quo,
### config.status is removed.
])
+AC_DIVERT_PUSH(NOTICE)
+XE_AC_INIT_NOTICE
+define([_AC_INIT_PARSE_ARGS],
+[m4_divert_push([PARSE_ARGS])dnl
+m4_divert_pop([PARSE_ARGS])dnl
+])
+AC_DIVERT_POP
dnl Since XEmacs has configuration requirements that autoconf cannot
dnl meet, this file is an unholy marriage of custom-baked
@@ -51,7 +58,7 @@
dnl We use the m4 quoting characters [ ] (as established by the
dnl autoconf system), so quote them like this: [[foo]]
-AC_PREREQ(2.13)dnl
+AC_PREREQ(2.50)dnl
dnl Redefine some standard autoconf macros
dnl here is how XEmacs is different:
dnl - no cache file
@@ -81,14 +88,14 @@
#include "confdefs.h"
[$1]
EOF
-if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit $?)
2>&AC_FD_CC
+if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit $?)
2>&AS_MESSAGE_LOG_FD
then
dnl Do not remove the temporary files here, so they can be examined.
ifelse([$2], , :, [$2])
else
conftest_rc="$?"
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.$ac_ext >&AC_FD_CC
+ echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
ifelse([$3], , , [ rm -fr conftest*
$3
])dnl
@@ -104,21 +111,25 @@
dnl Set VARIABLE to VALUE, verbatim, or 1.
dnl AC_DEFINE(VARIABLE [, VALUE])
define([AC_DEFINE],
-[{ test "$extra_verbose" = "yes" && cat << \EOF
+[
+{ test "$extra_verbose" = "yes" && cat << \EOF
Defining $1[]ifelse($#, 2, [ = $2],)
EOF
-cat >> confdefs.h <<\EOF
-[#define] $1 ifelse($#, 2, [$2], 1)
+m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
+cat >>confdefs.h <<\EOF
+[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
EOF
}
])dnl AC_DEFINE
define([AC_DEFINE_UNQUOTED],
-[{ test "$extra_verbose" = "yes" && cat << EOF
+[
+{ test "$extra_verbose" = "yes" && cat << EOF
Defining $1[]ifelse($#, 2, [ = $2],)
EOF
-cat >> confdefs.h <<EOF
-[#define] $1 ifelse($#, 2, [$2], 1)
+m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
+cat >>confdefs.h <<EOF
+[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
EOF
}
])dnl AC_DEFINE_UNQUOTED
@@ -157,7 +168,7 @@
AC_TRY_LINK(dnl
ifelse([$2], [main], , dnl Avoid conflicting decl of main.
[/* Override any gcc2 internal prototype to avoid an error. */
-]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+]ifelse(_AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
extern "C"
#endif
])dnl
@@ -190,20 +201,21 @@
dnl AC_LANG_C()
define([AC_LANG_C],
-[define([AC_LANG], [C])dnl
+[define([_AC_LANG], [C])dnl
ac_ext=c
dnl CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
dnl ac_cpp='$CPP $CPPFLAGS'
-dnl ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext
1>&AC_FD_CC'
-dnl ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
1>&AC_FD_CC'
+dnl ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext
1>&AS_MESSAGE_LOG_FD'
+dnl ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
1>&AS_MESSAGE_LOG_FD'
xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system
$c_switch_x_site $X_CFLAGS'
xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system
$ld_switch_x_site $ld_switch_run'
xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS
$LIBS $libs_machine $libs_system $libs_standard'
ac_cpp='$CPP '"$xe_cppflags"
-ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext
1>&AC_FD_CC'
-ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"'
conftest.$ac_ext '"$xe_libs"' 1>&AC_FD_CC'
+ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext
1>&AS_MESSAGE_LOG_FD'
+ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"'
conftest.$ac_ext '"$xe_libs"' 1>&AS_MESSAGE_LOG_FD'
cross_compiling=no
]) dnl AC_LANG_C
+define([AC_LANG(C)], [AC_LANG_C]);
dnl The construct foo=`echo $w1 $w2 $w3` fails on some systems if $w1 = -e or -n
dnl So we use the following instead.
@@ -243,7 +255,7 @@
dnl The variables have the same names as the options, with
dnl dashes changed to underlines.
-define([AC_INIT_PARSE_ARGS],[
+AC_DIVERT_PUSH(PARSE_ARGS)
dnl Get sane consistent behavior from various shells
dnl Avoid losing with weird user CDPATHs
@@ -266,8 +278,11 @@
fi
dnl Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
dnl The variables have the same names as the options, with
dnl dashes changed to underlines.
+cache_file=/dev/null
exec_prefix=NONE
host=NONE
no_create=
@@ -291,9 +306,9 @@
SHELL=${CONFIG_SHELL-/bin/sh}
dnl Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
-])dnl AC_INIT_PARSE_ARGS
+AC_DIVERT_POP
-AC_INIT(src/lisp.h)dnl
+AC_INIT(lisp/version.el)
AC_CONFIG_HEADER(src/config.h lwlib/config.h)
dnl Remove any more than one leading "." element from the path name.
dnl If we do not remove them, then another "./" will be prepended to
@@ -1040,7 +1055,7 @@
dnl names of the m/*.h and s/*.h files we should use.
dnl Canonicalize the configuration name.
-AC_MSG_CHECKING("host system type")
+AS_MESSAGE([checking "host system type"...])
dnl allow -workshop suffix on configuration name
internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub
"$internal_configuration"`
@@ -2455,7 +2470,7 @@
AC_DEFINE(HAVE_INVERSE_HYPERBOLIC))
dnl Determine type of mail locking from configure args and s&m headers
-AC_CHECKING(type of mail spool file locking)
+AS_MESSAGE([checking type of mail spool file locking...])
AC_CHECK_FUNCS(lockf flock)
dnl The mail_use_xxx variables are set according to the s&m headers.
test -z "$mail_locking" -a "$mail_use_flock" = "yes"
&& mail_locking=flock
@@ -2513,7 +2528,7 @@
dnl Choose a window system
dnl ----------------------
-AC_CHECKING("for specified window system")
+AS_MESSAGE([checking "for specified window system"...])
dnl Autodetection of Gdk libraries and includes
dnl -------------------------------------------
@@ -2751,7 +2766,7 @@
test ! -z "$bitmapdirs" && AC_DEFINE_UNQUOTED(BITMAPDIR,
"$bitmapdirs")
dnl Autodetect defines extracted from X config by xmkmf, e.g. NARROWPROTO
- AC_CHECKING(for X defines extracted by xmkmf)
+ AS_MESSAGE([checking for X defines extracted by xmkmf...])
rm -fr conftestdir
if mkdir conftestdir; then
cd conftestdir
@@ -2871,7 +2886,7 @@
fi dnl $with_x11 = yes
if test "$with_msw" != "no"; then
- AC_CHECKING(for MS-Windows)
+ AS_MESSAGE([checking for MS-Windows...])
AC_CHECK_LIB(gdi32,main,with_msw=yes)
if test "$with_msw" = "yes"; then
AC_DEFINE(HAVE_MS_WINDOWS)
@@ -2987,7 +3002,7 @@
esac
dnl Enable or disable proper handling of WM_COMMAND
-AC_CHECKING(for WM_COMMAND option);
+AS_MESSAGE([checking for WM_COMMAND option...]);
dnl if test "$with_wmcommand" = "yes"; then
if test "$with_wmcommand" != "no"; then
AC_DEFINE(HAVE_WMCOMMAND)
@@ -3103,7 +3118,7 @@
fi
dnl Autodetect LDAP
-AC_CHECKING(for LDAP)
+AS_MESSAGE([checking for LDAP...])
test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) }
test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) }
if test "$with_ldap" != "no"; then
@@ -3140,7 +3155,7 @@
dnl (such as the default /usr/local/pgsql when building from source),
dnl that prefix must be specified using the --site-prefixes flag.
if test "$with_postgresql" != "no"; then
- AC_CHECKING(for PostgreSQL)
+ AS_MESSAGE([checking for PostgreSQL...])
dnl Look for these standard header file locations, known to be used on Linux
for header_dir in "" "pgsql/" "postgresql/"; do
@@ -3169,7 +3184,7 @@
dnl ----------------------
if test "$window_system" != "none"; then
- AC_CHECKING(for graphics libraries)
+ AS_MESSAGE([checking for graphics libraries...])
dnl Autodetect Xpm
xpm_problem=""
@@ -3326,11 +3341,11 @@
dnl ----------------------
if test "$with_x11" = "yes"; then
- AC_CHECKING(for X11 graphics libraries)
+ AS_MESSAGE([checking for X11 graphics libraries...])
fi
if test "$with_x11" = "yes" -a "$with_widgets" =
"athena"; then
- AC_CHECKING(for the Athena widgets)
+ AS_MESSAGE([checking for the Athena widgets...])
dnl What in heck did the user actually want?
case "$with_athena" in
@@ -3369,42 +3384,42 @@
dnl Now we locate the Athena headers that we need.
if test "$athena_3d" = "no"; then
AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
- AC_MSG_WARN("Could not find a non-3d Athena header set."),
- AC_CHECK_HEADER(X11/Xaw/XawInit.h,
+ [AC_MSG_WARN("Could not find a non-3d Athena header set.")],
+ [AC_CHECK_HEADER(X11/Xaw/XawInit.h,
athena_h_path=X11/Xaw,
- AC_MSG_WARN("Could not find a non-3d Athena header set.")))
+ [AC_MSG_WARN("Could not find a non-3d Athena header set.")])])
else
dnl The three-d Athena headers are so much more slippery.
dnl Curse this `Lets replace standard libraries' thing that they did. :/
AC_CHECK_HEADER(X11/$athena_variant/XawInit.h,
- AC_CHECK_HEADER(X11/$athena_variant/ThreeD.h,
- athena_h_path=X11/$athena_variant,))
+ [AC_CHECK_HEADER(X11/$athena_variant/ThreeD.h,
+ athena_h_path=X11/$athena_variant,)])
dnl Is the variant specific header directory directly under include?
if test -z "$athena_h_path"; then
AC_CHECK_HEADER($athena_variant/XawInit.h,
- AC_CHECK_HEADER($athena_variant/ThreeD.h,
- athena_h_path=$athena_variant,))
+ [AC_CHECK_HEADER($athena_variant/ThreeD.h,
+ athena_h_path=$athena_variant,)])
fi
dnl If we couldn't find the specific variant, try the generic Athena 3d headers
if test -z "$athena_h_path" -a "$athena_variant" !=
"Xaw3d"; then
AC_CHECK_HEADER(X11/Xaw3d/XawInit.h,
- AC_CHECK_HEADER(X11/Xaw3d/ThreeD.h,
+ [AC_CHECK_HEADER(X11/Xaw3d/ThreeD.h,
[
AC_MSG_WARN("Assuming that X11/Xaw3d headers are suitable for
$athena_variant.")
athena_h_path=X11/Xaw3d
- ],))
+ ],)])
fi
dnl Also generic 3d headers directly under include dir
if test -z "$athena_h_path" -a "$athena_variant" !=
"Xaw3d"; then
AC_CHECK_HEADER(Xaw3d/XawInit.h,
- AC_CHECK_HEADER(Xaw3d/ThreeD.h,
+ [AC_CHECK_HEADER(Xaw3d/ThreeD.h,
[
AC_MSG_WARN("Assuming that Xaw3d headers are suitable for
$athena_variant.")
athena_h_path=Xaw3d
- ],))
+ ],)])
fi
dnl If nothing yet found, see if Xaw is a 3d header set...
@@ -3601,7 +3616,7 @@
fi
if test "$with_mule" = "yes" ; then
- AC_CHECKING(for Mule-related features)
+ AS_MESSAGE([checking for Mule-related features...])
AC_DEFINE(MULE)
AC_DEFINE(FILE_CODING)
XE_ADD_OBJS(mule.o mule-ccl.o mule-charset.o file-coding.o)
@@ -3610,12 +3625,12 @@
AC_CHECK_HEADERS(libintl.h)
AC_CHECK_LIB(intl, strerror)
- AC_CHECKING(for Mule input methods)
+ AS_MESSAGE([checking for Mule input methods...])
dnl Do we have the XmIm* routines? And if so, do we want to use them?
dnl XIM seems to be flaky except on Solaris...
dnl test -z "$with_xim" -a "$opsys" != "sol2" &&
with_xim=no
case "$with_xim" in "" | "yes" )
- AC_CHECKING(for XIM)
+ AS_MESSAGE([checking for XIM...])
AC_CHECK_LIB(X11, XOpenIM, with_xim=xlib, with_xim=no)
dnl XIM + Lesstif is not (yet?) usable
if test "$have_motif $have_lesstif" = "yes no"; then
@@ -3640,7 +3655,7 @@
dnl "with_xfs" = "yes"
if test "$with_xfs" = "yes" ; then
- AC_CHECKING(for XFontSet)
+ AS_MESSAGE([checking for XFontSet...])
AC_CHECK_LIB(X11, XmbDrawString, [:], with_xfs=no)
if test "$with_xfs" = "yes" && test
"$with_menubars" = "lucid"; then
AC_DEFINE(USE_XFONTSET)
@@ -4002,7 +4017,7 @@
dnl Check for sound of various sorts.
dnl Autodetect native sound
-AC_CHECKING("for sound support")
+AS_MESSAGE([checking "for sound support"...])
test -z "$with_native_sound" -a -n "$native_sound_lib" &&
with_native_sound=yes
if test "$with_native_sound" != "no"; then
@@ -4135,7 +4150,7 @@
test -z "$with_tty" && with_tty=yes
if test "$with_tty" = "yes" ; then
- AC_CHECKING(for TTY-related features)
+ AS_MESSAGE([checking for TTY-related features...])
AC_DEFINE(HAVE_TTY)
XE_ADD_OBJS(console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o
redisplay-tty.o cm.o)
@@ -4218,7 +4233,7 @@
dnl By default, we check for DBM support in libgdbm, then libc, then libdbm.
test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
- != "no no no" && AC_CHECKING(for database support)
+ != "no no no" && AS_MESSAGE([checking for database support...])
dnl Check for ndbm.h, required for either kind of DBM support.
if test "$with_database_gdbm $with_database_dbm" != "no no"; then
@@ -4327,7 +4342,7 @@
dnl autodetect dll support
if test "$with_modules" != "no"; then
- AC_CHECKING(for module support)
+ AS_MESSAGE([checking for module support...])
dnl Check for MS-Windows
if test "$with_msw" = "yes"; then
@@ -5016,10 +5031,8 @@
dnl Create a GNUmakefile and Makefile from Makefile.in.
changequote(<<,>>)dnl
-dnl CPP_MAKEFILE(CPPFLAGS,filename)
-define(<<CPP_MAKEFILE>>,
-echo creating $dir/<<$2>>
-$CPP -I. -I${top_srcdir}/src <<$1>> junk.c \
+echo creating $dir/Makefile
+$CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
dnl Delete line directives inserted by $CPP
| sed -e 's/^\#.*//' \
dnl Delete spurious blanks inserted by $CPP
@@ -5034,11 +5047,8 @@
s/\"[ TAB]*$//
}' > Makefile.new
chmod 444 Makefile.new
- mv -f Makefile.new <<$2>>
-)dnl CPP_MAKEFILE
-
- CPP_MAKEFILE(,Makefile)
- CPP_MAKEFILE(-DUSE_GNU_MAKE,GNUmakefile)
+ mv -f Makefile.new Makefile; cp Makefile GNUmakefile
+dnl
changequote([,])dnl
rm -f junk.c
)
--
Mike Fabian <mfabian(a)suse.de>
http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。