X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/5c6858167926225cc78d3a5ccaee71185f4c0c95..74dd3a6bbbd97771520fdff5f52844ddfd2f79fa:/configure.in diff --git a/configure.in b/configure.in index 8be0da2ab2..46b2e9993e 100644 --- a/configure.in +++ b/configure.in @@ -737,7 +737,7 @@ else AC_SUBST([WERROR_CFLAGS]) nw="$nw -Waggregate-return" # anachronistic - nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h) + nw="$nw -Wlong-long" # C90 is anachronistic nw="$nw -Wc++-compat" # We don't care about C++ compilers nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib nw="$nw -Wtraditional" # Warns on #elif which we use often @@ -763,6 +763,8 @@ else nw="$nw -Wshadow" # The following lines should be removable at some point. + nw="$nw -Wstack-protector" + nw="$nw -Wstrict-overflow" nw="$nw -Wsuggest-attribute=const" nw="$nw -Wsuggest-attribute=pure" @@ -785,8 +787,6 @@ else gl_WARN_ADD([-fdiagnostics-show-option]) gl_WARN_ADD([-funit-at-a-time]) - AC_SUBST([WARN_CFLAGS]) - AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) AC_DEFINE([_FORTIFY_SOURCE], [2], [enable compile-time and run-time bounds-checking, and some warnings]) @@ -1500,15 +1500,6 @@ else window_system=x11 fi -## Workaround for bug in autoconf <= 2.62. -## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html -## No need to do anything special for these standard directories. -if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then - - x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'` - -fi - LD_SWITCH_X_SITE_AUX= LD_SWITCH_X_SITE_AUX_RPATH= if test "${x_libraries}" != NONE; then @@ -1629,13 +1620,12 @@ fail; AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], [AC_MSG_ERROR([`--with-ns' was specified, but the include files are missing or cannot be compiled.])]) - NS_HAVE_NSINTEGER=yes AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [NSInteger i;])], ns_have_nsinteger=yes, ns_have_nsinteger=no) - if test $ns_have_nsinteger = no; then - NS_HAVE_NSINTEGER=no + if test $ns_have_nsinteger = yes; then + AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.]) fi fi AC_SUBST(TEMACS_LDFLAGS2) @@ -1718,17 +1708,20 @@ esac # Do the opsystem or machine files prohibit the use of the GNU malloc? # Assume not, until told otherwise. GNU_MALLOC=yes -doug_lea_malloc=yes -AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no) -AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no) -AC_CACHE_CHECK(whether __after_morecore_hook exists, - emacs_cv_var___after_morecore_hook, -[AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern void (* __after_morecore_hook)();]],[[__after_morecore_hook = 0]])], - emacs_cv_var___after_morecore_hook=yes, - emacs_cv_var___after_morecore_hook=no)]) -if test $emacs_cv_var___after_morecore_hook = no; then - doug_lea_malloc=no -fi + +AC_CACHE_CHECK( + [whether malloc is Doug Lea style], + [emacs_cv_var_doug_lea_malloc], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include + static void hook (void) {}]], + [[malloc_set_state (malloc_get_state ()); + __after_morecore_hook = hook; + __malloc_initialize_hook = hook;]])], + [emacs_cv_var_doug_lea_malloc=yes], + [emacs_cv_var_doug_lea_malloc=no])]) +doug_lea_malloc=$emacs_cv_var_doug_lea_malloc dnl See comments in aix4-2.h about maybe using system malloc there. @@ -2086,8 +2079,7 @@ if test "${HAVE_GTK}" = "yes"; then fi dnl D-Bus has been tested under GNU/Linux only. Must be adapted for -dnl other platforms. Support for higher D-Bus versions than 1.0 is -dnl also not configured. +dnl other platforms. HAVE_DBUS=no DBUS_OBJ= if test "${with_dbus}" = "yes"; then @@ -2095,7 +2087,13 @@ if test "${with_dbus}" = "yes"; then if test "$HAVE_DBUS" = yes; then LIBS="$LIBS $DBUS_LIBS" AC_DEFINE(HAVE_DBUS, 1, [Define to 1 if using D-Bus.]) - AC_CHECK_FUNCS([dbus_watch_get_unix_fd]) + dnl dbus_watch_get_unix_fd has been introduced in D-Bus 1.1.1. + dnl dbus_validate_* have been introduced in D-Bus 1.5.12. + AC_CHECK_FUNCS(dbus_watch_get_unix_fd \ + dbus_validate_bus_name \ + dbus_validate_path \ + dbus_validate_interface \ + dbus_validate_member) DBUS_OBJ=dbusbind.o fi fi @@ -2683,9 +2681,6 @@ if test "${HAVE_NS}" = "yes"; then ## Extra CFLAGS applied to src/*.m files. GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" fi - if test "${NS_HAVE_NSINTEGER}" = "yes"; then - AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.]) - fi # We also have mouse menus. HAVE_MENUS=yes OTHER_FILES=ns-app @@ -2828,6 +2823,7 @@ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm \ sendto recvfrom getsockopt setsockopt getsockname getpeername \ gai_strerror mkstemp getline getdelim mremap fsync sync \ difftime mempcpy mblen mbrlen posix_memalign \ +getpwent endpwent getgrent endgrent \ cfmakeraw cfsetspeed copysign __executable_start) dnl Cannot use AC_CHECK_FUNCS @@ -3520,7 +3516,7 @@ case "$opsys" in ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM ## had different values in configure (in ac_link) and src/Makefile.in. ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. - gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; + gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX_RPATH)" ;; *) LD_SWITCH_SYSTEM_TEMACS= ;; esac