Skip to content

Commit

Permalink
Force static linking for libraries when --enable-static-linking is sp…
Browse files Browse the repository at this point in the history
…ecified on Windows (MinGW/Cygwin) (#679)
  • Loading branch information
lsh123 authored Jun 25, 2023
1 parent 7d1dda2 commit 512442e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2350,6 +2350,9 @@ AC_MSG_CHECKING(for static linking)
AC_ARG_ENABLE([static_linking], [AS_HELP_STRING([--enable-static-linking],[enable static linking (no)])])
if test "z$enable_static_linking" = "zyes" -o "z$enable_static_linking" = "ztrue" ; then
XMLSEC_STATIC_BINARIES="-static"
if test "z$build_on_windows" = "zyes" ; then
XMLSEC_DEFINES="$XMLSEC_DEFINES -DXMLSEC_STATIC=1"
fi
XMLSEC_APP_DEFINES="$XMLSEC_APP_DEFINES -DXMLSEC_STATIC=1"
enable_crypto_dl="no"
AC_MSG_RESULT([yes])
Expand Down
4 changes: 2 additions & 2 deletions include/xmlsec/exports.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extern "C" {
# if !defined(XMLSEC_STATIC)
# define XMLSEC_EXPORT __declspec(dllimport)
# else
# define XMLSEC_EXPORT
# define XMLSEC_EXPORT extern
# endif
# endif /* defined(IN_XMLSEC) */
/* This holds on all other platforms/compilers, which are easier to
Expand All @@ -71,7 +71,7 @@ extern "C" {
# if !defined(XMLSEC_STATIC)
# define XMLSEC_CRYPTO_EXPORT __declspec(dllimport)
# else
# define XMLSEC_CRYPTO_EXPORT
# define XMLSEC_CRYPTO_EXPORT extern
# endif
# endif /* defined(IN_XMLSEC_CRYPTO) */
/* This holds on all other platforms/compilers, which are easier to
Expand Down

0 comments on commit 512442e

Please sign in to comment.