diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 9939973..5e22cca 100644 --- a/configure.ac +++ b/configure.ac @@ -20,9 +20,16 @@ if test "x$GCC" = "xyes"; then fi fi -sibling_codegen_dir=$(pwd)/../rabbitmq-codegen -AMQP_CODEGEN_DIR=$(test -d $sibling_codegen_dir && echo $sibling_codegen_dir || echo codegen) -AMQP_SPEC_JSON_PATH=$AMQP_CODEGEN_DIR/amqp-0.8.json +AC_MSG_CHECKING(location of AMQP codegen directory) +sibling_codegen_dir="$ac_abs_confdir/../rabbitmq-codegen" +AMQP_CODEGEN_DIR=$(test -d "$sibling_codegen_dir" && echo "$sibling_codegen_dir" || echo "$ac_abs_confdir/codegen") +AMQP_SPEC_JSON_PATH="$AMQP_CODEGEN_DIR/amqp-0.8.json" +if test -f "$AMQP_SPEC_JSON_PATH" +then + AC_MSG_RESULT($AMQP_CODEGEN_DIR) +else + AC_MSG_ERROR(could not find AMQP spec file at "'$AMQP_SPEC_JSON_PATH'") +fi AC_SUBST(AMQP_CODEGEN_DIR) AC_SUBST(AMQP_SPEC_JSON_PATH) |