optsep=
dnl This is the documented way to record the args passed to configure,
dnl rather than $ac_configure_args.
-for opt in ${1+"$@"} CFLAGS CPPFLAGS LDFLAGS; do
+for opt in "$@" CFLAGS CPPFLAGS LDFLAGS; do
case $opt in
-n | --no-create | --no-recursion)
continue ;;
OPTION_DEFAULT_ON([gif],[don't compile with GIF image support])
OPTION_DEFAULT_ON([png],[don't compile with PNG image support])
OPTION_DEFAULT_ON([rsvg],[don't compile with SVG image support])
-OPTION_DEFAULT_OFF([cairo],[compile with Cairo drawing])
+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])
],
[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
dnl checks for header files
AC_CHECK_HEADERS_ONCE(
+ malloc.h
sys/systeminfo.h
sys/sysinfo.h
coff.h pty.h
cygwin) hybrid_malloc=yes;;
esac
+if test "${system_malloc}" != yes && test "${doug_lea_malloc}" != yes \
+ && test "${UNEXEC_OBJ}" = unexelf.o; then
+ hybrid_malloc=yes
+fi
+
GMALLOC_OBJ=
+HYBRID_MALLOC=
if test "${system_malloc}" = "yes"; then
AC_DEFINE([SYSTEM_MALLOC], 1,
[Define to 1 to use the system memory allocator, even if it is not
elif test "$hybrid_malloc" = yes; then
AC_DEFINE(HYBRID_MALLOC, 1,
[Define to use gmalloc before dumping and the system malloc after.])
+ HYBRID_MALLOC=1
GNU_MALLOC=
GNU_MALLOC_reason="only before dumping"
GMALLOC_OBJ=gmalloc.o
of the main data segment.])
fi
fi
+AC_SUBST([HYBRID_MALLOC])
+AM_CONDITIONAL([HYBRID_MALLOC_LIB], [test -n "$HYBRID_MALLOC"])
AC_SUBST(GMALLOC_OBJ)
AC_SUBST(VMLIMIT_OBJ)
-if test "$doug_lea_malloc" = "yes" ; then
+if test "$doug_lea_malloc" = "yes" && test "$hybrid_malloc" != yes; then
if test "$GNU_MALLOC" = yes ; then
GNU_MALLOC_reason="
(Using Doug Lea's new malloc from the GNU C Library.)"
use_mmap_for_buffers=no
case "$opsys" in
- cygwin|mingw32|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
+ cygwin|mingw32|irix6-5) use_mmap_for_buffers=yes ;;
esac
AC_FUNC_MMAP
OLD_LIBS=$LIBS
CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
LIBS="$IMAGEMAGICK_LIBS $LIBS"
- AC_CHECK_FUNCS(MagickExportImagePixels MagickMergeImageLayers)
+ AC_CHECK_FUNCS(MagickExportImagePixels MagickMergeImageLayers MagickAutoOrientImage)
CFLAGS=$OLD_CFLAGS
LIBS=$OLD_LIBS
fi
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
AC_SUBST(M17N_FLT_CFLAGS)
AC_SUBST(M17N_FLT_LIBS)
-USE_CAIRO=no
+HAVE_CAIRO=no
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, :)
- if test $USE_CAIRO = yes; then
+ EMACS_CHECK_MODULES(CAIRO, $CAIRO_MODULE)
+ if test $HAVE_CAIRO = yes; then
AC_DEFINE(USE_CAIRO, 1, [Define to 1 if using cairo.])
else
AC_MSG_ERROR([cairo requested but not found.])
else
SAVE_LIBS=$LIBS
LIBS="$LIBS $LIBMODULES"
- AC_CHECK_FUNCS([dlfunc])
+ AC_CHECK_FUNCS([dladdr dlfunc])
LIBS=$SAVE_LIBS
fi
fi
fi
AC_SUBST(MODULES_OBJ)
AC_SUBST(LIBMODULES)
-AC_CHECK_FUNCS(dladdr)
### Use -lpng if available, unless '--with-png=no'.
HAVE_PNG=no
cfmakeraw cfsetspeed copysign __executable_start log2)
LIBS=$OLD_LIBS
-dnl No need to check for aligned_alloc and posix_memalign if using
-dnl gmalloc.o, as it supplies them, unless we're using hybrid_malloc.
-dnl Don't use these functions on Darwin as they are incompatible with
-dnl unexmacosx.c.
-if (test -z "$GMALLOC_OBJ" || test "$hybrid_malloc" = yes) \
- && test "$opsys" != darwin; then
- AC_CHECK_FUNCS([aligned_alloc posix_memalign], [break])
-fi
+dnl No need to check for posix_memalign if aligned_alloc works.
+AC_CHECK_FUNCS([aligned_alloc posix_memalign], [break])
+AC_CHECK_DECLS([aligned_alloc], [], [], [[#include <stdlib.h>]])
dnl Cannot use AC_CHECK_FUNCS
AC_CACHE_CHECK([for __builtin_unwind_init],
XMENU_OBJ=xmenu.o
XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
FONT_OBJ=xfont.o
- if test "$USE_CAIRO" = "yes"; then
+ if test "$HAVE_CAIRO" = "yes"; then
FONT_OBJ="ftfont.o ftcrfont.o"
elif test "$HAVE_XFT" = "yes"; then
FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
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
AC_SUBST(RALLOC_OBJ)
if test "$opsys" = "cygwin"; then
- CYGWIN_OBJ="sheap.o cygw32.o"
+ CYGWIN_OBJ="cygw32.o"
## Cygwin differs because of its unexec().
PRE_ALLOC_OBJ=
POST_ALLOC_OBJ=lastfile.o
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} ;;
- CAIRO|TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;;
+ TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;;
*) eval val=\${HAVE_$opt} ;;
esac
case x$val in
Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF
Does Emacs use a png library? ${HAVE_PNG} $LIBPNG
Does Emacs use -lrsvg-2? ${HAVE_RSVG}
- Does Emacs use cairo? ${USE_CAIRO}
+ Does Emacs use cairo? ${HAVE_CAIRO}
Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}
Does Emacs support sound? ${HAVE_SOUND}
Does Emacs use -lgpm? ${HAVE_GPM}
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