X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/067a69a2d38db30190997dc48dbf82988ffa3583..60a406cf162e7bfd7f32c44db12747164baaf923:/configure.in diff --git a/configure.in b/configure.in index 5d2992539f..0135b9f1bf 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]) @@ -364,17 +369,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. @@ -996,7 +990,7 @@ 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 @@ -1019,6 +1013,18 @@ if test "X$CRT_DIR" = "X"; then ## Default is /usr/lib. test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib + ## 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 "x${GCC}" = xyes; then + crt_file=`$CC --print-file-name=crt1.o 2>/dev/null` + case "$crt_file" in + */*) + CRT_DIR=`AS_DIRNAME(["$crt_file"])` + ;; + esac + fi + else ## Some platforms don't use any of these files, so it is not @@ -1297,9 +1303,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)]) @@ -1370,6 +1373,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 @@ -1503,7 +1510,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 @@ -1516,13 +1522,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) @@ -1827,6 +1831,7 @@ fi HAVE_GTK=no +GTK_OBJ= if test "${with_gtk3}" = "yes"; then GLIB_REQUIRED=2.28 GTK_REQUIRED=3.0 @@ -1838,6 +1843,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 @@ -1855,7 +1861,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) @@ -1873,7 +1878,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 : @@ -2476,7 +2481,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)]) @@ -2484,8 +2488,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) @@ -3421,23 +3423,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. @@ -3474,16 +3464,6 @@ AH_BOTTOM([ /* 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). @@ -3726,10 +3706,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], [