diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-04-11 21:36:07 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-04-11 21:38:56 +0300 |
commit | e51f5cd6456a794e3f4464f72c10ad15032b2137 (patch) | |
tree | 5c50a4e5bac136ae656fcc05e2eb9c94a2081a99 | |
parent | df295571f2af48d6129704e644fabfec204ed259 (diff) | |
download | libmicrohttpd-e51f5cd6456a794e3f4464f72c10ad15032b2137.tar.gz libmicrohttpd-e51f5cd6456a794e3f4464f72c10ad15032b2137.zip |
Updated more M4 autoconf macros
-rw-r--r-- | m4/iconv.m4 | 24 | ||||
-rw-r--r-- | m4/lib-ld.m4 | 142 | ||||
-rw-r--r-- | m4/lib-prefix.m4 | 109 | ||||
-rw-r--r-- | m4/libcurl.m4 | 29 | ||||
-rw-r--r-- | m4/libgcrypt.m4 | 78 | ||||
-rw-r--r-- | m4/mhd_shutdown_socket_trigger.m4 | 2 | ||||
-rw-r--r-- | m4/pkg.m4 | 225 |
7 files changed, 377 insertions, 232 deletions
diff --git a/m4/iconv.m4 b/m4/iconv.m4 index aa159c53..bdafc54e 100644 --- a/m4/iconv.m4 +++ b/m4/iconv.m4 | |||
@@ -1,4 +1,4 @@ | |||
1 | # iconv.m4 serial 19 (gettext-0.18.2) | 1 | # iconv.m4 serial 20 |
2 | dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
@@ -258,14 +258,18 @@ size_t iconv(); | |||
258 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | 258 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` |
259 | AC_MSG_RESULT([ | 259 | AC_MSG_RESULT([ |
260 | $am_cv_proto_iconv]) | 260 | $am_cv_proto_iconv]) |
261 | AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], | 261 | else |
262 | [Define as const if the declaration of iconv() needs const.]) | 262 | dnl When compiling GNU libiconv on a system that does not have iconv yet, |
263 | dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. | 263 | dnl pick the POSIX compliant declaration without 'const'. |
264 | m4_ifdef([gl_ICONV_H_DEFAULTS], | 264 | am_cv_proto_iconv_arg1="" |
265 | [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) | ||
266 | if test -n "$am_cv_proto_iconv_arg1"; then | ||
267 | ICONV_CONST="const" | ||
268 | fi | ||
269 | ]) | ||
270 | fi | 265 | fi |
266 | AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], | ||
267 | [Define as const if the declaration of iconv() needs const.]) | ||
268 | dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. | ||
269 | m4_ifdef([gl_ICONV_H_DEFAULTS], | ||
270 | [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) | ||
271 | if test -n "$am_cv_proto_iconv_arg1"; then | ||
272 | ICONV_CONST="const" | ||
273 | fi | ||
274 | ]) | ||
271 | ]) | 275 | ]) |
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 index 6209de65..8b8a26e8 100644 --- a/m4/lib-ld.m4 +++ b/m4/lib-ld.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # lib-ld.m4 serial 6 | 1 | # lib-ld.m4 serial 7 |
2 | dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 1996-2003, 2009-2017 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -47,73 +47,101 @@ if test "${PATH_SEPARATOR+set}" != set; then | |||
47 | } | 47 | } |
48 | fi | 48 | fi |
49 | 49 | ||
50 | ac_prog=ld | 50 | if test -n "$LD"; then |
51 | if test "$GCC" = yes; then | 51 | AC_MSG_CHECKING([for ld]) |
52 | # Check if gcc -print-prog-name=ld gives a path. | 52 | elif test "$GCC" = yes; then |
53 | AC_MSG_CHECKING([for ld used by $CC]) | 53 | AC_MSG_CHECKING([for ld used by $CC]) |
54 | case $host in | ||
55 | *-*-mingw*) | ||
56 | # gcc leaves a trailing carriage return which upsets mingw | ||
57 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | ||
58 | *) | ||
59 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | ||
60 | esac | ||
61 | case $ac_prog in | ||
62 | # Accept absolute paths. | ||
63 | [[\\/]]* | ?:[[\\/]]*) | ||
64 | re_direlt='/[[^/]][[^/]]*/\.\./' | ||
65 | # Canonicalize the pathname of ld | ||
66 | ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` | ||
67 | while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do | ||
68 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | ||
69 | done | ||
70 | test -z "$LD" && LD="$ac_prog" | ||
71 | ;; | ||
72 | "") | ||
73 | # If it fails, then pretend we aren't using GCC. | ||
74 | ac_prog=ld | ||
75 | ;; | ||
76 | *) | ||
77 | # If it is relative, then search for the first ld in PATH. | ||
78 | with_gnu_ld=unknown | ||
79 | ;; | ||
80 | esac | ||
81 | elif test "$with_gnu_ld" = yes; then | 54 | elif test "$with_gnu_ld" = yes; then |
82 | AC_MSG_CHECKING([for GNU ld]) | 55 | AC_MSG_CHECKING([for GNU ld]) |
83 | else | 56 | else |
84 | AC_MSG_CHECKING([for non-GNU ld]) | 57 | AC_MSG_CHECKING([for non-GNU ld]) |
85 | fi | 58 | fi |
86 | AC_CACHE_VAL([acl_cv_path_LD], | 59 | if test -n "$LD"; then |
87 | [if test -z "$LD"; then | 60 | # Let the user override the test with a path. |
88 | acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | 61 | : |
89 | for ac_dir in $PATH; do | 62 | else |
90 | IFS="$acl_save_ifs" | 63 | AC_CACHE_VAL([acl_cv_path_LD], |
91 | test -z "$ac_dir" && ac_dir=. | 64 | [ |
92 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | 65 | acl_cv_path_LD= # Final result of this test |
93 | acl_cv_path_LD="$ac_dir/$ac_prog" | 66 | ac_prog=ld # Program to search in $PATH |
94 | # Check to see if the program is GNU ld. I'd rather use --version, | 67 | if test "$GCC" = yes; then |
95 | # but apparently some variants of GNU ld only accept -v. | 68 | # Check if gcc -print-prog-name=ld gives a path. |
96 | # Break only if it was the GNU/non-GNU ld that we prefer. | 69 | case $host in |
97 | case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in | 70 | *-*-mingw*) |
98 | *GNU* | *'with BFD'*) | 71 | # gcc leaves a trailing carriage return which upsets mingw |
99 | test "$with_gnu_ld" != no && break | 72 | acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
100 | ;; | 73 | *) |
101 | *) | 74 | acl_output=`($CC -print-prog-name=ld) 2>&5` ;; |
102 | test "$with_gnu_ld" != yes && break | 75 | esac |
103 | ;; | 76 | case $acl_output in |
77 | # Accept absolute paths. | ||
78 | [[\\/]]* | ?:[[\\/]]*) | ||
79 | re_direlt='/[[^/]][[^/]]*/\.\./' | ||
80 | # Canonicalize the pathname of ld | ||
81 | acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` | ||
82 | while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do | ||
83 | acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` | ||
84 | done | ||
85 | # Got the pathname. No search in PATH is needed. | ||
86 | acl_cv_path_LD="$acl_output" | ||
87 | ac_prog= | ||
88 | ;; | ||
89 | "") | ||
90 | # If it fails, then pretend we aren't using GCC. | ||
91 | ;; | ||
92 | *) | ||
93 | # If it is relative, then search for the first ld in PATH. | ||
94 | with_gnu_ld=unknown | ||
95 | ;; | ||
104 | esac | 96 | esac |
105 | fi | 97 | fi |
106 | done | 98 | if test -n "$ac_prog"; then |
107 | IFS="$acl_save_ifs" | 99 | # Search for $ac_prog in $PATH. |
108 | else | 100 | acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
109 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | 101 | for ac_dir in $PATH; do |
110 | fi]) | 102 | IFS="$acl_save_ifs" |
111 | LD="$acl_cv_path_LD" | 103 | test -z "$ac_dir" && ac_dir=. |
104 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | ||
105 | acl_cv_path_LD="$ac_dir/$ac_prog" | ||
106 | # Check to see if the program is GNU ld. I'd rather use --version, | ||
107 | # but apparently some variants of GNU ld only accept -v. | ||
108 | # Break only if it was the GNU/non-GNU ld that we prefer. | ||
109 | case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in | ||
110 | *GNU* | *'with BFD'*) | ||
111 | test "$with_gnu_ld" != no && break | ||
112 | ;; | ||
113 | *) | ||
114 | test "$with_gnu_ld" != yes && break | ||
115 | ;; | ||
116 | esac | ||
117 | fi | ||
118 | done | ||
119 | IFS="$acl_save_ifs" | ||
120 | fi | ||
121 | case $host in | ||
122 | *-*-aix*) | ||
123 | AC_EGREP_CPP([yes], | ||
124 | [#if defined __powerpc64__ || defined _ARCH_PPC64 | ||
125 | yes | ||
126 | #endif | ||
127 | ], | ||
128 | [# The compiler produces 64-bit code. Add option '-b64' so that the | ||
129 | # linker groks 64-bit object files. | ||
130 | case "$acl_cv_path_LD " in | ||
131 | *" -b64 "*) ;; | ||
132 | *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; | ||
133 | esac | ||
134 | ], []) | ||
135 | ;; | ||
136 | esac | ||
137 | ]) | ||
138 | LD="$acl_cv_path_LD" | ||
139 | fi | ||
112 | if test -n "$LD"; then | 140 | if test -n "$LD"; then |
113 | AC_MSG_RESULT([$LD]) | 141 | AC_MSG_RESULT([$LD]) |
114 | else | 142 | else |
115 | AC_MSG_RESULT([no]) | 143 | AC_MSG_RESULT([no]) |
144 | AC_MSG_ERROR([no acceptable ld found in \$PATH]) | ||
116 | fi | 145 | fi |
117 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | ||
118 | AC_LIB_PROG_LD_GNU | 146 | AC_LIB_PROG_LD_GNU |
119 | ]) | 147 | ]) |
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 index 6851031d..a5d56c8d 100644 --- a/m4/lib-prefix.m4 +++ b/m4/lib-prefix.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # lib-prefix.m4 serial 7 (gettext-0.18) | 1 | # lib-prefix.m4 serial 8 |
2 | dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2001-2005, 2008-2017 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -174,51 +174,68 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB], | |||
174 | dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or | 174 | dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or |
175 | dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. | 175 | dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. |
176 | AC_REQUIRE([AC_CANONICAL_HOST]) | 176 | AC_REQUIRE([AC_CANONICAL_HOST]) |
177 | acl_libdirstem=lib | 177 | dnl Allow the user to override the result by setting acl_cv_libdirstems. |
178 | acl_libdirstem2= | 178 | AC_CACHE_CHECK([for the common suffixes of directories in the library search path], |
179 | case "$host_os" in | 179 | [acl_cv_libdirstems], |
180 | solaris*) | 180 | [acl_libdirstem=lib |
181 | dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment | 181 | acl_libdirstem2= |
182 | dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. | 182 | case "$host_os" in |
183 | dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." | 183 | solaris*) |
184 | dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the | 184 | dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment |
185 | dnl symlink is missing, so we set acl_libdirstem2 too. | 185 | dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. |
186 | AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], | 186 | dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." |
187 | [AC_EGREP_CPP([sixtyfour bits], [ | 187 | dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the |
188 | dnl symlink is missing, so we set acl_libdirstem2 too. | ||
189 | AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], | ||
190 | [AC_EGREP_CPP([sixtyfour bits], [ | ||
188 | #ifdef _LP64 | 191 | #ifdef _LP64 |
189 | sixtyfour bits | 192 | sixtyfour bits |
190 | #endif | 193 | #endif |
191 | ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) | 194 | ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) |
192 | ]) | 195 | ]) |
193 | if test $gl_cv_solaris_64bit = yes; then | 196 | if test $gl_cv_solaris_64bit = yes; then |
194 | acl_libdirstem=lib/64 | 197 | acl_libdirstem=lib/64 |
195 | case "$host_cpu" in | 198 | case "$host_cpu" in |
196 | sparc*) acl_libdirstem2=lib/sparcv9 ;; | 199 | sparc*) acl_libdirstem2=lib/sparcv9 ;; |
197 | i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; | 200 | i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; |
198 | esac | 201 | esac |
199 | fi | 202 | fi |
200 | ;; | 203 | ;; |
201 | *) | 204 | *) |
202 | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | 205 | dnl The result is a property of the system. However, non-system |
203 | if test -n "$searchpath"; then | 206 | dnl compilers sometimes have odd library search paths. Therefore |
204 | acl_save_IFS="${IFS= }"; IFS=":" | 207 | dnl prefer asking /usr/bin/gcc, if available, rather than $CC. |
205 | for searchdir in $searchpath; do | 208 | searchpath=`(if test -f /usr/bin/gcc \ |
206 | if test -d "$searchdir"; then | 209 | && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \ |
207 | case "$searchdir" in | 210 | LC_ALL=C /usr/bin/gcc -print-search-dirs; \ |
208 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | 211 | else \ |
209 | */../ | */.. ) | 212 | LC_ALL=C $CC -print-search-dirs; \ |
210 | # Better ignore directories of this form. They are misleading. | 213 | fi) 2>/dev/null \ |
211 | ;; | 214 | | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` |
212 | *) searchdir=`cd "$searchdir" && pwd` | 215 | if test -n "$searchpath"; then |
213 | case "$searchdir" in | 216 | acl_save_IFS="${IFS= }"; IFS=":" |
214 | */lib64 ) acl_libdirstem=lib64 ;; | 217 | for searchdir in $searchpath; do |
215 | esac ;; | 218 | if test -d "$searchdir"; then |
216 | esac | 219 | case "$searchdir" in |
217 | fi | 220 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; |
218 | done | 221 | */../ | */.. ) |
219 | IFS="$acl_save_IFS" | 222 | # Better ignore directories of this form. They are misleading. |
220 | fi | 223 | ;; |
221 | ;; | 224 | *) searchdir=`cd "$searchdir" && pwd` |
222 | esac | 225 | case "$searchdir" in |
223 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" | 226 | */lib64 ) acl_libdirstem=lib64 ;; |
227 | esac ;; | ||
228 | esac | ||
229 | fi | ||
230 | done | ||
231 | IFS="$acl_save_IFS" | ||
232 | fi | ||
233 | ;; | ||
234 | esac | ||
235 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" | ||
236 | acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2" | ||
237 | ]) | ||
238 | # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2. | ||
239 | acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` | ||
240 | acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'` | ||
224 | ]) | 241 | ]) |
diff --git a/m4/libcurl.m4 b/m4/libcurl.m4 index 7e0a3c4c..53d694d0 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, 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.haxx.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 |
@@ -153,11 +174,11 @@ int x; | |||
153 | curl_easy_setopt(NULL,CURLOPT_URL,NULL); | 174 | curl_easy_setopt(NULL,CURLOPT_URL,NULL); |
154 | x=CURL_ERROR_SIZE; | 175 | x=CURL_ERROR_SIZE; |
155 | x=CURLOPT_WRITEFUNCTION; | 176 | x=CURLOPT_WRITEFUNCTION; |
156 | x=CURLOPT_FILE; | 177 | x=CURLOPT_WRITEDATA; |
157 | x=CURLOPT_ERRORBUFFER; | 178 | x=CURLOPT_ERRORBUFFER; |
158 | x=CURLOPT_STDERR; | 179 | x=CURLOPT_STDERR; |
159 | x=CURLOPT_VERBOSE; | 180 | x=CURLOPT_VERBOSE; |
160 | if (x) ; | 181 | if (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 |
@@ -201,8 +222,6 @@ if (x) ; | |||
201 | # protocols are available | 222 | # protocols are available |
202 | _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP" | 223 | _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP" |
203 | 224 | ||
204 | test -z "$_libcurl_version" && _libcurl_version=0 | ||
205 | |||
206 | if test x$libcurl_feature_SSL = xyes ; then | 225 | if test x$libcurl_feature_SSL = xyes ; then |
207 | _libcurl_protocols="$_libcurl_protocols HTTPS" | 226 | _libcurl_protocols="$_libcurl_protocols HTTPS" |
208 | 227 | ||
diff --git a/m4/libgcrypt.m4 b/m4/libgcrypt.m4 index 75863ba9..d89fe113 100644 --- a/m4/libgcrypt.m4 +++ b/m4/libgcrypt.m4 | |||
@@ -1,47 +1,62 @@ | |||
1 | dnl Autoconf macros for libgcrypt | 1 | # libgcrypt.m4 - Autoconf macros to detect libgcrypt |
2 | dnl Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc. | 2 | # Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH |
3 | dnl Copyright (C) 2014 Karlson2k (Evgeny Grin) | 3 | # |
4 | dnl | 4 | # This file is free software; as a special exception the author gives |
5 | dnl This file is free software; as a special exception the author gives | 5 | # unlimited permission to copy and/or distribute it, with or without |
6 | dnl unlimited permission to copy and/or distribute it, with or without | 6 | # modifications, as long as this notice is preserved. |
7 | dnl modifications, as long as this notice is preserved. | 7 | # |
8 | dnl | 8 | # This file is distributed in the hope that it will be useful, but |
9 | dnl This file is distributed in the hope that it will be useful, but | 9 | # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the |
10 | dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the | 10 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
11 | dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | # |
12 | # Last-changed: 2014-10-02 | ||
12 | 13 | ||
13 | 14 | ||
14 | dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, | 15 | dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, |
15 | dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) | 16 | dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) |
16 | dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS. | 17 | dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS. |
17 | dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed | 18 | dnl MINIMUM-VERSION is a string with the version number optionalliy prefixed |
18 | dnl with the API version to also check the API compatibility. Example: | 19 | dnl with the API version to also check the API compatibility. Example: |
19 | dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed | 20 | dnl a MINIMUM-VERSION of 1:1.2.5 won't pass the test unless the installed |
20 | dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using | 21 | dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using |
21 | dnl this features allows to prevent build against newer versions of libgcrypt | 22 | dnl this feature prevents building against newer versions of libgcrypt |
22 | dnl with a changed API. | 23 | dnl with a changed API. |
23 | dnl | 24 | dnl |
24 | dnl Updated by Karlson2k to be more tolerant to host tools variations. | 25 | dnl If a prefix option is not used, the config script is first |
26 | dnl searched in $SYSROOT/bin and then along $PATH. If the used | ||
27 | dnl config script does not match the host specification the script | ||
28 | dnl is added to the gpg_config_script_warn variable. | ||
25 | dnl | 29 | dnl |
26 | AC_DEFUN([AM_PATH_LIBGCRYPT], | 30 | AC_DEFUN([AM_PATH_LIBGCRYPT], |
27 | [ AC_REQUIRE([AC_CANONICAL_HOST]) | 31 | [ AC_REQUIRE([AC_CANONICAL_HOST]) |
28 | AC_REQUIRE([AC_PROG_GREP]) | ||
29 | AC_REQUIRE([AC_PROG_SED]) | ||
30 | AC_ARG_WITH(libgcrypt-prefix, | 32 | AC_ARG_WITH(libgcrypt-prefix, |
31 | AC_HELP_STRING([--with-libgcrypt-prefix=PFX], | 33 | AC_HELP_STRING([--with-libgcrypt-prefix=PFX], |
32 | [prefix where LIBGCRYPT is installed (optional)]), | 34 | [prefix where LIBGCRYPT is installed (optional)]), |
33 | libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="") | 35 | libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="") |
34 | if test x$libgcrypt_config_prefix != x ; then | 36 | if test x"${LIBGCRYPT_CONFIG}" = x ; then |
35 | if test x${LIBGCRYPT_CONFIG+set} != xset ; then | 37 | if test x"${libgcrypt_config_prefix}" != x ; then |
36 | LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config | 38 | LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config" |
39 | else | ||
40 | case "${SYSROOT}" in | ||
41 | /*) | ||
42 | if test -x "${SYSROOT}/bin/libgcrypt-config" ; then | ||
43 | LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config" | ||
44 | fi | ||
45 | ;; | ||
46 | '') | ||
47 | ;; | ||
48 | *) | ||
49 | AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) | ||
50 | ;; | ||
51 | esac | ||
37 | fi | 52 | fi |
38 | fi | 53 | fi |
39 | 54 | ||
40 | AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no) | 55 | AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) |
41 | tmp=ifelse([$1], ,1:1.2.0,$1) | 56 | tmp=ifelse([$1], ,1:1.2.0,$1) |
42 | if echo "$tmp" | $GREP ':' >/dev/null 2>/dev/null ; then | 57 | if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then |
43 | req_libgcrypt_api=`echo "$tmp" | $SED 's/\(.*\):\(.*\)/\1/'` | 58 | req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` |
44 | min_libgcrypt_version=`echo "$tmp" | $SED 's/\(.*\):\(.*\)/\2/'` | 59 | min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` |
45 | else | 60 | else |
46 | req_libgcrypt_api=0 | 61 | req_libgcrypt_api=0 |
47 | min_libgcrypt_version="$tmp" | 62 | min_libgcrypt_version="$tmp" |
@@ -51,18 +66,18 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], | |||
51 | ok=no | 66 | ok=no |
52 | if test "$LIBGCRYPT_CONFIG" != "no" ; then | 67 | if test "$LIBGCRYPT_CONFIG" != "no" ; then |
53 | req_major=`echo $min_libgcrypt_version | \ | 68 | req_major=`echo $min_libgcrypt_version | \ |
54 | $SED 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` | 69 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` |
55 | req_minor=`echo $min_libgcrypt_version | \ | 70 | req_minor=`echo $min_libgcrypt_version | \ |
56 | $SED 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` | 71 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` |
57 | req_micro=`echo $min_libgcrypt_version | \ | 72 | req_micro=`echo $min_libgcrypt_version | \ |
58 | $SED 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` | 73 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` |
59 | libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` | 74 | libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` |
60 | major=`echo $libgcrypt_config_version | \ | 75 | major=`echo $libgcrypt_config_version | \ |
61 | $SED 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` | 76 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` |
62 | minor=`echo $libgcrypt_config_version | \ | 77 | minor=`echo $libgcrypt_config_version | \ |
63 | $SED 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` | 78 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` |
64 | micro=`echo $libgcrypt_config_version | \ | 79 | micro=`echo $libgcrypt_config_version | \ |
65 | $SED 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` | 80 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` |
66 | if test "$major" -gt "$req_major"; then | 81 | if test "$major" -gt "$req_major"; then |
67 | ok=yes | 82 | ok=yes |
68 | else | 83 | else |
@@ -113,8 +128,9 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], | |||
113 | *** built for $libgcrypt_config_host and thus may not match the | 128 | *** built for $libgcrypt_config_host and thus may not match the |
114 | *** used host $host. | 129 | *** used host $host. |
115 | *** You may want to use the configure option --with-libgcrypt-prefix | 130 | *** You may want to use the configure option --with-libgcrypt-prefix |
116 | *** to specify a matching config script. | 131 | *** to specify a matching config script or use \$SYSROOT. |
117 | ***]]) | 132 | ***]]) |
133 | gpg_config_script_warn="$gpg_config_script_warn libgcrypt" | ||
118 | fi | 134 | fi |
119 | fi | 135 | fi |
120 | else | 136 | else |
diff --git a/m4/mhd_shutdown_socket_trigger.m4 b/m4/mhd_shutdown_socket_trigger.m4 index a0a0acf1..e73a0bd2 100644 --- a/m4/mhd_shutdown_socket_trigger.m4 +++ b/m4/mhd_shutdown_socket_trigger.m4 | |||
@@ -1,7 +1,7 @@ | |||
1 | # SYNOPSIS | 1 | # SYNOPSIS |
2 | # | 2 | # |
3 | # MHD_CHECK_SOCKET_SHUTDOWN_TRIGGER([ACTION-IF-TRIGGER], [ACTION-IF-NOT], | 3 | # MHD_CHECK_SOCKET_SHUTDOWN_TRIGGER([ACTION-IF-TRIGGER], [ACTION-IF-NOT], |
4 | # [ACTIION-IF-UNKNOWN]) | 4 | # [ACTION-IF-UNKNOWN]) |
5 | # | 5 | # |
6 | # DESCRIPTION | 6 | # DESCRIPTION |
7 | # | 7 | # |
@@ -1,29 +1,60 @@ | |||
1 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | 1 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
2 | # serial 1 (pkg-config-0.24) | 2 | # serial 12 (pkg-config-0.29.2) |
3 | # | 3 | |
4 | # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. | 4 | dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
5 | # | 5 | dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> |
6 | # This program is free software; you can redistribute it and/or modify | 6 | dnl |
7 | # it under the terms of the GNU General Public License as published by | 7 | dnl This program is free software; you can redistribute it and/or modify |
8 | # the Free Software Foundation; either version 2 of the License, or | 8 | dnl it under the terms of the GNU General Public License as published by |
9 | # (at your option) any later version. | 9 | dnl the Free Software Foundation; either version 2 of the License, or |
10 | # | 10 | dnl (at your option) any later version. |
11 | # This program is distributed in the hope that it will be useful, but | 11 | dnl |
12 | # WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | dnl This program is distributed in the hope that it will be useful, but |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 | dnl WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | # General Public License for more details. | 14 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | # | 15 | dnl General Public License for more details. |
16 | # You should have received a copy of the GNU General Public License | 16 | dnl |
17 | # along with this program; if not, write to the Free Software | 17 | dnl You should have received a copy of the GNU General Public License |
18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | dnl along with this program; if not, write to the Free Software |
19 | # | 19 | dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
20 | # As a special exception to the GNU General Public License, if you | 20 | dnl 02111-1307, USA. |
21 | # distribute this file as part of a program that contains a | 21 | dnl |
22 | # configuration script generated by Autoconf, you may include it under | 22 | dnl As a special exception to the GNU General Public License, if you |
23 | # the same distribution terms that you use for the rest of that program. | 23 | dnl distribute this file as part of a program that contains a |
24 | 24 | dnl configuration script generated by Autoconf, you may include it under | |
25 | # PKG_PROG_PKG_CONFIG([MIN-VERSION]) | 25 | dnl the same distribution terms that you use for the rest of that |
26 | # ---------------------------------- | 26 | dnl program. |
27 | |||
28 | dnl PKG_PREREQ(MIN-VERSION) | ||
29 | dnl ----------------------- | ||
30 | dnl Since: 0.29 | ||
31 | dnl | ||
32 | dnl Verify that the version of the pkg-config macros are at least | ||
33 | dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's | ||
34 | dnl installed version of pkg-config, this checks the developer's version | ||
35 | dnl of pkg.m4 when generating configure. | ||
36 | dnl | ||
37 | dnl To ensure that this macro is defined, also add: | ||
38 | dnl m4_ifndef([PKG_PREREQ], | ||
39 | dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) | ||
40 | dnl | ||
41 | dnl See the "Since" comment for each macro you use to see what version | ||
42 | dnl of the macros you require. | ||
43 | m4_defun([PKG_PREREQ], | ||
44 | [m4_define([PKG_MACROS_VERSION], [0.29.2]) | ||
45 | m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, | ||
46 | [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) | ||
47 | ])dnl PKG_PREREQ | ||
48 | |||
49 | dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) | ||
50 | dnl ---------------------------------- | ||
51 | dnl Since: 0.16 | ||
52 | dnl | ||
53 | dnl Search for the pkg-config tool and set the PKG_CONFIG variable to | ||
54 | dnl first found in the path. Checks that the version of pkg-config found | ||
55 | dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is | ||
56 | dnl used since that's the first version where most current features of | ||
57 | dnl pkg-config existed. | ||
27 | AC_DEFUN([PKG_PROG_PKG_CONFIG], | 58 | AC_DEFUN([PKG_PROG_PKG_CONFIG], |
28 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) | 59 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
29 | m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) | 60 | m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) |
@@ -45,18 +76,19 @@ if test -n "$PKG_CONFIG"; then | |||
45 | PKG_CONFIG="" | 76 | PKG_CONFIG="" |
46 | fi | 77 | fi |
47 | fi[]dnl | 78 | fi[]dnl |
48 | ])# PKG_PROG_PKG_CONFIG | 79 | ])dnl PKG_PROG_PKG_CONFIG |
49 | 80 | ||
50 | # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | 81 | dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
51 | # | 82 | dnl ------------------------------------------------------------------- |
52 | # Check to see whether a particular set of modules exists. Similar | 83 | dnl Since: 0.18 |
53 | # to PKG_CHECK_MODULES(), but does not set variables or print errors. | 84 | dnl |
54 | # | 85 | dnl Check to see whether a particular set of modules exists. Similar to |
55 | # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | 86 | dnl PKG_CHECK_MODULES(), but does not set variables or print errors. |
56 | # only at the first occurence in configure.ac, so if the first place | 87 | dnl |
57 | # it's called might be skipped (such as if it is within an "if", you | 88 | dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
58 | # have to call PKG_CHECK_EXISTS manually | 89 | dnl only at the first occurence in configure.ac, so if the first place |
59 | # -------------------------------------------------------------- | 90 | dnl it's called might be skipped (such as if it is within an "if", you |
91 | dnl have to call PKG_CHECK_EXISTS manually | ||
60 | AC_DEFUN([PKG_CHECK_EXISTS], | 92 | AC_DEFUN([PKG_CHECK_EXISTS], |
61 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | 93 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
62 | if test -n "$PKG_CONFIG" && \ | 94 | if test -n "$PKG_CONFIG" && \ |
@@ -66,8 +98,10 @@ m4_ifvaln([$3], [else | |||
66 | $3])dnl | 98 | $3])dnl |
67 | fi]) | 99 | fi]) |
68 | 100 | ||
69 | # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) | 101 | dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
70 | # --------------------------------------------- | 102 | dnl --------------------------------------------- |
103 | dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting | ||
104 | dnl pkg_failed based on the result. | ||
71 | m4_define([_PKG_CONFIG], | 105 | m4_define([_PKG_CONFIG], |
72 | [if test -n "$$1"; then | 106 | [if test -n "$$1"; then |
73 | pkg_cv_[]$1="$$1" | 107 | pkg_cv_[]$1="$$1" |
@@ -79,10 +113,11 @@ m4_define([_PKG_CONFIG], | |||
79 | else | 113 | else |
80 | pkg_failed=untried | 114 | pkg_failed=untried |
81 | fi[]dnl | 115 | fi[]dnl |
82 | ])# _PKG_CONFIG | 116 | ])dnl _PKG_CONFIG |
83 | 117 | ||
84 | # _PKG_SHORT_ERRORS_SUPPORTED | 118 | dnl _PKG_SHORT_ERRORS_SUPPORTED |
85 | # ----------------------------- | 119 | dnl --------------------------- |
120 | dnl Internal check to see if pkg-config supports short errors. | ||
86 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], | 121 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], |
87 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | 122 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
88 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | 123 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
@@ -90,26 +125,24 @@ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then | |||
90 | else | 125 | else |
91 | _pkg_short_errors_supported=no | 126 | _pkg_short_errors_supported=no |
92 | fi[]dnl | 127 | fi[]dnl |
93 | ])# _PKG_SHORT_ERRORS_SUPPORTED | 128 | ])dnl _PKG_SHORT_ERRORS_SUPPORTED |
94 | 129 | ||
95 | 130 | ||
96 | # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], | 131 | dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
97 | # [ACTION-IF-NOT-FOUND]) | 132 | dnl [ACTION-IF-NOT-FOUND]) |
98 | # | 133 | dnl -------------------------------------------------------------- |
99 | # | 134 | dnl Since: 0.4.0 |
100 | # Note that if there is a possibility the first call to | 135 | dnl |
101 | # PKG_CHECK_MODULES might not happen, you should be sure to include an | 136 | dnl Note that if there is a possibility the first call to |
102 | # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac | 137 | dnl PKG_CHECK_MODULES might not happen, you should be sure to include an |
103 | # | 138 | dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac |
104 | # | ||
105 | # -------------------------------------------------------------- | ||
106 | AC_DEFUN([PKG_CHECK_MODULES], | 139 | AC_DEFUN([PKG_CHECK_MODULES], |
107 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | 140 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
108 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl | 141 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl |
109 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl | 142 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl |
110 | 143 | ||
111 | pkg_failed=no | 144 | pkg_failed=no |
112 | AC_MSG_CHECKING([for $1]) | 145 | AC_MSG_CHECKING([for $2]) |
113 | 146 | ||
114 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) | 147 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
115 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) | 148 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
@@ -119,11 +152,11 @@ and $1[]_LIBS to avoid the need to call pkg-config. | |||
119 | See the pkg-config man page for more details.]) | 152 | See the pkg-config man page for more details.]) |
120 | 153 | ||
121 | if test $pkg_failed = yes; then | 154 | if test $pkg_failed = yes; then |
122 | AC_MSG_RESULT([no]) | 155 | AC_MSG_RESULT([no]) |
123 | _PKG_SHORT_ERRORS_SUPPORTED | 156 | _PKG_SHORT_ERRORS_SUPPORTED |
124 | if test $_pkg_short_errors_supported = yes; then | 157 | if test $_pkg_short_errors_supported = yes; then |
125 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` | 158 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` |
126 | else | 159 | else |
127 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` | 160 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` |
128 | fi | 161 | fi |
129 | # Put the nasty error message in config.log where it belongs | 162 | # Put the nasty error message in config.log where it belongs |
@@ -140,7 +173,7 @@ installed software in a non-standard prefix. | |||
140 | _PKG_TEXT])[]dnl | 173 | _PKG_TEXT])[]dnl |
141 | ]) | 174 | ]) |
142 | elif test $pkg_failed = untried; then | 175 | elif test $pkg_failed = untried; then |
143 | AC_MSG_RESULT([no]) | 176 | AC_MSG_RESULT([no]) |
144 | m4_default([$4], [AC_MSG_FAILURE( | 177 | m4_default([$4], [AC_MSG_FAILURE( |
145 | [The pkg-config script could not be found or is too old. Make sure it | 178 | [The pkg-config script could not be found or is too old. Make sure it |
146 | is in your PATH or set the PKG_CONFIG environment variable to the full | 179 | is in your PATH or set the PKG_CONFIG environment variable to the full |
@@ -156,16 +189,40 @@ else | |||
156 | AC_MSG_RESULT([yes]) | 189 | AC_MSG_RESULT([yes]) |
157 | $3 | 190 | $3 |
158 | fi[]dnl | 191 | fi[]dnl |
159 | ])# PKG_CHECK_MODULES | 192 | ])dnl PKG_CHECK_MODULES |
193 | |||
194 | |||
195 | dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], | ||
196 | dnl [ACTION-IF-NOT-FOUND]) | ||
197 | dnl --------------------------------------------------------------------- | ||
198 | dnl Since: 0.29 | ||
199 | dnl | ||
200 | dnl Checks for existence of MODULES and gathers its build flags with | ||
201 | dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags | ||
202 | dnl and VARIABLE-PREFIX_LIBS from --libs. | ||
203 | dnl | ||
204 | dnl Note that if there is a possibility the first call to | ||
205 | dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to | ||
206 | dnl include an explicit call to PKG_PROG_PKG_CONFIG in your | ||
207 | dnl configure.ac. | ||
208 | AC_DEFUN([PKG_CHECK_MODULES_STATIC], | ||
209 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | ||
210 | _save_PKG_CONFIG=$PKG_CONFIG | ||
211 | PKG_CONFIG="$PKG_CONFIG --static" | ||
212 | PKG_CHECK_MODULES($@) | ||
213 | PKG_CONFIG=$_save_PKG_CONFIG[]dnl | ||
214 | ])dnl PKG_CHECK_MODULES_STATIC | ||
160 | 215 | ||
161 | 216 | ||
162 | # PKG_INSTALLDIR(DIRECTORY) | 217 | dnl PKG_INSTALLDIR([DIRECTORY]) |
163 | # ------------------------- | 218 | dnl ------------------------- |
164 | # Substitutes the variable pkgconfigdir as the location where a module | 219 | dnl Since: 0.27 |
165 | # should install pkg-config .pc files. By default the directory is | 220 | dnl |
166 | # $libdir/pkgconfig, but the default can be changed by passing | 221 | dnl Substitutes the variable pkgconfigdir as the location where a module |
167 | # DIRECTORY. The user can override through the --with-pkgconfigdir | 222 | dnl should install pkg-config .pc files. By default the directory is |
168 | # parameter. | 223 | dnl $libdir/pkgconfig, but the default can be changed by passing |
224 | dnl DIRECTORY. The user can override through the --with-pkgconfigdir | ||
225 | dnl parameter. | ||
169 | AC_DEFUN([PKG_INSTALLDIR], | 226 | AC_DEFUN([PKG_INSTALLDIR], |
170 | [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) | 227 | [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) |
171 | m4_pushdef([pkg_description], | 228 | m4_pushdef([pkg_description], |
@@ -176,16 +233,18 @@ AC_ARG_WITH([pkgconfigdir], | |||
176 | AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) | 233 | AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) |
177 | m4_popdef([pkg_default]) | 234 | m4_popdef([pkg_default]) |
178 | m4_popdef([pkg_description]) | 235 | m4_popdef([pkg_description]) |
179 | ]) dnl PKG_INSTALLDIR | 236 | ])dnl PKG_INSTALLDIR |
180 | 237 | ||
181 | 238 | ||
182 | # PKG_NOARCH_INSTALLDIR(DIRECTORY) | 239 | dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) |
183 | # ------------------------- | 240 | dnl -------------------------------- |
184 | # Substitutes the variable noarch_pkgconfigdir as the location where a | 241 | dnl Since: 0.27 |
185 | # module should install arch-independent pkg-config .pc files. By | 242 | dnl |
186 | # default the directory is $datadir/pkgconfig, but the default can be | 243 | dnl Substitutes the variable noarch_pkgconfigdir as the location where a |
187 | # changed by passing DIRECTORY. The user can override through the | 244 | dnl module should install arch-independent pkg-config .pc files. By |
188 | # --with-noarch-pkgconfigdir parameter. | 245 | dnl default the directory is $datadir/pkgconfig, but the default can be |
246 | dnl changed by passing DIRECTORY. The user can override through the | ||
247 | dnl --with-noarch-pkgconfigdir parameter. | ||
189 | AC_DEFUN([PKG_NOARCH_INSTALLDIR], | 248 | AC_DEFUN([PKG_NOARCH_INSTALLDIR], |
190 | [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) | 249 | [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) |
191 | m4_pushdef([pkg_description], | 250 | m4_pushdef([pkg_description], |
@@ -196,13 +255,15 @@ AC_ARG_WITH([noarch-pkgconfigdir], | |||
196 | AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) | 255 | AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) |
197 | m4_popdef([pkg_default]) | 256 | m4_popdef([pkg_default]) |
198 | m4_popdef([pkg_description]) | 257 | m4_popdef([pkg_description]) |
199 | ]) dnl PKG_NOARCH_INSTALLDIR | 258 | ])dnl PKG_NOARCH_INSTALLDIR |
200 | 259 | ||
201 | 260 | ||
202 | # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, | 261 | dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, |
203 | # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) | 262 | dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
204 | # ------------------------------------------- | 263 | dnl ------------------------------------------- |
205 | # Retrieves the value of the pkg-config variable for the given module. | 264 | dnl Since: 0.28 |
265 | dnl | ||
266 | dnl Retrieves the value of the pkg-config variable for the given module. | ||
206 | AC_DEFUN([PKG_CHECK_VAR], | 267 | AC_DEFUN([PKG_CHECK_VAR], |
207 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl | 268 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
208 | AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl | 269 | AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl |
@@ -211,4 +272,4 @@ _PKG_CONFIG([$1], [variable="][$3]["], [$2]) | |||
211 | AS_VAR_COPY([$1], [pkg_cv_][$1]) | 272 | AS_VAR_COPY([$1], [pkg_cv_][$1]) |
212 | 273 | ||
213 | AS_VAR_IF([$1], [""], [$5], [$4])dnl | 274 | AS_VAR_IF([$1], [""], [$5], [$4])dnl |
214 | ])# PKG_CHECK_VAR | 275 | ])dnl PKG_CHECK_VAR |