On 09/03/2015 08:09 AM, Sébastien Hinderer wrote: > Dear all, > > I am one of the maintainers of Coccinelle[1], a tool written in the > Objective Caml[2] language. > > The tool is distributed with the libraries it depends on (they are > provided as bundles). At one point, this was how both libintl (gettext) and libltdl (libtool) were primarily used - many packages would include subdirectories with the appropriate bundled library, and then rely on macros provided by gettext/libtool to probe whether to favor the system version if present and capable, otherwise fall back to the bundled version. However, these days, most people have leaned towards excluding the bundle, and instead requiring the external library to be present. For more information, check out: https://www.gnu.org/software/gettext/manual/gettext.html#AM_005fGNU_005fGETTEXT https://www.gnu.org/software/libtool/manual/libtool.html#Distributing-libltdl > Then, assuming we continue to bundle the dependencies, it seems to me > that it would be more coherent to have the configure script of each > required bundle run by the tool's main configure script. I am aware of > the AC_CONFIG_SUBDIRS macro, but this seems a bit limited to me. For > instance it means that the sub-package's configure may find a different > compiler to use than the one found by the main conigure, which is not > good. I'm not sure why you think a different compiler would be picked for a sub-package. Particularly if $CC is set in the parent package before calling out to the sub-packages, then the sub-packages should see $CC in the environment and favor that as their compiler. But I don't have much experience with bundled libraries (as I have moved strongly to the camp of require the external library to be present, now that both gettext and libtool have made that easier to be the default), to know for sure. > > One other issue is that we bundle the dependencies as .tar.gz archives > and we would like to be able to extract the archives only for those > dependencies that will really be needed (because they are not already > installed on the system). Can this be achieved somehow with autoconf? If you can come up with appropriate shell code to do that, then you can embed that shell code in your configure.ac. I don't know of any autoconf macros that would automate some of the work, but it sounds like it might be something that could be cobbled together, if you still want to go the route of shipping dependent library bundles. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf