summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac29
1 files changed, 18 insertions, 11 deletions
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