Discussion:
Clarification request: AC_PREFIX_DEFAULT([.]) and AC_CONFIG_SUBDIRS collide.
Thomas Jahns
2014-12-03 10:32:28 UTC
Permalink
Hello,

I noticed having a default prefix of . causes AC_CONFIG_SUBDIRS to fail.

Is this a bug in AC_PREFIX_DEFAULT (or its documentation) or in AC_CONFIG_SUBDIRS?

Regards, Thomas

P.S.: the failure looks like this

....
config.status: executing depfiles commands
=== configuring in yaxt (/path/to/package_top/directory_sub)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=.'
--cache-file=/dev/null --srcdir=.
configure: error: expected an absolute directory name for --prefix: .
configure: error: ./configure failed for directory_sub
Václav Zeman
2014-12-03 11:24:29 UTC
Permalink
Post by Thomas Jahns
Hello,
I noticed having a default prefix of . causes AC_CONFIG_SUBDIRS to fail.
Is this a bug in AC_PREFIX_DEFAULT (or its documentation) or in AC_CONFIG_SUBDIRS?
Regards, Thomas
P.S.: the failure looks like this
....
config.status: executing depfiles commands
=== configuring in yaxt (/path/to/package_top/directory_sub)
configure: running /bin/sh ./configure --disable-option-checking
'--prefix=.' --cache-file=/dev/null --srcdir=.
configure: error: expected an absolute directory name for --prefix: .
configure: error: ./configure failed for directory_sub
I do not know the internals but this does look like a deliberate foot
shooting preventive measure rather than bug.
--
VZ
Eric Blake
2014-12-03 13:14:50 UTC
Permalink
Post by Václav Zeman
Post by Thomas Jahns
Hello,
I noticed having a default prefix of . causes AC_CONFIG_SUBDIRS to fail.
Is this a bug in AC_PREFIX_DEFAULT (or its documentation) or in AC_CONFIG_SUBDIRS?
configure: error: expected an absolute directory name for --prefix: .
configure: error: ./configure failed for directory_sub
I do not know the internals but this does look like a deliberate foot
shooting preventive measure rather than bug.
install.texi (and therefore INSTALL) documents that --prefix MUST be
absolute. Using AC_PREFIX_DEFAULT with a non-absolute location is
therefore unwise. That said, we either need a doc patch to mention this
about AC_PREFIX_DEFAULT, or it may be possible to refactor
AC_PREFIX_DEFAULT to canonicalize the default to be absolute to match
that --prefix must be absolute. Would you care to write the patch?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Loading...