aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
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
219 m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=no])dnl 219 m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=no])dnl
220])dnl 220])dnl
221 221
222dnl OPTION_DEFAULT_IFAVAILABLE(NAME, HELP-STRING)
223dnl Create a new --with option that defaults to 'ifavailable'.
224dnl NAME is the base name of the option. The shell variable with_NAME
225dnl will be set to either the user's value (if the option is
226dnl specified; 'yes' for a plain --with-NAME) or to 'ifavailable' (if the
227dnl option is not specified). Note that the shell variable name is
228dnl constructed as autoconf does, by replacing non-alphanumeric
229dnl characters with "_".
230dnl HELP-STRING is the help text for the option.
231AC_DEFUN([OPTION_DEFAULT_IFAVAILABLE], [dnl
232 AC_ARG_WITH([$1],[AS_HELP_STRING([--with-$1],[$2])],[],[dnl
233 m4_bpatsubst([with_$1], [[^0-9a-z]], [_])=ifavailable])dnl
234])dnl
235
236
222dnl OPTION_DEFAULT_ON(NAME, HELP-STRING) 237dnl OPTION_DEFAULT_ON(NAME, HELP-STRING)
223dnl Create a new --with option that defaults to $with_features. 238dnl Create a new --with option that defaults to $with_features.
224dnl NAME is the base name of the option. The shell variable with_NAME 239dnl 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])
438OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support]) 453OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support])
439OPTION_DEFAULT_OFF([imagemagick],[compile with ImageMagick image support]) 454OPTION_DEFAULT_OFF([imagemagick],[compile with ImageMagick image support])
440OPTION_DEFAULT_ON([native-image-api], [don't use native image APIs (GDI+ on Windows)]) 455OPTION_DEFAULT_ON([native-image-api], [don't use native image APIs (GDI+ on Windows)])
441OPTION_DEFAULT_ON([json], [don't compile with native JSON support]) 456OPTION_DEFAULT_IFAVAILABLE([json], [don't compile with native JSON support])
442 457
443OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts]) 458OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts])
444OPTION_DEFAULT_ON([harfbuzz],[don't use HarfBuzz for text shaping]) 459OPTION_DEFAULT_ON([harfbuzz],[don't use HarfBuzz for text shaping])
@@ -709,7 +724,7 @@ case "${canonical}" in
709 *-apple-darwin* ) 724 *-apple-darwin* )
710 case "${canonical}" in 725 case "${canonical}" in
711 *-apple-darwin[0-9].*) unported=yes ;; 726 *-apple-darwin[0-9].*) unported=yes ;;
712 i[3456]86-* | x86_64-* ) ;; 727 i[3456]86-* | x86_64-* | arm-* ) ;;
713 * ) unported=yes ;; 728 * ) unported=yes ;;
714 esac 729 esac
715 opsys=darwin 730 opsys=darwin
@@ -1012,7 +1027,10 @@ AS_IF([test $gl_gcc_warnings = no],
1012 [# Use -fanalyzer and related options only if --enable-gcc-warnings, 1027 [# Use -fanalyzer and related options only if --enable-gcc-warnings,
1013 # as they slow GCC considerably. 1028 # as they slow GCC considerably.
1014 nw="$nw -fanalyzer -Wno-analyzer-double-free -Wno-analyzer-malloc-leak" 1029 nw="$nw -fanalyzer -Wno-analyzer-double-free -Wno-analyzer-malloc-leak"
1015 nw="$nw -Wno-analyzer-null-dereference -Wno-analyzer-use-after-free"]) 1030 nw="$nw -Wno-analyzer-null-dereference -Wno-analyzer-use-after-free"
1031 # Use -Wsuggest-attribute=malloc only if --enable-gcc-warnings,
1032 # as it doesn't flag code that is wrong in any way.
1033 nw="$nw -Wsuggest-attribute=malloc"])
1016 1034
1017 nw="$nw -Wcast-align=strict" # Emacs is tricky with pointers. 1035 nw="$nw -Wcast-align=strict" # Emacs is tricky with pointers.
1018 nw="$nw -Wduplicated-branches" # Too many false alarms 1036 nw="$nw -Wduplicated-branches" # Too many false alarms
@@ -2927,7 +2945,7 @@ AC_SUBST(LIBSYSTEMD_CFLAGS)
2927HAVE_JSON=no 2945HAVE_JSON=no
2928JSON_OBJ= 2946JSON_OBJ=
2929 2947
2930if test "${with_json}" = yes; then 2948if test "${with_json}" != no; then
2931 EMACS_CHECK_MODULES([JSON], [jansson >= 2.7], 2949 EMACS_CHECK_MODULES([JSON], [jansson >= 2.7],
2932 [HAVE_JSON=yes], [HAVE_JSON=no]) 2950 [HAVE_JSON=yes], [HAVE_JSON=no])
2933 if test "${HAVE_JSON}" = yes; then 2951 if test "${HAVE_JSON}" = yes; then
@@ -3965,6 +3983,11 @@ case $with_gnutls,$HAVE_GNUTLS in
3965 *) MISSING="$MISSING gnutls" 3983 *) MISSING="$MISSING gnutls"
3966 WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-gnutls=ifavailable";; 3984 WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-gnutls=ifavailable";;
3967esac 3985esac
3986case $with_json,$HAVE_JSON in
3987 no,* | ifavailable,* | *,yes) ;;
3988 *) MISSING="$MISSING json"
3989 WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-json=ifavailable";;
3990esac
3968if test "X${MISSING}" != X; then 3991if test "X${MISSING}" != X; then
3969 AC_MSG_ERROR([The following required libraries were not found: 3992 AC_MSG_ERROR([The following required libraries were not found:
3970 $MISSING 3993 $MISSING