aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac43
1 files changed, 27 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index cb11cde98be..c941fcb2122 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"
@@ -718,6 +723,8 @@ else
718 nw="$nw -Wfloat-equal" # warns about high-quality code 723 nw="$nw -Wfloat-equal" # warns about high-quality code
719 nw="$nw -Winline" # OK to ignore 'inline' 724 nw="$nw -Winline" # OK to ignore 'inline'
720 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init. 725 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
726 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
727 # signed overflow has undefined behavior
721 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning 728 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
722 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations 729 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
723 730
@@ -725,11 +732,23 @@ else
725 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>. 732 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
726 nw="$nw -Wshadow" 733 nw="$nw -Wshadow"
727 734
728 # The following lines should be removable at some point. 735 # The following line should be removable at some point.
729 nw="$nw -Wstack-protector"
730 nw="$nw -Wstrict-overflow"
731 nw="$nw -Wsuggest-attribute=pure" 736 nw="$nw -Wsuggest-attribute=pure"
732 737
738 AC_MSG_CHECKING([whether to use -Wstack-protector])
739 AC_PREPROC_IFELSE(
740 [AC_LANG_PROGRAM(
741 [[#if (1 <= __LONG_MAX__ >> 31 >> 31 \
742 && 4 < __GNUC__ + (7 < __GNUC_MINOR__ + (2 <= __GNUC_PATCHLEVEL__)))
743 /* OK */
744 #else
745 #error "Not GCC, or GCC before 4.7.2, or 'long int' has < 64 bits."
746 #endif
747 ]])],
748 [AC_MSG_RESULT(yes)],
749 [AC_MSG_RESULT(no)
750 nw="$nw -Wstack-protector"])
751
733 gl_MANYWARN_ALL_GCC([ws]) 752 gl_MANYWARN_ALL_GCC([ws])
734 gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) 753 gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
735 for w in $ws; do 754 for w in $ws; do
@@ -1283,7 +1302,7 @@ fi
1283dnl checks for header files 1302dnl checks for header files
1284AC_CHECK_HEADERS_ONCE( 1303AC_CHECK_HEADERS_ONCE(
1285 linux/version.h sys/systeminfo.h 1304 linux/version.h sys/systeminfo.h
1286 fcntl.h coff.h pty.h 1305 coff.h pty.h
1287 sys/vlimit.h sys/resource.h 1306 sys/vlimit.h sys/resource.h
1288 sys/utsname.h pwd.h utmp.h util.h) 1307 sys/utsname.h pwd.h utmp.h util.h)
1289 1308
@@ -3003,8 +3022,8 @@ AC_SUBST(BLESSMAIL_TARGET)
3003AC_CHECK_FUNCS(gethostname \ 3022AC_CHECK_FUNCS(gethostname \
3004getrusage get_current_dir_name \ 3023getrusage get_current_dir_name \
3005lrand48 \ 3024lrand48 \
3006fpathconf select getpagesize setlocale \ 3025select getpagesize setlocale \
3007utimes getrlimit setrlimit getcwd shutdown getaddrinfo \ 3026utimes getrlimit setrlimit shutdown getaddrinfo \
3008strsignal setitimer \ 3027strsignal setitimer \
3009sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ 3028sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
3010gai_strerror mkstemp getline getdelim fsync sync \ 3029gai_strerror mkstemp getline getdelim fsync sync \
@@ -3013,14 +3032,6 @@ getpwent endpwent getgrent endgrent \
3013touchlock \ 3032touchlock \
3014cfmakeraw cfsetspeed copysign __executable_start) 3033cfmakeraw cfsetspeed copysign __executable_start)
3015 3034
3016dnl getwd appears to be buggy on SVR4.2, so we don't use it.
3017if test $opsys = unixware; then
3018 dnl In case some other test ends up checking for getwd.
3019 AC_DEFINE(BROKEN_GETWD, 1, [Define if getwd should not be used.])
3020else
3021 AC_CHECK_FUNCS(getwd)
3022fi
3023
3024## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines 3035## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
3025## has a broken `rint' in some library versions including math library 3036## has a broken `rint' in some library versions including math library
3026## version number A.09.05. 3037## version number A.09.05.