From bd316f681059910962a9ba38c339517ac472ac38 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 4 Jun 2011 12:09:26 +0200 Subject: [PATCH] configure: Check for gengetopt. Print an error message at configure time if gengetopt is not installed. This patch also modifies the commands that call gengetopt in ggo/makefile to use the executable which was found by configure. --- Makefile.in | 2 ++ configure.ac | 6 ++++++ ggo/makefile | 8 ++++---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index 3f4e1651..58553d77 100644 --- a/Makefile.in +++ b/Makefile.in @@ -11,6 +11,8 @@ install_sh := @install_sh@ cmdline_dir := @cmdline_dir@ executables := @executables@ +GENGETOPT := @gengetopt@ + build_date := $(shell date) uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") uname_rs := $(shell uname -rs) diff --git a/configure.ac b/configure.ac index 89042812..fd2e073b 100644 --- a/configure.ac +++ b/configure.ac @@ -23,6 +23,12 @@ fi AC_C_BIGENDIAN() +AC_PATH_PROG([gengetopt], [gengetopt]) +test -z "$gengetopt" && AC_MSG_ERROR( + [gengetopt is required to build this package]) + + + AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL diff --git a/ggo/makefile b/ggo/makefile index d5a1d645..bcc172b2 100644 --- a/ggo/makefile +++ b/ggo/makefile @@ -4,7 +4,7 @@ $(cmdline_dir): $(cmdline_dir)/%_recv.cmdline.h $(cmdline_dir)/%_recv.cmdline.c: $(ggo_dir)/%_recv.ggo | $(cmdline_dir) @[ -z "$(Q)" ] || echo 'GGO $<' - $(Q) gengetopt $(module_ggo_opts) \ + $(Q) $(GENGETOPT) $(module_ggo_opts) \ --output-dir=$(cmdline_dir) \ --set-package=$(subst .ggo,,$(