From 640165088dcdfd6ac1587df09eaeecfffabdd5df Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 4 Feb 2019 03:23:20 +0100 Subject: build: Check for pthread properly (non-win32) --- configure.ac | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 6191c89..ea8ed08 100644 --- a/configure.ac +++ b/configure.ac @@ -46,18 +46,25 @@ PKG_CHECK_MODULES(zlib, zlib) GLOBAL_CFLAGS="" AC_LDADD="" AC_LDFLAGS="" -case "$host_os" in - darwin*) - ;; - linux*) - ;; - mingw*) - GLOBAL_CFLAGS+="-DWIN32 -D__LITTLE_ENDIAN__=1" - AC_LDFLAGS+="-static-libgcc" - ;; - *) - ;; +AC_MSG_CHECKING([whether we need platform-specific build settings]) +case ${host_os} in + *mingw32*|*cygwin*) + AC_MSG_RESULT([yes]) + AC_DEFINE(WINVER, 0x0501, [minimum Windows version]) + win32=true + GLOBAL_CFLAGS+="-DWIN32 -D__LITTLE_ENDIAN__=1" + AC_LDFLAGS+="-static-libgcc" + ;; + darwin*) + AC_MSG_RESULT([no]) + AX_PTHREAD([], [AC_MSG_ERROR([pthread is required to build $PACKAGE])]) + ;; + *) + AC_MSG_RESULT([yes]) + AX_PTHREAD([], [AC_MSG_ERROR([pthread is required to build $PACKAGE])]) + ;; esac +AM_CONDITIONAL(WIN32, test x$win32 = xtrue) AC_CHECK_FUNCS([strsep strcspn mkstemp]) if test x$ac_cv_func_strsep != xyes; then -- cgit v1.1-32-gdbae