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
with_x_toolkit=$val
])
-OPTION_DEFAULT_OFF([wide-int], [prefer wide Emacs integers (typically 62-bit)])
+OPTION_DEFAULT_OFF([wide-int], [prefer wide Emacs integers (typically 62-bit); allows buffer and string size up to 2GB on 32-bit hosts, at the cost of 10% to 30% slowdown of Lisp interpreter and larger memory footprint])
if test "$with_wide_int" = yes; then
AC_DEFINE([WIDE_EMACS_INT], 1, [Use long long for EMACS_INT if available.])
fi
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_ON([xml2],[don't compile with XML parsing support])
OPTION_DEFAULT_ON([imagemagick],[don't compile with ImageMagick image support])
OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Motif or Xaw3d scroll bars])
OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d])
OPTION_DEFAULT_ON([xim],[don't use X11 XIM])
-OPTION_DEFAULT_OFF([ns],[use NeXTstep (Cocoa or GNUstep) windowing system])
+AC_ARG_WITH([ns],[AS_HELP_STRING([--with-ns],
+[use Nextstep (OS X Cocoa or GNUstep) windowing system.
+On by default on Mac OS X.])],[],[with_ns=maybe])
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([selinux],[don't compile with SELinux support])
OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
OPTION_DEFAULT_ON([zlib],[don't compile with zlib decompression support])
+OPTION_DEFAULT_OFF([modules],[compile with dynamic modules support])
AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB],
[use a file notification library (LIB one of: yes, gfile, inotify, w32, no)])],
* ) AC_MSG_ERROR(['--with-file-notification=$withval' is invalid;
this option's value should be 'yes', 'no', 'gfile', 'inotify' or 'w32'.
'yes' is a synonym for 'w32' on MS-Windows, for 'no' on Nextstep,
-otherwise for the first of 'gfile' or 'inotify' that is usable.])
+otherwise for the first of 'inotify' or 'gfile' that is usable.])
;;
esac
with_file_notification=$val
case ${with_gameuser} in
no) ;;
"" | yes) gamegroup=games ;;
- :*) gamegroup=`echo "${with_gameuser}" | sed -e "s/://"` ;;
+ :*) gamegroup=${with_gameuser#:} ;;
*) gameuser=${with_gameuser} ;;
esac
# option problematic.
nw="$nw -Wsuggest-attribute=pure"
+ # This part is merely for shortening the command line,
+ # since -Wall implies -Wswitch.
+ nw="$nw -Wswitch"
+
# This part is merely for shortening the command line,
# since -Wno-FOO needs to be added below regardless.
nw="$nw -Wmissing-field-initializers"
- nw="$nw -Wswitch"
nw="$nw -Wtype-limits"
nw="$nw -Wunused-parameter"
gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now
gl_WARN_ADD([-Wno-type-limits]) # Too many warnings for now
- gl_WARN_ADD([-Wno-switch]) # Too many warnings for now
gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
gl_WARN_ADD([-Wno-format-nonliteral])
LD_SWITCH_X_SITE_RPATH=
if test "${x_libraries}" != NONE; then
if test -n "${x_libraries}"; then
- LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
- LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
+ LD_SWITCH_X_SITE=-L`AS_ECHO(["$x_libraries"]) | sed -e 's/:/ -L/g'`
+ LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`
+ AS_ECHO(["$x_libraries"]) | sed -e 's/:/ -Wl,-rpath,/g'
+ `
fi
x_default_search_path=""
x_search_path=${x_libraries}
if test -z "${x_search_path}"; then
x_search_path=/usr/lib
fi
- for x_library in `echo ${x_search_path}: | \
+ for x_library in `AS_ECHO(["$x_search_path:"]) | \
sed -e "s/:/ /g" -e p -e "s:/lib[[^ /]]* :/share :g"`; do
x_search_path="\
${x_library}/X11/%L/%T/%N%C%S:\
AC_SUBST(LD_SWITCH_X_SITE_RPATH)
if test "${x_includes}" != NONE && test -n "${x_includes}"; then
- C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
+ C_SWITCH_X_SITE=$isystem`AS_ECHO(["$x_includes"]) | sed -e "s/:/ $isystem/g"`
fi
if test x"${x_includes}" = x; then
bitmapdir=/usr/include/X11/bitmaps
else
# accumulate include directories that have X11 bitmap subdirectories
- bmd_acc="dummyval"
- for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
+ bmd_acc=
+ for bmd in `AS_ECHO(["$x_includes"]) | sed -e 's/:/ /g'`; do
if test -d "${bmd}/X11/bitmaps"; then
bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
fi
bmd_acc="${bmd_acc}:${bmd}/bitmaps"
fi
done
- if test ${bmd_acc} != "dummyval"; then
- bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
- fi
+ bitmapdir=${bmd_acc#:}
fi
+test "${with_ns}" = maybe && test "${opsys}" != darwin && with_ns=no
HAVE_NS=no
NS_GNUSTEP_CONFIG=no
NS_IMPL_COCOA=no
elif test -f $GNUSTEP_CONFIG_FILE; then
NS_IMPL_GNUSTEP=yes
dnl FIXME sourcing this several times in subshells seems inefficient.
- GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
- GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
+ GNUSTEP_SYSTEM_HEADERS=$(
+ . $GNUSTEP_CONFIG_FILE
+ AS_ECHO(["$GNUSTEP_SYSTEM_HEADERS"])
+ )
+ GNUSTEP_SYSTEM_LIBRARIES=$(
+ . $GNUSTEP_CONFIG_FILE
+ AS_ECHO(["$GNUSTEP_SYSTEM_LIBRARIES"])
+ )
dnl I seemed to need these as well with GNUstep-startup 0.25.
- GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
- GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
+ GNUSTEP_LOCAL_HEADERS=$(
+ . $GNUSTEP_CONFIG_FILE
+ AS_ECHO(["$GNUSTEP_LOCAL_HEADERS"])
+ )
+ GNUSTEP_LOCAL_LIBRARIES=$(
+ . $GNUSTEP_CONFIG_FILE
+ AS_ECHO(["$GNUSTEP_LOCAL_LIBRARIES"])
+ )
test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes],
- [AC_MSG_ERROR(['--with-ns' was specified, but the include
- files are missing or cannot be compiled.])])
+ [AC_MSG_ERROR([The include files (AppKit/AppKit.h etc) that
+are required for a Nextstep build are missing or cannot be compiled.
+Either fix this, or re-configure with the option '--without-ns'.])])
macfont_file=""
if test "${NS_IMPL_COCOA}" = "yes"; then
AC_CHECK_PROG(HAVE_XSERVER, X, true, false)
if test "$HAVE_XSERVER" = true ||
test -n "$DISPLAY" ||
- test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
+ {
+ for emacs_libX11 in /usr/lib/libX11.*; do break; done
+ test "$emacs_libX11" != '/usr/lib/libX11.*'
+ }
+ then
AC_MSG_ERROR([You seem to be running X, but no X development libraries
were found. You should install the relevant development files for X
and for the toolkit you want, such as Gtk+ or Motif. Also make
[[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
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
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
dnl FIXME? Don't auto-detect on NS, but do allow someone to specify
dnl a particular library. This doesn't make much sense?
-if test "${with_ns}" = yes && test ${with_file_notification} = yes; then
+if test "${HAVE_NS}" = yes && test ${with_file_notification} = yes; then
with_file_notification=no
fi
fi ;;
esac
-dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED
-dnl has been added in glib 2.24. It has been tested under
-dnl GNU/Linux only. We take precedence over inotify, but this makes
-dnl only sense when glib has been compiled with inotify support. How
-dnl to check?
-case $with_file_notification,$NOTIFY_OBJ in
- gfile, | yes,)
- EMACS_CHECK_MODULES([GFILENOTIFY], [gio-2.0 >= 2.24])
- if test "$HAVE_GFILENOTIFY" = "yes"; then
- AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.])
- NOTIFY_OBJ=gfilenotify.o
- NOTIFY_SUMMARY="yes -lgio (gfile)"
- fi ;;
-esac
-
-dnl inotify is only available on GNU/Linux.
+dnl inotify is available only on GNU/Linux.
case $with_file_notification,$NOTIFY_OBJ in
inotify, | yes,)
AC_CHECK_HEADER(sys/inotify.h)
fi ;;
esac
+dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED
+dnl has been added in glib 2.24. It has been tested under
+dnl GNU/Linux only.
+case $with_file_notification,$NOTIFY_OBJ in
+ gfile,* | yes,)
+ EMACS_CHECK_MODULES([GFILENOTIFY], [gio-2.0 >= 2.24])
+ if test "$HAVE_GFILENOTIFY" = "yes"; then
+ AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.])
+ NOTIFY_OBJ=gfilenotify.o
+ NOTIFY_SUMMARY="yes -lgio (gfile)"
+ fi ;;
+esac
+
case $with_file_notification,$NOTIFY_OBJ in
yes,* | no,* | *,?*) ;;
*) AC_MSG_ERROR([File notification '$with_file_notification' requested but requirements not found.]) ;;
AC_SUBST(M17N_FLT_CFLAGS)
AC_SUBST(M17N_FLT_LIBS)
+USE_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
+ AC_DEFINE(USE_CAIRO, 1, [Define to 1 if using cairo.])
+ else
+ AC_MSG_ERROR([cairo requested but not found.])
+ fi
+
+ CFLAGS="$CFLAGS $CAIRO_CFLAGS"
+ LIBS="$LIBS $CAIRO_LIBS"
+ AC_SUBST(CAIRO_CFLAGS)
+ AC_SUBST(CAIRO_LIBS)
+ fi
+fi
+
+if test "${HAVE_X11}" = "yes"; then
+ AC_CHECK_HEADER(X11/Xlib-xcb.h,
+ AC_CHECK_LIB(xcb, xcb_translate_coordinates, HAVE_XCB=yes))
+ if test "${HAVE_XCB}" = "yes"; then
+ AC_CHECK_LIB(X11-xcb, XGetXCBConnection, HAVE_X11_XCB=yes)
+ if test "${HAVE_X11_XCB}" = "yes"; then
+ AC_DEFINE(USE_XCB, 1,
+[Define to 1 if you have the XCB library and X11-XCB library for mixed
+ X11/XCB programming.])
+ XCB_LIBS="-lX11-xcb -lxcb"
+ AC_SUBST(XCB_LIBS)
+ fi
+ fi
+fi
+
### 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
fi
AC_SUBST(LIBZ)
+### Dynamic modules support
+LIBMODULES=
+HAVE_MODULES=no
+MODULES_OBJ=
+MODULES_SUFFIX=
+if test "${with_modules}" != "no"; then
+ if test "$opsys" = "gnu-linux"; then
+ LIBMODULES="-ldl"
+ MODULES_SUFFIX=".so"
+ HAVE_MODULES=yes
+ elif test "$opsys" = "cygwin"; then
+ MODULES_SUFFIX=".dll"
+ HAVE_MODULES=yes
+ elif test "$opsys" = "darwin"; then
+ MODULES_SUFFIX=".so"
+ HAVE_MODULES=yes
+ elif test "$opsys" = "mingw32"; then
+ MODULES_SUFFIX=".dll"
+ HAVE_MODULES=yes
+ else
+ # BSD system have dlopen in the libc
+ AC_CHECK_FUNC(dlopen, [MODULES_SUFFIX=".so"]
+ [HAVE_MODULES=yes], [])
+ fi
+
+ 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 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])
+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'.
HAVE_PNG=no
LIBPNG=
# 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, ,
AC_CHECK_HEADERS(valgrind/valgrind.h)
-AC_CHECK_FUNCS_ONCE(tzalloc tzset)
+AC_CHECK_MEMBERS([struct unipair.unicode], [], [], [[#include <linux/kd.h>]])
+
+AC_CHECK_FUNCS_ONCE(tzset)
ok_so_far=yes
AC_CHECK_FUNC(socket, , ok_so_far=no)
OLDLIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS $RSVG_CFLAGS $DBUS_CFLAGS $SETTINGS_CFLAGS"
LIBS="$LIBS $GTK_LIBS $RSVG_LIBS $DBUS_LIBS $SETTINGS_LIBS"
-CFLAGS="$CFLAGS $GFILENOTIFY_CFLAGS"
-LIBS="$LIBS $GFILENOTIFY_LIBS"
+CFLAGS="$CFLAGS $GFILENOTIFY_CFLAGS $CAIRO_CFLAGS"
+LIBS="$LIBS $GFILENOTIFY_LIBS $CAIRO_LIBS"
AC_MSG_CHECKING([whether GLib is linked in])
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[#include <glib.h>
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.])
;;
sol2* )
- dnl On SysVr4, grantpt(3) forks a subprocess, so keep sigchld_handler()
+ dnl On SysVr4, grantpt(3) forks a subprocess, so do not use
+ dnl O_CLOEXEC when opening the pty, and keep the SIGCHLD handler
dnl from intercepting that death. If any child but grantpt's should die
dnl within, it should be caught after sigrelse(2).
+ AC_DEFINE(PTY_OPEN, [fd = open (pty_name, O_RDWR | O_NONBLOCK)])
AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, "%s", ptyname); }])
;;
unixware )
dnl Comments are as per sol2*.
+ AC_DEFINE(PTY_OPEN, [fd = open (pty_name, O_RDWR | O_NONBLOCK)])
AC_DEFINE(PTY_TTY_NAME_SPRINTF, [{ char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal("could not grant slave pty"); if (unlockpt(fd) == -1) fatal("could not unlock slave pty"); if (!(ptyname = ptsname(fd))) fatal ("could not enable slave pty"); snprintf (pty_name, PTY_NAME_SIZE, "%s", ptyname); }])
;;
esac
AC_DEFINE(FIRST_PTY_LETTER, ['z'])
AC_DEFINE(PTY_NAME_SPRINTF, [strcpy (pty_name, "/dev/ptmx");])
dnl Push various streams modules onto a PTY channel. Used in process.c.
- AC_DEFINE(SETUP_SLAVE_PTY, [if (ioctl (xforkin, I_PUSH, "ptem") == -1) fatal ("ioctl I_PUSH ptem"); if (ioctl (xforkin, I_PUSH, "ldterm") == -1) fatal ("ioctl I_PUSH ldterm"); if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) fatal ("ioctl I_PUSH ttcompat");], [How to set up a slave PTY, if needed.])
+ AC_DEFINE(SETUP_SLAVE_PTY, [if (ioctl (forkin, I_PUSH, "ptem") == -1) fatal ("ioctl I_PUSH ptem"); if (ioctl (forkin, I_PUSH, "ldterm") == -1) fatal ("ioctl I_PUSH ldterm"); if (ioctl (forkin, I_PUSH, "ttcompat") == -1) fatal ("ioctl I_PUSH ttcompat");], [How to set up a slave PTY, if needed.])
;;
esac
[Define to 1 if sigsetjmp and siglongjmp work.])
fi
-# We need all of these features to handle C stack overflows.
-if test "$ac_cv_header_sys_resource_h" = "yes" &&
- test "$ac_cv_func_getrlimit" = "yes" &&
- test "$emacs_cv_func_sigsetjmp" = "yes" &&
- test "$emacs_cv_alternate_stack" = yes; then
- AC_DEFINE([HAVE_STACK_OVERFLOW_HANDLING], 1,
- [Define to 1 if C stack overflow can be handled in some cases.])
-fi
+case $emacs_cv_func_sigsetjmp,$emacs_cv_alternate_stack,$opsys in
+ yes,yes,* | *,*,mingw32)
+ AC_DEFINE([HAVE_STACK_OVERFLOW_HANDLING], 1,
+ [Define to 1 if C stack overflow can be handled in some cases.]);;
+esac
case $opsys in
sol2* | unixware )
LIBS="$REAL_LIBS"
## Hack to detect a buggy GCC version.
-if test "x$GCC" = xyes \
- && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
- && test x"`echo $CFLAGS | grep '\-O@<:@23@:>@'`" != x \
- && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
- AC_MSG_ERROR([GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'.])
+if test "$GCC" = yes && \
+ $CC --version 2> /dev/null | grep 'gcc.* 4.5.0' >/dev/null; then
+ case $CFLAGS in
+ *-fno-optimize-sibling-calls*) ;;
+ *-O@<:@23@:>@*)
+ AC_MSG_ERROR([GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS.]);;
+ esac
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)
XMENU_OBJ=xmenu.o
XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
FONT_OBJ=xfont.o
- if test "$HAVE_XFT" = "yes"; then
+ if test "$USE_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"
elif test "$HAVE_FREETYPE" = "yes"; then
FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
if test "${opsys}" = "mingw32"; then
CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I \${abs_top_srcdir}/nt/inc"
# Remove unneeded switches from the value of CC that goes to Makefiles
- CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"`
+ CC=`AS_ECHO(["$CC"]) | sed -e "s,$GCC_TEST_OPTIONS,,"`
fi
case "$opsys" in
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.
ACL_SUMMARY=no
fi
-echo "
+emacs_standard_dirs='Standard dirs'
+AS_ECHO(["
Configured for '${canonical}'.
Where should the build process find the source code? ${srcdir}
Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
What window system should Emacs use? ${window_system}
- What toolkit should Emacs use? ${USE_X_TOOLKIT}"
-
-if test -n "${x_includes}"; then
-echo " Where do we find X Windows header files? ${x_includes}"
-else
-echo " Where do we find X Windows header files? Standard dirs"
-fi
-if test -n "${x_libraries}"; then
-echo " Where do we find X Windows libraries? ${x_libraries}"
-else
-echo " Where do we find X Windows libraries? Standard dirs"
-fi
+ What toolkit should Emacs use? ${USE_X_TOOLKIT}
+ Where do we find X Windows header files? ${x_includes:-$emacs_standard_dirs}
+ Where do we find X Windows libraries? ${x_libraries:-$emacs_standard_dirs}"])
optsep=
emacs_config_features=
-for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS \
+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; do
+ LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT X11 NS MODULES; do
case $opt in
NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;;
+ CAIRO|TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;;
*) eval val=\${HAVE_$opt} ;;
esac
- test x"$val" = xno && continue
+ case x$val in
+ xno|xnone|x) continue ;;
+ esac
+ case $opt in
+ X_TOOLKIT)
+ case $val in
+ GTK*|LUCID|MOTIF) opt=$val ;;
+ *) continue ;;
+ esac
+ ;;
+ esac
AS_VAR_APPEND([emacs_config_features], ["$optsep$opt"])
optsep=' '
done
AC_DEFINE_UNQUOTED(EMACS_CONFIG_FEATURES, "${emacs_config_features}",
[Summary of some of the main features enabled by configure.])
-echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
-echo " Does Emacs use -lXpm? ${HAVE_XPM}"
-echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
-echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
-echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
-echo " Does Emacs use a png library? ${HAVE_PNG} $LIBPNG"
-echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
-echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
-
-echo " Does Emacs support sound? ${HAVE_SOUND}"
-
-echo " Does Emacs use -lgpm? ${HAVE_GPM}"
-echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
-echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
-echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
-echo " Does Emacs use a file notification library? ${NOTIFY_SUMMARY}"
-echo " Does Emacs use access control lists? ${ACL_SUMMARY}"
-echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
-echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
-echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
-
-echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
-echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
-echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
-echo " Does Emacs use -lxft? ${HAVE_XFT}"
-echo " Does Emacs directly use zlib? ${HAVE_ZLIB}"
-
-echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
-echo
+AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D}
+ Does Emacs use -lXpm? ${HAVE_XPM}
+ Does Emacs use -ljpeg? ${HAVE_JPEG}
+ Does Emacs use -ltiff? ${HAVE_TIFF}
+ 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 imagemagick? ${HAVE_IMAGEMAGICK}
+ Does Emacs support sound? ${HAVE_SOUND}
+ Does Emacs use -lgpm? ${HAVE_GPM}
+ Does Emacs use -ldbus? ${HAVE_DBUS}
+ Does Emacs use -lgconf? ${HAVE_GCONF}
+ Does Emacs use GSettings? ${HAVE_GSETTINGS}
+ Does Emacs use a file notification library? ${NOTIFY_SUMMARY}
+ Does Emacs use access control lists? ${ACL_SUMMARY}
+ Does Emacs use -lselinux? ${HAVE_LIBSELINUX}
+ Does Emacs use -lgnutls? ${HAVE_GNUTLS}
+ Does Emacs use -lxml2? ${HAVE_LIBXML2}
+ Does Emacs use -lfreetype? ${HAVE_FREETYPE}
+ Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}
+ Does Emacs use -lotf? ${HAVE_LIBOTF}
+ Does Emacs use -lxft? ${HAVE_XFT}
+ 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}
+"])
if test -n "${EMACSDATA}"; then
- echo " Environment variable EMACSDATA set to: $EMACSDATA"
+ AS_ECHO([" Environment variable EMACSDATA set to: $EMACSDATA"])
fi
if test -n "${EMACSDOC}"; then
- echo " Environment variable EMACSDOC set to: $EMACSDOC"
+ AS_ECHO([" Environment variable EMACSDOC set to: $EMACSDOC"])
fi
echo
if test "$HAVE_NS" = "yes"; then
echo
- echo "You must run \"${MAKE-make} install\" in order to test the built application.
+ 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."
+run or moved from there."])
if test "$EN_NS_SELF_CONTAINED" = "yes"; then
echo "The application will be fully self-contained."
else
- echo "The lisp resources for the application will be installed under ${prefix}.
+ AS_ECHO(["The lisp resources for the application will be installed under ${prefix}.
You may need to run \"${MAKE-make} install\" with sudo. The application will fail
-to run if these resources are not installed."
+to run if these resources are not installed."])
fi
echo
fi
fi
# Remove any trailing slashes in these variables.
-[test "${prefix}" != NONE &&
- prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
-test "${exec_prefix}" != NONE &&
- exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`]
+case $prefix in
+ */) prefix=`AS_DIRNAME(["$prefix."])`;;
+esac
+case $exec_prefix in
+ */) exec_prefix=`AS_DIRNAME(["$exec_prefix."])`;;
+esac
if test "$HAVE_NS" = "yes"; then
if test "$NS_IMPL_GNUSTEP" = yes; then
dnl The admin/ directory used to be excluded from tarfiles.
if test -d $srcdir/admin; then
- SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES admin/unidata/Makefile admin/grammars/Makefile"
+ SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES admin/charsets/Makefile admin/unidata/Makefile admin/grammars/Makefile"
+ AC_CONFIG_FILES([admin/charsets/Makefile])
AC_CONFIG_FILES([admin/unidata/Makefile])
AC_CONFIG_FILES([admin/grammars/Makefile])
fi dnl -d admin
dnl or a symlink?
AC_CONFIG_COMMANDS([src/.gdbinit], [
if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
- echo "source $ac_abs_top_srcdir/src/.gdbinit" > src/.gdbinit
+ AS_ECHO(["source $ac_abs_top_srcdir/src/.gdbinit"]) > src/.gdbinit
fi
])