summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTony Garnock-Jones <tonygarnockjones@gmail.com>2010-06-27 19:43:44 +1200
committerTony Garnock-Jones <tonygarnockjones@gmail.com>2010-06-27 19:43:44 +1200
commitc4e367b151fc4058b316554475d5704ba26f05c1 (patch)
treedab47123ce5e1ae8fdee8960bbb1591f2fa987bb /configure.ac
parentfafa16b15f7d4d9a8ae6d982fabd9371579d0b0f (diff)
parent5e48c730f768e40663af19e01b143d95d1e11fef (diff)
downloadrabbitmq-c-github-ask-c4e367b151fc4058b316554475d5704ba26f05c1.tar.gz
Merge default into bug22825
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 28 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index c3f1bb7..7217440 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,6 +9,7 @@ AC_GNU_SOURCE
AC_PROG_CC
dnl Library checks
+AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
dnl Header-file checks
@@ -21,6 +22,26 @@ if test "x$GCC" = "xyes"; then
fi
fi
+dnl Detect the kind of host we're building for
+AC_CANONICAL_HOST
+windows=no
+case "${host}" in
+*-*-mingw*)
+ windows=yes
+ ;;
+esac
+AM_CONDITIONAL(WINDOWS, test "x$windows" = xyes)
+AS_IF([test "x$windows" = xyes],
+ [AC_DEFINE([WINDOWS], [1], [Define to 1 if on Windows.])]
+)
+
+dnl Decide which API abstraction layer to use
+PLATFORM_DIR=unix
+if test "x$windows" = xyes ; then
+ PLATFORM_DIR=windows
+fi
+AC_SUBST(PLATFORM_DIR)
+
dnl Enable -m64 if we were asked to do so
AC_ARG_ENABLE(64-bit,
[ --enable-64-bit produce 64-bit library],
@@ -55,7 +76,8 @@ checkPython() {
return
fi
PYTHON=$1
- if $PYTHON -c 'import simplejson' 2>/dev/null
+ if $PYTHON -c 'import json' 2>/dev/null \
+ || $PYTHON -c 'import simplejson' 2>/dev/null
then
found_python=yes
AC_MSG_RESULT($PYTHON)
@@ -74,8 +96,12 @@ AC_SUBST(AMQP_SPEC_JSON_PATH)
AC_SUBST(AMQP_EXTENSIONS_JSON_PATH)
AC_SUBST(PYTHON)
-# Check for libpopt, which we need to build the tools
+dnl Decide which extra win32 libs we need
+EXTRA_LIBS=
+AS_IF([test "x$windows" = xyes], [EXTRA_LIBS="-lws2_32 $EXTRA_LIBS"])
+AC_SUBST(EXTRA_LIBS)
+dnl Check for libpopt, which we need to build the tools
AC_ARG_WITH([popt],
[AS_HELP_STRING([--with-popt], [use the popt library. Needed for tools.])],
[],