aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac43
1 files changed, 27 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index 1884cc7ccf7..7dda0010f28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -329,10 +329,15 @@ if test "${enableval}" != "no"; then
329fi) 329fi)
330 330
331 331
332dnl The name of this option is unfortunate. It predates, and has no
333dnl relation to, the "sampling-based elisp profiler" added in 24.3.
334dnl Actually, it stops it working.
335dnl http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00393.html
332AC_ARG_ENABLE(profiling, 336AC_ARG_ENABLE(profiling,
333[AS_HELP_STRING([--enable-profiling], 337[AS_HELP_STRING([--enable-profiling],
334 [build emacs with profiling support. 338 [build emacs with low-level, gprof profiling support.
335 This might not work on all platforms])], 339 Mainly useful for debugging Emacs itself. May not work on
340 all platforms. Stops profiler.el working.])],
336[ac_enable_profiling="${enableval}"],[]) 341[ac_enable_profiling="${enableval}"],[])
337if test x$ac_enable_profiling != x ; then 342if test x$ac_enable_profiling != x ; then
338 PROFILING_CFLAGS="-DPROFILING=1 -pg" 343 PROFILING_CFLAGS="-DPROFILING=1 -pg"
@@ -710,6 +715,8 @@ else
710 nw="$nw -Wfloat-equal" # warns about high-quality code 715 nw="$nw -Wfloat-equal" # warns about high-quality code
711 nw="$nw -Winline" # OK to ignore 'inline' 716 nw="$nw -Winline" # OK to ignore 'inline'
712 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init. 717 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
718 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
719 # signed overflow has undefined behavior
713 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning 720 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
714 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations 721 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
715 722
@@ -717,11 +724,23 @@ else
717 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>. 724 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
718 nw="$nw -Wshadow" 725 nw="$nw -Wshadow"
719 726
720 # The following lines should be removable at some point. 727 # The following line should be removable at some point.
721 nw="$nw -Wstack-protector"
722 nw="$nw -Wstrict-overflow"
723 nw="$nw -Wsuggest-attribute=pure" 728 nw="$nw -Wsuggest-attribute=pure"
724 729
730 AC_MSG_CHECKING([whether to use -Wstack-protector])
731 AC_PREPROC_IFELSE(
732 [AC_LANG_PROGRAM(
733 [[#if (1 <= __LONG_MAX__ >> 31 >> 31 \
734 && 4 < __GNUC__ + (7 < __GNUC_MINOR__ + (2 <= __GNUC_PATCHLEVEL__)))
735 /* OK */
736 #else
737 #error "Not GCC, or GCC before 4.7.2, or 'long int' has < 64 bits."
738 #endif
739 ]])],
740 [AC_MSG_RESULT(yes)],
741 [AC_MSG_RESULT(no)
742 nw="$nw -Wstack-protector"])
743
725 gl_MANYWARN_ALL_GCC([ws]) 744 gl_MANYWARN_ALL_GCC([ws])
726 gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) 745 gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
727 for w in $ws; do 746 for w in $ws; do
@@ -1270,7 +1289,7 @@ AC_CHECK_HEADERS_ONCE(
1270 linux/version.h sys/systeminfo.h 1289 linux/version.h sys/systeminfo.h
1271 coff.h pty.h 1290 coff.h pty.h
1272 sys/vlimit.h sys/resource.h 1291 sys/vlimit.h sys/resource.h
1273 sys/utsname.h pwd.h utmp.h dirent.h util.h) 1292 sys/utsname.h pwd.h utmp.h util.h)
1274 1293
1275AC_MSG_CHECKING(if personality LINUX32 can be set) 1294AC_MSG_CHECKING(if personality LINUX32 can be set)
1276AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/personality.h>]], [[personality (PER_LINUX32)]])], 1295AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/personality.h>]], [[personality (PER_LINUX32)]])],
@@ -2872,10 +2891,10 @@ AC_SUBST(BLESSMAIL_TARGET)
2872 2891
2873 2892
2874AC_CHECK_FUNCS(gethostname \ 2893AC_CHECK_FUNCS(gethostname \
2875closedir getrusage get_current_dir_name \ 2894getrusage get_current_dir_name \
2876lrand48 \ 2895lrand48 \
2877select getpagesize setlocale \ 2896select getpagesize setlocale \
2878utimes getrlimit setrlimit getcwd shutdown getaddrinfo \ 2897utimes getrlimit setrlimit shutdown getaddrinfo \
2879strsignal setitimer \ 2898strsignal setitimer \
2880sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ 2899sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
2881gai_strerror mkstemp getline getdelim fsync sync \ 2900gai_strerror mkstemp getline getdelim fsync sync \
@@ -2884,14 +2903,6 @@ getpwent endpwent getgrent endgrent \
2884touchlock \ 2903touchlock \
2885cfmakeraw cfsetspeed copysign __executable_start) 2904cfmakeraw cfsetspeed copysign __executable_start)
2886 2905
2887dnl getwd appears to be buggy on SVR4.2, so we don't use it.
2888if test $opsys = unixware; then
2889 dnl In case some other test ends up checking for getwd.
2890 AC_DEFINE(BROKEN_GETWD, 1, [Define if getwd should not be used.])
2891else
2892 AC_CHECK_FUNCS(getwd)
2893fi
2894
2895## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines 2906## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
2896## has a broken `rint' in some library versions including math library 2907## has a broken `rint' in some library versions including math library
2897## version number A.09.05. 2908## version number A.09.05.