summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 27 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 0d60b72..658f387 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.59])
m4_define([major_version], [0])
m4_define([minor_version], [5])
-m4_define([micro_version], [0])
+m4_define([micro_version], [3])
# Follow all steps below in order to calculate new ABI version when updating the library
# NOTE: THIS IS UNRELATED to the actual project version
@@ -13,7 +13,7 @@ m4_define([micro_version], [0])
# 3. If any interfaces have been added since the last public release, then increment age.
# 4. If any interfaces have been removed since the last public release, then set age to 0.
m4_define([soversion_current], [3])
-m4_define([soversion_revision], [0])
+m4_define([soversion_revision], [3])
m4_define([soversion_age], [2])
AC_INIT([rabbitmq-c], [major_version.minor_version.micro_version],
@@ -61,13 +61,17 @@ AC_SUBST([LT_AGE])
# OS setup
os_unix=no
+os_apple=no
os_win32=no
AS_CASE([$host],
[*-*-mingw*],
[os_win32=yes],
+ [*-apple-darwin*],
+ [os_apple=yes; os_unix=yes],
[*],
[os_unix=yes])
AM_CONDITIONAL([OS_UNIX], [test "x$os_unix" = xyes])
+AM_CONDITIONAL([OS_APPLE], [test "x$os_apple" = xyes])
AM_CONDITIONAL([OS_WIN32], [test "x$os_win32" = xyes])
AC_DEFINE([ENABLE_THREAD_SAFETY], [1], [Define to 1 to enable thread safety])
@@ -99,7 +103,26 @@ AC_SEARCH_LIBS([socket], [socket], [],
[AC_MSG_ERROR([cannot find socket library (library with socket symbol)])],
[-lnsl])])
AC_SEARCH_LIBS([clock_gettime], [rt])
-AC_CHECK_FUNCS([htonll])
+AC_MSG_CHECKING([if htonll is defined])
+
+dnl # Check for htonll
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <arpa/inet.h>
+ ]],
+ [[
+ return htonll(0);
+ ]]
+ )],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_HTONLL, 1, [Define to 1 if the function (or macro) htonll exists.])
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ]
+)
# Configure SSL/TLS
AC_ARG_WITH([ssl],
@@ -165,6 +188,7 @@ AM_CONDITIONAL([EXAMPLES], [test "x$enable_examples" = "xyes"])
AC_SUBST([requires_private], [$ssl_pkg_required])
AC_SUBST([libs_private], [$LIBS])
+AC_DEFINE_UNQUOTED([AMQ_PLATFORM], ["$host_os"], [Host operating system string])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
librabbitmq.pc