X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/a53cfbe58781e8f967d298d937e34efa3db93c1d..c613687be4a79df9fe2e3ef12b4fe3fecd07a591:/configure.in diff --git a/configure.in b/configure.in index c2f680106d..304f6ab2f9 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.50) +AC_INIT(emacs, 23.2.50) AC_CONFIG_HEADER(src/config.h:src/config.in) AC_CONFIG_SRCDIR(src/lisp.h) @@ -144,6 +144,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]) ## For the times when you want to build Emacs but don't have ## a suitable makeinfo, and can live without the manuals. @@ -756,6 +757,19 @@ CFLAGS="$SAVE_CFLAGS" unset has_option unset SAVE_CFLAGS +### 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_TRY_COMPILE([], [], 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 + #### Some other nice autoconf tests. dnl checks for programs @@ -785,11 +799,11 @@ fi ## pre-built, and not deleted by the normal clean rules. makeinfo is ## therefore in the category of "special tools" not normally required, which ## configure does not have to check for (eg autoconf itself). -## In a CVS checkout on the other hand, the manuals are not included. -## So makeinfo is a requirement to build from CVS, and configure +## In a Bazaar checkout on the other hand, the manuals are not included. +## So makeinfo is a requirement to build from Bazaar, and configure ## should test for it as it does for any other build requirement. ## We use the presence of $srcdir/info/emacs to distinguish a release, -## with pre-built manuals, from a CVS checkout. +## with pre-built manuals, from a Bazaar checkout. if test "$MAKEINFO" = "no"; then if test "x${with_makeinfo}" = "xno"; then MAKEINFO=off @@ -1092,7 +1106,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)], @@ -1596,7 +1610,7 @@ fi ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. HAVE_RSVG=no -if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then +if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then if test "${with_rsvg}" != "no"; then RSVG_REQUIRED=2.11.0 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" @@ -1739,6 +1753,16 @@ if test "${with_dbus}" = "yes"; then 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 +if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then + PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.13, HAVE_GCONF=yes, HAVE_GCONF=no) + if test "$HAVE_GCONF" = yes; then + AC_DEFINE(HAVE_GCONF, 1, [Define to 1 if using GConf.]) + fi +fi + dnl Do not put whitespace before the #include statements below. dnl Older compilers (eg sunos4 cc) choke on it. HAVE_XAW3D=no @@ -1960,12 +1984,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)) @@ -2571,6 +2600,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/'`] @@ -2688,7 +2725,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. @@ -2985,6 +3022,7 @@ echo " Does Emacs use -lpng? ${HAVE_PNG}" echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" 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 -lfreetype? ${HAVE_FREETYPE}" echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" @@ -3001,16 +3039,6 @@ fi echo -if test "$USE_X_TOOLKIT" = GTK; then - case "$canonical" in - *cygwin*) - echo "There are known problems with Emacs and Gtk+ on cygwin, so you - will probably get a crash on startup. If this happens, please use another - toolkit for Emacs. See etc/PROBLEMS for more information." - ;; - esac -fi - if test "$HAVE_NS" = "yes"; then echo echo "You must run \"make install\" in order to test the built application. @@ -3044,7 +3072,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'`"]