X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/8bd7b8304a41da5dc0c8a11967c1a6005e9465d0..15e3a074a6ebdcefd828a1ba14a5a12ff9921034:/configure.in diff --git a/configure.in b/configure.in index 3d99873eab..f88506fbb2 100644 --- a/configure.in +++ b/configure.in @@ -144,6 +144,11 @@ this option's value should be `yes', `no', `lucid', `athena', `motif', `gtk' or with_x_toolkit=$val ]) +OPTION_DEFAULT_OFF([wide-int], [prefer wide Emacs integers (typically 62-bit)]) +if test "$with_wide_int" = yes; then + AC_DEFINE([WIDE_EMACS_INT], 1, [Use long long for EMACS_INT if available.]) +fi + dnl _ON results in a '--without' option in the --help output, so dnl the help text should refer to "don't compile", etc. OPTION_DEFAULT_ON([xpm],[don't compile with XPM image support]) @@ -167,6 +172,7 @@ OPTION_DEFAULT_OFF([ns],[use NeXTstep (Cocoa or GNUstep) windowing system]) OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux console]) OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support]) OPTION_DEFAULT_ON([gconf],[don't compile with GConf support]) +OPTION_DEFAULT_ON([gsettings],[don't compile with GSettings support]) OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support]) OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support]) @@ -225,8 +231,8 @@ AC_ARG_ENABLE(asserts, USE_XASSERTS=no) AC_ARG_ENABLE(maintainer-mode, -[AS_HELP_STRING([--enable-maintainer-mode], - [enable make rules and dependencies not useful (and sometimes +[AS_HELP_STRING([--disable-maintainer-mode], + [disable make rules and dependencies not useful (and sometimes confusing) to the casual installer])], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=yes) @@ -294,7 +300,7 @@ if test x$ac_gc_check_stringbytes != x ; then strings is redundantly recorded in sdata structures so that it can be compared to the sizes recorded in Lisp strings.]) fi -if test x$ac_gc_check_stringoverrun != x ; then +if test x$ac_gc_check_string_overrun != x ; then AC_DEFINE(GC_CHECK_STRING_OVERRUN, 1, [Define this to check for short string overrun.]) fi @@ -364,17 +370,6 @@ case "${srcdir}" in * ) srcdir="`(cd ${srcdir}; pwd)`" ;; esac -#### Check if the source directory already has a configured system in it. -if test `pwd` != `(cd ${srcdir} && pwd)` \ - && test -f "${srcdir}/src/config.h" ; then - AC_MSG_WARN([[The directory tree `${srcdir}' is being used - as a build directory right now; it has been configured in its own - right. To configure in another directory as well, you MUST - use GNU make. If you do not have GNU make, then you must - now do `make distclean' in ${srcdir}, - and then run $0 again.]]) -fi - #### Given the configuration name, set machfile and opsysfile to the #### names of the m/*.h and s/*.h files we should use. @@ -541,7 +536,7 @@ case "${canonical}" in ## Silicon Graphics machines ## Iris 4D mips-sgi-irix6.5 ) - machine=iris4d opsys=irix6-5 + opsys=irix6-5 # Without defining _LANGUAGE_C, things get masked out in the headers # so that, for instance, grepping for `free' in stdlib.h fails and # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m). @@ -987,46 +982,15 @@ else CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS" fi +# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better. +AC_DEFUN([AC_TYPE_SIZE_T]) +# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them. +AC_DEFUN([AC_TYPE_UID_T]) + dnl Do this early because it can frob feature test macros for Unix-98 &c. AC_SYS_LARGEFILE -## If user specified a crt-dir, use that unconditionally. -if test "X$CRT_DIR" = "X"; then - - case "$canonical" in - x86_64-*-linux-gnu* | s390x-*-linux-gnu*) - ## On x86-64 and s390x GNU/Linux distributions, the standard library - ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. - ## For anything else (eg /usr/lib32), it is up the user to specify - ## the location (bug#5655). - ## Test for crtn.o, not just the directory, because sometimes the - ## directory exists but does not have the relevant files (bug#1287). - ## FIXME better to test for binary compatibility somehow. - test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 - ;; - - powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; - esac - - case "$opsys" in - hpux10-20) CRT_DIR=/lib ;; - esac - - ## Default is /usr/lib. - test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib - -else - - ## Some platforms don't use any of these files, so it is not - ## appropriate to put this test outside the if block. - test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ - AC_MSG_ERROR([crt*.o not found in specified location.]) - -fi - -AC_SUBST(CRT_DIR) - LIB_MATH=-lm LIB_STANDARD= START_FILES= @@ -1067,6 +1031,80 @@ esac AC_SUBST(LIB_MATH) AC_SUBST(START_FILES) +dnl Not all platforms use crtn.o files. Check if the current one does. +crt_files= + +for file in x $LIB_STANDARD $START_FILES; do + case "$file" in + *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;; + esac +done + +if test "x$crt_files" != x; then + + ## If user specified a crt-dir, use that unconditionally. + crt_gcc=no + + if test "X$CRT_DIR" = "X"; then + + CRT_DIR=/usr/lib # default + + case "$canonical" in + x86_64-*-linux-gnu* | s390x-*-linux-gnu*) + ## On x86-64 and s390x GNU/Linux distributions, the standard library + ## can be in a variety of places. We only try /usr/lib64 and /usr/lib. + ## For anything else (eg /usr/lib32), it is up the user to specify + ## the location (bug#5655). + ## Test for crtn.o, not just the directory, because sometimes the + ## directory exists but does not have the relevant files (bug#1287). + ## FIXME better to test for binary compatibility somehow. + test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 + ;; + + powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;; + esac + + case "$opsys" in + hpux10-20) CRT_DIR=/lib ;; + esac + + test "x${GCC}" = xyes && crt_gcc=yes + + fi # CRT_DIR = "" + + crt_missing= + + for file in $crt_files; do + + ## If we're using gcc, try to determine it automatically by asking + ## gcc. [If this doesn't work, CRT_DIR will remain at the + ## system-dependent default from above.] + if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then + + crt_file=`$CC --print-file-name=$file 2>/dev/null` + case "$crt_file" in + */*) + CRT_DIR=`AS_DIRNAME(["$crt_file"])` + ;; + esac + fi + + dnl We expect all the files to be in a single directory, so after the + dnl first there is no point asking gcc. + crt_gcc=no + + test -e $CRT_DIR/$file || crt_missing="$crt_missing $file" + done # $crt_files + + test "x$crt_missing" = x || \ + AC_MSG_ERROR([Required file(s) not found:$crt_missing +Try using the --with-crt-dir option.]) + +fi # crt_files != "" + +AC_SUBST(CRT_DIR) + + dnl This function definition taken from Gnome 2.0 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page @@ -1294,9 +1332,6 @@ dnl and void *. AC_C_PROTOTYPES AC_C_VOLATILE AC_C_CONST -dnl This isn't useful because we can't turn on use of `inline' unless -dnl the compiler groks `extern inline'. -dnl AC_C_INLINE AC_CACHE_CHECK([for void * support], emacs_cv_void_star, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[void * foo;]])], emacs_cv_void_star=yes, emacs_cv_void_star=no)]) @@ -1367,6 +1402,10 @@ AC_SUBST(DEPFLAGS) AC_SUBST_FILE(deps_frag) +lisp_frag=$srcdir/src/lisp.mk +AC_SUBST_FILE(lisp_frag) + + dnl checks for operating system services AC_SYS_LONG_FILE_NAMES @@ -1500,7 +1539,6 @@ AC_SUBST(TEMACS_LDFLAGS2) ns_frag=/dev/null NS_OBJ= NS_OBJC_OBJ= -NS_SUPPORT= if test "${HAVE_NS}" = yes; then window_system=nextstep with_xft=no @@ -1513,13 +1551,11 @@ if test "${HAVE_NS}" = yes; then ns_frag=$srcdir/src/ns.mk NS_OBJ="fontset.o fringe.o image.o" NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o" - NS_SUPPORT="\${lispsource}/emacs-lisp/easymenu.elc \${lispsource}/term/ns-win.elc" fi CFLAGS="$tmp_CFLAGS" CPPFLAGS="$tmp_CPPFLAGS" AC_SUBST(NS_OBJ) AC_SUBST(NS_OBJC_OBJ) -AC_SUBST(NS_SUPPORT) AC_SUBST(LIB_STANDARD) AC_SUBST_FILE(ns_frag) @@ -1631,7 +1667,7 @@ fi use_mmap_for_buffers=no case "$opsys" in - freebsd|irix6-5) use_mmap_for_buffers=yes ;; + cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;; esac AC_FUNC_MMAP @@ -1824,6 +1860,7 @@ fi HAVE_GTK=no +GTK_OBJ= if test "${with_gtk3}" = "yes"; then GLIB_REQUIRED=2.28 GTK_REQUIRED=3.0 @@ -1835,6 +1872,7 @@ if test "${with_gtk3}" = "yes"; then AC_MSG_ERROR($GTK_PKG_ERRORS) fi AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.]) + GTK_OBJ=emacsgtkfixed.o fi if test "$pkg_check_gtk" != "yes"; then @@ -1852,7 +1890,6 @@ if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then fi fi -GTK_OBJ= if test x"$pkg_check_gtk" = xyes; then AC_SUBST(GTK_CFLAGS) @@ -1870,7 +1907,7 @@ if test x"$pkg_check_gtk" = xyes; then else HAVE_GTK=yes AC_DEFINE(USE_GTK, 1, [Define to 1 if using GTK.]) - GTK_OBJ=gtkutil.o + GTK_OBJ="gtkutil.o $GTK_OBJ" USE_X_TOOLKIT=none if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then : @@ -1947,6 +1984,17 @@ if test "${with_dbus}" = "yes"; then fi AC_SUBST(DBUS_OBJ) +dnl GSettings has been tested under GNU/Linux only. +HAVE_GSETTINGS=no +if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then + PKG_CHECK_MODULES(GSETTINGS, gio-2.0 >= 2.26, HAVE_GSETTINGS=yes, HAVE_GSETTINGS=no) + if test "$HAVE_GSETTINGS" = "yes"; then + AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.]) + SETTINGS_CFLAGS="$GSETTINGS_CFLAGS" + SETTINGS_LIBS="$GSETTINGS_LIBS" + fi +fi + dnl GConf has been tested under GNU/Linux only. dnl The version is really arbitrary, it is about the same age as Gtk+ 2.6. HAVE_GCONF=no @@ -1955,10 +2003,24 @@ if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then if test "$HAVE_GCONF" = yes; then AC_DEFINE(HAVE_GCONF, 1, [Define to 1 if using GConf.]) dnl Newer GConf doesn't link with g_objects, so this is not defined. - AC_CHECK_FUNCS([g_type_init]) + SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS" + SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS" fi fi +if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + CFLAGS="$SETTINGS_CFLAGS $CFLAGS" + LDFLAGS="$SETTINGS_LIBS $LDFLAGS" + AC_CHECK_FUNCS([g_type_init]) + CFLAGS="$SAVE_CFLAGS" + LDFLAGS="$SAVE_LDFLAGS" +fi +AC_SUBST(SETTINGS_CFLAGS) +AC_SUBST(SETTINGS_LIBS) + + dnl SELinux is available for GNU/Linux only. HAVE_LIBSELINUX=no LIBSELINUX_LIBS= @@ -1972,12 +2034,22 @@ fi AC_SUBST(LIBSELINUX_LIBS) HAVE_GNUTLS=no +HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no if test "${with_gnutls}" = "yes" ; then - PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.2.4], HAVE_GNUTLS=yes, HAVE_GNUTLS=no) + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.6.0], HAVE_GNUTLS=yes, HAVE_GNUTLS=no) if test "${HAVE_GNUTLS}" = "yes"; then AC_DEFINE(HAVE_GNUTLS, 1, [Define if using GnuTLS.]) fi + + CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" + LIBS="$LIBGNUTLS_LIBS $LIBS" + AC_CHECK_FUNCS(gnutls_certificate_set_verify_function, HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes) + + if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then + AC_DEFINE(HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY, 1, [Define if using GnuTLS certificate verification callbacks.]) + fi fi + AC_SUBST(LIBGNUTLS_LIBS) AC_SUBST(LIBGNUTLS_CFLAGS) @@ -2023,8 +2095,11 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then elif test x"${USE_X_TOOLKIT}" = xLUCID; then AC_MSG_ERROR([Lucid toolkit requires X11/Xaw include files]) else - AC_MSG_RESULT([no; do not use toolkit by default]) - USE_X_TOOLKIT=none + AC_MSG_ERROR([No X toolkit could be found. +If you are sure you want Emacs compiled without an X toolkit, pass + --with-x-toolkit=no +to configure. Otherwise, install the development libraries for the toolkit +that you want to use (e.g. Gtk+) and re-run configure.]) fi fi fi @@ -2460,7 +2535,6 @@ fi ### Use -lgpm if available, unless `--with-gpm=no'. HAVE_GPM=no LIBGPM= -MOUSE_SUPPORT= if test "${with_gpm}" != "no"; then AC_CHECK_HEADER(gpm.h, [AC_CHECK_LIB(gpm, Gpm_Open, HAVE_GPM=yes)]) @@ -2468,8 +2542,6 @@ if test "${with_gpm}" != "no"; then if test "${HAVE_GPM}" = "yes"; then AC_DEFINE(HAVE_GPM, 1, [Define to 1 if you have the gpm library (-lgpm).]) LIBGPM=-lgpm - ## May be reset below. - MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)" fi fi AC_SUBST(LIBGPM) @@ -2547,15 +2619,6 @@ if test $emacs_cv_netdb_declares_h_errno = yes; then AC_DEFINE(HAVE_H_ERRNO, 1, [Define to 1 if netdb.h declares h_errno.]) fi -AC_FUNC_ALLOCA - -dnl src/alloca.c has been removed. Could also check if $ALLOCA is set? -dnl FIXME is there an autoconf test that does the right thing, without -dnl needing to call A_M_E afterwards? -if test x"$ac_cv_func_alloca_works" != xyes; then - AC_MSG_ERROR( [a system implementation of alloca is required] ) -fi - # fmod, logb, and frexp are found in -lm on most systems. # On HPUX 9.01, -lm does not contain logb, so check for sqrt. AC_CHECK_LIB(m, sqrt) @@ -2636,7 +2699,7 @@ esac AC_SUBST(BLESSMAIL_TARGET) -AC_CHECK_FUNCS(gethostname getdomainname dup2 \ +AC_CHECK_FUNCS(gethostname getdomainname \ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ random lrand48 logb frexp fmod rint cbrt ftime setsid \ strerror fpathconf select euidaccess getpagesize tzset setlocale \ @@ -2664,11 +2727,6 @@ AC_FUNC_FSEEKO AC_FUNC_GETPGRP -# Configure gnulib. -gl_ASSERT_NO_GNULIB_POSIXCHECK -gl_ASSERT_NO_GNULIB_TESTS -gl_INIT - # UNIX98 PTYs. AC_CHECK_FUNCS(grantpt) @@ -3026,8 +3084,6 @@ if test $emacs_cv_langinfo_codeset = yes; then [Define if you have and nl_langinfo(CODESET).]) fi -AC_CHECK_TYPES(size_t) - AC_TYPE_MBSTATE_T AC_CACHE_CHECK([for C restricted array declarations], emacs_cv_c_restrict_arr, @@ -3274,6 +3330,10 @@ AC_SUBST(CYGWIN_OBJ) AC_SUBST(PRE_ALLOC_OBJ) AC_SUBST(POST_ALLOC_OBJ) +# Configure gnulib here, now that we know LIBS. +gl_ASSERT_NO_GNULIB_POSIXCHECK +gl_ASSERT_NO_GNULIB_TESTS +gl_INIT case "$opsys" in aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; @@ -3290,7 +3350,7 @@ case "$opsys" in libs_nsgui= headerpad_extra=690 fi - LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" + LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" ## This is here because src/Makefile.in did some extra fiddling around ## with LD_SWITCH_SYSTEM. The cpp logic was: @@ -3407,23 +3467,11 @@ fi dnl if $GCC AC_SUBST(LIB_GCC) -TOOLTIP_SUPPORT= -WINDOW_SUPPORT= ## If we're using X11/GNUstep, define some consequences. if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.]) AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.]) - MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)" - TOOLTIP_SUPPORT="\${lispsource}/mouse.elc" - - WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)" - test "$HAVE_X_WINDOWS" = "yes" && \ - WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)" - fi -AC_SUBST(MOUSE_SUPPORT) -AC_SUBST(TOOLTIP_SUPPORT) -AC_SUBST(WINDOW_SUPPORT) AH_TOP([/* GNU Emacs site configuration template file. @@ -3455,21 +3503,17 @@ along with GNU Emacs. If not, see . */ ])dnl AH_BOTTOM([ +/* On AIX 3 this must be included before any other include file. */ +#include +#if ! HAVE_ALLOCA +# error "alloca not available on this machine" +#endif + /* Define AMPERSAND_FULL_NAME if you use the convention that & in the full name stands for the login id. */ /* Turned on June 1996 supposing nobody will mind it. */ #define AMPERSAND_FULL_NAME -/* If using GNU, then support inline function declarations. */ -/* Don't try to switch on inline handling as detected by AC_C_INLINE - generally, because even if non-gcc compilers accept `inline', they - may reject `extern inline'. */ -#if defined (__GNUC__) -#define INLINE __inline__ -#else -#define INLINE -#endif - /* `subprocesses' should be defined if you want to have code for asynchronous subprocesses (as used in M-x compile and M-x shell). @@ -3507,7 +3551,8 @@ AH_BOTTOM([ #endif /* These default definitions are good for almost all machines. - The exceptions override them in m/MACHINE.h. */ + Any exceptions should override them in m/MACHINE.h. + They must be usable in preprocessor conditionals. */ #ifndef BITS_PER_CHAR #define BITS_PER_CHAR 8 @@ -3517,9 +3562,6 @@ AH_BOTTOM([ #define BITS_PER_SHORT 16 #endif -/* Note that lisp.h uses this in a preprocessor conditional, so it - would not work to use sizeof. That being so, we do all of them - without sizeof, for uniformity's sake. */ #ifndef BITS_PER_INT #define BITS_PER_INT 32 #endif @@ -3532,6 +3574,10 @@ AH_BOTTOM([ #endif #endif +#if !defined BITS_PER_LONG_LONG && HAVE_LONG_LONG_INT +#define BITS_PER_LONG_LONG 64 +#endif + /* Define if the compiler supports function prototypes. It may do so but not define __STDC__ (e.g. DEC C by default) or may define it as zero. */ #undef PROTOTYPES @@ -3539,24 +3585,6 @@ AH_BOTTOM([ #include #include -#ifdef HAVE_ALLOCA_H -# include -#elif defined __GNUC__ -# define alloca __builtin_alloca -#elif defined _AIX -# define alloca __alloca -#else -# include -# ifdef __cplusplus -extern "C" -# endif -void *alloca (size_t); -#endif - -#ifndef HAVE_SIZE_T -typedef unsigned size_t; -#endif - #ifndef HAVE_STRCHR #define strchr(a, b) index (a, b) #endif @@ -3673,8 +3701,9 @@ echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGI echo " Does Emacs use -lgpm? ${HAVE_GPM}" echo " Does Emacs use -ldbus? ${HAVE_DBUS}" echo " Does Emacs use -lgconf? ${HAVE_GCONF}" +echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}" echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" -echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}" +echo " Does Emacs use -lgnutls (2.6.x or higher)? ${HAVE_GNUTLS}" echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" @@ -3714,10 +3743,34 @@ fi test "${exec_prefix}" != NONE && exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`] +dnl Obviously there is duplication here wrt $SUBDIR_MAKEFILES. +dnl You _can_ use that variable in AC_CONFIG_FILES, so long as any directory +dnl using automake (ie lib/) is explicitly listed and not "hidden" in a variable +dnl (else you get "no `Makefile.am' found for any configure output"). +dnl This will work, but you get a config.status that is not quite right +dnl (see http://lists.gnu.org/archive/html/bug-autoconf/2008-08/msg00028.html). +dnl That doesn't have any obvious consequences for Emacs, but on the whole +dnl it seems better to just live with the duplication. +SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile" + AC_CONFIG_FILES([Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \ - doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \ - doc/lispref/Makefile src/Makefile \ - lwlib/Makefile lisp/Makefile leim/Makefile test/automated/Makefile]) + doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \ + doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile \ + leim/Makefile]) + +dnl test/ is not present in release tarfiles. +opt_makefile=test/automated/Makefile + +if test -f $srcdir/${opt_makefile}.in; then + SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" + dnl Again, it's best not to use a variable. Though you can add + dnl ", [], [opt_makefile='$opt_makefile']" and it should work. + AC_CONFIG_FILES([test/automated/Makefile]) +fi + +SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'` + +AC_SUBST(SUBDIR_MAKEFILES_IN) dnl Make the necessary directories, if they don't exist. AC_CONFIG_COMMANDS([mkdirs], [