summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2013-01-16 02:04:00 -0500
committerAlan Antonuk <alan.antonuk@gmail.com>2013-01-16 02:04:00 -0500
commitd008bb0f322d188399441519aabf746d50ebd3b5 (patch)
treedbed66e91408ddae7958fb09fa2cba7adc774d0e /configure.ac
parent395834331c4f50445957603bd5158803056c3386 (diff)
downloadrabbitmq-c-github-ask-d008bb0f322d188399441519aabf746d50ebd3b5.tar.gz
Build without amqp_framing.py codegen
Changes to support building rabbitmq-c without having run the python code generator, or do a git submodule init/update. This is to facilitate creating links to downloadable source archives from github
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac34
1 files changed, 23 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 4ee6a2f..8423fcc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,21 +97,33 @@ AC_SEARCH_LIBS([socket], [socket], [],
[-lnsl])])
AC_CHECK_FUNCS([htonll])
-AM_PATH_PYTHON([2.4])
+AC_ARG_ENABLE([regen-amqp-framing],
+ [AS_HELP_STRING([--enable-regen-amqp-framing],
+ [Regenerate amqp_framing.h/amqp_framing.c (for developer use)])])
-AX_PYTHON_MODULE([json], [])
-AS_IF([test "x$HAVE_PYMOD_JSON" = "xno"],
- [AX_PYTHON_MODULE([simplejson])])
-AS_IF([test "x$HAVE_PYMOD_JSON" = "xno" && test "x$HAVE_PYMOD_SIMPLEJSON" = "xno"],
- [AC_MSG_ERROR([Unable to find json or simplejson python modules])])
+AM_CONDITIONAL([REGENERATE_AMQP_FRAMING], [test "x$enable_regen_amqp_framing" = "xyes"])
-AS_VERSION_COMPARE([$PYTHON_VERSION],[3.0],[eval HAVE_PYTHON3=no],[eval HAVE_PYTHON3=yes],[eval HAVE_PYTHON3=yes])
+AS_IF([test "x$enable_regen_amqp_framing" = "xyes"],
+ [AM_PATH_PYTHON([2.4],,AC_MSG_ERROR([--enable-regen-amqp-framing requires python]))
-AS_IF([test "x$HAVE_PYTHON3" = "xyes"],
- [AC_PATH_PROG(PYTHON2TO3,[2to3])
- AS_IF([test "x$PYTHON2TO3" = "x"],
- AC_MSG_ERROR([Unable to find 2to3 python utility]))])
+ AX_PYTHON_MODULE([json], [])
+ AS_IF([test "x$HAVE_PYMOD_JSON" = "xno"],
+ [AX_PYTHON_MODULE([simplejson])])
+ AS_IF([test "x$HAVE_PYMOD_JSON" = "xno" && test "x$HAVE_PYMOD_SIMPLEJSON" = "xno"],
+ [AC_MSG_ERROR([Unable to find json or simplejson python modules])])
+ AS_VERSION_COMPARE([$PYTHON_VERSION],[3.0],
+ [eval HAVE_PYTHON3=no],
+ [eval HAVE_PYTHON3=yes],
+ [eval HAVE_PYTHON3=yes])
+
+ AS_IF([test "x$HAVE_PYTHON3" = "xyes"],
+ [AC_PATH_PROG(PYTHON2TO3,[2to3])
+ AS_IF([test "x$PYTHON2TO3" = "x"],
+ AC_MSG_ERROR([Unable to find 2to3 python utility]))])
+
+ ],
+ [HAVE_PYTHON3=no])
AM_CONDITIONAL([PYTHON3], [test "x$HAVE_PYTHON3" = "xyes"])
# Configure AMQP command-line tools