X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/adee8a65c46c101249a665ad34bad70fcd8b0deb..48def666f155f3a102594f3a7d800ae549c36313:/configure.in diff --git a/configure.in b/configure.in index 83acc82064..3a7e42965e 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl autoconf dnl in the directory containing this script. dnl If you changed any AC_DEFINES, also run autoheader. dnl -dnl Copyright (C) 1994-1996, 1999-2011 Free Software Foundation, Inc. +dnl Copyright (C) 1994-1996, 1999-2012 Free Software Foundation, Inc. dnl dnl This file is part of GNU Emacs. dnl @@ -22,7 +22,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with GNU Emacs. If not, see . AC_PREREQ(2.65) -AC_INIT(emacs, 24.0.92) +AC_INIT(emacs, 24.1.50) AC_CONFIG_HEADER(src/config.h:src/config.in) AC_CONFIG_SRCDIR(src/lisp.h) AC_CONFIG_AUX_DIR(build-aux) @@ -37,6 +37,7 @@ dnl hence the single quotes. This is per the GNU coding standards, see dnl (autoconf) Installation Directory Variables dnl See also epaths.h below. lispdir='${datadir}/emacs/${version}/lisp' +leimdir='${datadir}/emacs/${version}/leim' locallisppath='${datadir}/emacs/${version}/site-lisp:'\ '${datadir}/emacs/site-lisp' lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim' @@ -374,8 +375,8 @@ case "${srcdir}" in * ) srcdir="`(cd ${srcdir}; pwd)`" ;; esac -#### Given the configuration name, set machfile and opsysfile to the -#### names of the m/*.h and s/*.h files we should use. +#### Given the configuration name, set opsysfile to the +#### name of s/*.h file we should use. ### Canonicalize the configuration name. @@ -395,13 +396,11 @@ dnl quotation begins ### If you add support for a new configuration, add code to this ### switch statement to recognize your configuration name and select -### the appropriate operating system and machine description files. +### the appropriate operating system file. -### You would hope that you could choose an m/*.h file pretty much -### based on the machine portion of the configuration name, and an s/*.h +### You would hope that you could choose an s/*.h ### file based on the operating system portion. However, it turns out -### that each m/*.h file is pretty manufacturer-specific - for -### example mips.h is MIPS +### that each s/*.h file is pretty manufacturer-specific. ### So we basically have to have a special case for each ### configuration name. ### @@ -411,95 +410,49 @@ dnl quotation begins ### prepared to handle anything reasonably. If version numbers ### matter, be sure /etc/MACHINES says something about it. -machine='' opsys='' unported=no +opsys='' unported=no case "${canonical}" in ## GNU/Linux and similar ports *-*-linux* ) opsys=gnu-linux - case ${canonical} in - alpha*) machine=alpha ;; - s390x-*) machine=ibms390x ;; - powerpc*) machine=macppc ;; - sparc*) machine=sparc ;; - ia64*) machine=ia64 ;; - m68k*) machine=m68k ;; - x86_64*) machine=amdx86-64 ;; - esac ;; ## FreeBSD ports *-*-freebsd* ) opsys=freebsd - case "${canonical}" in - alpha*) machine=alpha ;; - amd64-*|x86_64-*) machine=amdx86-64 ;; - ia64-*) machine=ia64 ;; - i[3456]86-*) machine=intel386 ;; - powerpc-*) machine=macppc ;; - sparc-*) machine=sparc ;; - sparc64-*) machine=sparc ;; - esac ;; ## FreeBSD kernel + glibc based userland *-*-kfreebsd*gnu* ) opsys=gnu-kfreebsd - case "${canonical}" in - alpha*) machine=alpha ;; - amd64-*|x86_64-*) machine=amdx86-64 ;; - ia64-*) machine=ia64 ;; - i[3456]86-*) machine=intel386 ;; - powerpc-*) machine=macppc ;; - sparc-*) machine=sparc ;; - sparc64-*) machine=sparc ;; - esac ;; ## NetBSD ports *-*-netbsd* ) opsys=netbsd - case "${canonical}" in - alpha*) machine=alpha ;; - x86_64-*) machine=amdx86-64 ;; - i[3456]86-*) machine=intel386 ;; - m68k-*) machine=m68k ;; - powerpc-*) machine=macppc ;; - sparc*-) machine=sparc ;; - vax-*) machine=vax ;; - esac ;; ## OpenBSD ports *-*-openbsd* ) opsys=openbsd - case "${canonical}" in - alpha*) machine=alpha ;; - x86_64-*) machine=amdx86-64 ;; - i386-*) machine=intel386 ;; - powerpc-*) machine=macppc ;; - sparc*) machine=sparc ;; - vax-*) machine=vax ;; - esac ;; ## Apple Darwin / Mac OS X *-apple-darwin* ) case "${canonical}" in - i[3456]86-* ) machine=intel386 ;; - powerpc-* ) machine=macppc ;; - x86_64-* ) machine=amdx86-64 ;; + i[3456]86-* ) ;; + powerpc-* ) ;; + x86_64-* ) ;; * ) unported=yes ;; esac opsys=darwin - # Define CPP as follows to make autoconf work correctly. - CPP="${CC-cc} -E -no-cpp-precomp" - # Use fink packages if available. - if test -d /sw/include && test -d /sw/lib; then - GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" - CPP="${CPP} ${GCC_TEST_OPTIONS}" - NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} - fi + ## Use fink packages if available. + ## FIXME find a better way to do this: http://debbugs.gnu.org/11507 +## if test -d /sw/include && test -d /sw/lib; then +## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib" +## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS} +## fi ;; ## HP 9000 series 700 and 800, running HP/UX @@ -513,16 +466,16 @@ case "${canonical}" in ## IBM machines rs6000-ibm-aix4.[23]* ) - machine=ibmrs6000 opsys=aix4-2 + opsys=aix4-2 ;; powerpc-ibm-aix4.[23]* ) - machine=ibmrs6000 opsys=aix4-2 + opsys=aix4-2 ;; rs6000-ibm-aix[56]* ) - machine=ibmrs6000 opsys=aix4-2 + opsys=aix4-2 ;; powerpc-ibm-aix[56]* ) - machine=ibmrs6000 opsys=aix4-2 + opsys=aix4-2 ;; ## Silicon Graphics machines @@ -532,7 +485,6 @@ case "${canonical}" in # 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). - NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C" NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C" ;; @@ -541,26 +493,23 @@ case "${canonical}" in | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \ | x86_64-*-solaris2* | x86_64-*-sunos5*) case "${canonical}" in - i[3456]86-*-* ) machine=intel386 ;; - amd64-*-*|x86_64-*-*) machine=amdx86-64 ;; - sparc* ) machine=sparc ;; + i[3456]86-*-* ) ;; + amd64-*-*|x86_64-*-*) ;; + sparc* ) ;; * ) unported=yes ;; esac case "${canonical}" in *-sunos5.6* | *-solaris2.6* ) opsys=sol2-6 - NON_GNU_CPP=/usr/ccs/lib/cpp RANLIB="ar -ts" ;; *-sunos5.[7-9]* | *-solaris2.[7-9]* ) opsys=sol2-6 emacs_check_sunpro_c=yes - NON_GNU_CPP=/usr/ccs/lib/cpp ;; *-sunos5* | *-solaris* ) opsys=sol2-10 emacs_check_sunpro_c=yes - NON_GNU_CPP=/usr/ccs/lib/cpp ;; esac ## Watch out for a compiler that we know will not work. @@ -578,15 +527,12 @@ case "${canonical}" in ## Intel 386 machines where we don't care about the manufacturer. i[3456]86-*-* ) - machine=intel386 case "${canonical}" in *-cygwin ) opsys=cygwin ;; - *-darwin* ) opsys=darwin - CPP="${CC-cc} -E -no-cpp-precomp" - ;; - *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; - *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; - *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;; + *-darwin* ) opsys=darwin ;; + *-sysv4.2uw* ) opsys=unixware ;; + *-sysv5uw* ) opsys=unixware ;; + *-sysv5OpenUNIX* ) opsys=unixware ;; ## Otherwise, we'll fall through to the generic opsys code at the bottom. esac ;; @@ -619,137 +565,148 @@ if test $unported = yes; then Check `etc/MACHINES' for recognized configuration names.]) fi -if test -n "$machine"; then - machfile="m/${machine}.h" -else - machfile= -fi opsysfile="s/${opsys}.h" #### Choose a compiler. -test -n "$CC" && cc_specified=yes - -# Save the value of CFLAGS that the user specified. -SPECIFIED_CFLAGS="$CFLAGS" dnl Sets GCC=yes if using gcc. AC_PROG_CC AM_PROG_CC_C_O -# Initialize gnulib right after verifying that the C compiler works. -gl_EARLY - -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi - -## If not using gcc, and on Solaris, and no CPP specified, see if -## using a Sun compiler, which needs -Xs to prevent whitespace. -if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ - test x"$CPP" = x; then - AC_MSG_CHECKING([whether we are using a Sun C compiler]) - AC_CACHE_VAL(emacs_cv_sunpro_c, - [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], -[[#ifndef __SUNPRO_C -fail; -#endif -]])], emacs_cv_sunpro_c=yes, emacs_cv_sunpro_c=no)]) - AC_MSG_RESULT($emacs_cv_sunpro_c) - - if test x"$emacs_cv_sunpro_c" = xyes; then - NON_GNU_CPP="$CC -E -Xs" - fi -fi - -#### Some systems specify a CPP to use unless we are using GCC. -#### Now that we know whether we are using GCC, we can decide whether -#### to use that one. -if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x -then - CPP="$NON_GNU_CPP" -fi - -#### Some systems specify a CC to use unless we are using GCC. -#### Now that we know whether we are using GCC, we can decide whether -#### to use that one. -if test "x$NON_GNU_CC" != x && test x$GCC != xyes && - test x$cc_specified != xyes -then - CC="$NON_GNU_CC" -fi - if test x$GCC = xyes; then test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" else test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" fi -### Use -Wdeclaration-after-statement if the compiler supports it -AC_MSG_CHECKING([whether gcc understands -Wdeclaration-after-statement]) -SAVE_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wdeclaration-after-statement" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) -if test $has_option = yes; then - C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" -fi -AC_MSG_RESULT($has_option) -CFLAGS="$SAVE_CFLAGS" -unset has_option -unset SAVE_CFLAGS +# Initialize gnulib right after choosing the compiler. +gl_EARLY -### Use -Wold-style-definition if the compiler supports it -# This can be removed when conversion to standard C is finished. -AC_MSG_CHECKING([whether gcc understands -Wold-style-definition]) -SAVE_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wold-style-definition" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) -if test $has_option = yes; then - C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" -fi -AC_MSG_RESULT($has_option) -CFLAGS="$SAVE_CFLAGS" -unset has_option -unset SAVE_CFLAGS +AC_ARG_ENABLE([gcc-warnings], + [AS_HELP_STRING([--enable-gcc-warnings], + [turn on lots of GCC warnings (for developers)])], + [case $enableval in + yes|no) ;; + *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;; + esac + gl_gcc_warnings=$enableval], + [gl_gcc_warnings=no] +) + +# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found]) +# ------------------------------------------------ +# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND. +# Otherwise, run RUN-IF-NOT-FOUND. +AC_DEFUN([gl_GCC_VERSION_IFELSE], + [AC_PREPROC_IFELSE( + [AC_LANG_PROGRAM( + [[ +#if ($1) < __GNUC__ || (($1) == __GNUC__ && ($2) <= __GNUC_MINOR__) +/* ok */ +#else +# error "your version of gcc is older than $1.$2" +#endif + ]]), + ], [$3], [$4]) + ] +) + +# When compiling with GCC, prefer -isystem to -I when including system +# include files, to avoid generating useless diagnostics for the files. +if test "$gl_gcc_warnings" != yes; then + isystem='-I' +else + isystem='-isystem ' + + # This, $nw, is the list of warnings we disable. + nw= + + case $with_x_toolkit in + lucid | athena | motif) + # Old toolkits mishandle 'const'. + nw="$nw -Wwrite-strings" + ;; + *) + gl_WARN_ADD([-Werror], [WERROR_CFLAGS]) + ;; + esac + AC_SUBST([WERROR_CFLAGS]) + + nw="$nw -Waggregate-return" # anachronistic + nw="$nw -Wlong-long" # C90 is anachronistic + nw="$nw -Wc++-compat" # We don't care about C++ compilers + nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib + nw="$nw -Wtraditional" # Warns on #elif which we use often + nw="$nw -Wcast-qual" # Too many warnings for now + nw="$nw -Wconversion" # Too many warnings for now + nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings + nw="$nw -Wsign-conversion" # Too many warnings for now + nw="$nw -Woverlength-strings" # Not a problem these days + nw="$nw -Wtraditional-conversion" # Too many warnings for now + nw="$nw -Wpadded" # Our structs are not padded + nw="$nw -Wredundant-decls" # We regularly (re)declare getenv etc. + nw="$nw -Wlogical-op" # any use of fwrite provokes this + nw="$nw -Wformat-nonliteral" # Emacs does this a lot + nw="$nw -Wvla" # warnings in gettext.h + nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ + nw="$nw -Wswitch-enum" # Too many warnings for now + nw="$nw -Wswitch-default" # Too many warnings for now + nw="$nw -Wfloat-equal" # e.g., ftoastr.c + nw="$nw -Winline" # e.g., dispnew.c's inlining of row_equal_p + + # Emacs doesn't care about shadowing; see + # . + nw="$nw -Wshadow" + + # The following lines should be removable at some point. + nw="$nw -Wstack-protector" + nw="$nw -Wstrict-overflow" + nw="$nw -Wsuggest-attribute=const" + nw="$nw -Wsuggest-attribute=pure" + + gl_MANYWARN_ALL_GCC([ws]) + gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) + for w in $ws; do + gl_WARN_ADD([$w]) + done + gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one + gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now + gl_WARN_ADD([-Wno-type-limits]) # Too many warnings for now + gl_WARN_ADD([-Wno-switch]) # Too many warnings for now + gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now + gl_WARN_ADD([-Wno-format-nonliteral]) -### Use -Wimplicit-function-declaration if the compiler supports it -AC_MSG_CHECKING([whether gcc understands -Wimplicit-function-declaration]) -SAVE_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wimplicit-function-declaration" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) -if test $has_option = yes; then - C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" -fi -AC_MSG_RESULT($has_option) -CFLAGS="$SAVE_CFLAGS" -unset has_option -unset SAVE_CFLAGS + # In spite of excluding -Wlogical-op above, it is enabled, as of + # gcc 4.5.0 20090517. + gl_WARN_ADD([-Wno-logical-op]) -AC_SUBST(C_WARNINGS_SWITCH) + gl_WARN_ADD([-fdiagnostics-show-option]) + gl_WARN_ADD([-funit-at-a-time]) + AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) + AC_DEFINE([_FORTIFY_SOURCE], [2], + [enable compile-time and run-time bounds-checking, and some warnings]) + AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) -#### Some other nice autoconf tests. + # We use a slightly smaller set of warning options for lib/. + # Remove the following and save the result in GNULIB_WARN_CFLAGS. + nw= + nw="$nw -Wunused-macros" -dnl checks for programs -AC_PROG_CPP -AC_PROG_INSTALL -if test "x$RANLIB" = x; then - AC_PROG_RANLIB + gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw]) + AC_SUBST([GNULIB_WARN_CFLAGS]) fi -## Although we're running on an amd64 kernel, we're actually compiling for -## the x86 architecture. The user should probably have provided an -## explicit --build to `configure', but if everything else than the kernel -## is running in i386 mode, we can help them out. -if test "$machine" = "amdx86-64"; then - AC_CHECK_DECL([i386]) - if test "$ac_cv_have_decl_i386" = "yes"; then - canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'` - machine=intel386 - machfile="m/${machine}.h" - fi -fi + + +dnl Some other nice autoconf tests. +dnl These are commented out, since gl_EARLY and/or Autoconf already does them. +dnl AC_PROG_INSTALL +dnl AC_PROG_MKDIR_P +dnl if test "x$RANLIB" = x; then +dnl AC_PROG_RANLIB +dnl fi AC_PATH_PROG(INSTALL_INFO, install-info) AC_PATH_PROG(INSTALL_INFO, install-info,, /usr/sbin) @@ -758,12 +715,12 @@ dnl Don't use GZIP, which is used by gzip for additional parameters. AC_PATH_PROG(GZIP_PROG, gzip) -## Need makeinfo >= 4.6 (?) to build the manuals. +## Need makeinfo >= 4.7 (?) to build the manuals. AC_PATH_PROG(MAKEINFO, makeinfo, no) dnl By this stage, configure has already checked for egrep and set EGREP, dnl or exited with an error if no egrep was found. if test "$MAKEINFO" != "no" && \ - test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[[^0-9]]*([[1-4]][[0-9]]+|[[5-9]]|4\.[[6-9]]|4\.[[1-5]][[0-9]]+)'`" = x; then + test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[[^0-9]]*([[1-4]][[0-9]]+|[[5-9]]|4\.[[7-9]]|4\.[[1-6]][[0-9]]+)'`" = x; then MAKEINFO=no fi @@ -783,7 +740,7 @@ if test "$MAKEINFO" = "no"; then if test "x${with_makeinfo}" = "xno"; then HAVE_MAKEINFO=no elif test ! -e $srcdir/info/emacs; then - AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.6, and your + AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.7, and your source tree does not seem to have pre-built manuals in the `info' directory. Either install a suitable version of makeinfo, or re-run configure with the `--without-makeinfo' option to build without the manuals.] ) @@ -791,6 +748,12 @@ with the `--without-makeinfo' option to build without the manuals.] ) fi AC_SUBST(HAVE_MAKEINFO) +dnl Just so that there is only a single place we need to edit. +INFO_EXT=.info +INFO_OPTS=--no-split +AC_SUBST(INFO_EXT) +AC_SUBST(INFO_OPTS) + dnl Add our options to ac_link now, after it is set up. if test x$GCC = xyes; then @@ -821,11 +784,6 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [AC_MSG_RESULT(no)]) -# The value of CPP is a quoted variable reference, so we need to do this -# to get its actual value... -CPP=`eval "echo $CPP"` - - dnl The function dump-emacs will not be defined and temacs will do dnl (load "loadup") automatically unless told otherwise. test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no @@ -877,7 +835,9 @@ case "$opsys" in ## Let `ld' find image libs and similar things in /usr/local/lib. ## The system compiler, GCC, has apparently been modified to not ## look there, contrary to what a stock GCC would do. - LD_SWITCH_SYSTEM=-L/usr/local/lib +### It's not our place to do this. See bug#10313#17. +### LD_SWITCH_SYSTEM=-L/usr/local/lib + : ;; gnu-linux) @@ -886,7 +846,9 @@ case "$opsys" in ;; netbsd) - LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib" +### It's not our place to do this. See bug#10313#17. +### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib" + : ;; openbsd) @@ -899,7 +861,7 @@ AC_SUBST(LD_SWITCH_SYSTEM) ac_link="$ac_link $LD_SWITCH_SYSTEM" -## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX, +## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH, ## which has not been defined yet. When this was handled with cpp, ## it was expanded to null when configure sourced the s/*.h file. ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles. @@ -911,13 +873,13 @@ ac_link="$ac_link $LD_SWITCH_SYSTEM" ## LD_SWITCH_SYSTEM_TEMACS. case "$opsys" in netbsd|openbsd) - ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R. - LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;; + LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;; esac C_SWITCH_MACHINE= -if test "$machine" = "alpha"; then +case $canonical in + alpha*) AC_CHECK_DECL([__ELF__]) if test "$ac_cv_have_decl___ELF__" = "yes"; then ## With ELF, make sure that all common symbols get allocated to in the @@ -933,7 +895,8 @@ if test "$machine" = "alpha"; then else UNEXEC_OBJ=unexalpha.o fi -fi + ;; +esac AC_SUBST(C_SWITCH_MACHINE) AC_SUBST(UNEXEC_OBJ) @@ -1124,17 +1087,19 @@ AC_DEFUN([PKG_CHECK_MODULES], [ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then AC_MSG_CHECKING(for $2) - if $PKG_CONFIG --exists "$2" 2>&AS_MESSAGE_LOG_FD; then - AC_MSG_RESULT(yes) + if $PKG_CONFIG --exists "$2" 2>&AS_MESSAGE_LOG_FD && + $1_CFLAGS=`$PKG_CONFIG --cflags "$2" 2>&AS_MESSAGE_LOG_FD` && + $1_LIBS=`$PKG_CONFIG --libs "$2" 2>&AS_MESSAGE_LOG_FD`; then + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + $1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"` + $1_LIBS=`AS_ECHO(["$$1_LIBS"]) | sed -e 's,///*,/,g'` + AC_MSG_RESULT([yes CFLAGS='$$1_CFLAGS' LIBS='$$1_LIBS']) succeeded=yes - - AC_MSG_CHECKING($1_CFLAGS) - $1_CFLAGS=`$PKG_CONFIG --cflags "$2"|sed -e 's,///*,/,g'` - AC_MSG_RESULT($$1_CFLAGS) - - AC_MSG_CHECKING($1_LIBS) - $1_LIBS=`$PKG_CONFIG --libs "$2"|sed -e 's,///*,/,g'` - AC_MSG_RESULT($$1_LIBS) else AC_MSG_RESULT(no) $1_CFLAGS="" @@ -1329,27 +1294,6 @@ AC_CHECK_MEMBERS([struct ifreq.ifr_flags, struct ifreq.ifr_hwaddr, #include #endif]) -dnl checks for compiler characteristics - -dnl Testing __STDC__ to determine prototype support isn't good enough. -dnl DEC C, for instance, doesn't define it with default options, and -dnl is used on 64-bit systems (OSF Alphas). Similarly for volatile -dnl and void *. -AC_C_PROTOTYPES -AC_C_VOLATILE -AC_C_CONST -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)]) -if test $emacs_cv_void_star = yes; then - AC_DEFINE(POINTER_TYPE, void) -else - AC_DEFINE(POINTER_TYPE, char) -fi -AH_TEMPLATE(POINTER_TYPE, - [Define as `void' if your compiler accepts `void *'; otherwise - define as `char'.])dnl - dnl Check for endianness. AC_C_BIGENDIAN @@ -1395,10 +1339,8 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then fi if test $ac_enable_autodepend = yes; then DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP' - ## In parallel builds, another make might create depdir between - ## the first test and mkdir, so stick another test on the end. - ## Or use install-sh -d? mkdir -p is not portable. - MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}' + ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe. + MKDEPDIR='${MKDIR_P} ${DEPDIR}' deps_frag=autodeps.mk fi fi @@ -1424,22 +1366,11 @@ else window_system=x11 fi -## Workaround for bug in autoconf <= 2.62. -## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html -## No need to do anything special for these standard directories. -if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then - - x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'` - -fi - -LD_SWITCH_X_SITE_AUX= -LD_SWITCH_X_SITE_AUX_RPATH= +LD_SWITCH_X_SITE_RPATH= if test "${x_libraries}" != NONE; then if test -n "${x_libraries}"; then LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` - LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` - LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'` + LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"` fi x_default_search_path="" x_search_path=${x_libraries} @@ -1462,11 +1393,10 @@ ${x_library}/X11/%T/%N%S" fi done fi -AC_SUBST(LD_SWITCH_X_SITE_AUX) -AC_SUBST(LD_SWITCH_X_SITE_AUX_RPATH) +AC_SUBST(LD_SWITCH_X_SITE_RPATH) if test "${x_includes}" != NONE && test -n "${x_includes}"; then - C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` + C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"` fi if test x"${x_includes}" = x; then @@ -1496,20 +1426,17 @@ CPPFLAGS="$CPPFLAGS -x objective-c" CFLAGS="$CFLAGS -x objective-c" TEMACS_LDFLAGS2="\${LDFLAGS}" GNU_OBJC_CFLAGS= -dnl I don't think it's especially important, but src/Makefile.in -dnl (now the only user of ns_appdir) used to go to the trouble of adding a -dnl trailing "/" to it, so now we do it here. if test "${with_ns}" != no; then if test "${opsys}" = darwin; then NS_IMPL_COCOA=yes ns_appdir=`pwd`/nextstep/Emacs.app - ns_appbindir=${ns_appdir}/Contents/MacOS/ + ns_appbindir=${ns_appdir}/Contents/MacOS ns_appresdir=${ns_appdir}/Contents/Resources ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base elif test -f $GNUSTEP_CONFIG_FILE; then NS_IMPL_GNUSTEP=yes ns_appdir=`pwd`/nextstep/Emacs.app - ns_appbindir=${ns_appdir}/ + ns_appbindir=${ns_appdir} ns_appresdir=${ns_appdir}/Resources ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base dnl FIXME sourcing this several times in subshells seems inefficient. @@ -1553,28 +1480,45 @@ fail; AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], [AC_MSG_ERROR([`--with-ns' was specified, but the include files are missing or cannot be compiled.])]) - NS_HAVE_NSINTEGER=yes AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [NSInteger i;])], ns_have_nsinteger=yes, ns_have_nsinteger=no) - if test $ns_have_nsinteger = no; then - NS_HAVE_NSINTEGER=no + if test $ns_have_nsinteger = yes; then + AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.]) fi fi AC_SUBST(TEMACS_LDFLAGS2) +INSTALL_ARCH_INDEP_EXTRA=install-etc +ns_self_contained=no ns_frag=/dev/null NS_OBJ= NS_OBJC_OBJ= if test "${HAVE_NS}" = yes; then + if test "$with_toolkit_scroll_bars" = "no"; then + AC_MSG_ERROR([Non-toolkit scroll bars are not implemented for Nextstep.]) + fi + window_system=nextstep with_xft=no # set up packaging dirs if test "${EN_NS_SELF_CONTAINED}" = yes; then + ns_self_contained=yes prefix=${ns_appresdir} exec_prefix=${ns_appbindir} - libexecdir=${ns_appbindir}/libexec + dnl This one isn't really used, only archlibdir is. + libexecdir="\${ns_appbindir}/libexec" + archlibdir="\${ns_appbindir}/libexec" + docdir="\${ns_appresdir}/etc" + etcdir="\${ns_appresdir}/etc" + dnl FIXME maybe set datarootdir instead. + dnl That would also get applications, icons, man. + infodir="\${ns_appresdir}/info" + mandir="\${ns_appresdir}/man" + lispdir="\${ns_appresdir}/lisp" + leimdir="\${ns_appresdir}/leim" + INSTALL_ARCH_INDEP_EXTRA= fi ns_frag=$srcdir/src/ns.mk NS_OBJ="fontset.o fringe.o image.o" @@ -1582,6 +1526,8 @@ if test "${HAVE_NS}" = yes; then fi CFLAGS="$tmp_CFLAGS" CPPFLAGS="$tmp_CPPFLAGS" +AC_SUBST(INSTALL_ARCH_INDEP_EXTRA) +AC_SUBST(ns_self_contained) AC_SUBST(NS_OBJ) AC_SUBST(NS_OBJC_OBJ) AC_SUBST(LIB_STANDARD) @@ -1635,20 +1581,23 @@ case ${HAVE_X11} in yes ) HAVE_MENUS=yes ;; esac -# Do the opsystem or machine files prohibit the use of the GNU malloc? +# Does the opsystem file prohibit the use of the GNU malloc? # Assume not, until told otherwise. GNU_MALLOC=yes -doug_lea_malloc=yes -AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no) -AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no) -AC_CACHE_CHECK(whether __after_morecore_hook exists, - emacs_cv_var___after_morecore_hook, -[AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern void (* __after_morecore_hook)();]],[[__after_morecore_hook = 0]])], - emacs_cv_var___after_morecore_hook=yes, - emacs_cv_var___after_morecore_hook=no)]) -if test $emacs_cv_var___after_morecore_hook = no; then - doug_lea_malloc=no -fi + +AC_CACHE_CHECK( + [whether malloc is Doug Lea style], + [emacs_cv_var_doug_lea_malloc], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + static void hook (void) {}]], + [[malloc_set_state (malloc_get_state ()); + __after_morecore_hook = hook; + __malloc_initialize_hook = hook;]])], + [emacs_cv_var_doug_lea_malloc=yes], + [emacs_cv_var_doug_lea_malloc=no])]) +doug_lea_malloc=$emacs_cv_var_doug_lea_malloc dnl See comments in aix4-2.h about maybe using system malloc there. @@ -1785,9 +1734,9 @@ if test "${HAVE_X11}" = "yes"; then CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS" # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. - # This is handled by LD_SWITCH_X_SITE_AUX during the real build, - # but it's more convenient here to set LD_RUN_PATH - # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX. + # This is handled by LD_SWITCH_X_SITE_RPATH during the real build, + # but it's more convenient here to set LD_RUN_PATH since this + # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH. if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH export LD_RUN_PATH @@ -1841,7 +1790,7 @@ if test "${HAVE_X11}" = "yes"; then fi AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \ -XScreenNumberOfScreen XSetWMProtocols) +XScreenNumberOfScreen) fi if test "${window_system}" = "x11"; then @@ -2006,8 +1955,7 @@ if test "${HAVE_GTK}" = "yes"; then fi dnl D-Bus has been tested under GNU/Linux only. Must be adapted for -dnl other platforms. Support for higher D-Bus versions than 1.0 is -dnl also not configured. +dnl other platforms. HAVE_DBUS=no DBUS_OBJ= if test "${with_dbus}" = "yes"; then @@ -2015,7 +1963,13 @@ if test "${with_dbus}" = "yes"; then if test "$HAVE_DBUS" = yes; then LIBS="$LIBS $DBUS_LIBS" AC_DEFINE(HAVE_DBUS, 1, [Define to 1 if using D-Bus.]) - AC_CHECK_FUNCS([dbus_watch_get_unix_fd]) + dnl dbus_watch_get_unix_fd has been introduced in D-Bus 1.1.1. + dnl dbus_validate_* have been introduced in D-Bus 1.5.12. + AC_CHECK_FUNCS(dbus_watch_get_unix_fd \ + dbus_validate_bus_name \ + dbus_validate_path \ + dbus_validate_interface \ + dbus_validate_member) DBUS_OBJ=dbusbind.o fi fi @@ -2234,6 +2188,8 @@ Motif version prior to 2.1. CPPFLAGS=$OLD_CPPFLAGS fi fi + AC_CHECK_HEADER([Xm/BulletinB.h], [], + [AC_MSG_ERROR([Motif toolkit requested but requirements not found.])]) fi dnl Use toolkit scroll bars if configured for GTK or X toolkit and either @@ -2249,7 +2205,7 @@ if test "${with_toolkit_scroll_bars}" != "no"; then AC_DEFINE(USE_TOOLKIT_SCROLL_BARS) HAVE_XAW3D=no USE_TOOLKIT_SCROLL_BARS=yes - elif test "${HAVE_XAW3D}" = "yes"; then + elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then AC_DEFINE(USE_TOOLKIT_SCROLL_BARS) USE_TOOLKIT_SCROLL_BARS=yes fi @@ -2586,7 +2542,7 @@ AC_SUBST(LIBGPM) dnl Check for malloc/malloc.h on darwin AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the header file.])]) -C_SWITCH_X_SYSTEM= +GNUSTEP_CFLAGS= ### Use NeXTstep API to implement GUI. if test "${HAVE_NS}" = "yes"; then AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on Mac OS X.]) @@ -2597,15 +2553,10 @@ if test "${HAVE_NS}" = "yes"; then AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.]) # See also .m.o rule in Makefile.in */ # FIXME: are all these flags really needed? Document here why. */ - dnl FIXME this should be renamed to GNUSTEP_CFLAGS, and only - dnl used in src/Makefile.in. - C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" + GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" ## Extra CFLAGS applied to src/*.m files. GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" fi - if test "${NS_HAVE_NSINTEGER}" = "yes"; then - AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.]) - fi # We also have mouse menus. HAVE_MENUS=yes OTHER_FILES=ns-app @@ -2739,15 +2690,16 @@ esac AC_SUBST(BLESSMAIL_TARGET) -AC_CHECK_FUNCS(gethostname getdomainname \ +AC_CHECK_FUNCS(gethostname \ rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \ -random lrand48 logb frexp fmod rint cbrt ftime setsid \ +random lrand48 logb frexp fmod rint cbrt setsid \ strerror fpathconf select euidaccess getpagesize tzset setlocale \ utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \ -__fpending mblen mbrlen mbsinit strsignal setitimer ualarm \ -sendto recvfrom getsockopt setsockopt getsockname getpeername \ -gai_strerror mkstemp getline getdelim mremap fsync sync \ -difftime mempcpy mblen mbrlen posix_memalign \ +__fpending strsignal setitimer \ +sendto recvfrom getsockname getpeername \ +gai_strerror mkstemp getline getdelim fsync sync \ +difftime posix_memalign \ +getpwent endpwent getgrent endgrent \ cfmakeraw cfsetspeed copysign __executable_start) dnl Cannot use AC_CHECK_FUNCS @@ -2778,48 +2730,66 @@ AC_CHECK_FUNCS(getpt) # It's better to believe a function is not available # than to expect to find it in ncurses. # Also we need tputs and friends to be able to build at all. -have_tputs_et_al=true +AC_MSG_CHECKING([for library containing tputs]) +# Run a test program that contains a call to tputs, a call that is +# never executed. This tests whether a pre-'main' dynamic linker +# works with the library. It's too much trouble to actually call +# tputs in the test program, due to portability hassles. When +# cross-compiling, assume the test program will run if it links. +AC_DEFUN([tputs_link_source], [ + AC_LANG_SOURCE( + [[extern void tputs (const char *, int, int (*)(int)); + int main (int argc, char **argv) + { + if (argc == 10000) + tputs (argv[0], 0, 0); + return 0; + }]]) +]) # Maybe curses should be tried earlier? # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35 -AC_SEARCH_LIBS(tputs, [ncurses terminfo termcap curses], , have_tputs_et_al=false) -if test "$have_tputs_et_al" != true; then +for tputs_library in '' tinfo ncurses terminfo termcap curses; do + OLIBS=$LIBS + if test -z "$tputs_library"; then + LIBS_TERMCAP= + msg='none required' + else + LIBS_TERMCAP=-l$tputs_library + msg=$LIBS_TERMCAP + LIBS="$LIBS_TERMCAP $LIBS" + fi + AC_RUN_IFELSE([tputs_link_source], [], [msg=no], + [AC_LINK_IFELSE([tputs_link_source], [], [msg=no])]) + LIBS=$OLIBS + if test "X$msg" != Xno; then + break + fi +done +AC_MSG_RESULT([$msg]) +if test "X$msg" = Xno; then AC_MSG_ERROR([The required function `tputs' was not found in any library. -These libraries were tried: libncurses, libterminfo, libtermcap, libcurses. +The following libraries were tried (in order): + libtinfo, libncurses, libterminfo, libtermcap, libcurses Please try installing whichever of these libraries is most appropriate for your system, together with its header files. For example, a libncurses-dev(el) or similar package.]) fi -# Must define this when any termcap library is found. -AC_DEFINE(HAVE_LIBNCURSES, 1, - [Define to 1 if you have the `ncurses' library (-lncurses).]) -## FIXME This was the cpp logic, but I am not sure it is right. -## The above test has not necessarily found libncurses. -HAVE_LIBNCURSES=yes - -## Use terminfo instead of termcap? -## Note only system files NOT using terminfo are: -## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and -## darwin|gnu without ncurses. -TERMINFO=no -LIBS_TERMCAP= -case "$opsys" in - ## cygwin: Fewer environment variables to go wrong, more terminal types. - ## hpux10-20: Use the system provided termcap(3) library. - ## openbsd: David Mazieres says this - ## is necessary. Otherwise Emacs dumps core when run -nw. - aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;; +## Use termcap instead of terminfo? +## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500. +TERMINFO=yes +## FIXME? In the cases below where we unconditionally set +## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo, +## if that was found above to have tputs. +## Should we use the gnu* logic everywhere? +case "$opsys" in ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2. ## The ncurses library has been moved out of the System framework in ## Mac OS X 10.2. So if configure detects it, set the command-line ## option to use it. - darwin|gnu*) - ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.) - if test "x$HAVE_LIBNCURSES" = "xyes"; then - TERMINFO=yes - LIBS_TERMCAP="-lncurses" - fi - ;; + darwin) LIBS_TERMCAP="-lncurses" ;; + + gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;; freebsd) AC_MSG_CHECKING([whether FreeBSD is new enough to use terminfo]) @@ -2833,43 +2803,34 @@ fail; AC_MSG_RESULT($emacs_cv_freebsd_terminfo) if test $emacs_cv_freebsd_terminfo = yes; then - TERMINFO=yes LIBS_TERMCAP="-lncurses" else + TERMINFO=no LIBS_TERMCAP="-ltermcap" fi ;; netbsd) - if test $ac_cv_search_tputs = -lterminfo; then - TERMINFO=yes - LIBS_TERMCAP="-lterminfo" - else + if test "x$LIBS_TERMCAP" != "x-lterminfo"; then + TERMINFO=no LIBS_TERMCAP="-ltermcap" fi ;; -esac + openbsd) LIBS_TERMCAP="-lncurses" ;; -case "$opsys" in ## hpux: Make sure we get select from libc rather than from libcurses ## because libcurses on HPUX 10.10 has a broken version of select. ## We used to use -lc -lcurses, but this may be cleaner. + ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly + # set that way, now it uses the default). Isn't this a contradiction? hpux*) LIBS_TERMCAP="-ltermcap" ;; - openbsd) LIBS_TERMCAP="-lncurses" ;; - - ## Must use system termcap, if we use any termcap. It does special things. - sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;; esac TERMCAP_OBJ=tparam.o if test $TERMINFO = yes; then AC_DEFINE(TERMINFO, 1, [Define to 1 if you use terminfo instead of termcap.]) - - ## Default used to be -ltermcap. Add a case above if need something else. - test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses" - TERMCAP_OBJ=terminfo.o fi AC_SUBST(LIBS_TERMCAP) @@ -3178,6 +3139,7 @@ AC_SUBST(libexecdir) AC_SUBST(mandir) AC_SUBST(infodir) AC_SUBST(lispdir) +AC_SUBST(leimdir) AC_SUBST(locallisppath) AC_SUBST(lisppath) AC_SUBST(x_default_search_path) @@ -3192,17 +3154,11 @@ AC_SUBST(gameuser) ## end of LIBX_BASE, but nothing ever set it. AC_SUBST(LD_SWITCH_X_SITE) AC_SUBST(C_SWITCH_X_SITE) -AC_SUBST(C_SWITCH_X_SYSTEM) +AC_SUBST(GNUSTEP_CFLAGS) AC_SUBST(CFLAGS) ## Used in lwlib/Makefile.in. AC_SUBST(X_TOOLKIT_TYPE) -if test -n "${machfile}"; then - M_FILE="\$(srcdir)/${machfile}" -else - M_FILE= -fi S_FILE="\$(srcdir)/${opsysfile}" -AC_SUBST(M_FILE) AC_SUBST(S_FILE) AC_SUBST(ns_appdir) AC_SUBST(ns_appbindir) @@ -3215,10 +3171,6 @@ AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}", [Define to the canonical Emacs configuration name.]) AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}", [Define to the options passed to configure.]) -if test -n "$machfile"; then - AC_DEFINE_UNQUOTED(config_machfile, "${machfile}", - [Define to the used machine dependent file.]) -fi AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}", [Define to the used os dependent file.]) @@ -3397,8 +3349,7 @@ case "$opsys" in ## #ifndef LD_SWITCH_SYSTEM ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF))) ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to: - ## not using gcc, darwin system not on an alpha (ie darwin, since - ## darwin + alpha does not occur). + ## not using gcc, darwin. ## Because this was done in src/Makefile.in, the resulting part of ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link). ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS, @@ -3407,13 +3358,14 @@ case "$opsys" in LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS" ;; - ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time. - ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at - ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX + ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to + ## find X at run-time. + ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the + ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM ## had different values in configure (in ac_link) and src/Makefile.in. ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. - gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; + gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;; *) LD_SWITCH_SYSTEM_TEMACS= ;; esac @@ -3437,12 +3389,12 @@ case "$opsys" in ## will also work on earlier NetBSD releases. netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;; - ## macpcc: NAKAJI Hiroyuki says + ## powerpc*: NAKAJI Hiroyuki says ## MkLinux/LinuxPPC needs this. - ## ibms390x only supports opsys = gnu-linux so it can be added here. + ## s390x-* only supports opsys = gnu-linux so it can be added here. gnu-*) - case "$machine" in - macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;; + case "$canonical" in + powerpc*|s390x-*) LD_FIRSTFLAG="-nostdlib" ;; esac ;; esac @@ -3454,7 +3406,7 @@ if test "x$ORDINARY_LINK" = "xyes"; then AC_DEFINE(ORDINARY_LINK, 1, [Define if the C compiler is the linker.]) ## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are: -## freebsd, gnu-* not on macppc|ibms390x. +## freebsd, gnu-* not on powerpc*|s390x*. elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure @@ -3516,7 +3468,7 @@ fi AH_TOP([/* GNU Emacs site configuration template file. -Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2011 +Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -3562,11 +3514,8 @@ AH_BOTTOM([ #define subprocesses -/* Include the os and machine dependent files. */ +/* Include the os dependent file. */ #include config_opsysfile -#ifdef config_machfile -# include config_machfile -#endif /* GNUstep needs a bit more pure memory. Of the existing knobs, SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. @@ -3590,38 +3539,6 @@ AH_BOTTOM([ #endif #endif -/* These default definitions are good for almost all machines. - 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 -#endif - -#ifndef BITS_PER_SHORT -#define BITS_PER_SHORT 16 -#endif - -#ifndef BITS_PER_INT -#define BITS_PER_INT 32 -#endif - -#ifndef BITS_PER_LONG -#ifdef _LP64 -#define BITS_PER_LONG 64 -#else -#define BITS_PER_LONG 32 -#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 - #include #include @@ -3689,17 +3606,12 @@ if test "${HAVE_GTK}" = "yes"; then USE_X_TOOLKIT=GTK fi -and_machfile= -if test -n "$machfile"; then - and_machfile=" and \`${machfile}'" -fi - echo " Configured for \`${canonical}'. Where should the build process find the source code? ${srcdir} - What operating system and machine description files should Emacs use? - \`${opsysfile}'${and_machfile} + What operating system file should Emacs use? + \`${opsysfile}' What compiler should emacs be built with? ${CC} ${CFLAGS} Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} Should Emacs use a relocating allocator for buffers? ${REL_ALLOC} @@ -3772,6 +3684,13 @@ to run if these resources are not installed." echo fi +if test "${opsys}" = "cygwin"; then + case `uname -r` in + 1.5.*) AC_MSG_WARN([[building Emacs on Cygwin 1.5 is not supported.]]) + echo + ;; + esac +fi # Remove any trailing slashes in these variables. [test "${prefix}" != NONE && @@ -3804,6 +3723,16 @@ if test -f $srcdir/${opt_makefile}.in; then AC_CONFIG_FILES([test/automated/Makefile]) fi + +dnl admin/ may or may not be present. +opt_makefile=admin/unidata/Makefile + +if test -f $srcdir/${opt_makefile}.in; then + SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" + AC_CONFIG_FILES([admin/unidata/Makefile]) +fi + + SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'` AC_SUBST(SUBDIR_MAKEFILES_IN) @@ -3826,7 +3755,7 @@ dnl the use of force in the `epaths-force' rule in Makefile.in. AC_CONFIG_COMMANDS([epaths], [ echo creating src/epaths.h ${MAKE-make} epaths-force -], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"]) +], [GCC="$GCC" CPPFLAGS="$CPPFLAGS"]) AC_CONFIG_COMMANDS([gdbinit], [ if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then