1 dnl pkg-config-based checks for Orc
4 dnl ORC_CHECK([REQUIRED_VERSION])
8 ORC_REQ=ifelse([$1], , "0.4.6", [$1])
11 AC_HELP_STRING([--enable-orc],[use Orc if installed]),
12 [case "${enableval}" in
13 auto) enable_orc=auto ;;
14 yes) enable_orc=yes ;;
16 *) AC_MSG_ERROR(bad value ${enableval} for --enable-orc) ;;
19 [enable_orc=auto]) dnl Default value
21 if test "x$enable_orc" != "xno" ; then
22 PKG_CHECK_MODULES(ORC, orc-0.4 >= $ORC_REQ, [
23 AC_DEFINE(HAVE_ORC, 1, [Use Orc])
24 if test "x$ORCC" = "x" ; then
25 ORCC=`$PKG_CONFIG --variable=orcc orc-0.4`
28 ORCC_FLAGS="--compat $ORC_REQ"
32 if test "x$cross_compiling" = "xyes" ; then
36 if test "x$enable_orc" = "xyes" ; then
37 AC_MSG_ERROR([--enable-orc specified, but Orc >= $ORC_REQ not found])
39 AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
44 AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
48 AM_CONDITIONAL(HAVE_ORC, [test "x$HAVE_ORC" = "xyes"])
49 AM_CONDITIONAL(HAVE_ORCC, [test "x$HAVE_ORCC" = "xyes"])
53 AC_DEFUN([ORC_OUTPUT],
55 if test "$HAVE_ORC" = yes ; then
56 printf "configure: *** Orc acceleration enabled.\n"
58 if test "x$enable_orc" = "xno" ; then
59 printf "configure: *** Orc acceleration disabled by --disable-orc. Slower code paths\n"
60 printf " will be used.\n"
62 printf "configure: *** Orc acceleration disabled. Requires Orc >= $ORC_REQ, which was\n"
63 printf " not found. Slower code paths will be used.\n"