X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/e8bbdc4665e4e9bb8c124310d19e75d454635082..5293d1bdb3e665a565af032a163004c976328cc2:/configure.ac diff --git a/configure.ac b/configure.ac index 7c9061029e..b5e6b77c71 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-2015 Free Software Foundation, Inc. +dnl Copyright (C) 1994-1996, 1999-2016 Free Software Foundation, Inc. dnl dnl This file is part of GNU Emacs. dnl @@ -373,6 +373,9 @@ otherwise for the first of 'inotify' or 'gfile' that is usable.]) ], [with_file_notification=$with_features]) +OPTION_DEFAULT_OFF([xwidgets], + [enable use of some gtk widgets in Emacs buffers (requires gtk3)]) + ## For the times when you want to build Emacs but don't have ## a suitable makeinfo, and can live without the manuals. dnl http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01844.html @@ -2103,8 +2106,8 @@ AC_CACHE_CHECK( [[malloc_set_state (malloc_get_state ()); __after_morecore_hook = hook; __malloc_initialize_hook = hook;]])], - [emacs_cv_var_doug_lea_malloc=yes])]) - fi + [emacs_cv_var_doug_lea_malloc=yes]) + fi]) doug_lea_malloc=$emacs_cv_var_doug_lea_malloc system_malloc=$emacs_cv_sanitize_address @@ -2192,9 +2195,6 @@ LIBS="$LIBS_SYSTEM $LIBS" dnl FIXME replace main with a function we actually want from this library. AC_CHECK_LIB(Xbsd, main, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd") -dnl Check for C11 threads. -AC_CHECK_HEADERS_ONCE(threads.h) - dnl Check for the POSIX thread library. LIB_PTHREAD= AC_CHECK_HEADERS_ONCE(pthread.h) @@ -2202,7 +2202,6 @@ if test "$ac_cv_header_pthread_h" && test "$opsys" != "mingw32"; then AC_CACHE_CHECK([for pthread library], [emacs_cv_pthread_lib], [emacs_cv_pthread_lib=no - OLD_CPPFLAGS=$CPPFLAGS OLD_LIBS=$LIBS for emacs_pthread_lib in 'none needed' -lpthread; do case $emacs_pthread_lib in @@ -2231,8 +2230,7 @@ if test "$ac_cv_header_pthread_h" && test "$opsys" != "mingw32"; then if test "$emacs_cv_pthread_lib" != no; then break fi - done - CPPFLAGS=$OLD_CPPFLAGS]) + done]) if test "$emacs_cv_pthread_lib" != no; then AC_DEFINE([HAVE_PTHREAD], 1, [Define to 1 if you have POSIX threads.]) case $emacs_cv_pthread_lib in @@ -2567,6 +2565,26 @@ if test "${HAVE_GTK}" = "yes"; then term_header=gtkutil.h fi + +dnl Enable xwidgets if GTK3 and WebKitGTK+ are available. +HAVE_XWIDGETS=no +XWIDGETS_OBJ= +if test "$with_xwidgets" != "no"; then + test "$USE_GTK_TOOLKIT" = "GTK3" && test "$window_system" != "none" || + AC_MSG_ERROR([xwidgets requested but gtk3 not used.]) + + WEBKIT_REQUIRED=1.4.0 + WEBKIT_MODULES="webkitgtk-3.0 >= $WEBKIT_REQUIRED" + EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES]) + HAVE_XWIDGETS=$HAVE_WEBKIT + test $HAVE_XWIDGETS = yes || + AC_MSG_ERROR([xwidgets requested but WebKitGTK+ not found.]) + + XWIDGETS_OBJ=xwidget.o + AC_DEFINE([HAVE_XWIDGETS], 1, [Define to 1 if you have xwidgets support.]) +fi +AC_SUBST(XWIDGETS_OBJ) + CFLAGS=$OLD_CFLAGS LIBS=$OLD_LIBS @@ -3105,7 +3123,7 @@ if test "${HAVE_X11}" = "yes"; then if test "${with_cairo}" != "no"; then CAIRO_REQUIRED=1.12.0 CAIRO_MODULE="cairo >= $CAIRO_REQUIRED" - PKG_CHECK_MODULES(CAIRO, $CAIRO_MODULE, USE_CAIRO=yes, :) + EMACS_CHECK_MODULES(CAIRO, $CAIRO_MODULE, USE_CAIRO=yes, :) if test $USE_CAIRO = yes; then AC_DEFINE(USE_CAIRO, 1, [Define to 1 if using cairo.]) else @@ -3316,17 +3334,22 @@ if test "${with_modules}" != "no"; then if test "${HAVE_MODULES}" = no; then AC_MSG_ERROR([Dynamic modules are not supported on your system]) + else + SAVE_LIBS=$LIBS + LIBS="$LIBS $LIBMODULES" + AC_CHECK_FUNCS([dlfunc]) + LIBS=$SAVE_LIBS fi fi if test "${HAVE_MODULES}" = yes; then - MODULES_OBJ="dynlib.o module.o" + MODULES_OBJ="dynlib.o emacs-module.o" AC_DEFINE(HAVE_MODULES, 1, [Define to 1 if dynamic modules are enabled]) - AC_DEFINE_UNQUOTED(MODULES_SUFFIX, "$MODULES_SUFFIX", [System extension for dynamic libraries]) + AC_DEFINE_UNQUOTED(MODULES_SUFFIX, "$MODULES_SUFFIX", + [System extension for dynamic libraries]) fi AC_SUBST(MODULES_OBJ) AC_SUBST(LIBMODULES) -AX_GCC_VAR_ATTRIBUTE(cleanup) AC_CHECK_FUNCS(dladdr) ### Use -lpng if available, unless '--with-png=no'. @@ -3614,6 +3637,14 @@ if test "${with_xml2}" != "no"; then # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc. if test "${HAVE_LIBXML2}" != "yes" && test "$opsys" = "darwin"; then SAVE_CPPFLAGS="$CPPFLAGS" + if test -z "$xcsdkdir" -a -n "$XCRUN" -a ! -d /usr/include; then + dnl /usr/include is not found. Try Xcode SDK dir if it is sane. + xcsdkdir=`$XCRUN --show-sdk-path 2>/dev/null` + case $xcsdkdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + xcsdkdir="" ;; + esac + fi CPPFLAGS="$CPPFLAGS -I$xcsdkdir/usr/include/libxml2" AC_CHECK_HEADER(libxml/HTMLparser.h, [AC_CHECK_DECL(HTML_PARSE_RECOVER, HAVE_LIBXML2=yes, , @@ -4409,24 +4440,11 @@ case $opsys in AC_DEFINE(PTY_TTY_NAME_SPRINTF, []) ;; - dnl FIXME? Maybe use same as freebsd - see bug#12040. - darwin ) - AC_DEFINE(PTY_ITERATION, [int i; for (i = 0; i < 1; i++)]) - dnl Not used, because PTY_ITERATION is defined. - AC_DEFINE(FIRST_PTY_LETTER, ['p']) - dnl Note that openpty may fork via grantpt on Mac OS X 10.4/Darwin 8. - dnl But we don't have to block SIGCHLD because it is blocked in the - dnl implementation of grantpt. - AC_DEFINE(PTY_OPEN, [ do { int slave; if (openpty (&fd, &slave, pty_name, NULL, NULL) == -1) fd = -1; else emacs_close (slave); } while (false)]) - AC_DEFINE(PTY_NAME_SPRINTF, []) - AC_DEFINE(PTY_TTY_NAME_SPRINTF, []) - ;; - gnu | openbsd ) AC_DEFINE(FIRST_PTY_LETTER, ['p']) ;; - gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd | nacl ) + gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd | darwin | nacl ) dnl if HAVE_GRANTPT if test "x$ac_cv_func_grantpt" = xyes; then AC_DEFINE(UNIX98_PTYS, 1, [Define if the system has Unix98 PTYs.]) @@ -4804,7 +4822,7 @@ fi version=$PACKAGE_VERSION -copyright="Copyright (C) 2015 Free Software Foundation, Inc." +copyright="Copyright (C) 2016 Free Software Foundation, Inc." AC_DEFINE_UNQUOTED(COPYRIGHT, ["$copyright"], [Short copyright string for this version of Emacs.]) AC_SUBST(copyright) @@ -4930,6 +4948,9 @@ case "$USE_X_TOOLKIT" in LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;; esac +if test "$HAVE_XWIDGETS" = "yes"; then + TOOLKIT_LIBW="$TOOLKIT_LIBW -lXcomposite" +fi AC_SUBST(TOOLKIT_LIBW) if test "${opsys}" != "mingw32"; then @@ -5150,7 +5171,7 @@ AC_SUBST(WINDOW_SYSTEM_OBJ) AH_TOP([/* GNU Emacs site configuration template file. -Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2015 +Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2016 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -5219,7 +5240,8 @@ optsep= 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 X11 NS MODULES; do + LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT X11 NS MODULES \ + XWIDGETS; do case $opt in NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;; @@ -5269,6 +5291,7 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D 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} + Does Emacs support Xwidgets (requires gtk3)? ${HAVE_XWIDGETS} "]) if test -n "${EMACSDATA}"; then