diff options
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 43 |
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 | |||
| 329 | fi) | 329 | fi) |
| 330 | 330 | ||
| 331 | 331 | ||
| 332 | dnl The name of this option is unfortunate. It predates, and has no | ||
| 333 | dnl relation to, the "sampling-based elisp profiler" added in 24.3. | ||
| 334 | dnl Actually, it stops it working. | ||
| 335 | dnl http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00393.html | ||
| 332 | AC_ARG_ENABLE(profiling, | 336 | AC_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}"],[]) |
| 337 | if test x$ac_enable_profiling != x ; then | 342 | if 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 | ||
| 1275 | AC_MSG_CHECKING(if personality LINUX32 can be set) | 1294 | AC_MSG_CHECKING(if personality LINUX32 can be set) |
| 1276 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/personality.h>]], [[personality (PER_LINUX32)]])], | 1295 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/personality.h>]], [[personality (PER_LINUX32)]])], |
| @@ -2872,10 +2891,10 @@ AC_SUBST(BLESSMAIL_TARGET) | |||
| 2872 | 2891 | ||
| 2873 | 2892 | ||
| 2874 | AC_CHECK_FUNCS(gethostname \ | 2893 | AC_CHECK_FUNCS(gethostname \ |
| 2875 | closedir getrusage get_current_dir_name \ | 2894 | getrusage get_current_dir_name \ |
| 2876 | lrand48 \ | 2895 | lrand48 \ |
| 2877 | select getpagesize setlocale \ | 2896 | select getpagesize setlocale \ |
| 2878 | utimes getrlimit setrlimit getcwd shutdown getaddrinfo \ | 2897 | utimes getrlimit setrlimit shutdown getaddrinfo \ |
| 2879 | strsignal setitimer \ | 2898 | strsignal setitimer \ |
| 2880 | sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ | 2899 | sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ |
| 2881 | gai_strerror mkstemp getline getdelim fsync sync \ | 2900 | gai_strerror mkstemp getline getdelim fsync sync \ |
| @@ -2884,14 +2903,6 @@ getpwent endpwent getgrent endgrent \ | |||
| 2884 | touchlock \ | 2903 | touchlock \ |
| 2885 | cfmakeraw cfsetspeed copysign __executable_start) | 2904 | cfmakeraw cfsetspeed copysign __executable_start) |
| 2886 | 2905 | ||
| 2887 | dnl getwd appears to be buggy on SVR4.2, so we don't use it. | ||
| 2888 | if 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.]) | ||
| 2891 | else | ||
| 2892 | AC_CHECK_FUNCS(getwd) | ||
| 2893 | fi | ||
| 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. |