On 2012-08-22 15:12 +0200, Brice Goglin wrote: > I am working at embedding libltdl inside our project (hwloc, an Open MPI > subprojet). Our plugins are not expected to be enabled in the most > common cases. So I am trying to see if the libltdl sub-configure could > be skipped entirely unless really needed (when plugins are enabled, and > libltdl is indeed built). I got the usual failure when I tried to put > LTDL_INIT inside a conditional block so I am looking for something else now. > > Modifying the subdirs variable before AC_OUTPUT seems to work. But this > hack may not be safe enough. Is there a better way to do this?
Use either the "recursive" or "nonrecursive" libltdl styles. Do not use "subproject" (the default). Both these styles integrate all the configure machinery directly into your main configure script, so there may still be some extra checks but they should be fairly low-cost in the grand scheme of things (especially compared to subproject!). You can then use Automake conditionals to control whether or not libltdl will be built. Cheers, -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/) _______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool