summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-07-13 15:13:46 +0200
committerAndrea Corallo <akrl@sdf.org>2020-07-13 15:13:46 +0200
commit5be335e6b5d1a948a94206869d75c04684104203 (patch)
treecbc2b3b9ce933db204bb66f40be6fe09113b9afe /configure.ac
parenteb091c8647a7d10b02e49e61f3c5a0ce3d5ec0a4 (diff)
parent46a0c115f041d246b26ffcd93a8adbfab01e4b07 (diff)
downloademacs-5be335e6b5d1a948a94206869d75c04684104203.tar.gz
Merge remote-tracking branch 'savahnna/master' into HEAD
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac59
1 files changed, 13 insertions, 46 deletions
diff --git a/configure.ac b/configure.ac
index ac9f23e04a6..2277f36e491 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1031,14 +1031,17 @@ AS_IF([test $gl_gcc_warnings = no],
;;
esac
AS_IF([test $gl_gcc_warnings = yes],
- [WERROR_CFLAGS=-Werror])
+ [WERROR_CFLAGS=-Werror],
+ [# Use -fanalyzer and related options only if --enable-gcc-warnings,
+ # as they slow GCC considerably.
+ nw="$nw -fanalyzer -Wno-analyzer-double-free -Wno-analyzer-malloc-leak"
+ nw="$nw -Wno-analyzer-null-dereference -Wno-analyzer-use-after-free"])
- nw="$nw -Wcast-align -Wcast-align=strict" # Emacs is tricky with pointers.
+ nw="$nw -Wcast-align=strict" # Emacs is tricky with pointers.
nw="$nw -Wduplicated-branches" # Too many false alarms
nw="$nw -Wformat-overflow=2" # False alarms due to GCC bug 80776
nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
nw="$nw -Woverlength-strings" # Not a problem these days
- nw="$nw -Wformat-nonliteral" # we do this a lot
nw="$nw -Wvla" # Emacs uses <vla.h>.
nw="$nw -Wunused-const-variable=2" # lisp.h declares const objects.
nw="$nw -Winline" # OK to ignore 'inline'
@@ -1047,7 +1050,6 @@ AS_IF([test $gl_gcc_warnings = no],
nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
nw="$nw -Wbad-function-cast" # These casts are no worse than others.
- nw="$nw -Wabi" # Not useful, perceived as noise
# Emacs doesn't care about shadowing; see
# <https://lists.gnu.org/r/emacs-diffs/2011-11/msg00265.html>.
@@ -1067,26 +1069,12 @@ AS_IF([test $gl_gcc_warnings = no],
# option problematic.
nw="$nw -Wsuggest-attribute=pure"
- # This part is merely for shortening the command line,
- # since -Wall implies -Wswitch.
- nw="$nw -Wswitch"
-
- # This part is merely for shortening the command line,
- # since -Wno-FOO needs to be added below regardless.
- nw="$nw -Wmissing-field-initializers"
- nw="$nw -Woverride-init"
- nw="$nw -Wtype-limits"
- nw="$nw -Wunused-parameter"
-
if test "$emacs_cv_clang" = yes; then
- nw="$nw -Wcast-align"
nw="$nw -Wdouble-promotion"
- nw="$nw -Wmissing-braces"
fi
- # These cause too much noise in the MinGW build
+ # This causes too much noise in the MinGW build.
if test $opsys = mingw32; then
- nw="$nw -Wpointer-sign"
nw="$nw -Wsuggest-attribute=format"
fi
@@ -4607,32 +4595,6 @@ AC_SUBST(KRB5LIB)
AC_SUBST(DESLIB)
AC_SUBST(KRB4LIB)
-AC_ARG_WITH([libgmp],
- [AS_HELP_STRING([--without-libgmp],
- [don't use the GNU Multiple Precision (GMP) library;
- this is the default on systems lacking libgmp.])])
-GMP_LIB=
-GMP_OBJ=mini-gmp-emacs.o
-HAVE_GMP=no
-case $with_libgmp in
- no) ;;
- yes) HAVE_GMP=yes GMP_LIB=-lgmp;;
- *) AC_CHECK_HEADERS([gmp.h],
- [OLIBS=$LIBS
- AC_SEARCH_LIBS([__gmpz_roinit_n], [gmp])
- LIBS=$OLIBS
- case $ac_cv_search___gmpz_roinit_n in
- 'none needed') HAVE_GMP=yes;;
- -*) HAVE_GMP=yes GMP_LIB=$ac_cv_search___gmpz_roinit_n;;
- esac]);;
-esac
-if test "$HAVE_GMP" = yes; then
- GMP_OBJ=
- AC_DEFINE([HAVE_GMP], 1, [Define to 1 if you have recent-enough GMP.])
-fi
-AC_SUBST([GMP_LIB])
-AC_SUBST([GMP_OBJ])
-
AC_CHECK_HEADERS(valgrind/valgrind.h)
AC_CHECK_MEMBERS([struct unipair.unicode], [], [], [[#include <linux/kd.h>]])
@@ -5800,6 +5762,11 @@ done
AC_DEFINE_UNQUOTED(EMACS_CONFIG_FEATURES, "${emacs_config_features}",
[Summary of some of the main features enabled by configure.])
+if test -z "$GMP_H"; then
+ HAVE_GMP=yes
+else
+ HAVE_GMP=no
+fi
AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D}
Does Emacs use -lXpm? ${HAVE_XPM}
Does Emacs use -ljpeg? ${HAVE_JPEG}
@@ -5828,7 +5795,7 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D
Does Emacs use -lxft? ${HAVE_XFT}
Does Emacs use -lsystemd? ${HAVE_LIBSYSTEMD}
Does Emacs use -ljansson? ${HAVE_JSON}
- Does Emacs use -lgmp? ${HAVE_GMP}
+ Does Emacs use the GMP library? ${HAVE_GMP}
Does Emacs directly use zlib? ${HAVE_ZLIB}
Does Emacs have dynamic modules support? ${HAVE_MODULES}
Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}