hal: Branch 'master'

Richard Hughes hughsient at kemper.freedesktop.org
Mon Jun 11 08:32:41 PDT 2007


 configure.in      |   10 ++++++++++
 tools/Makefile.am |    6 +++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

New commits:
diff-tree e7b7241a92149429a9e74a01f83c7fcce585f5ce (from a492453b15abfbaada99e1fd51a516acb480331d)
Author: Richard Hughes <richard at hughsie.com>
Date:   Mon Jun 11 16:32:18 2007 +0100

    fix build when gperf is not installed
    
    Make still tries to rebuild the .h file, even when present.
    If gperf is not installed, don't let make even _try_ to rebuild the file.

diff --git a/configure.in b/configure.in
index cd8c80c..0b6734c 100644
--- a/configure.in
+++ b/configure.in
@@ -658,6 +658,16 @@ else
     have_xmllint=yes
 fi
 
+AC_PATH_PROG(GPERF, [gperf], [no])
+AC_MSG_CHECKING([whether to rebuild gperf header files])
+if test x$GPERF = xno ; then
+    have_gperf=no
+else
+    have_gperf=yes
+fi
+AC_SUBST(HAVE_GPERF)
+AM_CONDITIONAL(HAVE_GPERF, [test x$have_gperf = xyes])
+
 if test x$enable_docbook_docs = xauto ; then
     if test x$have_xmlto = xno || test x$have_xmllint = xno ; then
         enable_docbook_docs=no
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 6897eb6..077e362 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -78,6 +78,7 @@ endif
 
 if BUILD_KEYMAPS
 
+if HAVE_GPERF
 hal-setup-keymap-keys.txt: /usr/include/linux/input.h
 	awk '/^#define.*KEY_/ { if ($$2 != "KEY_MAX") { print substr($$2, 5) } }' < $< > $@
 
@@ -86,11 +87,12 @@ hal-setup-keymap-hash-name.gperf: hal-se
 
 hal-setup-keymap-hash-name.h: hal-setup-keymap-hash-name.gperf
 	gperf -t --ignore-case -N lookup_key -H hash_input_names -p -C < $< > $@
+endif #HAVE_GPERF
 
 hal_setup_keymap_SOURCES = hal-setup-keymap.c hal-setup-keymap-hash-name.h
 hal_setup_keymap_LDADD = $(top_builddir)/libhal/libhal.la
 
-endif
+endif #BUILD_KEYMAPS
 
 libexec_PROGRAMS =                          \
 	hal-storage-mount	            \
@@ -177,6 +179,7 @@ umount_hal_SOURCES = umount-hal.c
 umount_hal_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la $(top_builddir)/libhal-storage/libhal-storage.la
 endif
 
+if HAVE_GPERF
 DISTCLEANFILES += 				\
 	hal-setup-keymap-hash-name.h		\
 	hal-setup-keymap-hash-name.gperf	\
@@ -186,6 +189,7 @@ BUILT_SOURCES += 				\
 	hal-setup-keymap-hash-name.h		\
 	hal-setup-keymap-hash-name.gperf	\
 	hal-setup-keymap-keys.txt
+endif
 
 check:
 	for f in $(script_SCRIPTS); do \


More information about the hal-commit mailing list