From 0a333110f7c7228a2e2d4f57814979392df192c3 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Fri, 26 Nov 2010 16:28:12 -0500 Subject: Build on Windows using mingw32. --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b60fbfb..2543ae3 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,18 @@ AC_PROG_RANLIB dnl Checks for header files. AC_HEADER_STDC +case $host in + *-*-mingw*) + have_win32=true + PTHREAD_FLAGS="" + ;; + *) + have_win32=false + PTHREAD_FLAGS="-pthread" + ;; +esac + + AC_CHECK_LIB(jansson, json_loads, request_jansson=false, request_jansson=true) AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIBS=-lpthread) @@ -35,6 +47,7 @@ LIBCURL_CHECK_CONFIG(, 7.10.1, , [AC_MSG_ERROR([Missing required libcurl >= 7.10.1])]) AC_SUBST(JANSSON_LIBS) +AC_SUBST(PTHREAD_FLAGS) AC_SUBST(PTHREAD_LIBS) AC_CONFIG_FILES([ -- cgit v1.2.3-18-g5258