diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-05-13 09:29:02 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-05-13 09:29:02 +0200 |
commit | 6ef94cf448e11a51c4b24d7347351047c39e3afe (patch) | |
tree | 20a994a998c5bd54bf99b067500ce380fc0fe7ce /configure.ac | |
parent | 8588d6da95f73f04f49013ec54654975ffab9f7b (diff) | |
download | libmicrohttpd-6ef94cf448e11a51c4b24d7347351047c39e3afe.tar.gz libmicrohttpd-6ef94cf448e11a51c4b24d7347351047c39e3afe.zip |
use AS_CASE/AS_IF
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index e61b28e1..9113301e 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -318,15 +318,12 @@ AS_CASE(["$host_os"], | |||
318 | AC_CHECK_HEADERS([winsock2.h ws2tcpip.h], [], [AC_MSG_ERROR([[Winsock2 headers are required for W32]])], [AC_INCLUDES_DEFAULT]) | 318 | AC_CHECK_HEADERS([winsock2.h ws2tcpip.h], [], [AC_MSG_ERROR([[Winsock2 headers are required for W32]])], [AC_INCLUDES_DEFAULT]) |
319 | AC_CACHE_CHECK([for MS lib utility], [ac_cv_use_ms_lib_tool], | 319 | AC_CACHE_CHECK([for MS lib utility], [ac_cv_use_ms_lib_tool], |
320 | [[mslibcheck=`lib 2>&1` | 320 | [[mslibcheck=`lib 2>&1` |
321 | if [[ $mslibcheck = "Microsoft (R) Library Manager"* ]]; then | 321 | AS_IF([$mslibcheck = "Microsoft (R) Library Manager"*], |
322 | ac_cv_use_ms_lib_tool=yes | 322 | [ac_cv_use_ms_lib_tool=yes], |
323 | else | 323 | [ac_cv_use_ms_lib_tool=no]) |
324 | ac_cv_use_ms_lib_tool=no | ||
325 | fi | ||
326 | ]]) | 324 | ]]) |
327 | if test "x$ac_cv_use_ms_lib_tool" = "xyes"; then | 325 | AS_IF([test "x$ac_cv_use_ms_lib_tool" = "xyes"], |
328 | AC_SUBST([MS_LIB_TOOL], [[lib]]) | 326 | [AC_SUBST([MS_LIB_TOOL], [[lib]])]) |
329 | fi | ||
330 | AC_SUBST([lt_cv_objdir]) | 327 | AC_SUBST([lt_cv_objdir]) |
331 | os_is_windows=yes | 328 | os_is_windows=yes |
332 | os_is_native_w32=yes | 329 | os_is_native_w32=yes |
@@ -1187,22 +1184,20 @@ have_inet6=no | |||
1187 | AC_MSG_RESULT($have_inet6) | 1184 | AC_MSG_RESULT($have_inet6) |
1188 | 1185 | ||
1189 | HIDDEN_VISIBILITY_CFLAGS="" | 1186 | HIDDEN_VISIBILITY_CFLAGS="" |
1190 | case "$host" in | 1187 | AS_CASE(["$host"], |
1191 | *-*-mingw*) | 1188 | [*-*-mingw*],[ |
1192 | dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport) | 1189 | dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport) |
1193 | AC_DEFINE([_MHD_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern], | 1190 | AC_DEFINE([_MHD_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern], |
1194 | [defines how to decorate public symbols while building]) | 1191 | [defines how to decorate public symbols while building]) |
1195 | HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden" | 1192 | HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden" |
1196 | ;; | 1193 | ],[ |
1197 | *) | ||
1198 | dnl on other compilers, check if we can do -fvisibility=hidden | 1194 | dnl on other compilers, check if we can do -fvisibility=hidden |
1199 | AX_CHECK_LINK_FLAG([-fvisibility=hidden], | 1195 | AX_CHECK_LINK_FLAG([-fvisibility=hidden], |
1200 | [AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], | 1196 | [AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], |
1201 | [AC_DEFINE([_MHD_EXTERN], [__attribute__((visibility("default"))) extern], | 1197 | [AC_DEFINE([_MHD_EXTERN], [__attribute__((visibility("default"))) extern], |
1202 | [defines how to decorate public symbols while building]) | 1198 | [defines how to decorate public symbols while building]) |
1203 | HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"])]) | 1199 | HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"])]) |
1204 | ;; | 1200 | ]) |
1205 | esac | ||
1206 | AC_SUBST(HIDDEN_VISIBILITY_CFLAGS) | 1201 | AC_SUBST(HIDDEN_VISIBILITY_CFLAGS) |
1207 | 1202 | ||
1208 | # libcurl (required for testing) | 1203 | # libcurl (required for testing) |
@@ -1213,9 +1208,8 @@ curl=0 | |||
1213 | AS_IF([test "$enable_curl" != "no"], | 1208 | AS_IF([test "$enable_curl" != "no"], |
1214 | [LIBCURL_CHECK_CONFIG([yes],[7.16.4],[enable_curl=yes], | 1209 | [LIBCURL_CHECK_CONFIG([yes],[7.16.4],[enable_curl=yes], |
1215 | [ | 1210 | [ |
1216 | if test "x$enable_curl" = "xyes"; then | 1211 | AS_IF([test "x$enable_curl" = "xyes"], |
1217 | AC_MSG_WARN([[cURL-based tests cannot be enabled because libcurl is missing]]) | 1212 | [AC_MSG_WARN([[cURL-based tests cannot be enabled because libcurl is missing]])]) |
1218 | fi | ||
1219 | enable_curl=no | 1213 | enable_curl=no |
1220 | ]) | 1214 | ]) |
1221 | ]) | 1215 | ]) |