there should be no warnings; on older and on non-GNU systems the
generated warnings may still be useful.
+Use --enable-link-time-optimization to enable link-time optimizer, which
+is available in GNU compiler since version 4.5.0. If your compiler is not
+GNU or older than version 4.5.0, this option does nothing. If `configure'
+can determine number of online CPUS on your system, final link-time
+optimization and code generation is executed in parallel using one job
+per each available online CPU.
+
The `--prefix=PREFIXDIR' option specifies where the installation process
should put emacs and its data files. This defaults to `/usr/local'.
- Emacs (and the other utilities users run) go in PREFIXDIR/bin
EN_NS_SELF_CONTAINED=$enableval,
EN_NS_SELF_CONTAINED=yes)
-AC_ARG_ENABLE(asserts,
-[AS_HELP_STRING([--enable-asserts], [compile code with asserts enabled])],
- USE_XASSERTS=$enableval,
- USE_XASSERTS=no)
-
AC_ARG_ENABLE(locallisppath,
[AS_HELP_STRING([--enable-locallisppath=PATH],
[directories Emacs should search for lisp files specific
ac_gc_check_string_free_list= ;
ac_xmalloc_overrun= ;
ac_gc_check_cons_list= ;
- ac_check_glyphs= ;;
+ 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_check_glyphs=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_check_glyphs=1 ;;
+ glyphs) ac_glyphs_debug=1 ;;
*) AC_MSG_ERROR(unknown check category $check) ;;
esac
done
AC_DEFINE(GC_CHECK_CONS_LIST, 1,
[Define this to check for errors in cons list.])
fi
-if test x$ac_check_glyphs != x ; then
+if test x$ac_glyphs_debug != x ; then
AC_DEFINE(GLYPH_DEBUG, 1,
[Define this to enable glyphs debugging code.])
fi
[gl_gcc_warnings=no]
)
+AC_ARG_ENABLE(link-time-optimization,
+[AS_HELP_STRING([--enable-link-time-optimization],
+ [build emacs with link-time optimization.
+ This is supported only for GCC since 4.5.0.])],
+if test "${enableval}" != "no"; then
+ AC_MSG_CHECKING([whether link-time optimization is supported])
+ ac_lto_supported=no
+ if test x$GCC = xyes; then
+ CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
+ if test x$CPUS != x; then
+ LTO="-flto=$CPUS"
+ else
+ LTO="-flto"
+ fi
+ old_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $LTO"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [ac_lto_supported=yes], [ac_lto_supported=no])
+ CFLAGS="$old_CFLAGS"
+ fi
+ AC_MSG_RESULT([$ac_lto_supported])
+ if test "$ac_lto_supported" = "yes"; then
+ CFLAGS="$CFLAGS $LTO"
+ fi
+fi)
+
# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
# ------------------------------------------------
# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
echo " Environment variable EMACSDOC set to: $EMACSDOC"
fi
-if test $USE_XASSERTS = yes; then
- echo " Compiling with asserts turned on."
- CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
-fi
-
echo
if test "$HAVE_NS" = "yes"; then