summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMichael Steinert <mike.steinert@gmail.com>2012-05-24 12:37:40 -0600
committerMichael Steinert <mike.steinert@gmail.com>2012-05-24 12:37:40 -0600
commite567f9eb8918d35db4ebc78e9a512d3e838afe00 (patch)
tree905ce64fbee48f720b553cda46cee272ea064b17 /configure.ac
parent9781a774a6ff89b79bd07df672edd4423556f75d (diff)
downloadrabbitmq-c-github-ask-e567f9eb8918d35db4ebc78e9a512d3e838afe00.tar.gz
Add preprocessor definitions for Win32 static build
1. Define AMQP_BUILD for all Win32 builds. 2. Define AMQP_STATIC for all static Win32 builds. 3. Error out if both static & shared libraries are enabled for a Win32 build since they require different flags. Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index b18de82..211858e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,9 +68,15 @@ AM_CONDITIONAL([OS_WIN32], [test "x$os_win32" = xyes])
# Extra Win32 setup
AS_IF([test "x$os_win32" = xyes],
[AC_DEFINE([OS_WIN32], [1], [Define to 1 for Win32.])
+ AC_DEFINE([AMQP_BUILD], [1], [Define to 1 for a Win32 build.])
AS_IF([test "x$GCC" = xyes],
[AX_LDFLAGS([-lws2_32])],
- [AX_LDFLAGS([ws2_32.lib])])])
+ [AX_LDFLAGS([ws2_32.lib])])
+ AS_IF([test "x$enable_static" = "xyes"],
+ [AS_IF([test "x$enable_shared" = "xyes"],
+ [AC_MSG_ERROR([select one of shared @<:@--enable-shared@:>@ or static @<:@--enable-static@:>@.])],
+ [AC_DEFINE([AMQP_STATIC], [1],
+ [Define to 1 for a static Win32 build.])])])])
# 64-bit option
AC_ARG_ENABLE([64-bit],