If configure was generated with autoconf >= 2.60 and is run without --datadir argument, AS_AC_EXPAND will fail to expand $(datadir), the pseudo-expanded value is $(prefix)/share and this ends up in hal-device-manager, effectively breaking it: sys.path.append('${prefix}/share/hal/device-manager') gtk.glade.bindtextdomain('hal', '${prefix}/share/locale') DATADIR = "${prefix}/share/hal/device-manager" (Note the *literal* instance of ${prefix}, not its value) I did a long analysis of this in https://bugzilla.novell.com/show_bug.cgi?id=210297 and have been told that this would be fixed by removing hal-device-manager, but hal-device-manager is still there and still broken. In the above Novell Bugzilla report, I've posted an easy solution that makes hal-device-manager work: Upgrade from AS_AC_EXPAND 0.1.0 to 0.2.0. This is the easy fix, but the proper fix is to remove all traces of it from the codebase because it's just broken. Proper expansion and definition of directory variables has to be done from the Makefiles, not from configure - please see: http://www.gnu.org/software/autoconf/manual/html_node/Defining-Directories.html
The easy, but incorrect fix is https://bugzilla.novell.com/attachment.cgi?id=105866
Created attachment 8868 [details] [review] Starting point This preliminary and self-contained patch can be seen as a starting point to get rid of AS_AC_EXPAND. haldaemon.in is a shell script, so there's no need to expand the variables. If you want to get rid of AS_AC_EXPAND, just recode all shell scripts like this.
Created attachment 8869 [details] [review] Even better version of the above patch.
Created attachment 8870 [details] [review] Make hal-device-manager independent of AS_AC_EXPAND. This patch, also self-contained, demonstrates how to properly expand variables in files which are not shell scripts, and by the way makes hal-device-manager independent of the broken AS_AC_EXPAND semantics. For languages other than sh, perl, make and such, the trick with having the language interpreter expand the variables at runtime does not work, but fortunately make supports it, so let make do it and use sed to write it into arbitrary files. I'm not going to work on more such patches now; the direction should be clear. After fixing all instances of similar things among the whole codebase, AS_AC_EXPAND will no longer be necessary and can be removed.
Btw. it is known since 3 years that this macro is broken: https://mail.comedi.org/pipermail/comedi/2004-March/005611.html And yet it is still present in all kinds of open source projects :-(
Thanks, this is on HEAD now. http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=f1f5d0e4389c0d2c8b86eb21d0d4681ad3cb739a;hp=13e11b6bf1126ec0a439459da5a4b1f2c8b02e97
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.