summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2020-02-18 16:01:41 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2020-02-18 16:01:41 +0900
commita6ab8e3a710b899ecfb2ff518725314a1e0e64ff (patch)
tree44598055c1f1604e662677e445b581dc7f748555 /configure.ac
parentd72c1ddfde09ffa69745ec2439c5a16d15e2202f (diff)
downloadlibgpg-error-a6ab8e3a710b899ecfb2ff518725314a1e0e64ff.tar.gz
w32: Support static link with -lws2_32.
* configure.ac (GPG_ERROR_CONFIG_LIBS_PRIVATE): New. * src/Makefile.am (socklibs): Use GPG_ERROR_CONFIG_LIBS_PRIVATE. * src/gpg-error.pc.in: Require @GPG_ERROR_CONFIG_LIBS_PRIVATE@. -- GnuPG-bug-id: 4623 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7ca8be0..a92143c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -458,6 +458,7 @@ AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
# Windows has always thread support; thus we don't bother to test for
# it as it may lead to false results when cross building.
if test "$have_w32_system" = yes; then
+ GPG_ERROR_CONFIG_LIBS_PRIVATE=-lws2_32
AC_DEFINE([USE_WINDOWS_THREADS], [1])
LIBTHREAD=
LTLIBTHREAD=
@@ -469,6 +470,7 @@ if test "$have_w32_system" = yes; then
AC_SUBST([LIBMULTITHREAD])
AC_SUBST([LTLIBMULTITHREAD])
else
+ GPG_ERROR_CONFIG_LIBS_PRIVATE=""
gl_LOCK
if test "$gl_threads_api" = posix; then
AC_CHECK_SIZEOF(pthread_mutex_t,,[AC_INCLUDES_DEFAULT
@@ -574,6 +576,7 @@ AC_SUBST(GPG_ERROR_CONFIG_LIBS)
AC_SUBST(GPG_ERROR_CONFIG_CFLAGS)
AC_SUBST(GPG_ERROR_CONFIG_MT_LIBS)
AC_SUBST(GPG_ERROR_CONFIG_MT_CFLAGS)
+AC_SUBST(GPG_ERROR_CONFIG_LIBS_PRIVATE)
AC_SUBST(GPG_ERROR_CONFIG_HOST)