Have configure check for fluxcomp in PATH, or actually have it check
for fluxcomp with a prefix of the host type, falling back to fluxcomp
without a prefix.

If fluxcomp is not available, check if the files that fluxcomp would
generate are available. If they are missing (most probably because
people are compiling from git and not from a tarball), then bail out
with an error.
---
 configure.in         |   13 +++++++++++++
 rules/flux_comp.make |    2 +-
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/configure.in b/configure.in
index be28e00..59c860a 100644
--- a/configure.in
+++ b/configure.in
@@ -111,6 +111,19 @@ AC_PATH_PROG(MAN2HTML, man2html, no)
 AC_SUBST(MAN2HTML)
 AM_CONDITIONAL(HAVE_MAN2HTML, test "$MAN2HTML" != "no")
 
+AC_PATH_TOOL(FLUXCOMP, fluxcomp)
+AC_SUBST(FLUXCOMP)
+if test -z "$FLUXCOMP"; then
+   if ! test -e src/core/CoreDFB.cpp; then
+      AC_MSG_ERROR([
+*** DirectFB compilation requires fluxcomp ***
+
+Unless you are compiling from a distributed tarball you need fluxcomp
+available from git://git.directfb.org/git/directfb/core/flux installed
+in your PATH.
+])
+   fi
+fi
 
 dnl Test for OSX
 AC_ARG_ENABLE(osx,
diff --git a/rules/flux_comp.make b/rules/flux_comp.make
index 9282a90..20fd678 100644
--- a/rules/flux_comp.make
+++ b/rules/flux_comp.make
@@ -1,2 +1,2 @@
 $(builddir)/%.cpp $(builddir)/%.h: $(srcdir)/%.flux
-       fluxcomp --include-prefix=core $<
+       $(FLUXCOMP) --include-prefix=core $<
-- 
1.7.4.1

_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to