From b7e78e276b2a72527b2fe6bf584707682681bcdd Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 4 Jul 2017 03:33:11 +0200 Subject: Make sure to only globally init/deinit libcurl upon library load/unload Up until now libcurl was initialized/deinitialized every time a request was sent. However curl_global_cleanup() also affects other libraries' code so that e.g. OpenSSL-related functions could fail. --- configure.ac | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c0c722f..938e8a7 100644 --- a/configure.ac +++ b/configure.ac @@ -56,6 +56,24 @@ AC_TYPE_UINT8_T # Checks for library functions. AC_CHECK_FUNCS([strcasecmp strdup strerror strndup]) +# Check for operating system +AC_MSG_CHECKING([wether we need platform-specific build settings for ${host_os}]) +case ${host_os} in + *mingw32*|*cygwin*) + AC_MSG_RESULT([yes]) + win32=true + ;; + darwin*|*android*) + AC_MSG_RESULT([no]) + ;; + *) + AC_MSG_RESULT([yes]) + AX_PTHREAD([], [AC_MSG_ERROR([pthread is required to build ${PACKAGE}])]) + AC_CHECK_LIB(pthread, [pthread_once], [], [AC_MSG_ERROR([pthread with pthread_once required to build ${PACKAGE}])]) + ;; +esac +AM_CONDITIONAL(WIN32, test x$win32 = xtrue) + AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fsigned-char -fvisibility=hidden") AC_SUBST(GLOBAL_CFLAGS) -- cgit v1.1-32-gdbae