diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-05-13 07:31:15 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-05-13 07:31:15 +0200 |
commit | 44ed20e1ac3c3431d8d39fc5e29f35b6bceba10a (patch) | |
tree | 00ae2d266820aa6d1ed7086eef0ebe24479fb69c | |
parent | 7eeea6e113e135e986d951798fd6e9bd82fb0e79 (diff) | |
download | libextractor-44ed20e1ac3c3431d8d39fc5e29f35b6bceba10a.tar.gz libextractor-44ed20e1ac3c3431d8d39fc5e29f35b6bceba10a.zip |
use AS_CASE/AS_IF
-rw-r--r-- | configure.ac | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 53c802b..5a6ef25 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -231,22 +231,20 @@ AC_ARG_ENABLE(linker-hardening, | |||
231 | 231 | ||
232 | # Support for hiding non-public symbols | 232 | # Support for hiding non-public symbols |
233 | HIDDEN_VISIBILITY_CFLAGS="" | 233 | HIDDEN_VISIBILITY_CFLAGS="" |
234 | case "$host" in | 234 | AS_CASE(["$host"], |
235 | *-*-mingw*) | 235 | [*-*-mingw*],[ |
236 | dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport) | 236 | dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport) |
237 | AC_DEFINE([_EXTRACTOR_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern], | 237 | AC_DEFINE([_EXTRACTOR_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern], |
238 | [defines how to decorate public symbols while building]) | 238 | [defines how to decorate public symbols while building]) |
239 | HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden" | 239 | HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden" |
240 | ;; | 240 | ],[ |
241 | *) | ||
242 | dnl on other compilers, check if we can do -fvisibility=hidden | 241 | dnl on other compilers, check if we can do -fvisibility=hidden |
243 | AX_CHECK_LINK_FLAG([-fvisibility=hidden], | 242 | AX_CHECK_LINK_FLAG([-fvisibility=hidden], |
244 | [AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], | 243 | [AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], |
245 | [AC_DEFINE([_EXTRACTOR_EXTERN], [__attribute__((visibility("default"))) extern], | 244 | [AC_DEFINE([_EXTRACTOR_EXTERN], [__attribute__((visibility("default"))) extern], |
246 | [defines how to decorate public symbols while building]) | 245 | [defines how to decorate public symbols while building]) |
247 | HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"])]) | 246 | HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"])]) |
248 | ;; | 247 | ]) |
249 | esac | ||
250 | AC_SUBST(HIDDEN_VISIBILITY_CFLAGS) | 248 | AC_SUBST(HIDDEN_VISIBILITY_CFLAGS) |
251 | 249 | ||
252 | 250 | ||