summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2011-06-23 22:21:06 +0200
committerColin Guthrie <colin@mageia.org>2011-06-24 10:08:11 +0100
commitf04331fa152995330d623de14d59771084c688e3 (patch)
tree20dc07a9b0b1de8ee0eb5583b1d892e18897fa83 /m4
parentebf93404b6c453ef27f4d35b04f1e08ba90732df (diff)
build-sys: Update orc.m4 to latest upstream version
ORCC is now correctly set to orcc on build system instead of host for cross-compiling
Diffstat (limited to 'm4')
-rw-r--r--m4/orc.m421
1 files changed, 17 insertions, 4 deletions
diff --git a/m4/orc.m4 b/m4/orc.m4
index 92bf21e9..983d4624 100644
--- a/m4/orc.m4
+++ b/m4/orc.m4
@@ -5,7 +5,7 @@ dnl ORC_CHECK([REQUIRED_VERSION])
AC_DEFUN([ORC_CHECK],
[
- ORC_REQ=ifelse([$1], , "0.4.5", [$1])
+ ORC_REQ=ifelse([$1], , "0.4.6", [$1])
AC_ARG_ENABLE(orc,
AC_HELP_STRING([--enable-orc],[use Orc if installed]),
@@ -21,21 +21,34 @@ AC_DEFUN([ORC_CHECK],
if test "x$enable_orc" != "xno" ; then
PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [
AC_DEFINE(HAVE_ORC, 1, [Use Orc])
- ORCC=`$PKG_CONFIG --variable=orcc orc-0.4`
- AC_SUBST(ORCC)
HAVE_ORC=yes
+ if test "x$ORCC" = "x" ; then
+ AC_MSG_CHECKING(for usable orcc)
+ ORCC=`$PKG_CONFIG --variable=orcc orc-0.4`
+ dnl check whether the orcc found by pkg-config can be run from the build environment
+ dnl if this is not the case (e.g. when cross-compiling) fall back to orcc from PATH
+ AS_IF([$ORCC --version 1> /dev/null 2> /dev/null], [], [ORCC=`which orcc`])
+ AC_MSG_RESULT($ORCC)
+ fi
+ AC_SUBST(ORCC)
+ ORCC_FLAGS="--compat $ORC_REQ"
+ AC_SUBST(ORCC_FLAGS)
+ AS_IF([test "x$ORCC" = "x"], [HAVE_ORCC=no], [HAVE_ORCC=yes])
], [
if test "x$enable_orc" = "xyes" ; then
AC_MSG_ERROR([--enable-orc specified, but Orc >= $ORC_REQ not found])
fi
AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
HAVE_ORC=no
+ HAVE_ORCC=no
])
else
AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
HAVE_ORC=no
+ HAVE_ORCC=no
fi
- AM_CONDITIONAL(HAVE_ORC, test "x$HAVE_ORC" = "xyes")
+ AM_CONDITIONAL(HAVE_ORC, [test "x$HAVE_ORC" = "xyes"])
+ AM_CONDITIONAL(HAVE_ORCC, [test "x$HAVE_ORCC" = "xyes"])
]))