diff options
author | Nikias Bassen | 2017-07-04 03:33:11 +0200 |
---|---|---|
committer | Nikias Bassen | 2017-07-04 03:33:11 +0200 |
commit | b7e78e276b2a72527b2fe6bf584707682681bcdd (patch) | |
tree | 84a9467917063a27c61ab60fbc98fe453b7dd3c5 /configure.ac | |
parent | 6d7418a8cc3a5da6ed558152d201686742ab6fcc (diff) | |
download | libideviceactivation-b7e78e276b2a72527b2fe6bf584707682681bcdd.tar.gz libideviceactivation-b7e78e276b2a72527b2fe6bf584707682681bcdd.tar.bz2 |
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.
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 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) |