diff options
| author | Eli Zaretskii | 2012-11-24 18:16:33 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-11-24 18:16:33 +0200 |
| commit | 2ef26ceb192c7683754cf0b4aa3087f501254332 (patch) | |
| tree | 0b719be9d326dba5c2b744ea4b03fad74b14f33f | |
| parent | 9e821c83d328207d418ade2a5fb36168dd0fa9c6 (diff) | |
| download | emacs-2ef26ceb192c7683754cf0b4aa3087f501254332.tar.gz emacs-2ef26ceb192c7683754cf0b4aa3087f501254332.zip | |
Conclude what can be done about headers, macros, and compiler switches.
What is left is missing and replaced functions provided by Emacs.
| -rw-r--r-- | configure.ac | 43 |
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 | |||
| 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" |
| @@ -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 | |||
| 1283 | dnl checks for header files | 1302 | dnl checks for header files |
| 1284 | AC_CHECK_HEADERS_ONCE( | 1303 | AC_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) | |||
| 3003 | AC_CHECK_FUNCS(gethostname \ | 3022 | AC_CHECK_FUNCS(gethostname \ |
| 3004 | getrusage get_current_dir_name \ | 3023 | getrusage get_current_dir_name \ |
| 3005 | lrand48 \ | 3024 | lrand48 \ |
| 3006 | fpathconf select getpagesize setlocale \ | 3025 | select getpagesize setlocale \ |
| 3007 | utimes getrlimit setrlimit getcwd shutdown getaddrinfo \ | 3026 | utimes getrlimit setrlimit shutdown getaddrinfo \ |
| 3008 | strsignal setitimer \ | 3027 | strsignal setitimer \ |
| 3009 | sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ | 3028 | sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \ |
| 3010 | gai_strerror mkstemp getline getdelim fsync sync \ | 3029 | gai_strerror mkstemp getline getdelim fsync sync \ |
| @@ -3013,14 +3032,6 @@ getpwent endpwent getgrent endgrent \ | |||
| 3013 | touchlock \ | 3032 | touchlock \ |
| 3014 | cfmakeraw cfsetspeed copysign __executable_start) | 3033 | cfmakeraw cfsetspeed copysign __executable_start) |
| 3015 | 3034 | ||
| 3016 | dnl getwd appears to be buggy on SVR4.2, so we don't use it. | ||
| 3017 | if 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.]) | ||
| 3020 | else | ||
| 3021 | AC_CHECK_FUNCS(getwd) | ||
| 3022 | fi | ||
| 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. |