summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2024-01-29 10:45:41 +0100
committerGravatar Nikias Bassen2024-01-29 10:45:41 +0100
commit3daee6097cfa14c597e5104b02acfe83749001d9 (patch)
treef810f63085b5f7270df1ca0fcab68d7479729957 /configure.ac
parentb3cf5bec39de69bf06c7813689f03cbe58f45ca9 (diff)
downloadlibplist-3daee6097cfa14c597e5104b02acfe83749001d9.tar.gz
libplist-3daee6097cfa14c597e5104b02acfe83749001d9.tar.bz2
Fix PLIST_API definitions
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c6cb4bc..bf1131d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -174,7 +174,7 @@ else
fi
AM_CONDITIONAL([HAVE_CYTHON],[test "x$cython_python_bindings" = "xyes"])
-AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing -fvisibility=hidden $PTHREAD_CFLAGS")
+AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -Wno-strict-aliasing $PTHREAD_CFLAGS")
GLOBAL_LDFLAGS="$PTHREAD_LIBS"
AC_ARG_ENABLE(debug,
@@ -192,7 +192,17 @@ if (test "x$debug" = "xyes"); then
GLOBAL_CFLAGS+=" -g"
fi
+if test "x$enable_static" = "xyes" -a "x$enable_shared" = "xno"; then
+ GLOBAL_CFLAGS+=" -DLIBPLIST_STATIC"
+fi
+
+GLOBAL_CXXFLAGS=$GLOBAL_CFLAGS
+AS_COMPILER_FLAG([-fvisibility=hidden], [
+ GLOBAL_CFLAGS+=" -fvisibility=hidden"
+], [])
+
AC_SUBST(GLOBAL_CFLAGS)
+AC_SUBST(GLOBAL_CXXFLAGS)
AC_SUBST(GLOBAL_LDFLAGS)
case "$GLOBAL_CFLAGS" in