dnl Autoconf script for GNU Emacs
-dnl To rebuild the `configure' script from this, execute the command
-dnl autoconf
+dnl To rebuild the 'configure' script from this, execute the command
+dnl autoconf
dnl in the directory containing this script.
dnl If you changed any AC_DEFINES, also run autoheader.
dnl
AC_DEFINE(HESIOD, 1, [Define to support using a Hesiod database to find the POP server.])
fi
-OPTION_DEFAULT_OFF([mmdf],[support MMDF mailboxes])
-if test "$with_mmdf" != no; then
- AC_DEFINE(MAIL_USE_MMDF, 1, [Define to support MMDF mailboxes in movemail.])
-fi
-
OPTION_DEFAULT_OFF([mail-unlink],[unlink, rather than empty, mail spool after reading])
if test "$with_mail_unlink" != no; then
AC_DEFINE(MAIL_UNLINK_SPOOL, 1, [Define to unlink, rather than empty, mail spool after reading.])
default yes). Only for GNU/Linux, FreeBSD, NetBSD, MinGW, Cygwin.])],
[ case "${withval}" in
yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
- *) AC_MSG_ERROR([`--with-sound=$withval' is invalid;
-this option's value should be `yes', `no', `alsa', `oss', or `bsd-ossaudio'.])
+ *) AC_MSG_ERROR(['--with-sound=$withval' is invalid;
+this option's value should be 'yes', 'no', 'alsa', 'oss', or 'bsd-ossaudio'.])
;;
esac
with_sound=$val
gtk2 ) val=gtk2 ;;
gtk3 ) val=gtk3 ;;
* )
-AC_MSG_ERROR([`--with-x-toolkit=$withval' is invalid;
-this option's value should be `yes', `no', `lucid', `athena', `motif', `gtk',
-`gtk2' or `gtk3'. `yes' and `gtk' are synonyms.
-`athena' and `lucid' are synonyms.])
+AC_MSG_ERROR(['--with-x-toolkit=$withval' is invalid;
+this option's value should be 'yes', 'no', 'lucid', 'athena', 'motif', 'gtk',
+'gtk2' or 'gtk3'. 'yes' and 'gtk' are synonyms.
+'athena' and 'lucid' are synonyms.])
;;
esac
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)])],
g | gf | gfi | gfil | gfile ) val=gfile ;;
i | in | ino | inot | inoti | inotif | inotify ) val=inotify ;;
w | w3 | w32 ) val=w32 ;;
- * ) 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.])
+ * ) 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 '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
ac_gc_check_cons_list=1 ;
ac_glyphs_debug=1 ;;
# these enable particular checks
- stringbytes) ac_gc_check_stringbytes=1 ;;
- stringoverrun) ac_gc_check_string_overrun=1 ;;
+ stringbytes) ac_gc_check_stringbytes=1 ;;
+ stringoverrun) ac_gc_check_string_overrun=1 ;;
stringfreelist) ac_gc_check_string_free_list=1 ;;
xmallocoverrun) ac_xmalloc_overrun=1 ;;
conslist) ac_gc_check_cons_list=1 ;;
AC_ARG_ENABLE(autodepend,
[AS_HELP_STRING([--enable-autodepend],
[automatically generate dependencies to .h-files.
- Requires gcc, enabled if found.])],
+ Requires gcc, enabled if found.])],
[ac_enable_autodepend="${enableval}"],[ac_enable_autodepend=yes])
AC_ARG_ENABLE(gtk-deprecation-warnings,
[Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0])],
[ac_enable_gtk_deprecation_warnings="${enableval}"],[])
-dnl This used to use changequote, but, apart from `changequote is evil'
+dnl This used to use changequote, but, apart from 'changequote is evil'
dnl per the autoconf manual, we can speed up autoconf somewhat by quoting
dnl the great gob of text. Thus it's not processed for possible expansion.
dnl Just make sure the brackets remain balanced.
mips-sgi-irix6.5 )
opsys=irix6-5
# Without defining _LANGUAGE_C, things get masked out in the headers
- # so that, for instance, grepping for `free' in stdlib.h fails and
+ # so that, for instance, grepping for 'free' in stdlib.h fails and
# AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
;;
# MinGW overrides and adds some system headers in nt/inc.
GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
;;
- *-sysv4.2uw* ) opsys=unixware ;;
- *-sysv5uw* ) opsys=unixware ;;
- *-sysv5OpenUNIX* ) opsys=unixware ;;
+ *-sysv4.2uw* ) opsys=unixware ;;
+ *-sysv5uw* ) opsys=unixware ;;
+ *-sysv5OpenUNIX* ) opsys=unixware ;;
## Otherwise, we'll fall through to the generic opsys code at the bottom.
esac
;;
dnl quotation ends
if test $unported = yes; then
- AC_MSG_ERROR([Emacs does not support `${canonical}' systems.
+ AC_MSG_ERROR([Emacs does not support '${canonical}' systems.
If you think it should, please send a report to ${PACKAGE_BUGREPORT}.
-Check `etc/MACHINES' for recognized configuration names.])
+Check 'etc/MACHINES' for recognized configuration names.])
fi
#### Choose a compiler.
# 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])
HAVE_MAKEINFO=no
elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.7, and your
-source tree does not seem to have pre-built manuals in the `info' directory.
+source tree does not seem to have pre-built manuals in the 'info' directory.
Either install a suitable version of makeinfo, or re-run configure
-with the `--without-makeinfo' option to build without the manuals.] )
+with the '--without-makeinfo' option to build without the manuals.] )
fi
fi
AC_SUBST(HAVE_MAKEINFO)
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 (Don't use `-z nocombreloc' as -z takes no arg on Irix.)
-dnl Treat GCC specially since it just gives a non-fatal `unrecognized option'
+dnl (Don't use '-z nocombreloc' as -z takes no arg on Irix.)
+dnl Treat GCC specially 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
LD_SWITCH_SYSTEM=
case "$opsys" in
freebsd|dragonfly)
- ## Let `ld' find image libs and similar things in /usr/local/lib.
+ ## Let 'ld' find image libs and similar things in /usr/local/lib.
## The system compiler, GCC, has apparently been modified to not
## look there, contrary to what a stock GCC would do.
### It's not our place to do this. See bug#10313#17.
AC_SUBST(LIB_MATH)
AC_DEFINE_UNQUOTED(SYSTEM_TYPE, "$SYSTEM_TYPE",
- [The type of system you are compiling for; sets `system-type'.])
+ [The type of system you are compiling for; sets 'system-type'.])
pre_PKG_CONFIG_CFLAGS=$CFLAGS
LIBS="$ALSA_LIBS $LIBS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <asoundlib.h>]], [[snd_lib_error_set_handler (0);]])],
emacs_alsa_normal=yes,
- emacs_alsa_normal=no)
+ emacs_alsa_normal=no)
if test "$emacs_alsa_normal" != yes; then
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <alsa/asoundlib.h>]],
[[snd_lib_error_set_handler (0);]])],
emacs_alsa_subdir=yes,
- emacs_alsa_subdir=no)
+ emacs_alsa_subdir=no)
if test "$emacs_alsa_subdir" != yes; then
AC_MSG_ERROR([pkg-config found alsa, but it does not compile. See config.log for error messages.])
fi
fi
dnl On Solaris 8 there's a compilation warning for term.h because
-dnl it doesn't define `bool'.
+dnl it doesn't define 'bool'.
AC_CHECK_HEADERS(term.h, , , -)
AC_HEADER_TIME
AC_CHECK_DECLS([sys_siglist], [], [], [[#include <signal.h>
dnl check for Make feature
-DEPFLAGS=
-MKDEPDIR=":"
-deps_frag=deps.mk
+AUTO_DEPEND=no
dnl check if we have GCC and autodepend is on.
if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
AC_MSG_CHECKING([whether gcc understands -MMD -MF])
rm -rf deps.d
AC_MSG_RESULT([$ac_enable_autodepend])
if test $ac_enable_autodepend = yes; then
- DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
- ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
- MKDEPDIR='${MKDIR_P} ${DEPDIR}'
- deps_frag=autodeps.mk
+ AUTO_DEPEND=yes
fi
fi
-lwlib_deps_frag=$srcdir/lwlib/$deps_frag
-oldxmenu_deps_frag=$srcdir/oldXMenu/$deps_frag
-deps_frag=$srcdir/src/$deps_frag
-AC_SUBST(MKDEPDIR)
-AC_SUBST(DEPFLAGS)
-AC_SUBST_FILE(deps_frag)
-AC_SUBST_FILE(lwlib_deps_frag)
-AC_SUBST_FILE(oldxmenu_deps_frag)
-
-lisp_frag=$srcdir/src/lisp.mk
-AC_SUBST_FILE(lisp_frag)
-
+AC_SUBST(AUTO_DEPEND)
dnl checks for operating system services
AC_SYS_LONG_FILE_NAMES
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_MSG_RESULT([$ns_osx_have_106])
if test $ns_osx_have_106 = no; then
- AC_MSG_ERROR([`OSX 10.6 or newer is required']);
+ AC_MSG_ERROR([OSX 10.6 or newer is required]);
fi
fi
fi
case "${opsys}" in
cygwin)
AC_CHECK_HEADER([windows.h], [HAVE_W32=yes],
- [AC_MSG_ERROR([`--with-w32' was specified, but windows.h
+ [AC_MSG_ERROR(['--with-w32' was specified, but windows.h
cannot be found.])])
;;
mingw32)
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
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)
fi
-### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
+### Use -lrsvg-2 if available, unless '--with-rsvg=no' is specified.
HAVE_RSVG=no
if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then
if test "${with_rsvg}" != "no"; then
CFLAGS="$CFLAGS $RSVG_CFLAGS"
# Windows loads librsvg dynamically
if test "${opsys}" = "mingw32"; then
- RSVG_LIBS=
+ RSVG_LIBS=
fi
fi
fi
GTK_OBJ="gtkutil.o $GTK_OBJ"
term_header=$gtk_term_header
USE_X_TOOLKIT=none
- if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
- :
- else
- AC_MSG_WARN([[Your version of Gtk+ will have problems with
+ AC_MSG_WARN([[Your version of Gtk+ will have problems with
closing open displays. This is no problem if you just use
one display, but if you use more than one and close one of them
- Emacs may crash.]])
- sleep 3
- fi
+ Emacs may crash.
+ See http://bugzilla.gnome.org/show_bug.cgi?id=85715]])
+ sleep 3
fi
fi
AC_MSG_CHECKING([whether GSettings is in gio])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
- [[/* Check that gsettings really is present. */
- #include <glib-object.h>
+ [[/* Check that gsettings really is present. */
+ #include <glib-object.h>
#include <gio/gio.h>
- ]],
- [[
+ ]],
+ [[
GSettings *settings;
GVariant *val = g_settings_get_value (settings, "");
- ]])],
- [], HAVE_GSETTINGS=no)
+ ]])],
+ [], HAVE_GSETTINGS=no)
AC_MSG_RESULT([$HAVE_GSETTINGS])
if test "$HAVE_GSETTINGS" = "yes"; then
AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.])
- SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
- SETTINGS_LIBS="$GSETTINGS_LIBS"
+ SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
+ SETTINGS_LIBS="$GSETTINGS_LIBS"
fi
CFLAGS=$old_CFLAGS
LIBS=$old_LIBS
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
dnl MS Windows native file monitor is available for mingw32 only.
case $with_file_notification,$opsys in
w32,cygwin)
- AC_MSG_ERROR([`--with-file-notification=w32' was specified, but
+ AC_MSG_ERROR(['--with-file-notification=w32' was specified, but
this is only supported on MS-Windows native and MinGW32 builds.
Consider using gfile instead.])
;;
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_MSG_ERROR([File notification '$with_file_notification' requested but requirements not found.]) ;;
esac
if test -n "$NOTIFY_OBJ"; then
AC_DEFINE(HAVE_XIM, 1, [Define to 1 if XIM is available])],
HAVE_XIM=no)
-dnl `--with-xim' now controls only the initial value of use_xim at run time.
+dnl '--with-xim' now controls only the initial value of use_xim at run time.
if test "${with_xim}" != "no"; then
AC_DEFINE(USE_XIM, 1,
### Start of font-backend (under X11) section.
if test "${HAVE_X11}" = "yes"; then
- ## Use -lXft if available, unless `--with-xft=no'.
+ ## Use -lXft if available, unless '--with-xft=no'.
HAVE_XFT=maybe
if test "x${with_x}" = "xno"; then
with_xft="no";
AC_SUBST(M17N_FLT_CFLAGS)
AC_SUBST(M17N_FLT_LIBS)
-### Use -lXpm if available, unless `--with-xpm=no'.
+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
### rather than /usr/include/X11/xpm.h, so we set CPPFLAGS (and
AC_SUBST(LIBXPM)
-### Use -ljpeg if available, unless `--with-jpeg=no'.
-### mingw32 doesn't use -ljpeg, since it loads the library dynamically.
+### Use -ljpeg if available, unless '--with-jpeg=no'.
HAVE_JPEG=no
LIBJPEG=
-if test "${opsys}" = "mingw32"; then
- if test "${with_jpeg}" != "no"; then
- dnl Checking for jpeglib.h can lose because of a redefinition of
- dnl HAVE_STDLIB_H.
- AC_CHECK_HEADER(jerror.h, HAVE_JPEG=yes, HAVE_JPEG=no)
- fi
- AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
- if test "${HAVE_JPEG}" = "yes"; then
- AC_DEFINE(HAVE_JPEG)
- AC_EGREP_CPP([version 6b or later],
- [#include <jpeglib.h>
- #if JPEG_LIB_VERSION >= 62
- version 6b or later
- #endif
- ],
- [AC_DEFINE(HAVE_JPEG)],
- [AC_MSG_WARN([libjpeg found, but not version 6b or later])
- HAVE_JPEG=no])
- fi
-elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
- if test "${with_jpeg}" != "no"; then
- dnl Checking for jpeglib.h can lose because of a redefinition of
- dnl HAVE_STDLIB_H.
- AC_CHECK_HEADER(jerror.h,
- [AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes)])
- fi
-
- AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
- if test "${HAVE_JPEG}" = "yes"; then
- AC_DEFINE(HAVE_JPEG)
- AC_EGREP_CPP([version 6b or later],
- [#include <jpeglib.h>
- #if JPEG_LIB_VERSION >= 62
- version 6b or later
- #endif
- ],
- [AC_DEFINE(HAVE_JPEG)],
- [AC_MSG_WARN([libjpeg found, but not version 6b or later])
- HAVE_JPEG=no])
- fi
- if test "${HAVE_JPEG}" = "yes"; then
- LIBJPEG=-ljpeg
+if test "${with_jpeg}" != "no"; then
+ AC_CACHE_CHECK([for jpeglib 6b or later],
+ [emacs_cv_jpeglib],
+ [OLD_LIBS=$LIBS
+ for emacs_cv_jpeglib in yes -ljpeg no; do
+ case $emacs_cv_jpeglib in
+ yes) ;;
+ no) break;;
+ *) LIBS="$LIBS $emacs_cv_jpeglib";;
+ esac
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#undef HAVE_STDLIB_H /* Avoid config.h/jpeglib.h collision. */
+ #include <stdio.h> /* jpeglib.h needs FILE and size_t. */
+ #include <jpeglib.h>
+ #include <jerror.h>
+ char verify[JPEG_LIB_VERSION < 62 ? -1 : 1];
+ struct jpeg_decompress_struct cinfo;
+ ]],
+ [[
+ jpeg_create_decompress (&cinfo);
+ WARNMS (&cinfo, JWRN_JPEG_EOF);
+ jpeg_destroy_decompress (&cinfo);
+ ]])],
+ [emacs_link_ok=yes],
+ [emacs_link_ok=no])
+ LIBS=$OLD_LIBS
+ test $emacs_link_ok = yes && break
+ done])
+ if test "$emacs_cv_jpeglib" != no; then
+ HAVE_JPEG=yes
+ AC_DEFINE([HAVE_JPEG], 1,
+ [Define to 1 if you have the jpeg library (typically -ljpeg).])
+ ### mingw32 doesn't use -ljpeg, since it loads the library
+ ### dynamically when needed, and doesn't want a run-time
+ ### dependency on the jpeglib DLL.
+ test "$emacs_cv_jpeglib" != yes && test "${opsys}" != "mingw32" \
+ && LIBJPEG=$emacs_cv_jpeglib
fi
fi
AC_SUBST(LIBJPEG)
fi
AC_SUBST(LIBZ)
-### Use -lpng if available, unless `--with-png=no'.
+### 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
+ # XXX: not tested
+ LIBMODULES="-lcygwin"
+ 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])
+ fi
+fi
+
+if test "${HAVE_MODULES}" = yes; then
+ MODULES_OBJ="dynlib.o 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=
PNG_CFLAGS=
AC_SUBST(LIBPNG)
AC_SUBST(PNG_CFLAGS)
-### Use -ltiff if available, unless `--with-tiff=no'.
+### Use -ltiff if available, unless '--with-tiff=no'.
### mingw32 doesn't use -ltiff, since it loads the library dynamically.
HAVE_TIFF=no
LIBTIFF=
fi
AC_SUBST(LIBTIFF)
-### Use -lgif or -lungif if available, unless `--with-gif=no'.
+### Use -lgif or -lungif if available, unless '--with-gif=no'.
### mingw32 doesn't use -lgif/-lungif, since it loads the library dynamically.
HAVE_GIF=no
LIBGIF=
fi
fi
-### Use -lgpm if available, unless `--with-gpm=no'.
+### Use -lgpm if available, unless '--with-gpm=no'.
HAVE_GPM=no
LIBGPM=
if test "${with_gpm}" != "no"; then
CPPFLAGS="$CPPFLAGS -I$xcsdkdir/usr/include/libxml2"
AC_CHECK_HEADER(libxml/HTMLparser.h,
[AC_CHECK_DECL(HTML_PARSE_RECOVER, HAVE_LIBXML2=yes, ,
- [#include <libxml/HTMLparser.h>])])
+ [#include <libxml/HTMLparser.h>])])
CPPFLAGS="$SAVE_CPPFLAGS"
if test "${HAVE_LIBXML2}" = "yes"; then
LIBXML2_CFLAGS="-I'$xcsdkdir/usr/include/libxml2'"
AC_CHECK_LIB(mail, maillock, have_mail=yes, have_mail=no)
if test $have_mail = yes; then
LIBS_MAIL=-lmail
- AC_DEFINE(HAVE_LIBMAIL, 1, [Define to 1 if you have the `mail' library (-lmail).])
+ AC_DEFINE(HAVE_LIBMAIL, 1, [Define to 1 if you have the 'mail' library (-lmail).])
OLD_LIBS=$LIBS
LIBS="$LIBS_MAIL $LIBS"
AC_CHECK_LIB(lockfile, maillock, have_lockfile=yes, have_lockfile=no)
if test $have_lockfile = yes; then
LIBS_MAIL=-llockfile
- AC_DEFINE(HAVE_LIBLOCKFILE, 1, [Define to 1 if you have the `lockfile' library (-llockfile).])
+ AC_DEFINE(HAVE_LIBLOCKFILE, 1, [Define to 1 if you have the 'lockfile' library (-llockfile).])
else
# If we have the shared liblockfile, assume we must use it for mail
# locking (e.g. Debian). If we couldn't link against liblockfile
if test $ac_cv_prog_liblockfile = yes; then
AC_MSG_ERROR([Shared liblockfile found but can't link against it.
This probably means that movemail could lose mail.
-There may be a `development' package to install containing liblockfile.])
+There may be a 'development' package to install containing liblockfile.])
fi
fi
AC_CHECK_HEADERS_ONCE(maillock.h)
## On GNU/Linux systems, both methods are used by various mail programs.
## I assume most people are using newer mailers that have heard of flock.
## Change this if you need to.
- ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
+ ## Debian contains a patch which says: "On Debian/GNU/Linux systems,
## configure gets the right answers, and that means *NOT* using flock.
## Using flock is guaranteed to be the wrong thing. See Debian Policy
- ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
+ ## for details." and then uses '#ifdef DEBIAN'. Unfortunately the
## Debian maintainer hasn't provided a clean fix for Emacs.
- ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
+ ## movemail.c will use 'maillock' when MAILDIR, HAVE_LIBMAIL and
## HAVE_MAILLOCK_H are defined, so the following appears to be the
## correct logic. -- fx
## We must check for HAVE_LIBLOCKFILE too, as movemail does.
emacs_cv_func___builtin_unwind_init=no)])
if test $emacs_cv_func___builtin_unwind_init = yes; then
AC_DEFINE(HAVE___BUILTIN_UNWIND_INIT, 1,
- [Define to 1 if you have the `__builtin_unwind_init' function.])
+ [Define to 1 if you have the '__builtin_unwind_init' function.])
fi
AC_CHECK_HEADERS_ONCE(sys/un.h)
fi
AC_MSG_RESULT([$msg])
if test "X$msg" = Xno; then
- AC_MSG_ERROR([The required function `tputs' was not found in any library.
+ AC_MSG_ERROR([The required function 'tputs' was not found in any library.
The following libraries were tried (in order):
libtinfo, libncurses, libterminfo, libtermcap, libcurses
Please try installing whichever of these libraries is most appropriate
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>
- ]],
+ ]],
[[g_print ("Hello world");]])],
[links_glib=yes],
[links_glib=no])
esac
-dnl If the system's imake configuration file defines `NeedWidePrototypes'
-dnl as `NO', we must define NARROWPROTO manually. Such a define is
-dnl generated in the Makefile generated by `xmkmf'. If we don't define
+dnl If the system's imake configuration file defines 'NeedWidePrototypes'
+dnl as 'NO', we must define NARROWPROTO manually. Such a define is
+dnl generated in the Makefile generated by 'xmkmf'. If we don't define
dnl NARROWPROTO, we will see the wrong function prototypes for X functions
dnl taking float or double parameters.
case $opsys in
cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
AC_DEFINE(NARROWPROTO, 1, [Define if system's imake configuration
- file defines `NeedWidePrototypes' as `NO'.])
+ file defines 'NeedWidePrototypes' as 'NO'.])
;;
esac
;;
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
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"
[emacs_cv_struct_alignment],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <stddef.h>
- struct __attribute__ ((aligned (8))) s { char c; };
- struct t { char c; struct s s; };
+ struct __attribute__ ((aligned (8))) s { char c; };
+ struct t { char c; struct s s; };
char verify[offsetof (struct t, s) == 8 ? 1 : -1];
]])],
[emacs_cv_struct_alignment=yes],
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
*) LD_SWITCH_SYSTEM_TEMACS= ;;
esac
-# -nopie fixes a temacs segfault on Gentoo for some reason (Bug#18784).
+# -nopie fixes a temacs segfault on Gentoo, OpenBSD, and other systems
+# with "hardened" GCC configurations for some reason (Bug#18784).
# We don't know why -nopie works, but not segfaulting is better than
-# segfaulting. Use -Werror when trying -nopie, otherwise clang keeps
-# warning that it does not understand -nopie.
+# segfaulting. Use ac_c_werror_flag=yes when trying -nopie, otherwise
+# clang keeps warning that it does not understand -nopie, and pre-4.6
+# GCC has a similar problem (Bug#20338).
AC_CACHE_CHECK([whether $CC accepts -nopie],
[emacs_cv_prog_cc_nopie],
- [emacs_save_CFLAGS=$CFLAGS
+ [emacs_save_c_werror_flag=$ac_c_werror_flag
emacs_save_LDFLAGS=$LDFLAGS
- CFLAGS="$CFLAGS -Werror"
+ ac_c_werror_flag=yes
LDFLAGS="$LDFLAGS -nopie"
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
[emacs_cv_prog_cc_nopie=yes],
[emacs_cv_prog_cc_nopie=no])
- CFLAGS=$emacs_save_CFLAGS
+ ac_c_werror_flag=$emacs_save_c_werror_flag
LDFLAGS=$emacs_save_LDFLAGS])
if test "$emacs_cv_prog_cc_nopie" = yes; then
LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -nopie"
ACL_SUMMARY=no
fi
-echo "
-Configured for \`${canonical}'.
+emacs_standard_dirs='Standard dirs'
+AS_ECHO(["
+Configured for '${canonical}'.
Where should the build process find the source code? ${srcdir}
What compiler should emacs be built with? ${CC} ${CFLAGS}
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 has 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 Obviously there is duplication here wrt $SUBDIR_MAKEFILES.
dnl You _can_ use that variable in AC_CONFIG_FILES, so long as any directory
dnl using automake (ie lib/) is explicitly listed and not "hidden" in a variable
-dnl (else you get "no `Makefile.am' found for any configure output").
+dnl (else you get "no 'Makefile.am' found for any configure output").
dnl This will work, but you get a config.status that is not quite right
dnl (see http://lists.gnu.org/archive/html/bug-autoconf/2008-08/msg00028.html).
dnl That doesn't have any obvious consequences for Emacs, but on the whole
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 One reason is that the various paths are not fully expanded (see above);
dnl eg gamedir=${prefix}/var/games/emacs.
dnl Secondly, the GNU Coding standards require that one should be able
-dnl to run `make prefix=/some/where/else' and override the values set
-dnl by configure. This also explains the `move-if-change' test and
-dnl the use of force in the `epaths-force' rule in Makefile.in.
+dnl to run 'make prefix=/some/where/else' and override the values set
+dnl by configure. This also explains the 'move-if-change' test and
+dnl the use of force in the 'epaths-force' rule in Makefile.in.
AC_CONFIG_COMMANDS([src/epaths.h], [
if test "${opsys}" = "mingw32"; then
${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
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
])