Parent: 668a93d4b8f633c8bd4e7a81a2ba910e3e26a752
Author: Antonio Ospite <ospite@studenti.unina.it>
Committer: Johan Hedberg <johan.hedberg@intel.com>
Date: 2013-02-23 12:49:04
Tree: 7a3a04809db5d16b410a158a1a2a23ded928a98a
configure.ac: call AC_SUBST unconditionally with --with-* options Call AC_SUBST unconditionally when specifying --with-* options, otherwise options like --with-dbusconfdir=DIR or --with-udevdir=DIR have no effect. Before this change, configuring with: $ mkdir build $ ./configure --disable-systemd \ --prefix=$(pwd)/build \ --with-dbusconfdir=$(pwd)/build/etc resulted in the option value to be ignored at "make install" time, with this error: /bin/mkdir: cannot create directory '/dbus-1/system.d': Permission denied This is what was going on in configure.ac: # define the option AC_ARG_WITH([dbusconfdir] ... [path_dbusconfdir=${withval}]) # when --with-dbusconfdir is NOT used if (test -z "${path_dbusconfdir}"); then ... # define the config dir automatically path_dbusconfdir="`$PKG_CONFIG --variable=sysconfdir dbus-1`" ... # set DBUS_CONFDIR AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}]) endif when --with-dbusconfdir=SOMEDIR was used the test above failed, and the result was that ${path_dbusconfdir} was indeed defined as manually specified, but DBUS_CONFDIR was not, and the latter was going to be used in Makefile.am: dbusdir = @DBUS_CONFDIR@/dbus-1/system.d The failure in mkdir can be exposed by the use of the "--prefix" option and by running "make install" as a normal user; when running "make install" with the root user /dbus-1/system.d would be happily (and wrongly) created. By always setting variables relative to --with-* options (like DBUS_CONFDIR) the cases when --with-someoption=SOMEDIR are used get covered.
Diffstat
| M | configure.ac | | | 12 | ++++++- - - - - - |
1 files changed, 6 insertions(+), 6 deletions(-)