hal: Branch 'master' - 4 commits

David Zeuthen david at kemper.freedesktop.org
Mon Apr 2 18:19:57 PDT 2007


 HACKING                               |    6 +--
 acinclude.m4                          |   45 -------------------------
 configure.in                          |   60 ++++++----------------------------
 doc/man/Makefile.am                   |   11 +++++-
 doc/man/hal-disable-polling.1.in      |    2 -
 doc/man/hal-find-by-capability.1.in   |    2 -
 doc/man/hal-find-by-property.1.in     |    2 -
 doc/man/hal-get-property.1.in         |    2 -
 doc/man/hal-is-caller-locked-out.1.in |    2 -
 doc/man/hal-lock.1.in                 |    2 -
 doc/man/hal-set-property.1.in         |    2 -
 doc/man/hald.8.in                     |    8 ++--
 doc/man/lshal.1.in                    |    2 -
 doc/spec/Makefile.am                  |    2 -
 hald-runner/Makefile.am               |    3 +
 hald/Makefile.am                      |   21 ++++++++++-
 hald/dummy/Makefile.am                |    2 -
 hald/freebsd/Makefile.am              |    2 -
 hald/freebsd/addons/Makefile.am       |    2 -
 hald/freebsd/libprobe/Makefile.am     |    2 -
 hald/freebsd/probing/Makefile.am      |    2 -
 hald/haldaemon.in                     |   10 ++---
 hald/linux/Makefile.am                |    2 -
 hald/linux/addons/Makefile.am         |    2 -
 hald/linux/probing/Makefile.am        |    2 -
 hald/solaris/Makefile.am              |    2 -
 hald/solaris/addons/Makefile.am       |    2 -
 hald/solaris/probing/Makefile.am      |    2 -
 libhal-storage/Makefile.am            |    2 -
 libhal/Makefile.am                    |    2 -
 tools/Makefile.am                     |    2 -
 31 files changed, 77 insertions(+), 133 deletions(-)

New commits:
diff-tree 1a08f8d8d9612647d53571b87c2049b0e7099cde (from 4afe161e6a81028564b95b16122319ff1d20b4ff)
Author: David Zeuthen <davidz at redhat.com>
Date:   Mon Apr 2 21:05:48 2007 -0400

    mention umount helper as default options to use

diff --git a/HACKING b/HACKING
index 2a77fdc..9210611 100644
--- a/HACKING
+++ b/HACKING
@@ -135,7 +135,7 @@ Coding Style
 Configuring the sources
 ===
 
-To configure the HAL sources for a generic Linux desktop distribution
-using Linux 2.6.20, one should use
+To configure the HAL sources for a generic modern Linux desktop
+distribution using Linux 2.6.20, one should use
 
---enable-console-kit --enable-acl-management --enable-docbook-docs --enable-acpi-ibm --enable-acpi-toshiba
+--enable-console-kit --enable-acl-management --enable-docbook-docs --enable-acpi-ibm --enable-acpi-toshiba --enable-umount-helper
diff-tree 4afe161e6a81028564b95b16122319ff1d20b4ff (from b31784daae8ec58c8fe16aed1a413087857bb7ac)
Author: David Zeuthen <davidz at redhat.com>
Date:   Mon Apr 2 21:05:13 2007 -0400

    require autoconfig 2.59c or newer
    
    Michael Biebl <mbiebl at gmail.com>:
    $docdir was introduced in 2.59c (2006-04-12).

diff --git a/configure.in b/configure.in
index 6bb33a9..bf4e150 100644
--- a/configure.in
+++ b/configure.in
@@ -6,7 +6,7 @@ dnl Process this file with autoconf to p
 # Patches for that is welcome.
 #
 
-AC_PREREQ(2.59)
+AC_PREREQ(2.59c)
 AC_INIT(hal, 0.5.9, david at fubar.dk)
 AM_INIT_AUTOMAKE(hal, 0.5.9)
 AM_CONFIG_HEADER(config.h)
diff-tree b31784daae8ec58c8fe16aed1a413087857bb7ac (from 4a2fdce129bc9300e1931ae4c8f3d449c70c4a71)
Author: Michael Biebl <mbiebl at gmail.com>
Date:   Mon Apr 2 21:03:17 2007 -0400

    as_ac_removal

diff --git a/acinclude.m4 b/acinclude.m4
index 81ee816..cfaf19a 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,49 +1,4 @@
 
-dnl as-ac-expand.m4 0.1.0
-dnl autostars m4 macro for expanding directories using configure's prefix
-dnl thomas at apestaart.org 
-
-dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
-dnl
-dnl example
-dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
-dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
-
-AC_DEFUN([AS_AC_EXPAND],
-[
-  EXP_VAR=[$1]
-  FROM_VAR=[$2]
-
-  dnl first expand prefix and exec_prefix if necessary
-  prefix_save=$prefix
-  exec_prefix_save=$exec_prefix
-
-  dnl if no prefix given, then use /usr/local, the default prefix
-  if test "x$prefix" = "xNONE"; then
-    prefix=$ac_default_prefix
-  fi
-  dnl if no exec_prefix given, then use prefix
-  if test "x$exec_prefix" = "xNONE"; then
-    exec_prefix=$prefix
-  fi
-
-  full_var="$FROM_VAR"
-  dnl loop until it doesn't change anymore
-  while true; do
-    new_full_var="`eval echo $full_var`"
-    if test "x$new_full_var"="x$full_var"; then break; fi
-    full_var=$new_full_var
-  done
-
-  dnl clean up
-  full_var=$new_full_var
-  AC_SUBST([$1], "$full_var")
-
-  dnl restore prefix and exec_prefix
-  prefix=$prefix_save
-  exec_prefix=$exec_prefix_save
-])
-
 dnl GTK_DOC_CHECK borrowed from cairo, thanks!
 
 dnl Usage:
diff --git a/configure.in b/configure.in
index 4a2c76b..6bb33a9 100644
--- a/configure.in
+++ b/configure.in
@@ -106,8 +106,6 @@ else
   AC_DEFINE(USE_PNP_IDS,1,[Whether builtin PNP IDs are to be used])
 fi
 
-AC_DEFINE_UNQUOTED(PCI_IDS_DIR,"$PCI_IDS_DIR", [Where PCI IDs are found])
-AC_DEFINE_UNQUOTED(USB_IDS_DIR,"$USB_IDS_DIR", [Where USB IDs are found])
 AC_SUBST(PCI_IDS_DIR)
 AC_SUBST(USB_IDS_DIR)
 AC_SUBST(USE_PCI_IDS)
@@ -589,25 +587,14 @@ AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, tes
 AC_MSG_RESULT(yes)
 
 
-
-AS_AC_EXPAND(LOCALSTATEDIR, $localstatedir)
-AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
-AS_AC_EXPAND(DATADIR, $datadir)
-AS_AC_EXPAND(BINDIR, $bindir)
-AS_AC_EXPAND(SBINDIR, $sbindir)
-AS_AC_EXPAND(LIBDIR, $libdir)
-AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
-
-
 AC_ARG_WITH(dbus-sys, [  --with-dbus-sys=<dir>   where D-BUS system.d directory is])
 
 if ! test -z "$with_dbus_sys" ; then
     DBUS_SYS_DIR="$with_dbus_sys"
 else
-    DBUS_SYS_DIR="$SYSCONFDIR/dbus-1/system.d"
+    DBUS_SYS_DIR="$sysconfdir/dbus-1/system.d"
 fi
 AC_SUBST(DBUS_SYS_DIR)
-AC_DEFINE_UNQUOTED(DBUS_SYSTEMD_DIR, "$DBUS_SYS_DIR", [Where system.d dir for DBUS is])
 
 #### Check our operating system (distro-tweaks required)
 operating_system=unknown
@@ -633,22 +620,20 @@ AM_CONDITIONAL(OS_TYPE_RED_HAT, test x$w
 if ! test -z "$with_pid_file"; then
    HALD_PID_FILE=$with_pid_file
 elif test x$with_os_type = xredhat ; then
-   HALD_PID_FILE=${LOCALSTATEDIR}/run/haldaemon.pid
+   HALD_PID_FILE=${localstatedir}/run/haldaemon.pid
 else
-   HALD_PID_FILE=${LOCALSTATEDIR}/run/hald/pid
+   HALD_PID_FILE=${localstatedir}/run/hald/pid
 fi
 
 AC_SUBST(HALD_PID_FILE)
-AC_DEFINE_UNQUOTED(HALD_PID_FILE, "$HALD_PID_FILE", [pid file])
 
 if ! test -z "$with_socket_dir"; then
     HALD_SOCKET_DIR=$with_socket_dir
 else
-    HALD_SOCKET_DIR=${LOCALSTATEDIR}/run/hald
+    HALD_SOCKET_DIR=${localstatedir}/run/hald
 fi
 
 AC_SUBST(HALD_SOCKET_DIR)
-AC_DEFINE_UNQUOTED(HALD_SOCKET_DIR, "$HALD_SOCKET_DIR", [socket dir])
 
 
 ALL_LINGUAS="ca cs da de el es et eu fi fr hu it ja km ko lt nb nl pa pl pt_BR pt ru sl_SI sv tr uk zh_CN zh_TW"
@@ -846,7 +831,6 @@ hald/freebsd/Makefile
 hald/freebsd/probing/Makefile
 hald/freebsd/libprobe/Makefile
 hald/freebsd/addons/Makefile
-hald/haldaemon
 hald-runner/Makefile
 libhal/Makefile
 libhal-storage/Makefile
@@ -884,13 +868,13 @@ echo "
                   ==============
 
         prefix:                      ${prefix}
-        libdir:                      ${LIBDIR}
-        libexecdir:                  ${LIBEXECDIR}
-        bindir:                      ${BINDIR}
-        sbindir:                     ${SBINDIR}
-        datadir:                     ${DATADIR}
-        sysconfdir:                  ${SYSCONFDIR}
-        localstatedir:               ${LOCALSTATEDIR}
+        libdir:                      ${libdir}
+        libexecdir:                  ${libexecdir}
+        bindir:                      ${bindir}
+        sbindir:                     ${sbindir}
+        datadir:                     ${datadir}
+        sysconfdir:                  ${sysconfdir}
+        localstatedir:               ${localstatedir}
         dbus-1 system.d dir:         ${DBUS_SYS_DIR}
         pci.ids dir:                 ${PCI_IDS_DIR}
         usb.ids dir:                 ${USB_IDS_DIR}
diff --git a/hald-runner/Makefile.am b/hald-runner/Makefile.am
index 990fdc8..65eb677 100644
--- a/hald-runner/Makefile.am
+++ b/hald-runner/Makefile.am
@@ -4,9 +4,10 @@ INCLUDES = \
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
 	-DPACKAGE_SCRIPT_DIR=\""$(libdir)/hal/scripts"\" \
+	-DHALD_SOCKET_DIR=\""$(HALD_SOCKET_DIR)"\" \
 	-I$(top_srcdir) \
 	@DBUS_CFLAGS@ @GLIB_CFLAGS@
 
diff --git a/hald/Makefile.am b/hald/Makefile.am
index 1ca01ac..74647d1 100644
--- a/hald/Makefile.am
+++ b/hald/Makefile.am
@@ -7,9 +7,13 @@ INCLUDES = \
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
 	-DPACKAGE_SCRIPT_DIR=\""$(libdir)/hal/scripts"\" \
+	-DHALD_SOCKET_DIR=\""$(HALD_SOCKET_DIR)"\" \
+	-DHALD_PID_FILE=\""$(HALD_PID_FILE)"\" \
+	-DPCI_IDS_DIR=\""$(PCI_IDS_DIR)"\" \
+	-DUSB_IDS_DIR=\""$(USB_IDS_DIR)"\" \
 	-I$(top_srcdir) \
 	@GLIB_CFLAGS@ @DBUS_CFLAGS@
 
@@ -74,6 +78,15 @@ hald_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -lm
 #### Init scripts fun
 SCRIPT_IN_FILES=haldaemon.in
 
+haldaemon: haldaemon.in Makefile
+	$(edit) $< >$@
+
+edit = sed \
+	-e 's|@sbindir[@]|$(sbindir)|g' \
+	-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
+	-e 's|@localstatedir[@]|$(localstatedir)|g' \
+	-e 's|@HALD_PID_FILE[@]|$(HALD_PID_FILE)|g'
+
 ## Red Hat start
 if OS_TYPE_RED_HAT
 
@@ -85,8 +98,9 @@ initd_SCRIPTS= 	\
 endif
  ## Red Hat end
 
-EXTRA_DIST =			\
-	hald_marshal.list hald-cache-test.sh
+EXTRA_DIST = \
+	hald_marshal.list hald-cache-test.sh \
+	$(SCRIPT_IN_FILES)
 
 hald_marshal.h: hald_marshal.list
 	glib-genmarshal $< --prefix=hald_marshal --header > $@
@@ -108,4 +122,5 @@ install-data-local:
 clean-local:
 	rm -f *~
 	rm -f hald_marshal.c hald_marshal.h
+	rm -f haldaemon
 
diff --git a/hald/dummy/Makefile.am b/hald/dummy/Makefile.am
index d5eba31..48cebfd 100644
--- a/hald/dummy/Makefile.am
+++ b/hald/dummy/Makefile.am
@@ -3,7 +3,7 @@ INCLUDES = \
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
 	-I$(top_srcdir) -I.. \
 	@GLIB_CFLAGS@ @DBUS_CFLAGS@
diff --git a/hald/freebsd/Makefile.am b/hald/freebsd/Makefile.am
index c4e27d6..f70f261 100644
--- a/hald/freebsd/Makefile.am
+++ b/hald/freebsd/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES = \
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
 	-I$(top_srcdir) -I.. \
 	@GLIB_CFLAGS@ @DBUS_CFLAGS@
diff --git a/hald/freebsd/addons/Makefile.am b/hald/freebsd/addons/Makefile.am
index 90b9d83..90c0ee2 100644
--- a/hald/freebsd/addons/Makefile.am
+++ b/hald/freebsd/addons/Makefile.am
@@ -2,7 +2,7 @@ INCLUDES = \
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
 	-I$(top_srcdir) \
 	@DBUS_CFLAGS@
diff --git a/hald/freebsd/libprobe/Makefile.am b/hald/freebsd/libprobe/Makefile.am
index 4174bcd..a266617 100644
--- a/hald/freebsd/libprobe/Makefile.am
+++ b/hald/freebsd/libprobe/Makefile.am
@@ -2,7 +2,7 @@ INCLUDES = \
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
 	-I$(top_srcdir) -I.. \
 	@DBUS_CFLAGS@
diff --git a/hald/freebsd/probing/Makefile.am b/hald/freebsd/probing/Makefile.am
index f98c620..fdba1eb 100644
--- a/hald/freebsd/probing/Makefile.am
+++ b/hald/freebsd/probing/Makefile.am
@@ -2,7 +2,7 @@ AM_CPPFLAGS = \
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
 	-I$(top_srcdir) \
 	@DBUS_CFLAGS@
diff --git a/hald/haldaemon.in b/hald/haldaemon.in
index 004ec2c..cd6dfde 100755
--- a/hald/haldaemon.in
+++ b/hald/haldaemon.in
@@ -12,10 +12,10 @@
 #
 
 # Sanity checks.
-[ -x @SBINDIR@/hald ] || exit 0
+[ -x @sbindir@/hald ] || exit 0
 
 # Source function library.
-. @SYSCONFDIR@/rc.d/init.d/functions
+. @sysconfdir@/rc.d/init.d/functions
 
 # so we can rearrange this easily
 processname=hald
@@ -28,7 +28,7 @@ start() {
     daemon --check $servicename $processname
     RETVAL=$?
     echo
-    [ $RETVAL -eq 0 ] && touch @LOCALSTATEDIR@/lock/subsys/$servicename
+    [ $RETVAL -eq 0 ] && touch @localstatedir@/lock/subsys/$servicename
 }
 
 stop() {
@@ -38,7 +38,7 @@ stop() {
     RETVAL=$?
     echo
     if [ $RETVAL -eq 0 ]; then
-        rm -f @LOCALSTATEDIR@/lock/subsys/$servicename
+        rm -f @localstatedir@/lock/subsys/$servicename
         rm -f @HALD_PID_FILE@
     fi
 }
@@ -61,7 +61,7 @@ case "$1" in
         start
         ;;
     condrestart)
-        if [ -f @LOCALSTATEDIR@/lock/subsys/$servicename ]; then
+        if [ -f @localstatedir@/lock/subsys/$servicename ]; then
             stop
 	    sleep 3
             start
diff --git a/hald/linux/Makefile.am b/hald/linux/Makefile.am
index 2ed2b27..9ee500d 100644
--- a/hald/linux/Makefile.am
+++ b/hald/linux/Makefile.am
@@ -5,7 +5,7 @@ INCLUDES = \
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
 	-I$(top_srcdir) -I.. \
 	@GLIB_CFLAGS@ @DBUS_CFLAGS@
diff --git a/hald/linux/addons/Makefile.am b/hald/linux/addons/Makefile.am
index bc249a0..fef64a5 100644
--- a/hald/linux/addons/Makefile.am
+++ b/hald/linux/addons/Makefile.am
@@ -3,7 +3,7 @@ INCLUDES = \
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
         -I$(top_srcdir) \
         @GLIB_CFLAGS@ @DBUS_CFLAGS@ @POLKIT_CFLAGS@
diff --git a/hald/linux/probing/Makefile.am b/hald/linux/probing/Makefile.am
index 1744d28..b081e48 100644
--- a/hald/linux/probing/Makefile.am
+++ b/hald/linux/probing/Makefile.am
@@ -3,7 +3,7 @@ INCLUDES = \
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
 	-I$(top_srcdir) \
 	@GLIB_CFLAGS@ @DBUS_CFLAGS@ @VOLUME_ID_CFLAGS@
diff --git a/hald/solaris/Makefile.am b/hald/solaris/Makefile.am
index d90beb7..36f5a78 100644
--- a/hald/solaris/Makefile.am
+++ b/hald/solaris/Makefile.am
@@ -5,7 +5,7 @@ INCLUDES = \
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
 	-I$(top_srcdir) -I.. \
 	@GLIB_CFLAGS@ @DBUS_CFLAGS@
diff --git a/hald/solaris/addons/Makefile.am b/hald/solaris/addons/Makefile.am
index 87ce550..5c194d8 100644
--- a/hald/solaris/addons/Makefile.am
+++ b/hald/solaris/addons/Makefile.am
@@ -3,7 +3,7 @@ INCLUDES = \
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
         -I$(top_srcdir) -I$(top_srcdir)/hald -I$(top_srcdir)/libhal -I$(top_srcdir)/libhal-storage \
         @GLIB_CFLAGS@ @DBUS_CFLAGS@
diff --git a/hald/solaris/probing/Makefile.am b/hald/solaris/probing/Makefile.am
index b3c94ff..d57f73b 100644
--- a/hald/solaris/probing/Makefile.am
+++ b/hald/solaris/probing/Makefile.am
@@ -3,7 +3,7 @@ INCLUDES = \
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
 	-I$(top_srcdir) -I$(top_srcdir)/hald -I$(top_srcdir)/libhal -I$(top_srcdir)/libhal-storage \
 	@GLIB_CFLAGS@ @DBUS_CFLAGS@
diff --git a/libhal-storage/Makefile.am b/libhal-storage/Makefile.am
index 4d5b93d..6085d2f 100644
--- a/libhal-storage/Makefile.am
+++ b/libhal-storage/Makefile.am
@@ -2,7 +2,7 @@
 
 INCLUDES = -I$(top_srcdir)/libhal \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	@DBUS_CFLAGS@
 
 lib_LTLIBRARIES=libhal-storage.la
diff --git a/libhal/Makefile.am b/libhal/Makefile.am
index e3ae82f..a98416e 100644
--- a/libhal/Makefile.am
+++ b/libhal/Makefile.am
@@ -2,7 +2,7 @@
 
 INCLUDES = \
 	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	@DBUS_CFLAGS@
 
 lib_LTLIBRARIES=libhal.la
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 1a8347b..2eba2cd 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -19,7 +19,7 @@ INCLUDES = \
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" \
 	-DPACKAGE_LOCALSTATEDIR=\""$(localstatedir)"\" \
 	-DPACKAGE_SCRIPT_DIR=\""$(libdir)/hal/scripts"\" \
-	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
 	-I$(top_srcdir) -I$(top_srcdir)/libhal -I$(top_srcdir)/libhal-storage \
 	@DBUS_CFLAGS@ @GLIB_CFLAGS@ @POLKIT_CFLAGS@
 
diff-tree 4a2fdce129bc9300e1931ae4c8f3d449c70c4a71 (from 23bf8e38fde374ed21419f299887c9ebd22b4413)
Author: Michael Biebl <mbiebl at gmail.com>
Date:   Mon Apr 2 21:01:57 2007 -0400

    properly use $(docdir)
    
    * Bump autoconf dependency to 2.59 so we have $(docdir)
    * Remove custom $(DOCDIR) from configure.in and use $(docdir) in
      doc/spec/Makefile.am instead
    * Generate man pages during make time using sed as recommended [1].
    * Use $(docdir), $(sbindir) and $(sysconfdir) instead of fixed paths.
    * Generate man_MANS list automatically from MAN_IN_FILES
    
    [1] http://tinyurl.com/yueld5

diff --git a/configure.in b/configure.in
index 401d5af..4a2c76b 100644
--- a/configure.in
+++ b/configure.in
@@ -6,7 +6,7 @@ dnl Process this file with autoconf to p
 # Patches for that is welcome.
 #
 
-AC_PREREQ(2.57)
+AC_PREREQ(2.59)
 AC_INIT(hal, 0.5.9, david at fubar.dk)
 AM_INIT_AUTOMAKE(hal, 0.5.9)
 AM_CONFIG_HEADER(config.h)
@@ -650,16 +650,6 @@ fi
 AC_SUBST(HALD_SOCKET_DIR)
 AC_DEFINE_UNQUOTED(HALD_SOCKET_DIR, "$HALD_SOCKET_DIR", [socket dir])
 
-# documentation target
-AC_ARG_WITH(doc-dir,   [  --with-doc-dir=[dirname]  directory to install documentation])
-if ! test -z "$with_doc_dir"; then
-   DOCDIR=$with_doc_dir
-else
-   DOCDIR="$DATADIR/doc/hal-$VERSION"
-fi
-
-AC_SUBST(DOCDIR)
-
 
 ALL_LINGUAS="ca cs da de el es et eu fi fr hu it ja km ko lt nb nl pa pl pt_BR pt ru sl_SI sv tr uk zh_CN zh_TW"
 AC_SUBST(ALL_LINGUAS)
@@ -885,15 +875,6 @@ doc/api/libhal-storage/version.xml
 doc/spec/Makefile
 doc/spec/hal-spec.xml.in
 doc/man/Makefile
-doc/man/hald.8
-doc/man/lshal.1
-doc/man/hal-get-property.1
-doc/man/hal-set-property.1
-doc/man/hal-find-by-property.1
-doc/man/hal-find-by-capability.1
-doc/man/hal-is-caller-locked-out.1
-doc/man/hal-lock.1
-doc/man/hal-disable-polling.1
 po/Makefile.in
 ])
 
@@ -910,7 +891,6 @@ echo "
         datadir:                     ${DATADIR}
         sysconfdir:                  ${SYSCONFDIR}
         localstatedir:               ${LOCALSTATEDIR}
-        docdir:                      ${DOCDIR}
         dbus-1 system.d dir:         ${DBUS_SYS_DIR}
         pci.ids dir:                 ${PCI_IDS_DIR}
         usb.ids dir:                 ${USB_IDS_DIR}
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index 8be2784..c54c16b 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -3,7 +3,7 @@ if MAN_PAGES_ENABLED
 
 MAN_IN_FILES = hald.8.in lshal.1.in hal-get-property.1.in hal-set-property.1.in hal-find-by-property.1.in hal-find-by-capability.1.in hal-is-caller-locked-out.1.in hal-lock.1.in hal-disable-polling.1.in
 
-man_MANS = hald.8 lshal.1 hal-get-property.1 hal-set-property.1 hal-find-by-property.1 hal-find-by-capability.1 hal-is-caller-locked-out.1 hal-lock.1 hal-disable-polling.1
+man_MANS = $(MAN_IN_FILES:.in=)
 
 endif # MAN_PAGES_ENABLED
 
@@ -11,3 +11,12 @@ EXTRA_DIST=$(man_MANS) $(MAN_IN_FILES)
 
 clean-local:
 	rm -f *~ *.1 *.8
+
+%: %.in Makefile
+	$(edit) $< >$@
+
+edit = sed \
+	-e 's|@docdir[@]|$(docdir)|g' \
+	-e 's|@sbindir[@]|$(sbindir)|g' \
+	-e 's|@sysconfdir[@]|$(sysconfdir)|g'
+
diff --git a/doc/man/hal-disable-polling.1.in b/doc/man/hal-disable-polling.1.in
index 343d3bc..53f55b4 100644
--- a/doc/man/hal-disable-polling.1.in
+++ b/doc/man/hal-disable-polling.1.in
@@ -17,7 +17,7 @@ detection on drives with removable stora
 both the big picture and specific
 .B HAL
 properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal- at VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
 depending on the distribution.
 
 .SH OPTIONS
diff --git a/doc/man/hal-find-by-capability.1.in b/doc/man/hal-find-by-capability.1.in
index 2417e45..880d735 100644
--- a/doc/man/hal-find-by-capability.1.in
+++ b/doc/man/hal-find-by-capability.1.in
@@ -19,7 +19,7 @@ device database by looking at device cap
 more information about both the big picture and specific
 .B HAL
 properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal- at VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
 depending on the distribution.
 
 .SH OPTIONS
diff --git a/doc/man/hal-find-by-property.1.in b/doc/man/hal-find-by-property.1.in
index ce76388..f8f8cdc 100644
--- a/doc/man/hal-find-by-property.1.in
+++ b/doc/man/hal-find-by-property.1.in
@@ -19,7 +19,7 @@ device database by looking at device pro
 more information about both the big picture and specific
 .B HAL
 properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal- at VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
 depending on the distribution.
 
 .SH OPTIONS
diff --git a/doc/man/hal-get-property.1.in b/doc/man/hal-get-property.1.in
index ecb15f6..8a502bb 100644
--- a/doc/man/hal-get-property.1.in
+++ b/doc/man/hal-get-property.1.in
@@ -19,7 +19,7 @@ device database. For
 more information about both the big picture and specific
 .B HAL
 properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal- at VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
 depending on the distribution.
 
 .SH OPTIONS
diff --git a/doc/man/hal-is-caller-locked-out.1.in b/doc/man/hal-is-caller-locked-out.1.in
index 3c73f17..67b31b7 100644
--- a/doc/man/hal-is-caller-locked-out.1.in
+++ b/doc/man/hal-is-caller-locked-out.1.in
@@ -17,7 +17,7 @@ locked out of a specific D-Bus interface
 more information about both the big picture and specific
 .B HAL
 properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal- at VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
 depending on the distribution.
 
 .SH OPTIONS
diff --git a/doc/man/hal-lock.1.in b/doc/man/hal-lock.1.in
index 6cb11a6..51a713c 100644
--- a/doc/man/hal-lock.1.in
+++ b/doc/man/hal-lock.1.in
@@ -17,7 +17,7 @@ either on a given device or globally. Fo
 the big picture and the semantics of 
 .B HAL
 locks, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal- at VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
 depending on the distribution.
 
 .SH OPTIONS
diff --git a/doc/man/hal-set-property.1.in b/doc/man/hal-set-property.1.in
index b9b2d33..10836d9 100644
--- a/doc/man/hal-set-property.1.in
+++ b/doc/man/hal-set-property.1.in
@@ -19,7 +19,7 @@ device database. For
 more information about both the big picture and specific
 .B HAL
 properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal- at VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
 depending on the distribution.
 
 .SH OPTIONS
diff --git a/doc/man/hald.8.in b/doc/man/hald.8.in
index 0c1a0b7..3728077 100644
--- a/doc/man/hald.8.in
+++ b/doc/man/hald.8.in
@@ -18,7 +18,7 @@ the \fID-Bus\fP system message bus to pr
 can use to discover, monitor and invoke operations on devices. For
 more information about both the big picture and specific API details,
 refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal- at VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
 depending on the distribution.
 
 .SH OPTIONS
@@ -55,7 +55,7 @@ Second, shut down the existing 
 .B hald
 daemon instance; on a Fedora system this is achieved by
 
-.I "/etc/init.d/haldaemon stop"
+.I "@sysconfdir@/init.d/haldaemon stop"
 
 After having shut down the daemon, you might want to run
 
@@ -65,11 +65,11 @@ to ensure that all the helper processe o
 .B hald
 are killed too. To start the HAL daemon, use
 
-.I "/usr/sbin/hald --daemon=no --verbose=yes"
+.I "@sbindir@/hald --daemon=no --verbose=yes"
 
 If the daemon crashes, you can start it under a debugger via
 
-.I "gdb /usr/sbin/hald"
+.I "gdb @sbindir@/hald"
 
 and then typing
 
diff --git a/doc/man/lshal.1.in b/doc/man/lshal.1.in
index 02f4fd3..bea6e68 100644
--- a/doc/man/lshal.1.in
+++ b/doc/man/lshal.1.in
@@ -18,7 +18,7 @@ device database. For
 more information about both the big picture and specific
 .B HAL
 properties, refer to the \fIHAL spec\fP which can be found in
-.I "/usr/share/doc/hal- at VERSION@/spec/hal-spec.html"
+.I "@docdir@/spec/hal-spec.html"
 depending on the distribution.
 
 .SH OPTIONS
diff --git a/doc/spec/Makefile.am b/doc/spec/Makefile.am
index 646110e..df1ea9b 100644
--- a/doc/spec/Makefile.am
+++ b/doc/spec/Makefile.am
@@ -12,7 +12,7 @@ SPEC_XML_EXTRA_FILES =			\
 
 if DOCBOOK_DOCS_ENABLED
 
-htmldocdir = $(DOCDIR)/spec
+htmldocdir = $(docdir)/spec
 htmldoc_DATA = hal-spec.html $(FIGURE_FILES) docbook.css
 
 hal-spec.html : hal-spec.xml.in $(FIGURE_FILES) $(SPEC_XML_EXTRA_FILES)


More information about the hal-commit mailing list