X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/60f5e585bd5a94ddce429a5271640293afa53089..474b43d90fdc3135aa4f277a1b64281f1d3b24a6:/configure.ac diff --git a/configure.ac b/configure.ac index 429443c2c2..cf930e7dee 100644 --- a/configure.ac +++ b/configure.ac @@ -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-2012 Free Software Foundation, Inc. +dnl Copyright (C) 1994-1996, 1999-2013 Free Software Foundation, Inc. dnl dnl This file is part of GNU Emacs. dnl @@ -23,9 +23,21 @@ dnl along with GNU Emacs. If not, see . AC_PREREQ(2.65) AC_INIT(emacs, 24.3.50) + dnl This is the documented way to record the args passed to configure, dnl rather than $ac_configure_args. emacs_config_options="$@" +## Add some environment variables, if they were passed via the environment +## rather than on the command-line. +for var in CFLAGS CPPFLAGS LDFLAGS; do + case "$emacs_config_options" in + *$var=*) continue ;; + esac + eval val="\$${var}" + test x"$val" = x && continue + emacs_config_options="${emacs_config_options}${emacs_config_options:+ }$var=\"$val\"" +done + AC_CONFIG_HEADER(src/config.h:src/config.in) AC_CONFIG_SRCDIR(src/lisp.h) AC_CONFIG_AUX_DIR(build-aux) @@ -218,12 +230,6 @@ 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. -The default is /usr/lib, or /usr/lib64 on some platforms.])]) -CRT_DIR="${with_crt_dir}" - AC_ARG_WITH(gameuser,dnl [AS_HELP_STRING([--with-gameuser=USER],[user for shared game score files])]) test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \ @@ -359,6 +365,11 @@ AC_ARG_ENABLE(autodepend, found])], [ac_enable_autodepend="${enableval}"],[ac_enable_autodepend=yes]) +AC_ARG_ENABLE(gtk-deprecation-warnings, +[AS_HELP_STRING([--enable-gtk-deprecation-warnings], + [Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0])], +[ac_enable_gtk_deprecation_warnings="${enableval}"],[]) + #### Make srcdir absolute, if it isn't already. It's important to #### avoid running the file name through pwd unnecessarily, since pwd can #### give you automounter prefixes, which can go away. We do all this @@ -622,7 +633,7 @@ fi AC_ARG_ENABLE([gcc-warnings], [AS_HELP_STRING([--enable-gcc-warnings], - [turn on lots of GCC warnings. This is intended for + [turn on lots of GCC warnings/errors. This is intended for developers, and may generate false alarms when used with older or non-GNU development tools.])], [case $enableval in @@ -1034,42 +1045,29 @@ AC_DEFUN([AC_TYPE_UID_T]) LIB_MATH=-lm -LIB_STANDARD= -START_FILES= dnl Current possibilities handled by sed (aix4-2 -> aix, dnl gnu-linux -> gnu/linux, etc.): dnl gnu, gnu/linux, gnu/kfreebsd, aix, cygwin, darwin, hpux, irix. dnl And special cases: berkeley-unix, usg-unix-v, ms-dos, windows-nt. SYSTEM_TYPE=`echo $opsys | sed -e 's/[[0-9]].*//' -e 's|-|/|'` -dnl NB do not use CRT_DIR unquoted here, since it might not be set yet. case $opsys in cygwin ) LIB_MATH= - START_FILES='pre-crt0.o' ;; darwin ) ## Adding -lm confuses the dynamic linker, so omit it. LIB_MATH= - START_FILES='pre-crt0.o' ;; freebsd ) - LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' - START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o' SYSTEM_TYPE=berkeley-unix ;; gnu-linux | gnu-kfreebsd ) - LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o' - START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o' ;; hpux10-20 | hpux11 ) - LIB_STANDARD=-lc - START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o' ;; dnl NB this may be adjusted below. netbsd | openbsd ) - LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o' - START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o' SYSTEM_TYPE=berkeley-unix ;; @@ -1080,96 +1078,9 @@ case $opsys in esac AC_SUBST(LIB_MATH) -AC_SUBST(START_FILES) AC_DEFINE_UNQUOTED(SYSTEM_TYPE, "$SYSTEM_TYPE", [The type of system you are compiling for; sets `system-type'.]) -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) - -case $opsys in - netbsd | openbsd ) - if test -f $CRT_DIR/crti.o; then - - test -f $CRT_DIR/crtn.o || \ - AC_MSG_ERROR([Required file not found: crtn.o]) - - LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' - START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o' - fi - ;; -esac - pre_PKG_CONFIG_CFLAGS=$CFLAGS pre_PKG_CONFIG_LIBS=$LIBS @@ -1287,7 +1198,7 @@ dnl checks for header files AC_CHECK_HEADERS_ONCE( linux/version.h sys/systeminfo.h coff.h pty.h - sys/vlimit.h sys/resource.h + sys/resource.h sys/utsname.h pwd.h utmp.h util.h) AC_MSG_CHECKING(if personality LINUX32 can be set) @@ -1475,8 +1386,8 @@ tmp_CPPFLAGS="$CPPFLAGS" tmp_CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS -x objective-c" CFLAGS="$CFLAGS -x objective-c" -TEMACS_LDFLAGS2="\${LDFLAGS}" GNU_OBJC_CFLAGS= +LIBS_GNUSTEP= if test "${with_ns}" != no; then if test "${opsys}" = darwin; then NS_IMPL_COCOA=yes @@ -1503,9 +1414,7 @@ if test "${with_ns}" != no; then CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" - LIB_STANDARD= - START_FILES= - TEMACS_LDFLAGS2= + LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread" dnl GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS to 0 or 1. dnl If they had chosen to either define it or not, we could have dnl just used AC_CHECK_DECL here. @@ -1556,7 +1465,7 @@ fail; fi fi -AC_SUBST(TEMACS_LDFLAGS2) +AC_SUBST(LIBS_GNUSTEP) INSTALL_ARCH_INDEP_EXTRA=install-etc ns_self_contained=no @@ -1594,7 +1503,6 @@ AC_SUBST(INSTALL_ARCH_INDEP_EXTRA) AC_SUBST(ns_self_contained) AC_SUBST(NS_OBJ) AC_SUBST(NS_OBJC_OBJ) -AC_SUBST(LIB_STANDARD) HAVE_W32=no W32_OBJ= @@ -1734,6 +1642,20 @@ if test "${system_malloc}" = "yes"; then else test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o VMLIMIT_OBJ=vm-limit.o + + AC_CHECK_HEADERS([sys/vlimit.h]) + AC_CACHE_CHECK([for data_start], [emacs_cv_data_start], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[extern char data_start[]; char ch;]], + [[return data_start < &ch;]])], + [emacs_cv_data_start=yes], + [emacs_cv_data_start=no])]) + if test $emacs_cv_data_start = yes; then + AC_DEFINE([HAVE_DATA_START], 1, + [Define to 1 if data_start is the address of the start + of the main data segment.]) + fi fi AC_SUBST(GMALLOC_OBJ) AC_SUBST(VMLIMIT_OBJ) @@ -1996,6 +1918,9 @@ if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOO GTK_OBJ=emacsgtkfixed.o term_header=gtkutil.h USE_GTK_TOOLKIT="GTK3" + if test "x$ac_enable_gtk_deprecation_warnings" = x; then + GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS" + fi else check_gtk2=yes gtk3_pkg_errors="$GTK_PKG_ERRORS " @@ -2071,6 +1996,23 @@ if test "${HAVE_GTK}" = "yes"; then AC_CHECK_FUNCS(gtk_file_selection_new) fi + dnl Same as above for gtk_handle_box. + HAVE_GTK_HANDLE_BOX=no + AC_CHECK_DECL(GTK_TYPE_HANDLE_BOX, HAVE_GTK_HANDLE_BOX=yes, + HAVE_GTK_HANDLE_BOX=no, [AC_INCLUDES_DEFAULT +#include ]) + if test "$HAVE_GTK_HANDLE_BOX" = yes; then + AC_CHECK_FUNCS(gtk_handle_box_new) + fi + + dnl Same as above for gtk_tearoff_menu_item. + HAVE_GTK_TEAROFF_MENU_ITEM=no + AC_CHECK_DECL(GTK_TYPE_TEAROFF_MENU_ITEM, HAVE_GTK_TEAROFF_MENU_ITEM=yes, + HAVE_GTK_TEAROFF_MENU_ITEM=no, [AC_INCLUDES_DEFAULT +#include ]) + if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then + AC_CHECK_FUNCS(gtk_tearoff_menu_item_new) + fi dnl Check for functions introduced in 2.14 and later. AC_CHECK_FUNCS(gtk_widget_get_window gtk_widget_set_has_window \ @@ -3698,9 +3640,7 @@ case $opsys in esac -dnl Used in vm-limit.c -AH_TEMPLATE(DATA_START, [Address of the start of the data segment.]) -dnl Used in lisp.h, emacs.c, mem-limits.h +dnl Used in lisp.h, emacs.c, vm-limit.c dnl NEWS.18 describes this as "a number which contains dnl the high bits to be inclusive or'ed with pointers that are unpacked." AH_TEMPLATE(DATA_SEG_BITS, [Extra bits to be or'd in with any pointers @@ -3708,18 +3648,15 @@ stored in a Lisp_Object.]) dnl if Emacs uses fewer than 32 bits for the value field of a LISP_OBJECT. case $opsys in - gnu) - dnl libc defines data_start. - AC_DEFINE(DATA_START, [({ extern int data_start; (char *) &data_start; })]) + aix*) + dnl This works with 32-bit executables; Emacs doesn't support 64-bit. + AC_DEFINE(DATA_SEG_BITS, [0x20000000]) ;; - hpux*) dnl The data segment on this machine always starts at address 0x40000000. - AC_DEFINE(DATA_START, [0x40000000]) AC_DEFINE(DATA_SEG_BITS, [0x40000000]) ;; irix6-5) - AC_DEFINE(DATA_START, [0x10000000]) AC_DEFINE(DATA_SEG_BITS, [0x10000000]) ;; esac @@ -3752,22 +3689,13 @@ case $opsys in esac -dnl These won't be used automatically yet. We also need to know, at least, +dnl This won't be used automatically yet. We also need to know, at least, dnl that the stack is continuous. AH_TEMPLATE(GC_SETJMP_WORKS, [Define if setjmp is known to save all registers relevant for conservative garbage collection in the jmp_buf.]) -AH_TEMPLATE(GC_MARK_STACK, [Define to GC_USE_GCPROS_AS_BEFORE if - conservative garbage collection is not known to work.]) - case $opsys in - aix4-2 | hpux* | unixware) - dnl Conservative garbage collection has not been tested, so for now - dnl play it safe and stick with the old-fashioned way of marking. - AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE]) - ;; - dnl Not all the architectures are tested, but there are Debian packages dnl for SCM and/or Guile on them, so the technique must work. See also dnl comments in alloc.c concerning setjmp and gcc. @@ -3782,8 +3710,7 @@ case $opsys in #else # error "setjmp not known to work on this arch" #endif - ]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1), - AC_DEFINE(GC_MARK_STACK, [GC_USE_GCPROS_AS_BEFORE]) ) + ]], [[]])], AC_DEFINE(GC_SETJMP_WORKS, 1)) ;; esac @@ -4016,7 +3943,7 @@ fi version=$PACKAGE_VERSION -copyright="Copyright (C) 2012 Free Software Foundation, Inc." +copyright="Copyright (C) 2013 Free Software Foundation, Inc." AC_DEFINE_UNQUOTED(COPYRIGHT, ["$copyright"], [Short copyright string for this version of Emacs.]) AC_SUBST(copyright) @@ -4072,7 +3999,7 @@ fi AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}", [Define to the canonical Emacs configuration name.]) dnl Replace any embedded " characters (bug#13274). -emacs_config_options=`echo "$emacs_config_options" | sed -e "s/\"/'/g"` +emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"` AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${emacs_config_options}", [Define to the options passed to configure.]) AH_TEMPLATE(config_opsysfile, [Some platforms that do not use configure @@ -4287,94 +4214,8 @@ case "$opsys" in *) LD_SWITCH_SYSTEM_TEMACS= ;; esac -if test "$NS_IMPL_GNUSTEP" = "yes"; then - LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread" -fi - AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) - -LD_FIRSTFLAG= -ORDINARY_LINK= -case "$opsys" in - ## gnu: GNU needs its own crt0. - aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; - - ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the - ## library search parth, i.e. it won't search /usr/lib for libc and - ## friends. Using -nostartfiles instead avoids this problem, and - ## will also work on earlier NetBSD releases. - netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;; - - ## powerpc*: NAKAJI Hiroyuki says - ## MkLinux/LinuxPPC needs this. - ## s390x-* only supports opsys = gnu-linux so it can be added here. - gnu-*) - case "$canonical" in - powerpc*|s390x-*) LD_FIRSTFLAG="-nostdlib" ;; - esac - ;; -esac - - -if test "x$ORDINARY_LINK" = "xyes"; then - - LD_FIRSTFLAG="" - 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 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 - ## places that are difficult to figure out at make time. Fortunately, - ## these same versions allow you to pass arbitrary flags on to the - ## linker, so there is no reason not to use it as a linker. - ## - ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from - ## searching for libraries in its internal directories, so we have to - ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). - LD_FIRSTFLAG="-nostdlib" -fi - -## FIXME? What setting of EDIT_LDFLAGS should this have? -test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic" - -AC_SUBST(LD_FIRSTFLAG) - - -## FIXME? The logic here is not precisely the same as that above. -## There is no check here for a pre-defined LD_FIRSTFLAG. -## Should we only be setting LIB_GCC if LD ~ -nostdlib? -LIB_GCC= -if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then - - case "$opsys" in - freebsd|netbsd|openbsd) LIB_GCC= ;; - - gnu-*) - ## armin76@gentoo.org reported that the lgcc_s flag is necessary to - ## build on ARM EABI under GNU/Linux. (Bug#5518) - case $host_cpu in - arm*) - LIB_GCC="-lgcc_s" - ;; - *) - ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then - ## immediately undefine it again and redefine it to empty. - ## Was the C_SWITCH_X_SITE part really necessary? -## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name` - LIB_GCC= - ;; - esac - ;; - - ## Ask GCC where to find libgcc.a. - *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;; - esac -fi dnl if $GCC -AC_SUBST(LIB_GCC) - ## Common for all window systems if test "$window_system" != "none"; then AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.]) @@ -4385,7 +4226,7 @@ AC_SUBST(WINDOW_SYSTEM_OBJ) AH_TOP([/* GNU Emacs site configuration template file. -Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2012 +Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2013 Free Software Foundation, Inc. This file is part of GNU Emacs.