summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac423
1 files changed, 265 insertions, 158 deletions
diff --git a/configure.ac b/configure.ac
index 005f96b3a91..91fa4173081 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@ dnl along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
AC_PREREQ(2.65)
dnl Note this is parsed by (at least) make-dist and lisp/cedet/ede/emacs.el.
-AC_INIT(GNU Emacs, 26.1.90, bug-gnu-emacs@gnu.org)
+AC_INIT(GNU Emacs, 27.0.50, bug-gnu-emacs@gnu.org, , https://www.gnu.org/software/emacs/)
dnl Set emacs_config_options to the options of 'configure', quoted for the shell,
dnl and then quoted again for a C string. Separate options with spaces.
@@ -355,6 +355,7 @@ OPTION_DEFAULT_ON([libsystemd],[don't compile with libsystemd support])
OPTION_DEFAULT_OFF([cairo],[compile with Cairo drawing (experimental)])
OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support])
OPTION_DEFAULT_ON([imagemagick],[don't compile with ImageMagick image support])
+OPTION_DEFAULT_ON([json], [don't compile with native JSON support])
OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts])
OPTION_DEFAULT_ON([libotf],[don't use libotf for OpenType font support])
@@ -371,7 +372,12 @@ OPTION_DEFAULT_OFF([w32], [use native MS Windows GUI in a Cygwin build])
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])
AC_ARG_WITH([gconf],[AS_HELP_STRING([--with-gconf],
-[compile with Gconf support (Gsettings replaces this)])],[],[with_gconf=maybe])
+[compile with Gconf support (Gsettings replaces this)])],[],
+[if test $with_features = yes; then
+with_gconf=maybe
+else
+with_gconf=no
+fi])
OPTION_DEFAULT_ON([gsettings],[don't compile with GSettings support])
OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support])
OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
@@ -899,10 +905,9 @@ AC_ARG_ENABLE([gcc-warnings],
AC_ARG_ENABLE([check-lisp-object-type],
[AS_HELP_STRING([--enable-check-lisp-object-type],
- [Enable compile-time checks for the Lisp_Object data type,
- which can catch some bugs during development.
- The default is "no" if --enable-gcc-warnings is "no".])])
-if test "${enable_check_lisp_object_type-$gl_gcc_warnings}" != "no"; then
+ [Enable compile time checks for the Lisp_Object data type,
+ which can catch some bugs during development.])])
+if test "$enable_check_lisp_object_type" = yes; then
AC_DEFINE([CHECK_LISP_OBJECT_TYPE], 1,
[Define to enable compile-time checks for the Lisp_Object data type.])
fi
@@ -947,13 +952,13 @@ AS_IF([test $gl_gcc_warnings = no],
AS_IF([test $gl_gcc_warnings = yes],
[WERROR_CFLAGS=-Werror])
+ nw="$nw -Wcast-align -Wcast-align=strict" # Emacs is tricky with pointers.
nw="$nw -Wduplicated-branches" # Too many false alarms
nw="$nw -Wformat-overflow=2" # False alarms due to GCC bug 80776
nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
nw="$nw -Woverlength-strings" # Not a problem these days
nw="$nw -Wformat-nonliteral" # we do this a lot
nw="$nw -Wvla" # Emacs uses <vla.h>.
- nw="$nw -Wswitch-default" # Too many warnings for now
nw="$nw -Wunused-const-variable=2" # lisp.h declares const objects.
nw="$nw -Winline" # OK to ignore 'inline'
nw="$nw -Wstrict-overflow" # OK to optimize assuming that
@@ -1014,9 +1019,10 @@ AS_IF([test $gl_gcc_warnings = no],
gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
gl_WARN_ADD([-Wno-format-nonliteral])
- # clang is unduly picky about braces.
+ # clang is unduly picky about some things.
if test "$emacs_cv_clang" = yes; then
gl_WARN_ADD([-Wno-missing-braces])
+ gl_WARN_ADD([-Wno-null-pointer-arithmetic])
fi
# This causes too much noise in the MinGW build
@@ -1221,53 +1227,63 @@ AC_SUBST([FIND_DELETE])
PAXCTL_dumped=
PAXCTL_notdumped=
-if test $opsys = gnu-linux; then
- if test "${SETFATTR+set}" != set; then
- AC_CACHE_CHECK([for setfattr],
- [emacs_cv_prog_setfattr],
- [touch conftest.tmp
- if (setfattr -n user.pax.flags conftest.tmp) >/dev/null 2>&1; then
- emacs_cv_prog_setfattr=yes
- else
- emacs_cv_prog_setfattr=no
- fi])
- if test "$emacs_cv_prog_setfattr" = yes; then
- PAXCTL_notdumped='$(SETFATTR) -n user.pax.flags -v er'
- SETFATTR=setfattr
- else
- SETFATTR=
+if test "$CANNOT_DUMP" != yes; then
+ if test $opsys = gnu-linux; then
+ if test "${SETFATTR+set}" != set; then
+ AC_CACHE_CHECK([for setfattr],
+ [emacs_cv_prog_setfattr],
+ [touch conftest.tmp
+ if (setfattr -n user.pax.flags conftest.tmp) >/dev/null 2>&1; then
+ emacs_cv_prog_setfattr=yes
+ else
+ emacs_cv_prog_setfattr=no
+ fi])
+ if test "$emacs_cv_prog_setfattr" = yes; then
+ PAXCTL_notdumped='$(SETFATTR) -n user.pax.flags -v er'
+ SETFATTR=setfattr
+ else
+ SETFATTR=
+ fi
+ rm -f conftest.tmp
+ AC_SUBST([SETFATTR])
fi
- rm -f conftest.tmp
- AC_SUBST([SETFATTR])
fi
-fi
-case $opsys,$PAXCTL_notdumped,$emacs_uname_r in
- gnu-linux,,* | netbsd,,[0-7].*)
- AC_PATH_PROG([PAXCTL], [paxctl], [],
- [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
- if test -n "$PAXCTL"; then
- if test "$opsys" = netbsd; then
- PAXCTL_dumped='$(PAXCTL) +a'
- PAXCTL_notdumped=$PAXCTL_dumped
- else
- AC_MSG_CHECKING([whether binaries have a PT_PAX_FLAGS header])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
- [if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- PAXCTL=
- fi])
- if test -n "$PAXCTL"; then
- PAXCTL_dumped='$(PAXCTL) -zex'
- PAXCTL_notdumped='$(PAXCTL) -r'
+ case $opsys,$PAXCTL_notdumped,$emacs_uname_r in
+ gnu-linux,,* | netbsd,,[0-7].*)
+ AC_PATH_PROG([PAXCTL], [paxctl], [],
+ [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
+ if test -n "$PAXCTL"; then
+ if test "$opsys" = netbsd; then
+ PAXCTL_dumped='$(PAXCTL) +a'
+ PAXCTL_notdumped=$PAXCTL_dumped
+ else
+ AC_MSG_CHECKING([whether binaries have a PT_PAX_FLAGS header])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+ [if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PAXCTL=
+ fi])
+ if test -n "$PAXCTL"; then
+ PAXCTL_dumped='$(PAXCTL) -zex'
+ PAXCTL_notdumped='$(PAXCTL) -r'
+ fi
fi
- fi
- fi;;
-esac
+ fi;;
+ esac
+fi
AC_SUBST([PAXCTL_dumped])
AC_SUBST([PAXCTL_notdumped])
+# Makeinfo on macOS is ancient, check whether there is a more recent
+# version installed by Homebrew.
+AC_CHECK_PROGS(BREW, [brew])
+if test -n "$BREW"; then
+ AC_PATH_PROG([MAKEINFO], [makeinfo], [],
+ [`$BREW --prefix texinfo 2>/dev/null`/bin$PATH_SEPARATOR$PATH])
+fi
+
## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals.
if test "${MAKEINFO:=makeinfo}" != "no"; then
case `($MAKEINFO --version) 2>/dev/null` in
@@ -1320,37 +1336,35 @@ else
ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
fi
-dnl We need -znocombreloc if we're using a relatively recent GNU ld.
-dnl If we can link with the flag, it shouldn't do any harm anyhow.
-dnl Treat GCC specially since it just gives a non-fatal 'unrecognized option'
+dnl On some platforms using GNU ld, linking temacs needs -znocombreloc.
+dnl Although this has something to do with dumping, the details are unknown.
+dnl If the flag is used but not needed,
+dnl Emacs should still work (albeit a bit more slowly),
+dnl so use the flag everywhere that it is supported.
+dnl When testing whether the flag works, treat GCC specially
+dnl since it just gives a non-fatal 'unrecognized option'
dnl if not built to support GNU ld.
-
-dnl For a long time, -znocombreloc was added to LDFLAGS rather than
-dnl LD_SWITCH_SYSTEM_TEMACS. That is:
-dnl * inappropriate, as LDFLAGS is a user option but this is essential.
-dnl Eg "make LDFLAGS=... all" could run into problems,
-dnl https://bugs.debian.org/684788
-dnl * unnecessary, since temacs is the only thing that actually needs it.
-dnl Indeed this is where it was originally, prior to:
-dnl https://lists.gnu.org/r/emacs-pretest-bug/2004-03/msg00170.html
-if test x$GCC = xyes; then
+if test "$GCC" = yes; then
LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
else
LDFLAGS_NOCOMBRELOC="-znocombreloc"
fi
AC_CACHE_CHECK([for -znocombreloc], [emacs_cv_znocombreloc],
-[late_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
-
-AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
- [emacs_cv_znocombreloc=yes], [emacs_cv_znocombreloc=no])
-
-LDFLAGS="$late_LDFLAGS"])
+ [if test "$CANNOT_DUMP" = "yes"; then
+ emacs_cv_znocombreloc='not needed'
+ else
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+ [emacs_cv_znocombreloc=yes], [emacs_cv_znocombreloc=no])
+ LDFLAGS=$save_LDFLAGS
+ fi])
-if test x$emacs_cv_znocombreloc = xno; then
- LDFLAGS_NOCOMBRELOC=
-fi
+case $emacs_cv_znocombreloc in
+ no*)
+ LDFLAGS_NOCOMBRELOC= ;;
+esac
AC_CACHE_CHECK([whether addresses are sanitized],
@@ -2076,7 +2090,7 @@ if test "${HAVE_W32}" = "yes"; then
AC_CHECK_TOOL(WINDRES, [windres],
[AC_MSG_ERROR([No resource compiler found.])])
W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
- W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
+ W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o w32cygwinx.o"
EMACSRES="emacs.res"
case "$canonical" in
x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
@@ -2111,6 +2125,12 @@ if test "${HAVE_W32}" = "yes"; then
XARGS_LIMIT="-s 10000"
fi
fi
+
+if test "${HAVE_W32}" = "no" && test "${opsys}" = "cygwin"; then
+ W32_LIBS="-lkernel32"
+ W32_OBJ="w32cygwinx.o"
+fi
+
AC_SUBST(W32_OBJ)
AC_SUBST(W32_LIBS)
AC_SUBST(EMACSRES)
@@ -2521,11 +2541,20 @@ fi
HAVE_IMAGEMAGICK=no
if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes"; then
if test "${with_imagemagick}" != "no"; then
- ## 6.3.5 is the earliest version known to work; see Bug#17339.
- ## 6.8.2 makes Emacs crash; see Bug#13867.
- ## 7 and later have not been ported to; See Bug#25967.
- IMAGEMAGICK_MODULE="Wand >= 6.3.5 Wand != 6.8.2 Wand < 7"
- EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK_MODULE])
+ if test -n "$BREW"; then
+ # Homebrew doesn't link ImageMagick 6 by default, so make sure
+ # pkgconfig can find it.
+ export PKG_CONFIG_PATH="$PKG_CONFIG_PATH$PATH_SEPARATOR`$BREW --prefix imagemagick@6 2>/dev/null`/lib/pkgconfig"
+ fi
+
+ EMACS_CHECK_MODULES([IMAGEMAGICK], [MagickWand >= 7])
+ if test $HAVE_IMAGEMAGICK = yes; then
+ AC_DEFINE([HAVE_IMAGEMAGICK7], 1, [Define to 1 if using ImageMagick7.])
+ else
+ ## 6.3.5 is the earliest version known to work; see Bug#17339.
+ ## 6.8.2 makes Emacs crash; see Bug#13867.
+ EMACS_CHECK_MODULES([IMAGEMAGICK], [Wand >= 6.3.5 Wand != 6.8.2])
+ fi
if test $HAVE_IMAGEMAGICK = yes; then
OLD_CFLAGS=$CFLAGS
@@ -2870,6 +2899,27 @@ fi
AC_SUBST(LIBSYSTEMD_LIBS)
AC_SUBST(LIBSYSTEMD_CFLAGS)
+HAVE_JSON=no
+JSON_OBJ=
+
+if test "${with_json}" = yes; then
+ EMACS_CHECK_MODULES([JSON], [jansson >= 2.7],
+ [HAVE_JSON=yes], [HAVE_JSON=no])
+ if test "${HAVE_JSON}" = yes; then
+ AC_DEFINE(HAVE_JSON, 1, [Define if using Jansson.])
+ JSON_OBJ=json.o
+ fi
+
+ # Windows loads libjansson dynamically
+ if test "${opsys}" = "mingw32"; then
+ JSON_LIBS=
+ fi
+fi
+
+AC_SUBST(JSON_LIBS)
+AC_SUBST(JSON_CFLAGS)
+AC_SUBST(JSON_OBJ)
+
NOTIFY_OBJ=
NOTIFY_SUMMARY=no
@@ -3272,6 +3322,10 @@ if test "${HAVE_X11}" = "yes"; then
AC_DEFINE(HAVE_OTF_GET_VARIATION_GLYPHS, 1,
[Define to 1 if libotf has OTF_get_variation_glyphs.])
fi
+ if ! $PKG_CONFIG --atleast-version=0.9.16 libotf; then
+ AC_DEFINE(HAVE_OTF_KANNADA_BUG, 1,
+[Define to 1 if libotf is affected by https://debbugs.gnu.org/28110.])
+ fi
fi
fi
dnl FIXME should there be an error if HAVE_FREETYPE != yes?
@@ -3428,7 +3482,9 @@ AC_SUBST(LIBXPM)
### Use -ljpeg if available, unless '--with-jpeg=no'.
HAVE_JPEG=no
LIBJPEG=
-if test "${with_jpeg}" != "no"; then
+if test "${NS_IMPL_COCOA}" = yes; then
+ : # Cocoa provides its own jpeg support, so do nothing.
+elif test "${with_jpeg}" != "no"; then
AC_CACHE_CHECK([for jpeglib 6b or later],
[emacs_cv_jpeglib],
[OLD_LIBS=$LIBS
@@ -3471,23 +3527,20 @@ fi
AC_SUBST(LIBJPEG)
HAVE_LCMS2=no
-LIBLCMS2=
+LCMS2_CFLAGS=
+LCMS2_LIBS=
if test "${with_lcms2}" != "no"; then
- OLIBS=$LIBS
- AC_SEARCH_LIBS([cmsCreateTransform], [lcms2], [HAVE_LCMS2=yes])
- LIBS=$OLIBS
- case $ac_cv_search_cmsCreateTransform in
- -*) LIBLCMS2=$ac_cv_search_cmsCreateTransform ;;
- esac
+ EMACS_CHECK_MODULES([LCMS2], [lcms2])
fi
if test "${HAVE_LCMS2}" = "yes"; then
AC_DEFINE([HAVE_LCMS2], 1, [Define to 1 if you have the lcms2 library (-llcms2).])
### mingw32 doesn't use -llcms2, since it loads the library dynamically.
if test "${opsys}" = "mingw32"; then
- LIBLCMS2=
+ LCMS2_LIBS=
fi
fi
-AC_SUBST(LIBLCMS2)
+AC_SUBST(LCMS2_CFLAGS)
+AC_SUBST(LCMS2_LIBS)
HAVE_ZLIB=no
LIBZ=
@@ -3563,45 +3616,54 @@ HAVE_PNG=no
LIBPNG=
PNG_CFLAGS=
if test "${NS_IMPL_COCOA}" = yes; then
- : # Nothing to do
+ : # Cocoa provides its own png support, so do nothing.
elif test "${with_png}" != no; then
# mingw32 loads the library dynamically.
if test "$opsys" = mingw32; then
AC_CHECK_HEADER([png.h], [HAVE_PNG=yes])
elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
- AC_MSG_CHECKING([for png])
- png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` &&
- png_ldflags=`(libpng-config --ldflags) 2>&AS_MESSAGE_LOG_FD` || {
- # libpng-config does not work; configure by hand.
- # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
- # in /usr/include/libpng.
- if test -r /usr/include/libpng/png.h &&
- test ! -r /usr/include/png.h; then
- png_cflags=-I/usr/include/libpng
- else
- png_cflags=
- fi
- png_ldflags='-lpng'
- }
- SAVE_CFLAGS=$CFLAGS
- SAVE_LIBS=$LIBS
- CFLAGS="$CFLAGS $png_cflags"
- LIBS="$png_ldflags -lz -lm $LIBS"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[#include <png.h>]],
- [[return !png_get_channels (0, 0);]])],
- [HAVE_PNG=yes
- PNG_CFLAGS=`AS_ECHO(["$png_cflags"]) | sed -e "$edit_cflags"`
- LIBPNG=$png_ldflags
- # $LIBPNG requires explicit -lz in some cases.
- # We don't know what those cases are, exactly, so play it safe and
- # append -lz to any nonempty $LIBPNG, unless we're already using LIBZ.
- if test -n "$LIBPNG" && test -z "$LIBZ"; then
- LIBPNG="$LIBPNG -lz"
- fi])
- CFLAGS=$SAVE_CFLAGS
- LIBS=$SAVE_LIBS
- AC_MSG_RESULT([$HAVE_PNG])
+ EMACS_CHECK_MODULES([PNG], [libpng >= 1.0.0])
+ if test $HAVE_PNG = yes; then
+ LIBPNG=$PNG_LIBS
+ else
+ # Test old way in case pkg-config doesn't have it (older machines).
+ AC_MSG_CHECKING([for libpng not configured by pkg-config])
+
+ png_cflags=`(libpng-config --cflags) 2>&AS_MESSAGE_LOG_FD` &&
+ png_ldflags=`(libpng-config --ldflags) 2>&AS_MESSAGE_LOG_FD` || {
+ # libpng-config does not work; configure by hand.
+ # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
+ # in /usr/include/libpng.
+ if test -r /usr/include/libpng/png.h &&
+ test ! -r /usr/include/png.h; then
+ png_cflags=-I/usr/include/libpng
+ else
+ png_cflags=
+ fi
+ png_ldflags='-lpng'
+ }
+ SAVE_CFLAGS=$CFLAGS
+ SAVE_LIBS=$LIBS
+ CFLAGS="$CFLAGS $png_cflags"
+ LIBS="$png_ldflags -lz -lm $LIBS"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <png.h>]],
+ [[return !png_get_channels (0, 0);]])],
+ [HAVE_PNG=yes
+ PNG_CFLAGS=`AS_ECHO(["$png_cflags"]) | sed -e "$edit_cflags"`
+ LIBPNG=$png_ldflags])
+ CFLAGS=$SAVE_CFLAGS
+ LIBS=$SAVE_LIBS
+ AC_MSG_RESULT([$HAVE_PNG])
+ fi
+
+ # $LIBPNG requires explicit -lz in some cases.
+ # We don't know what those cases are, exactly, so play it safe and
+ # append -lz to any nonempty $LIBPNG, unless we're already using LIBZ.
+ case " $LIBPNG ",$LIBZ in
+ *' -lz '*, | *' ',?*) ;;
+ *) LIBPNG="$LIBPNG -lz" ;;
+ esac
fi
fi
if test $HAVE_PNG = yes; then
@@ -3862,13 +3924,13 @@ if test "${with_xml2}" != "no"; then
xcsdkdir="" ;;
esac
fi
- CPPFLAGS="$CPPFLAGS -I$xcsdkdir/usr/include/libxml2"
+ CPPFLAGS="$CPPFLAGS -isystem${xcsdkdir}/usr/include/libxml2"
AC_CHECK_HEADER(libxml/HTMLparser.h,
[AC_CHECK_DECL(HTML_PARSE_RECOVER, HAVE_LIBXML2=yes, ,
[#include <libxml/HTMLparser.h>])])
CPPFLAGS="$SAVE_CPPFLAGS"
if test "${HAVE_LIBXML2}" = "yes"; then
- LIBXML2_CFLAGS="-I'$xcsdkdir/usr/include/libxml2'"
+ LIBXML2_CFLAGS="-isystem${xcsdkdir}/usr/include/libxml2"
LIBXML2_LIBS="-lxml2"
fi
fi
@@ -4276,26 +4338,38 @@ AC_SUBST(KRB5LIB)
AC_SUBST(DESLIB)
AC_SUBST(KRB4LIB)
+AC_ARG_WITH([libgmp],
+ [AS_HELP_STRING([--without-libgmp],
+ [don't use the GNU Multiple Precision (GMP) library;
+ this is the default on systems lacking libgmp.])])
+GMP_LIB=
+GMP_OBJ=mini-gmp-emacs.o
+HAVE_GMP=no
+case $with_libgmp in
+ no) ;;
+ yes) HAVE_GMP=yes GMP_LIB=-lgmp;;
+ *) AC_CHECK_HEADERS([gmp.h],
+ [OLIBS=$LIBS
+ AC_SEARCH_LIBS([__gmpz_roinit_n], [gmp])
+ LIBS=$OLIBS
+ case $ac_cv_search___gmpz_roinit_n in
+ 'none needed') HAVE_GMP=yes;;
+ -*) HAVE_GMP=yes GMP_LIB=$ac_cv_search___gmpz_roinit_n;;
+ esac]);;
+esac
+if test "$HAVE_GMP" = yes; then
+ GMP_OBJ=
+ AC_DEFINE([HAVE_GMP], 1, [Define to 1 if you have recent-enough GMP.])
+fi
+AC_SUBST([GMP_LIB])
+AC_SUBST([GMP_OBJ])
+
AC_CHECK_HEADERS(valgrind/valgrind.h)
AC_CHECK_MEMBERS([struct unipair.unicode], [], [], [[#include <linux/kd.h>]])
AC_CHECK_FUNCS_ONCE([sbrk])
-ok_so_far=yes
-AC_CHECK_FUNC(socket, , ok_so_far=no)
-if test $ok_so_far = yes; then
- AC_CHECK_HEADER(netinet/in.h, , ok_so_far=no)
-fi
-if test $ok_so_far = yes; then
- AC_CHECK_HEADER(arpa/inet.h, , ok_so_far=no)
-fi
-if test $ok_so_far = yes; then
-dnl Fixme: Not used. Should this be HAVE_SOCKETS?
- AC_DEFINE(HAVE_INET_SOCKETS, 1,
- [Define to 1 if you have inet sockets.])
-fi
-
AC_FUNC_FORK
AC_CHECK_FUNCS(snprintf)
@@ -4373,7 +4447,6 @@ fi
dnl Everybody supports this, except MS-DOS.
dnl Seems like the kind of thing we should be testing for, though.
-dnl Compare with HAVE_INET_SOCKETS (which is unused...) above.
AC_DEFINE(HAVE_SOCKETS, 1, [Define if the system supports
4.2-compatible sockets.])
@@ -5119,6 +5192,22 @@ else
fi
AC_SUBST(LIBXMENU)
+AC_CACHE_CHECK([for struct alignment],
+ [emacs_cv_struct_alignment],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <stddef.h>
+ struct s { char c; } __attribute__ ((aligned (8)));
+ struct t { char c; struct s s; };
+ char verify[offsetof (struct t, s) == 8 ? 1 : -1];
+ ]])],
+ [emacs_cv_struct_alignment=yes],
+ [emacs_cv_struct_alignment=no])])
+if test "$emacs_cv_struct_alignment" = yes; then
+ AC_DEFINE([HAVE_STRUCT_ATTRIBUTE_ALIGNED], 1,
+ [Define to 1 if 'struct __attribute__ ((aligned (N)))' aligns the
+ structure to an N-byte boundary.])
+fi
+
if test "${GNU_MALLOC}" = "yes" ; then
AC_DEFINE(GNU_MALLOC, 1,
[Define to 1 if you want to use the GNU memory allocator.])
@@ -5217,7 +5306,7 @@ case "$opsys" in
if test "$HAVE_NS" = "yes"; then
libs_nsgui="-framework AppKit"
if test "$NS_IMPL_COCOA" = "yes"; then
- libs_nsgui="$libs_nsgui -framework IOKit"
+ libs_nsgui="$libs_nsgui -framework IOKit -framework Carbon"
fi
else
libs_nsgui=
@@ -5262,19 +5351,25 @@ esac
AC_CACHE_CHECK(
[for $CC option to disable position independent executables],
[emacs_cv_prog_cc_no_pie],
- [emacs_save_c_werror_flag=$ac_c_werror_flag
- emacs_save_LDFLAGS=$LDFLAGS
- ac_c_werror_flag=yes
- for emacs_cv_prog_cc_no_pie in -no-pie -nopie no; do
- test $emacs_cv_prog_cc_no_pie = no && break
- LDFLAGS="$emacs_save_LDFLAGS $emacs_cv_prog_cc_no_pie"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [break])
- done
- ac_c_werror_flag=$emacs_save_c_werror_flag
- LDFLAGS=$emacs_save_LDFLAGS])
-if test "$emacs_cv_prog_cc_no_pie" != no; then
- LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS $emacs_cv_prog_cc_no_pie"
-fi
+ [if test "$CANNOT_DUMP" = yes; then
+ emacs_cv_prog_cc_no_pie='not needed'
+ else
+ emacs_save_c_werror_flag=$ac_c_werror_flag
+ emacs_save_LDFLAGS=$LDFLAGS
+ ac_c_werror_flag=yes
+ for emacs_cv_prog_cc_no_pie in -no-pie -nopie no; do
+ test $emacs_cv_prog_cc_no_pie = no && break
+ LDFLAGS="$emacs_save_LDFLAGS $emacs_cv_prog_cc_no_pie"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [break])
+ done
+ ac_c_werror_flag=$emacs_save_c_werror_flag
+ LDFLAGS=$emacs_save_LDFLAGS
+ fi])
+case $emacs_cv_prog_cc_no_pie in
+ -*)
+ LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS $emacs_cv_prog_cc_no_pie"
+ ;;
+esac
if test x$ac_enable_profiling != x ; then
case $opsys in
@@ -5368,7 +5463,7 @@ emacs_config_features=
for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \
GCONF GSETTINGS GLIB NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \
LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT OLDXMENU X11 XDBE XIM \
- NS MODULES THREADS XWIDGETS LIBSYSTEMD CANNOT_DUMP LCMS2; do
+ NS MODULES THREADS XWIDGETS LIBSYSTEMD JSON CANNOT_DUMP LCMS2 GMP; do
case $opt in
CANNOT_DUMP) eval val=\${$opt} ;;
@@ -5388,6 +5483,15 @@ for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \
*) continue ;;
esac
;;
+ NOTIFY)
+ case $val in
+ *lkqueue*) opt="$opt LIBKQUEUE" ;;
+ *kqueue*) opt="$opt KQUEUE" ;;
+ *inotify*) opt="$opt INOTIFY" ;;
+ *gfile*) opt="$opt GFILENOTIFY" ;;
+ *w32*) opt="$opt W32NOTIFY" ;;
+ esac
+ ;;
esac
AS_VAR_APPEND([emacs_config_features], ["$optsep$opt"])
optsep=' '
@@ -5404,7 +5508,7 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D
Does Emacs use -lrsvg-2? ${HAVE_RSVG}
Does Emacs use cairo? ${HAVE_CAIRO}
Does Emacs use -llcms2? ${HAVE_LCMS2}
- Does Emacs use imagemagick (version 6)? ${HAVE_IMAGEMAGICK}
+ Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}
Does Emacs support sound? ${HAVE_SOUND}
Does Emacs use -lgpm? ${HAVE_GPM}
Does Emacs use -ldbus? ${HAVE_DBUS}
@@ -5420,6 +5524,8 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D
Does Emacs use -lotf? ${HAVE_LIBOTF}
Does Emacs use -lxft? ${HAVE_XFT}
Does Emacs use -lsystemd? ${HAVE_LIBSYSTEMD}
+ Does Emacs use -ljansson? ${HAVE_JSON}
+ Does Emacs use -lgmp? ${HAVE_GMP}
Does Emacs directly use zlib? ${HAVE_ZLIB}
Does Emacs have dynamic modules support? ${HAVE_MODULES}
Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}
@@ -5438,9 +5544,10 @@ echo
if test "$HAVE_NS" = "yes"; then
echo
- AS_ECHO(["You must run \"${MAKE-make} install\" in order to test the built application.
-The installed application will go to nextstep/Emacs.app and can be
-run or moved from there."])
+ AS_ECHO(["Run '${MAKE-make}' to build Emacs, then run 'src/emacs' to test it.
+Run '${MAKE-make} install' in order to build an application bundle.
+The application will go to nextstep/Emacs.app and can be run or moved
+from there."])
if test "$EN_NS_SELF_CONTAINED" = "yes"; then
echo "The application will be fully self-contained."
else