diff options
author | David Wragg <dpw@lshift.net> | 2010-05-30 23:31:40 +0100 |
---|---|---|
committer | David Wragg <dpw@lshift.net> | 2010-05-30 23:31:40 +0100 |
commit | 1c198e88d1a0c74676f8d6fade99b2531ba815b8 (patch) | |
tree | 133f008278e7badb652e94535ef29b58d383fea6 /configure.ac | |
parent | bf06e86975f474da30e9c74faff7a99b0734e00e (diff) | |
download | rabbitmq-c-github-ask-1c198e88d1a0c74676f8d6fade99b2531ba815b8.tar.gz |
A Windows port, using MinGW/MSYS
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 13d1b4b..f7cfb74 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], @@ -65,8 +86,12 @@ AC_SUBST(AMQP_CODEGEN_DIR) AC_SUBST(AMQP_SPEC_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.])], [], |