diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2020-12-05 11:27:18 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2020-12-05 11:28:32 +0100 |
commit | 6371ef9861b734377c661840221f78632043f0b2 (patch) | |
tree | 1a5ea685e9f155f5a1a77976b550a0ca8d20bdd6 /configure.ac | |
parent | 6206a637af898db0c852ef56e5b59ff791c658af (diff) | |
download | libgphoto2-6371ef9861b734377c661840221f78632043f0b2.tar.gz |
check for -lws2_32 to enable winsock support for ptpip on windows
complements https://github.com/gphoto/libgphoto2/pull/596
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index fbca11d1c..a10209b4a 100644 --- a/configure.ac +++ b/configure.ac @@ -319,6 +319,24 @@ AS_IF([test "x$with_jpeg" != "xno"], [ GP_CONFIG_MSG([JPEG mangling support],[${libjpeg_msg}]) dnl --------------------------------------------------------------------------- +dnl check for ws2_32 +dnl --------------------------------------------------------------------------- +LIBWS232="" +libws232_msg="no" +AC_SUBST(LIBWS232) +AC_ARG_WITH([ws232], AS_HELP_STRING([--without-ws232], [Build without ws2_32 library (default: no)])) +AS_IF([test "x$with_jpeg" != "xno"], [ + AC_CHECK_LIB(ws2_32,WSAStartup,[ + AC_CHECK_HEADER(winsock.h,[ + AC_DEFINE(HAVE_LIBWS232,1,[define if we found LIBWS232 and its headers]) + LIBWS232="-lws2_32" + libws232_msg="yes" + ]) + ]) +]) +GP_CONFIG_MSG([Winsocket support (for PTP/IP)],[${libws232_msg}]) + +dnl --------------------------------------------------------------------------- dnl check for libxml2 dnl --------------------------------------------------------------------------- GP_CHECK_LIBRARY([LIBXML2],[libxml-2.0],[>= 2.0], |