]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
configure: Check for gengetopt.
authorAndre Noll <maan@systemlinux.org>
Sat, 4 Jun 2011 10:09:26 +0000 (12:09 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 30 Jul 2011 17:40:29 +0000 (19:40 +0200)
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
configure.ac
ggo/makefile

index 3f4e1651a5ffdd147d1f55d5665f4b0b35ef2a22..58553d77b0bab475d981613f583a23ee845b1ecd 100644 (file)
@@ -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)
index 8904281235c49caaef2211d008f399c80de19e26..fd2e073b6eb17c44751979743fcd90987f085f65 100644 (file)
@@ -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
index d5a1d645cd79db1b177e2f46cd67dbffe765cecf..bcc172b204855ca037a04bf4bfd9269f581eab69 100644 (file)
@@ -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,,$(<F)) \
                --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
@@ -13,7 +13,7 @@ $(cmdline_dir)/%_recv.cmdline.h $(cmdline_dir)/%_recv.cmdline.c: $(ggo_dir)/%_re
 
 $(cmdline_dir)/%_filter.cmdline.h $(cmdline_dir)/%_filter.cmdline.c: $(ggo_dir)/%_filter.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,,$(<F)) \
                --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
@@ -21,7 +21,7 @@ $(cmdline_dir)/%_filter.cmdline.h $(cmdline_dir)/%_filter.cmdline.c: $(ggo_dir)/
                --func-name=$(subst _filter.ggo,,$(<F))_cmdline_parser < $<
 $(cmdline_dir)/%_write.cmdline.h $(cmdline_dir)/%_write.cmdline.c: $(ggo_dir)/%_write.ggo | $(cmdline_dir)
        @[ -z "$(Q)" ] || echo 'GGO $<'
-       $(Q) gengetopt -S $(module_ggo_opts) \
+       $(Q) $(GENGETOPT) -S $(module_ggo_opts) \
                --output-dir=$(cmdline_dir) \
                --set-package=$(subst .ggo,,$(<F)) \
                --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
@@ -45,7 +45,7 @@ endef
 
 $(cmdline_dir)/%.cmdline.h $(cmdline_dir)/%.cmdline.c: $(ggo_dir)/%.ggo | $(cmdline_dir)
        @[ -z "$(Q)" ] || echo 'GGO $<'
-       $(Q) gengetopt $(ggo-opts) < $<
+       $(Q) $(GENGETOPT) $(ggo-opts) < $<
 
 $(ggo_dir)/server.ggo $(ggo_dir)/audiod.ggo: \
        $(ggo_dir)/loglevel.m4 $(ggo_dir)/color.m4 \