X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/4f4ec76fd68d21c3d3838f5f10e242a884598c40..2fdec80c2cebf486bc708c5a59b0cd52def5285b:/configure.ac diff --git a/configure.ac b/configure.ac index 0f4351fcd5..209bae9eef 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-2014 Free Software Foundation, Inc. +dnl Copyright (C) 1994-1996, 1999-2015 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.3.91) +AC_INIT(emacs, 24.4.91) dnl We get MINGW64 with MSYS2 if test "x$MSYSTEM" = "xMINGW32" -o "x$MSYSTEM" = "xMINGW64" @@ -35,7 +35,8 @@ then # "/c/foo/bar", to simplify later conversions to native Windows # format ("c:/foo/bar") srcdir=`cd "${srcdir}" && pwd -W` - srcdir="/${srcdir:0:1}${srcdir:2}" + # 'eval' pacifies strict POSIX non-MinGW shells (Bug#18612). + eval 'srcdir="/${srcdir:0:1}${srcdir:2}"' ;; esac fi @@ -242,6 +243,7 @@ fi dnl _ON results in a '--without' option in the --help output, so dnl the help text should refer to "don't compile", etc. +with_xpm_set=${with_xpm+set} OPTION_DEFAULT_ON([xpm],[don't compile with XPM image support]) OPTION_DEFAULT_ON([jpeg],[don't compile with JPEG image support]) OPTION_DEFAULT_ON([tiff],[don't compile with TIFF image support]) @@ -756,7 +758,10 @@ AC_ARG_ENABLE([gcc-warnings], AC_ARG_ENABLE(link-time-optimization, [AS_HELP_STRING([--enable-link-time-optimization], [build emacs with link-time optimization. - This is supported only for GCC since 4.5.0.])], + This requires GCC 4.5.0 or later. + It also makes Emacs harder to debug, and when we tried it + with GCC 4.9.0 x86-64 it made Emacs slower, so it's not + recommended for typical use.])], if test "${enableval}" != "no"; then AC_MSG_CHECKING([whether link-time optimization is supported]) ac_lto_supported=no @@ -776,6 +781,12 @@ if test "${enableval}" != "no"; then AC_MSG_RESULT([$ac_lto_supported]) if test "$ac_lto_supported" = "yes"; then CFLAGS="$CFLAGS $LTO" + dnl The following is needed for GCC 4.9.0. The GCC 4.9.0 release notes + dnl suggest that instead of -ffat-lto-objects we should use gcc-ar and + dnl gcc-ranlib in place of ar and ranlib, but gcc-ar makes /usr/bin/ar + dnl dump core on Fedora 20, so play it safe for now. + gl_COMPILER_OPTION_IF([-ffat-lto-objects], + [CFLAGS="$CFLAGS -ffat-lto-objects"]) fi fi) @@ -1388,7 +1399,7 @@ AC_DEFUN([PKG_CHECK_MODULES], [ HAVE_SOUND=no if test "${with_sound}" != "no"; then # Sound support for GNU/Linux, the free BSDs, and MinGW. - AC_CHECK_HEADERS([machine/soundcard.h sys/soundcard.h soundcard.h], + AC_CHECK_HEADERS([machine/soundcard.h sys/soundcard.h soundcard.h mmsystem.h], have_sound_header=yes, [], [ #ifdef __MINGW32__ #define WIN32_LEAN_AND_MEAN @@ -1830,6 +1841,9 @@ CM_OBJ="cm.o" XARGS_LIMIT= if test "${HAVE_W32}" = "yes"; then AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.]) + if test "$with_toolkit_scroll_bars" = "no"; then + AC_MSG_ERROR([Non-toolkit scroll bars are not implemented for w32 build.]) + fi AC_CHECK_TOOL(WINDRES, [windres], [AC_MSG_ERROR([No resource compiler found.])]) W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o" @@ -2074,6 +2088,18 @@ if test "$HAVE_PTHREAD" = yes; then LIBS="$LIB_PTHREAD $LIBS" ;; esac AC_DEFINE(HAVE_PTHREAD, 1, [Define to 1 if you have pthread (-lpthread).]) + + # Some systems optimize for single-threaded programs by default, and + # need special flags to disable these optimizations. For example, the + # definition of 'errno' in . + case $opsys in + sol*) + AC_DEFINE([_REENTRANT], 1, + [Define to 1 if your system requires this in multithreaded code.]);; + aix4-2) + AC_DEFINE([_THREAD_SAFE], 1, + [Define to 1 if your system requires this in multithreaded code.]);; + esac fi AC_SUBST([LIB_PTHREAD]) @@ -2947,6 +2973,9 @@ AC_SUBST(M17N_FLT_LIBS) ### Use -lXpm if available, unless `--with-xpm=no'. ### mingw32 doesn't use -lXpm, since it loads the library dynamically. +### In the Cygwin-w32 build, we need to use /usr/include/noX/X11/xpm.h +### rather than /usr/include/X11/xpm.h, so we set CPPFLAGS (and +### LDFLAGS) accordingly. HAVE_XPM=no LIBXPM= if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then @@ -2984,6 +3013,9 @@ no_return_alloc_pixels fi if test "${HAVE_X11}" = "yes"; then + dnl Avoid Xpm on AIX unless requested, as it crashes; see Bug#17598. + test "$opsys$with_xpm_set" = aix4-2 && with_xpm=no + if test "${with_xpm}" != "no"; then AC_CHECK_HEADER(X11/xpm.h, [AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, HAVE_XPM=yes, , -lX11)]) @@ -3007,6 +3039,9 @@ no_return_alloc_pixels if test "${HAVE_XPM}" = "yes"; then AC_DEFINE(HAVE_XPM, 1, [Define to 1 if you have the Xpm library (-lXpm).]) LIBXPM=-lXpm + elif test "$opsys,$LUCID_LIBW" = aix4-2,-lXaw; then + dnl AIX -lXaw needs -lXpm linked too; see Bug#17598 Message#152. + LIBXPM=-lXpm fi fi @@ -3480,7 +3515,7 @@ esac AC_SUBST(BLESSMAIL_TARGET) -AC_CHECK_FUNCS(accept4 gethostname \ +AC_CHECK_FUNCS(accept4 fchdir gethostname \ getrusage get_current_dir_name \ lrand48 \ select getpagesize setlocale \ @@ -4380,7 +4415,7 @@ if test x$GCC = xyes; then else case $opsys in dnl irix: Tested on Irix 6.5. SCM worked on earlier versions. - dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* ) + aix* | dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* ) AC_DEFINE(GC_SETJMP_WORKS, 1) ;; esac @@ -4595,7 +4630,7 @@ fi version=$PACKAGE_VERSION -copyright="Copyright (C) 2014 Free Software Foundation, Inc." +copyright="Copyright (C) 2015 Free Software Foundation, Inc." AC_DEFINE_UNQUOTED(COPYRIGHT, ["$copyright"], [Short copyright string for this version of Emacs.]) AC_SUBST(copyright) @@ -4825,20 +4860,24 @@ fi case "$opsys" in aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;; + cygwin) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000" ;; + darwin) ## The -headerpad option tells ld (see man page) to leave room at the ## end of the header for adding load commands. Needed for dumping. - ## 0x690 is the total size of 30 segment load commands (at 56 - ## each); under Cocoa 31 commands are required. + ## 0x1000 is enough for roughly 52 load commands on the x86_64 + ## architecture (where they are 78 bytes each). The actual number of + ## load commands added is not consistent but normally ranges from + ## about 14 to about 34. Setting it high gets us plenty of slop and + ## only costs about 1.5K of wasted binary space. + headerpad_extra=1000 if test "$HAVE_NS" = "yes"; then libs_nsgui="-framework AppKit" if test "$NS_IMPL_COCOA" = "yes"; then libs_nsgui="$libs_nsgui -framework IOKit" fi - headerpad_extra=6C8 else libs_nsgui= - headerpad_extra=690 fi LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra" @@ -4912,7 +4951,7 @@ AC_SUBST(WINDOW_SYSTEM_OBJ) AH_TOP([/* GNU Emacs site configuration template file. -Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2014 +Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2015 Free Software Foundation, Inc. This file is part of GNU Emacs.