summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2012-06-28 20:34:05 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2012-06-28 20:34:05 +0400
commit94eb8e0a5ac97228c17d2ec3260d3c6ca46999e2 (patch)
treec26777bc4225d2339efefd1cce501e69bd8d8720 /configure.in
parentaa754e6a9ef5fb65e6a4f582101d7284adc01656 (diff)
downloademacs-94eb8e0a5ac97228c17d2ec3260d3c6ca46999e2.tar.gz
* configure.in: Fix previous change. Remove --enable-asserts.
(CPPFLAGS): Remove conditional -DXASSERTS=1. Add --enable-link-time-optimization. * INSTALL: Mention this.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in44
1 files changed, 30 insertions, 14 deletions
diff --git a/configure.in b/configure.in
index 393d87fd721..5c38b041dec 100644
--- a/configure.in
+++ b/configure.in
@@ -230,11 +230,6 @@ AC_ARG_ENABLE(ns-self-contained,
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
@@ -265,21 +260,21 @@ do
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
@@ -311,7 +306,7 @@ 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_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
@@ -588,6 +583,32 @@ AC_ARG_ENABLE([gcc-warnings],
[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.
@@ -3657,11 +3678,6 @@ if test -n "${EMACSDOC}"; then
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