dnl Note this is parsed by (at least) make-dist and lisp/cedet/ede/emacs.el.
AC_INIT(GNU Emacs, 24.4.50, bug-gnu-emacs@gnu.org)
-dnl We get MINGW64 with MSYS2
-if test "x$MSYSTEM" = "xMINGW32" -o "x$MSYSTEM" = "xMINGW64"
-then
- . $srcdir/nt/mingw-cfg.site
-
- case $srcdir in
- /* | ?:*)
- # srcdir is an absolute path. In this case, force the format
- # "/c/foo/bar", to simplify later conversions to native Windows
- # format ("c:/foo/bar")
- srcdir=`cd "${srcdir}" && pwd -W`
- srcdir="/${srcdir:0:1}${srcdir:2}"
- ;;
- esac
-fi
-
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.
dnl Add some environment variables, if they were passed via the environment
AC_SUBST([SET_MAKE])])
dnl Check for GNU Make and possibly set MAKE before running AM_INIT_AUTOMAKE.
+[emacs_check_gnu_make ()
+{
+ emacs_makeout=`($1 --version) 2>/dev/null` &&
+ case $emacs_makeout in
+ 'GNU Make '3.8[1-9]* | 'GNU Make '3.9[0-9]* | \
+ 'GNU Make '3.[1-9][0-9][0-9]* | 'GNU Make '[4-9]* | 'GNU Make '[1-9][0-9]* )
+ ac_path_MAKE_found=:;;
+ esac
+}]
AC_CACHE_CHECK([for GNU Make], [ac_cv_path_MAKE],
[ac_path_MAKE_found=false
if test -n "$MAKE"; then
- emacs_makeout=`($MAKE --version) 2>/dev/null` &&
- case $emacs_makeout in
- 'GNU Make '*)
- ac_path_MAKE_found=:;;
- esac
+ emacs_check_gnu_make "$MAKE"
ac_cv_path_MAKE=$MAKE
else
emacs_tried_make=false
emacs_tried_gmake=false
emacs_tried_gnumake=false
AC_PATH_PROGS_FEATURE_CHECK([MAKE], [make gmake gnumake],
- [[emacs_makeout=`($ac_path_MAKE --version) 2>/dev/null` &&
- case $emacs_makeout in
- 'GNU Make '*)
- # Use the fully-qualified program name only if the basename
- # would not resolve to it.
- if eval \$emacs_tried_$ac_prog; then
- ac_cv_path_MAKE=$ac_path_MAKE
- else
- ac_cv_path_MAKE=$ac_prog
- fi
- ac_path_MAKE_found=:;;
- esac
+ [[emacs_check_gnu_make "$ac_path_MAKE"
+ if $ac_path_MAKE_found; then
+ # Use the fully-qualified program name only if the basename
+ # would not resolve to it.
+ if eval \$emacs_tried_$ac_prog; then
+ ac_cv_path_MAKE=$ac_path_MAKE
+ else
+ ac_cv_path_MAKE=$ac_prog
+ fi
+ fi
eval emacs_tried_$ac_prog=:]])
fi])
-$ac_path_MAKE_found || { AC_MSG_ERROR([[Building Emacs requires GNU Make.
+$ac_path_MAKE_found || {
+AC_MSG_ERROR([[Building Emacs requires GNU Make, at least version 3.81.
If you have it installed under another name, configure with 'MAKE=...'.
For example, run '$0 MAKE=gnu-make'.]])
}
dnl Fairly arbitrary, older versions might work too.
AM_INIT_AUTOMAKE(1.11)
+dnl Canonicalize the configuration name.
+AC_CANONICAL_HOST
+canonical=$host
+configuration=${host_alias-${build_alias-$host}}
+
+dnl We get MINGW64 with MSYS2.
+case $canonical in
+ *-mingw*)
+ . $srcdir/nt/mingw-cfg.site
+
+ case $srcdir in
+ /* | ?:*)
+ # srcdir is an absolute path. In this case, force the format
+ # "/c/foo/bar", to simplify later conversions to native Windows
+ # format ("c:/foo/bar").
+ srcdir=`cd "${srcdir}" && pwd -W`
+ srcdir="/${srcdir:0:1}${srcdir:2}"
+ ;;
+ esac;;
+esac
+
dnl Support for --program-prefix, --program-suffix and
dnl --program-transform-name options
AC_ARG_PROGRAM
AC_ARG_ENABLE(checking,
[AS_HELP_STRING([--enable-checking@<:@=LIST@:>@],
- [enable expensive run-time checks. With LIST,
- enable only specific categories of checks.
- Categories are: all,yes,no.
- Flags are: stringbytes, stringoverrun, stringfreelist,
- xmallocoverrun, conslist, glyphs])],
+ [enable expensive run-time checks])]
[ac_checking_flags="${enableval}"],[])
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
for check in $ac_checking_flags
case $check in
# these set all the flags to specific states
yes) ac_enable_checking=1 ;;
- no) ac_enable_checking= ;
- ac_gc_check_stringbytes= ;
- ac_gc_check_string_overrun= ;
- ac_gc_check_string_free_list= ;
- ac_xmalloc_overrun= ;
- ac_gc_check_cons_list= ;
- ac_glyphs_debug= ;;
- all) ac_enable_checking=1 ;
- ac_gc_check_stringbytes=1 ;
- ac_gc_check_string_overrun=1 ;
- ac_gc_check_string_free_list=1 ;
- ac_xmalloc_overrun=1 ;
- 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 ;;
- stringfreelist) ac_gc_check_string_free_list=1 ;;
- xmallocoverrun) ac_xmalloc_overrun=1 ;;
- conslist) ac_gc_check_cons_list=1 ;;
- glyphs) ac_glyphs_debug=1 ;;
+ all) ac_enable_checking=1 ;;
*) AC_MSG_ERROR(unknown check category $check) ;;
esac
done
AC_DEFINE(ENABLE_CHECKING, 1,
[Define to 1 if expensive run-time data type and consistency checks are enabled.])
fi
-if test x$ac_gc_check_stringbytes != x ; then
- AC_DEFINE(GC_CHECK_STRING_BYTES, 1,
-[Define this temporarily to hunt a bug. If defined, the size of
- strings is redundantly recorded in sdata structures so that it can
- be compared to the sizes recorded in Lisp strings.])
-fi
-if test x$ac_gc_check_string_overrun != x ; then
- AC_DEFINE(GC_CHECK_STRING_OVERRUN, 1,
-[Define this to check for short string overrun.])
-fi
-if test x$ac_gc_check_string_free_list != x ; then
- AC_DEFINE(GC_CHECK_STRING_FREE_LIST, 1,
-[Define this to check the string free list.])
-fi
-if test x$ac_xmalloc_overrun != x ; then
- AC_DEFINE(XMALLOC_OVERRUN_CHECK, 1,
-[Define this to check for malloc buffer overrun.])
-fi
-if test x$ac_gc_check_cons_list != x ; then
- AC_DEFINE(GC_CHECK_CONS_LIST, 1,
-[Define this to check for errors in cons list.])
-fi
-if test x$ac_glyphs_debug != x ; then
- AC_DEFINE(GLYPH_DEBUG, 1,
-[Define this to enable glyphs debugging code.])
-fi
AC_ARG_ENABLE(check-lisp-object-type,
[AS_HELP_STRING([--enable-check-lisp-object-type],
[Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0])],
[ac_enable_gtk_deprecation_warnings="${enableval}"],[])
-### Canonicalize the configuration name.
-
-AC_CANONICAL_HOST
-canonical=$host
-configuration=${host_alias-${build_alias-$host}}
-
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.
for w in $ws; do
gl_WARN_ADD([$w])
done
+ gl_WARN_ADD([-Wredundant-decls]) # Prefer this, as we don't use Bison.
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
AC_ARG_ENABLE(link-time-optimization,
[AS_HELP_STRING([--enable-link-time-optimization],
[build emacs with link-time optimization.
- This is supported for gcc since 4.5.0 and clang.
- Note that clang support is experimental - see INSTALL])],
+ This requires GCC 4.5.0 or later, or clang.
+ (Note that clang support is experimental - see INSTALL.)
+ It also makes Emacs harder to debug, and when we tried it
+ with GCC 4.9.0 x86-64 it made Emacs slower, so it's not
+ recommended for typical use.])],
if test "${enableval}" != "no"; then
ac_lto_supported=no
if test $emacs_cv_clang = yes; then
# command, so plugin name is appended to ARFLAGS.
ARFLAGS="cru --plugin $GOLD_PLUGIN"
RANLIB="$RANLIB --plugin $GOLD_PLUGIN"
+ else
+ dnl The following is needed for GCC 4.9.0. The GCC 4.9.0 release notes
+ dnl suggest that instead of -ffat-lto-objects we should use gcc-ar and
+ dnl gcc-ranlib in place of ar and ranlib, but gcc-ar makes /usr/bin/ar
+ dnl dump core on Fedora 20, so play it safe for now.
+ gl_COMPILER_OPTION_IF([-ffat-lto-objects],
+ [CFLAGS="$CFLAGS -ffat-lto-objects"])
fi
fi
fi)
fi
AC_SUBST(HAVE_MAKEINFO)
-dnl Just so that there is only a single place we need to edit.
-INFO_EXT=.info
-INFO_OPTS=--no-split
-AC_SUBST(INFO_EXT)
-AC_SUBST(INFO_OPTS)
-
if test $opsys = mingw32; then
DOCMISC_W32=efaq-w32
else
dnl The function dump-emacs will not be defined and temacs will do
dnl (load "loadup") automatically unless told otherwise.
-test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
-case "$opsys" in
- your-opsys-here) CANNOT_DUMP=yes ;;
-esac
-
-if test "$CANNOT_DUMP" = "yes"; then
- AC_DEFINE(CANNOT_DUMP, 1, [Define if Emacs cannot be dumped on your system.])
-elif test "$emacs_cv_sanitize_address" = yes; then
- AC_MSG_WARN([[Addresses are sanitized; suggest CANNOT_DUMP=yes]])
-fi
-
-AC_SUBST(CANNOT_DUMP)
-
+AC_DEFINE(CANNOT_DUMP, 1, [Define if Emacs cannot be dumped on your system.])
+AC_SUBST(CANNOT_DUMP, yes)
UNEXEC_OBJ=unexelf.o
case "$opsys" in
m4_default([$3], [HAVE_$1=yes])],
[m4_default([$4], [HAVE_$1=no])])])
+PKG_CHECK_MODULES([GUILE], [guile-2.2], [],
+ [PKG_CHECK_MODULES([GUILE], [guile-2.0])])
+AC_SUBST(GUILE_CFLAGS)
+AC_SUBST(GUILE_LIBS)
+
+AC_PATH_PROG(GUILE_SNARF, guile-snarf, no)
+if test "$GUILE_SNARF" = "no"; then
+ AC_MSG_ERROR([guile-snarf not found])
+fi
+
HAVE_SOUND=no
+
if test "${with_sound}" != "no"; then
# Sound support for GNU/Linux, the free BSDs, and MinGW.
AC_CHECK_HEADERS([machine/soundcard.h sys/soundcard.h soundcard.h],
deps_frag=autodeps.mk
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)
# Some systems optimize for single-threaded programs by default, and
# need special flags to disable these optimizations. For example, the
# definition of 'errno' in <errno.h>.
- if test "$opsys" = aix4-2; then
- AC_DEFINE([_THREAD_SAFE], [1],
- [Define to 1 if your system requires this in multithreaded code.])
- fi])
- if test "X$LIBS" != "X$OLD_LIBS"; then
+ case $opsys in
+ sol*)
+ AC_DEFINE([_REENTRANT], 1,
+ [Define to 1 if your system requires this in multithreaded code.]);;
+ aix4-2)
+ AC_DEFINE([_THREAD_SAFE], 1,
+ [Define to 1 if your system requires this in multithreaded code.]);;
+ esac])
+ if test "X$LIBS" != "X$OLD_LIBS"; then
eval LIB_PTHREAD=\$ac_cv_search_$emacs_pthread_function
fi
LIBS=$OLD_LIBS
${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
else
${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
-fi
+fi || AC_MSG_ERROR(['src/epaths.h' could not be made.])
], [GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"])
dnl NB we have to cheat and use the ac_... version because abs_top_srcdir