orc: Allow cross-building without orcc
authorDavid Schleef <ds@schleef.org>
Fri, 8 Oct 2010 19:40:04 +0000 (12:40 -0700)
committerDavid Schleef <ds@schleef.org>
Fri, 8 Oct 2010 19:42:20 +0000 (12:42 -0700)
m4/orc.m4
orc.mak

index ad0916a..4c7324c 100644 (file)
--- a/m4/orc.m4
+++ b/m4/orc.m4
@@ -39,7 +39,8 @@ AC_DEFUN([ORC_CHECK],
     AC_DEFINE(DISABLE_ORC, 1, [Disable Orc])
     HAVE_ORC=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$cross_compiling" != xyes -a "x$HAVE_ORC" = "xyes"])
 
 ]))
 
diff --git a/orc.mak b/orc.mak
index 663cfc7..ce4be89 100644 (file)
--- a/orc.mak
+++ b/orc.mak
@@ -40,7 +40,7 @@ cp_v_gen = $(cp_v_gen_$(V))
 cp_v_gen_ = $(cp_v_gen_$(AM_DEFAULT_VERBOSITY))
 cp_v_gen_0 = @echo "  CP     $@";
 
-if HAVE_ORC
+if HAVE_ORCC
 tmp-orc.c: $(srcdir)/$(ORC_SOURCE).orc
        $(orcc_v_gen)$(ORCC) $(ORCC_FLAGS) --implementation --include glib.h -o tmp-orc.c $(srcdir)/$(ORC_SOURCE).orc