X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/829f35a5bb1a68526a3175542bad177420df1e1d..f34477d7f057db3225b2f4335cc71cf556c6ad32:/configure.in diff --git a/configure.in b/configure.in index c36c6b2aa3..da1589f99c 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl autoconf dnl in the directory containing this script. dnl dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003, -dnl 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +dnl 2004, 2005, 2006, 2007, 2008, 2009, 2010 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.62) -AC_INIT(emacs, 23.1.91) +AC_INIT(emacs, 23.2.50) AC_CONFIG_HEADER(src/config.h:src/config.in) AC_CONFIG_SRCDIR(src/lisp.h) @@ -169,6 +169,12 @@ if test "X${with_pkg_config_prog}" != X; then fi fi +CRT_DIR= +AC_ARG_WITH([crt-dir],dnl +[AS_HELP_STRING([--with-crt-dir=DIR],[directory containing crtn.o etc. +This option is only used on x86-64 and s390x GNU/Linux architectures.])]) +CRT_DIR="${with_crt_dir}" + AC_ARG_WITH([gnustep-conf],dnl [AS_HELP_STRING([--with-gnustep-conf=PATH],[path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE, or /etc/GNUstep/GNUstep.conf])]) test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \ @@ -996,18 +1002,28 @@ AC_CONFIG_LIBOBJ_DIR(src) dnl Do this early because it can frob feature test macros for Unix-98 &c. AC_SYS_LARGEFILE - -### The standard library on x86-64 and s390x GNU/Linux distributions can -### be located in either /usr/lib64 or /usr/lib. -### In some rare cases, /usr/lib64 exists but does not contain the -### relevant files (bug#1287). Hence test for crtn.o. +## Note: at present CRT_DIR is only used for amdx86-64 and ibms390x. +## Other machine types hard-code the location in src/[ms]/*.h. case "${canonical}" in x86_64-*-linux-gnu* | s390x-*-linux-gnu* ) - if test -e /usr/lib64/crtn.o; then - AC_DEFINE(HAVE_LIB64_DIR, 1, - [Define to 1 if the directory /usr/lib64 exists.]) -fi + ## 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). + ## If user specified a crt-dir, use that unconditionally. + if test "X$CRT_DIR" = "X"; then + CRT_DIR=/usr/lib + test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64 + fi + + test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ + AC_MSG_ERROR([crt*.o not found. Use --with-crt-dir to specify the location.]) + ;; esac +test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib +AC_SUBST(CRT_DIR) dnl This function defintion taken from Gnome 2.0 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) @@ -1106,7 +1122,7 @@ AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ - sys/utsname.h pwd.h) + sys/utsname.h pwd.h utmp.h) AC_MSG_CHECKING(if personality LINUX32 can be set) AC_TRY_COMPILE([#include ], [personality (PER_LINUX32)], @@ -1984,12 +2000,17 @@ if test "${HAVE_X11}" = "yes"; then if test "x${with_xft}" != "xno"; then PKG_CHECK_MODULES(XFT, xft >= 0.13.0, , HAVE_XFT=no) - if test "$HAVE_XFT" != no; then + ## Because xftfont.c uses XRenderQueryExtension, we also + ## need to link to -lXrender. + HAVE_XRENDER=no + AC_CHECK_LIB(Xrender, XRenderQueryExtension, HAVE_XRENDER=yes) + if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then OLD_CPPFLAGS="$CPPFLAGS" OLD_CFLAGS="$CFLAGS" OLD_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" CFLAGS="$CFLAGS $XFT_CFLAGS" + XFT_LIBS="-lXrender $XFT_LIBS" LIBS="$XFT_LIBS $LIBS" AC_CHECK_HEADER(X11/Xft/Xft.h, AC_CHECK_LIB(Xft, XftFontOpen, HAVE_XFT=yes, , $XFT_LIBS)) @@ -2595,6 +2616,14 @@ dnl Fixme: Use AC_FUNC_MEMCMP since memcmp is used. (Needs libobj replacement.) CFLAGS="$REAL_CFLAGS" CPPFLAGS="$REAL_CPPFLAGS" +## Hack to detect a buggy GCC version. +if test "x$GCC" = xyes \ + && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ + && test x"`echo $CFLAGS | grep '\-O@<:@23@:>@'`" != x \ + && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then + AC_MSG_ERROR([GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'.]) +fi + #### Find out which version of Emacs this is. [version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \ | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`] @@ -2712,7 +2741,7 @@ fi AH_TOP([/* GNU Emacs site configuration template file. Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, - 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -3041,11 +3070,6 @@ to run if these resources are not installed." echo fi -if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then - echo "D-Bus integration has been tested for GNU/Linux only." - echo -fi - # Remove any trailing slashes in these variables. [test "${prefix}" != NONE && @@ -3059,7 +3083,7 @@ test "${exec_prefix}" != NONE && # the C preprocessor to some helpful value like 1, or maybe the empty # string. Needless to say consequent macro substitutions are less # than conducive to the makefile finding the correct directory. -[cpp_undefs="`echo $srcdir $configuration $canonical | +[cpp_undefs="`echo $srcdir $configuration $canonical unix | sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"]