if test "x$enable_orc" != "xno" ; then
PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [
AC_DEFINE(HAVE_ORC, 1, [Use Orc])
+ 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)
- HAVE_ORC=yes
- HAVE_ORCC=yes
- if test "x$cross_compiling" = "xyes" ; then
- HAVE_ORCC=no
- fi
+ 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])