[asterisk-users] Running configure from subdirectory of source tree

Gianluca Merlo gianluca.merlo at gmail.com
Wed Mar 5 14:24:11 CST 2014


2014-03-05 20:08 GMT+01:00 Jason Parker <jason.parker at schmoozecom.com>:

> That's not something that is likely to be supported.  Any configure
> script in the tree will be run via the top-level build process, as
> needed.


Hello Jason,

I admit I naively have yet to consider whether the actual build could work
or not, and assumed (for lack of knowledge) it could. By chance, is yours
an assumption or you have personally experienced (or know by understanding
its inner workings) that the top level make does not perform correctly if
the sources lie elsewhere (in this case, in the parent directory)?

Is there some reason you think you need to run the other
> configure scripts yourself?
>

If your question is related to the origin of the need of configuring and
building in a subdirectory, I am in need of building custom Debian packages
for Asterisk, and my plan was to use a single source package to build
several "monolithic" Asterisk binary packages, each with different
configure options and patches to modify/add some functionalities (I
currently compile and install them manually, and could use some
Debian-magic-automation).
Debhelper offers a "--builddirectory" option which allows to easily perform
such task, and I already successfully used it on more simple software using
the autotool build toolchain, but essentially this works as in my "manual"
example, thus failing.

Thanks in advance for your advice.

On 03/05/2014 08:54 AM, Gianluca Merlo wrote:
> > Hello everyone,
> >
> > I would like to seek your advice regarding a build (or rather
> > "configure") problem I am running into. For reference, tests are all
> > relative to a build from a 1.8.26.0 tarball, on Debian Wheezy.
> >
> > I would like to understand if it is possible, and if any of you have
> > tried, to build Asterisk from a subdirectory of the source tree, i.e.,
> > from a clean source tree
> >
> > # mkdir my-build-directory
> > # cd my-build-directory
> > # ../configure
> > # make
> >
> > I lack a proper amount of knowledge on the matter, but I think that this
> > should be "legit" with a common autotools build toolchain. Tests suggest
> > that (at least in my case) this is not working with
> >
> >     configure: error: cannot find install-sh, install.sh, or shtool in
> >     `pwd` ".."/`pwd`
> >
> >
> > Looking in the configure process in detail, the failure seem to follow
> > the checks (/bin/sh -x output)
> >
> >     + for ac_dir in '`pwd`' '"$srcdir"/`pwd`'
> >     + test -f
> /home/gian/src/asterisk-1.8.26.0/my-build-directory/install-sh
> >     + test -f
> /home/gian/src/asterisk-1.8.26.0/my-build-directory/install.sh
> >     + test -f /home/gian/src/asterisk-1.8.26.0/my-build-directory/shtool
> >     + for ac_dir in '`pwd`' '"$srcdir"/`pwd`'
> >     + test -f
> >     ..//home/gian/src/asterisk-1.8.26.0/my-build-directory/install-sh
> >     + test -f
> >     ..//home/gian/src/asterisk-1.8.26.0/my-build-directory/install.sh
> >     + test -f
> ..//home/gian/src/asterisk-1.8.26.0/my-build-directory/shtool
> >
> >
> > It looks to me that despite checking "`pwd`" leads to a correct
> > behaviour, checking "../`pwd`" is not correct. I seem to understand that
> > this behaviour was introduced in configure.ac <http://configure.ac> at
> > r259848, by adding
> >
> >     AC_CONFIG_AUX_DIR(`pwd`)
> >
> >
> > The log for the commit reports
> >
> >
> ------------------------------------------------------------------------
> >     r259848 | qwell | 2010-04-28 22:32:14 +0200 (Wed, 28 Apr 2010) | 9
> lines
> >
> >     Merged revisions 259847 via svnmerge from
> >     https://origsvn.digium.com/svn/asterisk/branches/1.4
> >
> >     ........
> >       r259847 | qwell | 2010-04-28 15:30:21 -0500 (Wed, 28 Apr 2010) | 1
> >     line
> >
> >       Add AC_CONFIG_AUX_DIR to configure script, so systems without
> >     install can use install-sh from our source dir.
> >     ........
> >
> >
> ------------------------------------------------------------------------
> >
> >
> >
> > Isn't the default behaviour for autoconf enough
> > (http://www.gnu.org/software/automake/manual/html_node/Optional.html)?
> > Can this be considered as a bug in Asterisk's the build system,
> > preventing an otherwise working build scenario (i.e. configuring and
> > building in a subdirectory of the source tree)?
> >
> > Thank you in advance for your help
> >
> > Gianluca
> >
> >
> >
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140305/b758a8ed/attachment.html>


More information about the asterisk-users mailing list