aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/Makefile.am1
-rw-r--r--m4/as-auto-alt.m48
-rw-r--r--m4/check-latex-package.m442
-rw-r--r--m4/check-libheader.m435
-rw-r--r--m4/iconv.m4118
-rw-r--r--m4/libcurl.m425
-rw-r--r--m4/libgcrypt.m489
-rw-r--r--m4/libgnurl.m4266
-rw-r--r--m4/libunistring.m421
-rw-r--r--m4/threadlib.m44
10 files changed, 226 insertions, 383 deletions
diff --git a/m4/Makefile.am b/m4/Makefile.am
index d41788460..79010513f 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -21,7 +21,6 @@ inttypes-pri.m4\
21isc-posix.m4\ 21isc-posix.m4\
22lcmessage.m4\ 22lcmessage.m4\
23libgcrypt.m4\ 23libgcrypt.m4\
24libgnurl.m4\
25libcurl.m4\ 24libcurl.m4\
26lib-ld.m4\ 25lib-ld.m4\
27lib-link.m4\ 26lib-link.m4\
diff --git a/m4/as-auto-alt.m4 b/m4/as-auto-alt.m4
index 3f7920dd2..07c550b38 100644
--- a/m4/as-auto-alt.m4
+++ b/m4/as-auto-alt.m4
@@ -10,7 +10,7 @@ AC_DEFUN([AS_AUTOTOOLS_ALTERNATE],
10[ 10[
11 dnl allow for different autoconf version 11 dnl allow for different autoconf version
12 AC_ARG_WITH(autoconf, 12 AC_ARG_WITH(autoconf,
13 AC_HELP_STRING([--with-autoconf], 13 AS_HELP_STRING([--with-autoconf],
14 [use a different autoconf for regeneration of Makefiles]), 14 [use a different autoconf for regeneration of Makefiles]),
15 [ 15 [
16 unset AUTOCONF 16 unset AUTOCONF
@@ -20,7 +20,7 @@ AC_DEFUN([AS_AUTOTOOLS_ALTERNATE],
20 20
21 dnl allow for different autoheader version 21 dnl allow for different autoheader version
22 AC_ARG_WITH(autoheader, 22 AC_ARG_WITH(autoheader,
23 AC_HELP_STRING([--with-autoheader], 23 AS_HELP_STRING([--with-autoheader],
24 [use a different autoheader for regeneration of Makefiles]), 24 [use a different autoheader for regeneration of Makefiles]),
25 [ 25 [
26 unset AUTOHEADER 26 unset AUTOHEADER
@@ -30,7 +30,7 @@ AC_DEFUN([AS_AUTOTOOLS_ALTERNATE],
30 30
31 dnl allow for different automake version 31 dnl allow for different automake version
32 AC_ARG_WITH(automake, 32 AC_ARG_WITH(automake,
33 AC_HELP_STRING([--with-automake], 33 AS_HELP_STRING([--with-automake],
34 [use a different automake for regeneration of Makefiles]), 34 [use a different automake for regeneration of Makefiles]),
35 [ 35 [
36 unset AUTOMAKE 36 unset AUTOMAKE
@@ -40,7 +40,7 @@ AC_DEFUN([AS_AUTOTOOLS_ALTERNATE],
40 40
41 dnl allow for different aclocal version 41 dnl allow for different aclocal version
42 AC_ARG_WITH(aclocal, 42 AC_ARG_WITH(aclocal,
43 AC_HELP_STRING([--with-aclocal], 43 AS_HELP_STRING([--with-aclocal],
44 [use a different aclocal for regeneration of Makefiles]), 44 [use a different aclocal for regeneration of Makefiles]),
45 [ 45 [
46 unset ACLOCAL 46 unset ACLOCAL
diff --git a/m4/check-latex-package.m4 b/m4/check-latex-package.m4
new file mode 100644
index 000000000..7b7861134
--- /dev/null
+++ b/m4/check-latex-package.m4
@@ -0,0 +1,42 @@
1dnl
2dnl CHECK_LATEX_PACKAGE(FEATURE-NAME,
3dnl PACKAGE-NAME,
4dnl ACTION-IF-FOUND,
5dnl ACTION-IF-NOT-FOUND)
6dnl
7dnl Tries to compile a small LaTeX document to see if the requested package is
8dnl available to be used with \usepackage.
9dnl
10dnl The result will be cached in the ac_cv_tex_PACKAGE-NAME variable.
11dnl
12dnl This macro also checks for pdflatex as in AC_CHECK_PROGS and the result
13dnl is made available in the PDFLATEX_BINARY variable (all capitals like that.)
14dnl
15dnl FEATURE-NAME is one or more words to identify the check;
16dnl PACKAGE-NAME is the package as it appears in the \usepackage statement
17dnl ACTION-IF-FOUND (optional) commands to execute if the package is installed
18dnl ACTION-IF-NOT-FOUND (optional) the inverse of ACTION-IF-FOUND
19dnl
20AC_DEFUN([CHECK_LATEX_PACKAGE],
21[AC_CHECK_PROGS([PDFLATEX_BINARY], [pdflatex], [no])
22
23 AS_IF([test "x$ac_cv_prog_PDFLATEX_BINARY" = "xno"],
24 [m4_if([$4], ,:,[$4])],
25 [AC_CACHE_CHECK([for the $1 package for LaTeX], [AS_TR_SH([ac_cv_tex_][$2])],
26 [cat <<EOF > conftest.tex
27\\documentclass{article}
28\\usepackage{$2}
29\\begin{document}
30Hello
31\\end{document}
32EOF
33
34 "$ac_cv_prog_PDFLATEX_BINARY" conftest.tex 1>/dev/null 2>&1
35 AS_IF([test "x$?" = "x0"],
36 [AS_VAR_SET([AS_TR_SH([ac_cv_tex_][$2])], [yes])],
37 [AS_VAR_SET([AS_TR_SH([ac_cv_tex_][$2])], [no])])])
38
39 AS_VAR_IF([AS_TR_SH([ac_cv_tex_][$2])], [xyes],
40 [m4_if([$3], ,:,[$3])],
41 [m4_if([$4], ,:,[$4])])])
42])dnl
diff --git a/m4/check-libheader.m4 b/m4/check-libheader.m4
index 1e24d8a97..4e0285336 100644
--- a/m4/check-libheader.m4
+++ b/m4/check-libheader.m4
@@ -11,30 +11,19 @@ dnl HEADER-NAME - header file name as in AC_CHECK_HEADER
11dnl ACTION-IF-FOUND - when feature is found then execute given action 11dnl ACTION-IF-FOUND - when feature is found then execute given action
12dnl ACTION-IF-NOT-FOUND - when feature is not found then execute given action 12dnl ACTION-IF-NOT-FOUND - when feature is not found then execute given action
13dnl EXTRA-LDFLAGS - extra linker flags (-L or -l) 13dnl EXTRA-LDFLAGS - extra linker flags (-L or -l)
14dnl EXTRA-CPPFLAGS - extra C preprocessor flags, i.e. -I/usr/X11R6/include 14dnl EXTRA-CPPFLAGS - extra C preprocessor flags, e.g. -I/usr/X11R6/include
15dnl 15dnl
16dnl Based on GST_CHECK_LIBHEADER from gstreamer plugins 0.3.1.
17dnl 16dnl
18AC_DEFUN([CHECK_LIBHEADER], 17AC_DEFUN([CHECK_LIBHEADER],
19[ 18[m4_if([$7], ,:,[LDFLAGS="$7 $LDFLAGS"])
20 AC_CHECK_LIB([$2], [$3], HAVE_[$1]=yes, HAVE_[$1]=no, [$7]) 19 m4_if([$8], ,:,[CPPFLAGS="$8 $CPPFLAGS"])
21 check_libheader_feature_name=translit([$1], A-Z, a-z)
22
23 if test "x$HAVE_[$1]" = "xyes"; then
24 check_libheader_save_CPPFLAGS=$CPPFLAGS
25 CPPFLAGS="[$8] $CPPFLAGS"
26 AC_CHECK_HEADER([$4], :, HAVE_[$1]=no)
27 CPPFLAGS=$check_libheader_save_CPPFLAGS
28 fi
29
30 if test "x$HAVE_[$1]" = "xyes"; then
31 ifelse([$5], , :, [$5])
32 AC_MSG_NOTICE($check_libheader_feature_name was found)
33 else
34 ifelse([$6], , :, [$6])
35 AC_MSG_WARN($check_libheader_feature_name not found)
36 fi
37 AC_SUBST(HAVE_[$1])
38]
39)
40 20
21 AC_CHECK_HEADERS([$4],
22 [AC_CHECK_LIB([$2], [$3],
23 [eval "HAVE_]AS_TR_SH([$1])[=yes"]
24 m4_if([$5], ,:,[$5]),
25 [eval "HAVE_]AS_TR_SH([$1])[=no"]
26 m4_if([$6], ,:,[$6]))],
27 [eval "HAVE_]AS_TR_SH([$1])[=no"]
28 m4_if([$6], ,:,[$6]))
29])dnl
diff --git a/m4/iconv.m4 b/m4/iconv.m4
index 41aa44a56..e593b7270 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -1,5 +1,6 @@
1# iconv.m4 serial 18 (gettext-0.18.2) 1# iconv.m4 serial 21
2dnl Copyright (C) 2000-2002, 2007-2013 Free Software Foundation, Inc. 2dnl Copyright (C) 2000-2002, 2007-2014, 2016-2020 Free Software Foundation,
3dnl Inc.
3dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
@@ -29,7 +30,7 @@ AC_DEFUN([AM_ICONV_LINK],
29 30
30 dnl Add $INCICONV to CPPFLAGS before performing the following checks, 31 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
31 dnl because if the user has installed libiconv and not disabled its use 32 dnl because if the user has installed libiconv and not disabled its use
32 dnl via --without-libiconv-prefix, they want to use it. The first 33 dnl via --without-libiconv-prefix, he wants to use it. The first
33 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. 34 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
34 am_save_CPPFLAGS="$CPPFLAGS" 35 am_save_CPPFLAGS="$CPPFLAGS"
35 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) 36 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
@@ -72,27 +73,33 @@ AC_DEFUN([AM_ICONV_LINK],
72 if test $am_cv_lib_iconv = yes; then 73 if test $am_cv_lib_iconv = yes; then
73 LIBS="$LIBS $LIBICONV" 74 LIBS="$LIBS $LIBICONV"
74 fi 75 fi
75 AC_RUN_IFELSE( 76 am_cv_func_iconv_works=no
76 [AC_LANG_SOURCE([[ 77 for ac_iconv_const in '' 'const'; do
78 AC_RUN_IFELSE(
79 [AC_LANG_PROGRAM(
80 [[
77#include <iconv.h> 81#include <iconv.h>
78#include <string.h> 82#include <string.h>
79int main () 83
80{ 84#ifndef ICONV_CONST
81 int result = 0; 85# define ICONV_CONST $ac_iconv_const
86#endif
87 ]],
88 [[int result = 0;
82 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful 89 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
83 returns. */ 90 returns. */
84 { 91 {
85 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); 92 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
86 if (cd_utf8_to_88591 != (iconv_t)(-1)) 93 if (cd_utf8_to_88591 != (iconv_t)(-1))
87 { 94 {
88 static const char input[] = "\342\202\254"; /* EURO SIGN */ 95 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
89 char buf[10]; 96 char buf[10];
90 const char *inptr = input; 97 ICONV_CONST char *inptr = input;
91 size_t inbytesleft = strlen (input); 98 size_t inbytesleft = strlen (input);
92 char *outptr = buf; 99 char *outptr = buf;
93 size_t outbytesleft = sizeof (buf); 100 size_t outbytesleft = sizeof (buf);
94 size_t res = iconv (cd_utf8_to_88591, 101 size_t res = iconv (cd_utf8_to_88591,
95 (char **) &inptr, &inbytesleft, 102 &inptr, &inbytesleft,
96 &outptr, &outbytesleft); 103 &outptr, &outbytesleft);
97 if (res == 0) 104 if (res == 0)
98 result |= 1; 105 result |= 1;
@@ -105,14 +112,14 @@ int main ()
105 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); 112 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
106 if (cd_ascii_to_88591 != (iconv_t)(-1)) 113 if (cd_ascii_to_88591 != (iconv_t)(-1))
107 { 114 {
108 static const char input[] = "\263"; 115 static ICONV_CONST char input[] = "\263";
109 char buf[10]; 116 char buf[10];
110 const char *inptr = input; 117 ICONV_CONST char *inptr = input;
111 size_t inbytesleft = strlen (input); 118 size_t inbytesleft = strlen (input);
112 char *outptr = buf; 119 char *outptr = buf;
113 size_t outbytesleft = sizeof (buf); 120 size_t outbytesleft = sizeof (buf);
114 size_t res = iconv (cd_ascii_to_88591, 121 size_t res = iconv (cd_ascii_to_88591,
115 (char **) &inptr, &inbytesleft, 122 &inptr, &inbytesleft,
116 &outptr, &outbytesleft); 123 &outptr, &outbytesleft);
117 if (res == 0) 124 if (res == 0)
118 result |= 2; 125 result |= 2;
@@ -124,14 +131,14 @@ int main ()
124 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); 131 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
125 if (cd_88591_to_utf8 != (iconv_t)(-1)) 132 if (cd_88591_to_utf8 != (iconv_t)(-1))
126 { 133 {
127 static const char input[] = "\304"; 134 static ICONV_CONST char input[] = "\304";
128 static char buf[2] = { (char)0xDE, (char)0xAD }; 135 static char buf[2] = { (char)0xDE, (char)0xAD };
129 const char *inptr = input; 136 ICONV_CONST char *inptr = input;
130 size_t inbytesleft = 1; 137 size_t inbytesleft = 1;
131 char *outptr = buf; 138 char *outptr = buf;
132 size_t outbytesleft = 1; 139 size_t outbytesleft = 1;
133 size_t res = iconv (cd_88591_to_utf8, 140 size_t res = iconv (cd_88591_to_utf8,
134 (char **) &inptr, &inbytesleft, 141 &inptr, &inbytesleft,
135 &outptr, &outbytesleft); 142 &outptr, &outbytesleft);
136 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) 143 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
137 result |= 4; 144 result |= 4;
@@ -144,14 +151,14 @@ int main ()
144 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); 151 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
145 if (cd_88591_to_utf8 != (iconv_t)(-1)) 152 if (cd_88591_to_utf8 != (iconv_t)(-1))
146 { 153 {
147 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; 154 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
148 char buf[50]; 155 char buf[50];
149 const char *inptr = input; 156 ICONV_CONST char *inptr = input;
150 size_t inbytesleft = strlen (input); 157 size_t inbytesleft = strlen (input);
151 char *outptr = buf; 158 char *outptr = buf;
152 size_t outbytesleft = sizeof (buf); 159 size_t outbytesleft = sizeof (buf);
153 size_t res = iconv (cd_88591_to_utf8, 160 size_t res = iconv (cd_88591_to_utf8,
154 (char **) &inptr, &inbytesleft, 161 &inptr, &inbytesleft,
155 &outptr, &outbytesleft); 162 &outptr, &outbytesleft);
156 if ((int)res > 0) 163 if ((int)res > 0)
157 result |= 8; 164 result |= 8;
@@ -161,27 +168,36 @@ int main ()
161#endif 168#endif
162 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is 169 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
163 provided. */ 170 provided. */
164 if (/* Try standardized names. */ 171 {
165 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) 172 /* Try standardized names. */
166 /* Try IRIX, OSF/1 names. */ 173 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
167 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) 174 /* Try IRIX, OSF/1 names. */
168 /* Try AIX names. */ 175 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
169 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) 176 /* Try AIX names. */
170 /* Try HP-UX names. */ 177 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
171 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) 178 /* Try HP-UX names. */
172 result |= 16; 179 iconv_t cd4 = iconv_open ("utf8", "eucJP");
180 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
181 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
182 result |= 16;
183 if (cd1 != (iconv_t)(-1))
184 iconv_close (cd1);
185 if (cd2 != (iconv_t)(-1))
186 iconv_close (cd2);
187 if (cd3 != (iconv_t)(-1))
188 iconv_close (cd3);
189 if (cd4 != (iconv_t)(-1))
190 iconv_close (cd4);
191 }
173 return result; 192 return result;
174}]])], 193]])],
175 [am_cv_func_iconv_works=yes], 194 [am_cv_func_iconv_works=yes], ,
176 [am_cv_func_iconv_works=no], 195 [case "$host_os" in
177 [ 196 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
178changequote(,)dnl 197 *) am_cv_func_iconv_works="guessing yes" ;;
179 case "$host_os" in 198 esac])
180 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; 199 test "$am_cv_func_iconv_works" = no || break
181 *) am_cv_func_iconv_works="guessing yes" ;; 200 done
182 esac
183changequote([,])dnl
184 ])
185 LIBS="$am_save_LIBS" 201 LIBS="$am_save_LIBS"
186 ]) 202 ])
187 case "$am_cv_func_iconv_works" in 203 case "$am_cv_func_iconv_works" in
@@ -255,14 +271,18 @@ size_t iconv();
255 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 271 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
256 AC_MSG_RESULT([ 272 AC_MSG_RESULT([
257 $am_cv_proto_iconv]) 273 $am_cv_proto_iconv])
258 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], 274 else
259 [Define as const if the declaration of iconv() needs const.]) 275 dnl When compiling GNU libiconv on a system that does not have iconv yet,
260 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. 276 dnl pick the POSIX compliant declaration without 'const'.
261 m4_ifdef([gl_ICONV_H_DEFAULTS], 277 am_cv_proto_iconv_arg1=""
262 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
263 if test -n "$am_cv_proto_iconv_arg1"; then
264 ICONV_CONST="const"
265 fi
266 ])
267 fi 278 fi
279 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
280 [Define as const if the declaration of iconv() needs const.])
281 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
282 m4_ifdef([gl_ICONV_H_DEFAULTS],
283 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
284 if test -n "$am_cv_proto_iconv_arg1"; then
285 ICONV_CONST="const"
286 fi
287 ])
268]) 288])
diff --git a/m4/libcurl.m4 b/m4/libcurl.m4
index a84077a5e..ad53a444e 100644
--- a/m4/libcurl.m4
+++ b/m4/libcurl.m4
@@ -1,3 +1,24 @@
1#***************************************************************************
2# _ _ ____ _
3# Project ___| | | | _ \| |
4# / __| | | | |_) | |
5# | (__| |_| | _ <| |___
6# \___|\___/|_| \_\_____|
7#
8# Copyright (C) 2006 - 2020, David Shaw <dshaw@jabberwocky.com>
9#
10# This software is licensed as described in the file COPYING, which
11# you should have received as part of this distribution. The terms
12# are also available at https://curl.se/docs/copyright.html.
13#
14# You may opt to use, copy, modify, merge, publish, distribute and/or sell
15# copies of the Software, and permit persons to whom the Software is
16# furnished to do so, under the terms of the COPYING file.
17#
18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19# KIND, either express or implied.
20#
21###########################################################################
1# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION], 22# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
2# [ACTION-IF-YES], [ACTION-IF-NO]) 23# [ACTION-IF-YES], [ACTION-IF-NO])
3# ---------------------------------------------------------- 24# ----------------------------------------------------------
@@ -61,7 +82,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
61 AH_TEMPLATE([LIBCURL_PROTOCOL_SMTP],[Defined if libcurl supports SMTP]) 82 AH_TEMPLATE([LIBCURL_PROTOCOL_SMTP],[Defined if libcurl supports SMTP])
62 83
63 AC_ARG_WITH(libcurl, 84 AC_ARG_WITH(libcurl,
64 AC_HELP_STRING([--with-libcurl=PREFIX],[look for the curl library in PREFIX/lib and headers in PREFIX/include]), 85 AS_HELP_STRING([--with-libcurl=PREFIX],[look for the curl library in PREFIX/lib and headers in PREFIX/include]),
65 [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])]) 86 [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])])
66 87
67 if test "$_libcurl_with" != "no" ; then 88 if test "$_libcurl_with" != "no" ; then
@@ -157,7 +178,7 @@ x=CURLOPT_WRITEDATA;
157x=CURLOPT_ERRORBUFFER; 178x=CURLOPT_ERRORBUFFER;
158x=CURLOPT_STDERR; 179x=CURLOPT_STDERR;
159x=CURLOPT_VERBOSE; 180x=CURLOPT_VERBOSE;
160if (x) ; 181if (x) {;}
161]])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no) 182]])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
162 183
163 CPPFLAGS=$_libcurl_save_cppflags 184 CPPFLAGS=$_libcurl_save_cppflags
diff --git a/m4/libgcrypt.m4 b/m4/libgcrypt.m4
index 6cf482fcb..19d514fd5 100644
--- a/m4/libgcrypt.m4
+++ b/m4/libgcrypt.m4
@@ -1,38 +1,70 @@
1dnl Autoconf macros for libgcrypt 1# libgcrypt.m4 - Autoconf macros to detect libgcrypt
2dnl Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc. 2# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018, 2020 g10 Code GmbH
3dnl 3#
4dnl This file is free software; as a special exception the author gives 4# This file is free software; as a special exception the author gives
5dnl unlimited permission to copy and/or distribute it, with or without 5# unlimited permission to copy and/or distribute it, with or without
6dnl modifications, as long as this notice is preserved. 6# modifications, as long as this notice is preserved.
7dnl 7#
8dnl This file is distributed in the hope that it will be useful, but 8# This file is distributed in the hope that it will be useful, but
9dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the 9# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
10dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11#
12# Last-changed: 2020-09-27
11 13
12 14
13dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, 15dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
14dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) 16dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
15dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS. 17dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
16dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed 18dnl MINIMUM-VERSION is a string with the version number optionally prefixed
17dnl with the API version to also check the API compatibility. Example: 19dnl with the API version to also check the API compatibility. Example:
18dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed 20dnl a MINIMUM-VERSION of 1:1.2.5 won't pass the test unless the installed
19dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using 21dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using
20dnl this features allows to prevent build against newer versions of libgcrypt 22dnl this features allows to prevent build against newer versions of libgcrypt
21dnl with a changed API. 23dnl with a changed API.
22dnl 24dnl
25dnl If a prefix option is not used, the config script is first
26dnl searched in $SYSROOT/bin and then along $PATH. If the used
27dnl config script does not match the host specification the script
28dnl is added to the gpg_config_script_warn variable.
29dnl
23AC_DEFUN([AM_PATH_LIBGCRYPT], 30AC_DEFUN([AM_PATH_LIBGCRYPT],
24[ AC_REQUIRE([AC_CANONICAL_HOST]) 31[ AC_REQUIRE([AC_CANONICAL_HOST])
25 AC_ARG_WITH(libgcrypt-prefix, 32 AC_ARG_WITH(libgcrypt-prefix,
26 AC_HELP_STRING([--with-libgcrypt-prefix=PFX], 33 AS_HELP_STRING([--with-libgcrypt-prefix=PFX],
27 [prefix where LIBGCRYPT is installed (optional)]), 34 [prefix where LIBGCRYPT is installed (optional)]),
28 libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="") 35 libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
29 if test x$libgcrypt_config_prefix != x ; then 36 if test x"${LIBGCRYPT_CONFIG}" = x ; then
30 if test x${LIBGCRYPT_CONFIG+set} != xset ; then 37 if test x"${libgcrypt_config_prefix}" != x ; then
31 LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config 38 LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config"
32 fi 39 fi
33 fi 40 fi
34 41
35 AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no) 42 use_gpgrt_config=""
43 if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
44 if $GPGRT_CONFIG libgcrypt --exists; then
45 LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt"
46 AC_MSG_NOTICE([Use gpgrt-config as libgcrypt-config])
47 use_gpgrt_config=yes
48 fi
49 fi
50 if test -z "$use_gpgrt_config"; then
51 if test x"${LIBGCRYPT_CONFIG}" = x ; then
52 case "${SYSROOT}" in
53 /*)
54 if test -x "${SYSROOT}/bin/libgcrypt-config" ; then
55 LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config"
56 fi
57 ;;
58 '')
59 ;;
60 *)
61 AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
62 ;;
63 esac
64 fi
65 AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
66 fi
67
36 tmp=ifelse([$1], ,1:1.2.0,$1) 68 tmp=ifelse([$1], ,1:1.2.0,$1)
37 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then 69 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
38 req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` 70 req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
@@ -51,7 +83,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
51 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` 83 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
52 req_micro=`echo $min_libgcrypt_version | \ 84 req_micro=`echo $min_libgcrypt_version | \
53 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` 85 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
54 libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` 86 if test -z "$use_gpgrt_config"; then
87 libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
88 else
89 libgcrypt_config_version=`$LIBGCRYPT_CONFIG --modversion`
90 fi
55 major=`echo $libgcrypt_config_version | \ 91 major=`echo $libgcrypt_config_version | \
56 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` 92 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
57 minor=`echo $libgcrypt_config_version | \ 93 minor=`echo $libgcrypt_config_version | \
@@ -83,7 +119,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
83 # If we have a recent libgcrypt, we should also check that the 119 # If we have a recent libgcrypt, we should also check that the
84 # API is compatible 120 # API is compatible
85 if test "$req_libgcrypt_api" -gt 0 ; then 121 if test "$req_libgcrypt_api" -gt 0 ; then
86 tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` 122 if test -z "$use_gpgrt_config"; then
123 tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
124 else
125 tmp=`$LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0`
126 fi
87 if test "$tmp" -gt 0 ; then 127 if test "$tmp" -gt 0 ; then
88 AC_MSG_CHECKING([LIBGCRYPT API version]) 128 AC_MSG_CHECKING([LIBGCRYPT API version])
89 if test "$req_libgcrypt_api" -eq "$tmp" ; then 129 if test "$req_libgcrypt_api" -eq "$tmp" ; then
@@ -99,17 +139,22 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
99 LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` 139 LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
100 LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` 140 LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
101 ifelse([$2], , :, [$2]) 141 ifelse([$2], , :, [$2])
102 libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` 142 if test -z "$use_gpgrt_config"; then
143 libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
144 else
145 libgcrypt_config_host=`$LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none`
146 fi
103 if test x"$libgcrypt_config_host" != xnone ; then 147 if test x"$libgcrypt_config_host" != xnone ; then
104 if test x"$libgcrypt_config_host" != x"$host" ; then 148 if test x"$libgcrypt_config_host" != x"$host" ; then
105 AC_MSG_WARN([[ 149 AC_MSG_WARN([[
106*** 150***
107*** The config script $LIBGCRYPT_CONFIG was 151*** The config script "$LIBGCRYPT_CONFIG" was
108*** built for $libgcrypt_config_host and thus may not match the 152*** built for $libgcrypt_config_host and thus may not match the
109*** used host $host. 153*** used host $host.
110*** You may want to use the configure option --with-libgcrypt-prefix 154*** You may want to use the configure option --with-libgcrypt-prefix
111*** to specify a matching config script. 155*** to specify a matching config script or use \$SYSROOT.
112***]]) 156***]])
157 gpg_config_script_warn="$gpg_config_script_warn libgcrypt"
113 fi 158 fi
114 fi 159 fi
115 else 160 else
diff --git a/m4/libgnurl.m4 b/m4/libgnurl.m4
deleted file mode 100644
index da72e5e87..000000000
--- a/m4/libgnurl.m4
+++ /dev/null
@@ -1,266 +0,0 @@
1# LIBGNURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
2# [ACTION-IF-YES], [ACTION-IF-NO])
3# ----------------------------------------------------------
4# David Shaw <dshaw@jabberwocky.com> May-09-2006
5#
6# Checks for libgnurl. DEFAULT-ACTION is the string yes or no to
7# specify whether to default to --with-libgnurl or --without-libgnurl.
8# If not supplied, DEFAULT-ACTION is yes. MINIMUM-VERSION is the
9# minimum version of libgnurl to accept. Pass the version as a regular
10# version number like 7.10.1. If not supplied, any version is
11# accepted. ACTION-IF-YES is a list of shell commands to run if
12# libgnurl was successfully found and passed the various tests.
13# ACTION-IF-NO is a list of shell commands that are run otherwise.
14# Note that using --without-libgnurl does run ACTION-IF-NO.
15#
16# This macro #defines HAVE_LIBGNURL if a working libgnurl setup is
17# found, and sets @LIBGNURL@ and @LIBGNURL_CPPFLAGS@ to the necessary
18# values. Other useful defines are LIBGNURL_FEATURE_xxx where xxx are
19# the various features supported by libgnurl, and LIBGNURL_PROTOCOL_yyy
20# where yyy are the various protocols supported by libgnurl. Both xxx
21# and yyy are capitalized. See the list of AH_TEMPLATEs at the top of
22# the macro for the complete list of possible defines. Shell
23# variables $libgnurl_feature_xxx and $libgnurl_protocol_yyy are also
24# defined to 'yes' for those features and protocols that were found.
25# Note that xxx and yyy keep the same capitalization as in the
26# gnurl-config list (e.g. it's "HTTP" and not "http").
27#
28# Users may override the detected values by doing something like:
29# LIBGNURL="-lgnurl" LIBGNURL_CPPFLAGS="-I/usr/myinclude" ./configure
30#
31# For the sake of sanity, this macro assumes that any libgnurl that is
32# found is after version 7.7.2, the first version that included the
33# gnurl-config script. Note that it is very important for people
34# packaging binary versions of libgnurl to include this script!
35# Without gnurl-config, we can only guess what protocols are available,
36# or use gnurl_version_info to figure it out at runtime.
37
38AC_DEFUN([LIBGNURL_CHECK_CONFIG],
39[
40 AH_TEMPLATE([LIBGNURL_FEATURE_SSL],[Defined if libgnurl supports SSL])
41 AH_TEMPLATE([LIBGNURL_FEATURE_KRB4],[Defined if libgnurl supports KRB4])
42 AH_TEMPLATE([LIBGNURL_FEATURE_IPV6],[Defined if libgnurl supports IPv6])
43 AH_TEMPLATE([LIBGNURL_FEATURE_LIBZ],[Defined if libgnurl supports libz])
44 AH_TEMPLATE([LIBGNURL_FEATURE_ASYNCHDNS],[Defined if libgnurl supports AsynchDNS])
45 AH_TEMPLATE([LIBGNURL_FEATURE_IDN],[Defined if libgnurl supports IDN])
46 AH_TEMPLATE([LIBGNURL_FEATURE_SSPI],[Defined if libgnurl supports SSPI])
47 AH_TEMPLATE([LIBGNURL_FEATURE_NTLM],[Defined if libgnurl supports NTLM])
48
49 AH_TEMPLATE([LIBGNURL_PROTOCOL_HTTP],[Defined if libgnurl supports HTTP])
50 AH_TEMPLATE([LIBGNURL_PROTOCOL_HTTPS],[Defined if libgnurl supports HTTPS])
51 AH_TEMPLATE([LIBGNURL_PROTOCOL_FTP],[Defined if libgnurl supports FTP])
52 AH_TEMPLATE([LIBGNURL_PROTOCOL_FTPS],[Defined if libgnurl supports FTPS])
53 AH_TEMPLATE([LIBGNURL_PROTOCOL_FILE],[Defined if libgnurl supports FILE])
54 AH_TEMPLATE([LIBGNURL_PROTOCOL_TELNET],[Defined if libgnurl supports TELNET])
55 AH_TEMPLATE([LIBGNURL_PROTOCOL_LDAP],[Defined if libgnurl supports LDAP])
56 AH_TEMPLATE([LIBGNURL_PROTOCOL_DICT],[Defined if libgnurl supports DICT])
57 AH_TEMPLATE([LIBGNURL_PROTOCOL_TFTP],[Defined if libgnurl supports TFTP])
58 AH_TEMPLATE([LIBGNURL_PROTOCOL_RTSP],[Defined if libgnurl supports RTSP])
59 AH_TEMPLATE([LIBGNURL_PROTOCOL_POP3],[Defined if libgnurl supports POP3])
60 AH_TEMPLATE([LIBGNURL_PROTOCOL_IMAP],[Defined if libgnurl supports IMAP])
61 AH_TEMPLATE([LIBGNURL_PROTOCOL_SMTP],[Defined if libgnurl supports SMTP])
62
63 AC_ARG_WITH(libgnurl,
64 AC_HELP_STRING([--with-libgnurl=PREFIX],[look for the gnurl library in PREFIX/lib and headers in PREFIX/include]),
65 [_libgnurl_with=$withval],[_libgnurl_with=ifelse([$1],,[yes],[$1])])
66
67 if test "$_libgnurl_with" != "no" ; then
68
69 AC_PROG_AWK
70
71 _libgnurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[[1]]+256*A[[2]]+A[[3]]; print X;}'"
72
73 _libgnurl_try_link=yes
74
75 if test -d "$_libgnurl_with" ; then
76 LIBGNURL_CPPFLAGS="-I$withval/include"
77 _libgnurl_ldflags="-L$withval/lib"
78 AC_PATH_PROG([_libgnurl_config],[gnurl-config],[],
79 ["$withval/bin"])
80 else
81 AC_PATH_PROG([_libgnurl_config],[gnurl-config],[],[$PATH])
82 fi
83
84 if test x$_libgnurl_config != "x" ; then
85 AC_CACHE_CHECK([for the version of libgnurl],
86 [libgnurl_cv_lib_gnurl_version],
87 [libgnurl_cv_lib_gnurl_version=`$_libgnurl_config --version | $AWK '{print $[]2}'`])
88
89 _libgnurl_version=`echo $libgnurl_cv_lib_gnurl_version | $_libgnurl_version_parse`
90 _libgnurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libgnurl_version_parse`
91
92 if test $_libgnurl_wanted -gt 0 ; then
93 AC_CACHE_CHECK([for libgnurl >= version $2],
94 [libgnurl_cv_lib_version_ok],
95 [
96 if test $_libgnurl_version -ge $_libgnurl_wanted ; then
97 libgnurl_cv_lib_version_ok=yes
98 else
99 libgnurl_cv_lib_version_ok=no
100 fi
101 ])
102 fi
103
104 if test $_libgnurl_wanted -eq 0 || test x$libgnurl_cv_lib_version_ok = xyes ; then
105 if test x"$LIBGNURL_CPPFLAGS" = "x" ; then
106 LIBGNURL_CPPFLAGS=`$_libgnurl_config --cflags`
107 fi
108 if test x"$LIBGNURL" = "x" ; then
109 LIBGNURL=`$_libgnurl_config --libs`
110
111 # This is so silly, but Apple actually has a bug in their
112 # gnurl-config script. Fixed in Tiger, but there are still
113 # lots of Panther installs around.
114 case "${host}" in
115 powerpc-apple-darwin7*)
116 LIBGNURL=`echo $LIBGNURL | sed -e 's|-arch i386||g'`
117 ;;
118 esac
119 fi
120
121 # All gnurl-config scripts support --feature
122 _libgnurl_features=`$_libgnurl_config --feature`
123
124 # Is it modern enough to have --protocols? (7.12.4)
125 if test $_libgnurl_version -ge 461828 ; then
126 _libgnurl_protocols=`$_libgnurl_config --protocols`
127 fi
128 else
129 _libgnurl_try_link=no
130 fi
131
132 unset _libgnurl_wanted
133 fi
134
135 if test $_libgnurl_try_link = yes ; then
136
137 # we didn't find gnurl-config, so let's see if the user-supplied
138 # link line (or failing that, "-lgnurl") is enough.
139 LIBGNURL=${LIBGNURL-"$_libgnurl_ldflags -lgnurl"}
140
141 AC_CACHE_CHECK([whether libgnurl is usable],
142 [libgnurl_cv_lib_gnurl_usable],
143 [
144 _libgnurl_save_cppflags=$CPPFLAGS
145 CPPFLAGS="$LIBGNURL_CPPFLAGS $CPPFLAGS"
146 _libgnurl_save_libs=$LIBS
147 LIBS="$LIBGNURL $LIBS"
148
149 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <curl/curl.h>],[
150/* Try and use a few common options to force a failure if we are
151 missing symbols or can't link. */
152int x;
153curl_easy_setopt(NULL,CURLOPT_URL,NULL);
154x=CURL_ERROR_SIZE;
155x=CURLOPT_WRITEFUNCTION;
156x=CURLOPT_FILE;
157x=CURLOPT_ERRORBUFFER;
158x=CURLOPT_STDERR;
159x=CURLOPT_VERBOSE;
160])],libgnurl_cv_lib_gnurl_usable=yes,libgnurl_cv_lib_gnurl_usable=no)
161
162# BEGIN Changes from original libcurl.m4:
163# Give it a 2nd shot using 'gnurl/curl.h'
164 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <gnurl/curl.h>],[
165/* Try and use a few common options to force a failure if we are
166 missing symbols or can't link. */
167int x;
168curl_easy_setopt(NULL,CURLOPT_URL,NULL);
169x=CURL_ERROR_SIZE;
170x=CURLOPT_WRITEFUNCTION;
171x=CURLOPT_FILE;
172x=CURLOPT_ERRORBUFFER;
173x=CURLOPT_STDERR;
174x=CURLOPT_VERBOSE;
175])],libgnurl_cv_lib_gnurl_usable=yes)
176# END Changes from original libcurl.m4:
177
178 CPPFLAGS=$_libgnurl_save_cppflags
179 LIBS=$_libgnurl_save_libs
180 unset _libgnurl_save_cppflags
181 unset _libgnurl_save_libs
182 ])
183
184 if test $libgnurl_cv_lib_gnurl_usable = yes ; then
185
186 # Does gnurl_free() exist in this version of libgnurl?
187 # If not, fake it with free()
188
189 _libgnurl_save_cppflags=$CPPFLAGS
190 CPPFLAGS="$CPPFLAGS $LIBGNURL_CPPFLAGS"
191 _libgnurl_save_libs=$LIBS
192 LIBS="$LIBS $LIBGNURL"
193
194 AC_CHECK_FUNC(curl_free,,
195 AC_DEFINE(curl_free,free,
196 [Define curl_free() as free() if our version of gnurl lacks curl_free.]))
197
198 CPPFLAGS=$_libgnurl_save_cppflags
199 LIBS=$_libgnurl_save_libs
200 unset _libgnurl_save_cppflags
201 unset _libgnurl_save_libs
202
203 AC_DEFINE(HAVE_LIBGNURL,1,
204 [Define to 1 if you have a functional gnurl library.])
205 AC_SUBST(LIBGNURL_CPPFLAGS)
206 AC_SUBST(LIBGNURL)
207
208 for _libgnurl_feature in $_libgnurl_features ; do
209 AC_DEFINE_UNQUOTED(AS_TR_CPP(libgnurl_feature_$_libgnurl_feature),[1])
210 eval AS_TR_SH(libgnurl_feature_$_libgnurl_feature)=yes
211 done
212
213 if test "x$_libgnurl_protocols" = "x" ; then
214
215 # We don't have --protocols, so just assume that all
216 # protocols are available
217 _libgnurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
218
219 if test x$libgnurl_feature_SSL = xyes ; then
220 _libgnurl_protocols="$_libgnurl_protocols HTTPS"
221
222 # FTPS wasn't standards-compliant until version
223 # 7.11.0 (0x070b00 == 461568)
224 if test $_libgnurl_version -ge 461568; then
225 _libgnurl_protocols="$_libgnurl_protocols FTPS"
226 fi
227 fi
228
229 # RTSP, IMAP, POP3 and SMTP were added in
230 # 7.20.0 (0x071400 == 463872)
231 if test $_libgnurl_version -ge 463872; then
232 _libgnurl_protocols="$_libgnurl_protocols RTSP IMAP POP3 SMTP"
233 fi
234 fi
235
236 for _libgnurl_protocol in $_libgnurl_protocols ; do
237 AC_DEFINE_UNQUOTED(AS_TR_CPP(libgnurl_protocol_$_libgnurl_protocol),[1])
238 eval AS_TR_SH(libgnurl_protocol_$_libgnurl_protocol)=yes
239 done
240 else
241 unset LIBGNURL
242 unset LIBGNURL_CPPFLAGS
243 fi
244 fi
245
246 unset _libgnurl_try_link
247 unset _libgnurl_version_parse
248 unset _libgnurl_config
249 unset _libgnurl_feature
250 unset _libgnurl_features
251 unset _libgnurl_protocol
252 unset _libgnurl_protocols
253 unset _libgnurl_version
254 unset _libgnurl_ldflags
255 fi
256
257 if test x$_libgnurl_with = xno || test x$libgnurl_cv_lib_gnurl_usable != xyes ; then
258 # This is the IF-NO path
259 ifelse([$4],,:,[$4])
260 else
261 # This is the IF-YES path
262 ifelse([$3],,:,[$3])
263 fi
264
265 unset _libgnurl_with
266])dnl
diff --git a/m4/libunistring.m4 b/m4/libunistring.m4
index c1bf4d553..e3d944793 100644
--- a/m4/libunistring.m4
+++ b/m4/libunistring.m4
@@ -1,9 +1,11 @@
1# libunistring.m4 serial 11 1# libunistring.m4 serial 12
2dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. 2dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
6 6
7AC_PREREQ([2.64])
8
7dnl gl_LIBUNISTRING 9dnl gl_LIBUNISTRING
8dnl Searches for an installed libunistring. 10dnl Searches for an installed libunistring.
9dnl If found, it sets and AC_SUBSTs HAVE_LIBUNISTRING=yes and the LIBUNISTRING 11dnl If found, it sets and AC_SUBSTs HAVE_LIBUNISTRING=yes and the LIBUNISTRING
@@ -12,8 +14,8 @@ dnl augments the CPPFLAGS variable, and #defines HAVE_LIBUNISTRING to 1.
12dnl Otherwise, it sets and AC_SUBSTs HAVE_LIBUNISTRING=no and LIBUNISTRING and 14dnl Otherwise, it sets and AC_SUBSTs HAVE_LIBUNISTRING=no and LIBUNISTRING and
13dnl LTLIBUNISTRING to empty. 15dnl LTLIBUNISTRING to empty.
14 16
15dnl Define gl_LIBUNISTRING using AC_DEFUN_ONCE for Autoconf >= 2.64, in order 17dnl Define gl_LIBUNISTRING using AC_DEFUN_ONCE, in order dnl to avoid warnings
16dnl to avoid warnings like 18dnl like
17dnl "warning: AC_REQUIRE: `gl_LIBUNISTRING' was expanded before it was required". 19dnl "warning: AC_REQUIRE: `gl_LIBUNISTRING' was expanded before it was required".
18dnl This is tricky because of the way 'aclocal' is implemented: 20dnl This is tricky because of the way 'aclocal' is implemented:
19dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. 21dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
@@ -21,16 +23,7 @@ dnl Otherwise aclocal's initial scan pass would miss the macro definition.
21dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. 23dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
22dnl Otherwise aclocal would emit many "Use of uninitialized value $1" 24dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
23dnl warnings. 25dnl warnings.
24m4_define([gl_libunistring_AC_DEFUN], 26AC_DEFUN_ONCE([gl_LIBUNISTRING],
25 m4_version_prereq([2.64],
26 [[AC_DEFUN_ONCE(
27 [$1], [$2])]],
28 [m4_ifdef([gl_00GNULIB],
29 [[AC_DEFUN_ONCE(
30 [$1], [$2])]],
31 [[AC_DEFUN(
32 [$1], [$2])]])]))
33gl_libunistring_AC_DEFUN([gl_LIBUNISTRING],
34[ 27[
35 AC_BEFORE([$0], [gl_LIBUNISTRING_MODULE]) 28 AC_BEFORE([$0], [gl_LIBUNISTRING_MODULE])
36 AC_BEFORE([$0], [gl_LIBUNISTRING_LIBHEADER]) 29 AC_BEFORE([$0], [gl_LIBUNISTRING_LIBHEADER])
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
index dc9a3d8e8..80af285bf 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -53,8 +53,8 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
53 [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])], 53 [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
54 [m4_divert_text([DEFAULTS], [gl_use_threads_default=])]) 54 [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
55 AC_ARG_ENABLE([threads], 55 AC_ARG_ENABLE([threads],
56AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ 56AS_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
57AC_HELP_STRING([--disable-threads], [build without multithread safety])]), 57AS_HELP_STRING([--disable-threads], [build without multithread safety])]),
58 [gl_use_threads=$enableval], 58 [gl_use_threads=$enableval],
59 [if test -n "$gl_use_threads_default"; then 59 [if test -n "$gl_use_threads_default"; then
60 gl_use_threads="$gl_use_threads_default" 60 gl_use_threads="$gl_use_threads_default"