diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 169 |
1 files changed, 114 insertions, 55 deletions
diff --git a/configure.ac b/configure.ac index f9c7bb76e58..d2269d6f35b 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.0.91, 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 @@ -1267,6 +1272,14 @@ esac 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 @@ -2076,7 +2089,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 +2124,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,6 +2540,12 @@ fi HAVE_IMAGEMAGICK=no if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes"; then if test "${with_imagemagick}" != "no"; then + 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 + ## 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. @@ -2870,6 +2895,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 @@ -3268,6 +3314,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? @@ -3424,7 +3474,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 @@ -3467,23 +3519,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= @@ -3559,45 +3608,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 @@ -3858,13 +3916,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 @@ -5213,7 +5271,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= @@ -5364,7 +5422,7 @@ emacs_config_features= for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \ GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \ LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT OLDXMENU X11 NS MODULES \ - THREADS XWIDGETS LIBSYSTEMD CANNOT_DUMP LCMS2; do + THREADS XWIDGETS LIBSYSTEMD JSON CANNOT_DUMP LCMS2; do case $opt in CANNOT_DUMP) eval val=\${$opt} ;; @@ -5415,6 +5473,7 @@ 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 directly use zlib? ${HAVE_ZLIB} Does Emacs have dynamic modules support? ${HAVE_MODULES} Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS} |