diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-08-19 16:11:00 +0200 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-08-19 16:11:00 +0200 |
commit | 886377fefd03a7b893afad28746e69615a300994 (patch) | |
tree | 03111a6e9c917daefd63daa7efa3f029ae6485af /configure.ac | |
parent | fc9b68636b1aec69295726d2b3be2b520911f40b (diff) | |
parent | f8d3d18168a742691d095a3f0c83512f19621725 (diff) | |
download | emacs-886377fefd03a7b893afad28746e69615a300994.tar.gz |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 4b8497b5969..0582b2f61c5 100644 --- a/configure.ac +++ b/configure.ac @@ -219,6 +219,21 @@ AC_DEFUN([OPTION_DEFAULT_OFF], [dnl m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=no])dnl ])dnl +dnl OPTION_DEFAULT_IFAVAILABLE(NAME, HELP-STRING) +dnl Create a new --with option that defaults to 'ifavailable'. +dnl NAME is the base name of the option. The shell variable with_NAME +dnl will be set to either the user's value (if the option is +dnl specified; 'yes' for a plain --with-NAME) or to 'ifavailable' (if the +dnl option is not specified). Note that the shell variable name is +dnl constructed as autoconf does, by replacing non-alphanumeric +dnl characters with "_". +dnl HELP-STRING is the help text for the option. +AC_DEFUN([OPTION_DEFAULT_IFAVAILABLE], [dnl + AC_ARG_WITH([$1],[AS_HELP_STRING([--with-$1],[$2])],[],[dnl + m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=ifavailable])dnl +])dnl + + dnl OPTION_DEFAULT_ON(NAME, HELP-STRING) dnl Create a new --with option that defaults to $with_features. dnl NAME is the base name of the option. The shell variable with_NAME @@ -438,7 +453,7 @@ OPTION_DEFAULT_ON([cairo],[don't compile with Cairo drawing]) OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support]) OPTION_DEFAULT_OFF([imagemagick],[compile with ImageMagick image support]) OPTION_DEFAULT_ON([native-image-api], [don't use native image APIs (GDI+ on Windows)]) -OPTION_DEFAULT_ON([json], [don't compile with native JSON support]) +OPTION_DEFAULT_IFAVAILABLE([json], [don't compile with native JSON support]) OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts]) OPTION_DEFAULT_ON([harfbuzz],[don't use HarfBuzz for text shaping]) @@ -709,7 +724,7 @@ case "${canonical}" in *-apple-darwin* ) case "${canonical}" in *-apple-darwin[0-9].*) unported=yes ;; - i[3456]86-* | x86_64-* ) ;; + i[3456]86-* | x86_64-* | arm-* ) ;; * ) unported=yes ;; esac opsys=darwin @@ -1012,7 +1027,10 @@ AS_IF([test $gl_gcc_warnings = no], [# 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 -Wno-analyzer-null-dereference -Wno-analyzer-use-after-free" + # Use -Wsuggest-attribute=malloc only if --enable-gcc-warnings, + # as it doesn't flag code that is wrong in any way. + nw="$nw -Wsuggest-attribute=malloc"]) nw="$nw -Wcast-align=strict" # Emacs is tricky with pointers. nw="$nw -Wduplicated-branches" # Too many false alarms @@ -2927,7 +2945,7 @@ AC_SUBST(LIBSYSTEMD_CFLAGS) HAVE_JSON=no JSON_OBJ= -if test "${with_json}" = yes; then +if test "${with_json}" != no; then EMACS_CHECK_MODULES([JSON], [jansson >= 2.7], [HAVE_JSON=yes], [HAVE_JSON=no]) if test "${HAVE_JSON}" = yes; then @@ -3965,6 +3983,11 @@ case $with_gnutls,$HAVE_GNUTLS in *) MISSING="$MISSING gnutls" WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-gnutls=ifavailable";; esac +case $with_json,$HAVE_JSON in + no,* | ifavailable,* | *,yes) ;; + *) MISSING="$MISSING json" + WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-json=ifavailable";; +esac if test "X${MISSING}" != X; then AC_MSG_ERROR([The following required libraries were not found: $MISSING |