On Thu, 2006-03-16 at 12:48 -0700, Ed Hartnett wrote: > All, > > If I have a library (netcdf) which depends on another library (hdf5), > which, in turn, may use another library (zlib), is there a good way to > package things for the end user? > > At the moment, my end user must first install zlib. Then they must > build HDF5 with a --with-zlib=/somewhere argument, and then install > HDF5. Then they will build netCDF with a --with-hdf5=/somewhere > argument. > > This is all working now, but it's a big burden for the user. > > Should I make a tarball which includes and installs all three in a > single step? This is one thing I am considering. (Using the > AC_CONFIG_SUBDIRS macro). I advocate against this practice. Experience tells, it's more confusing and error-prone than not doing so. Tell your users how to configure the package correctly. I'd even not use --with-zlib/--with-hdf5, but tell them to use CPPFLAGS, etc. > However, how to handle cases where one of these is already installed > on the end-user system? If you really want it, check for the libs and header, and then only enter the config-subdirs if you found you need to. AS_IF([test $zlib_available],[ AC_CONFIG_SUBDIR([zlib])]) And SUBDIRS = @subdirs@ (Or a custom magic to setup SUBDIRS) in Makefile.am should work. > Anyone autotool-using library builder out there who has tried this? It's pretty common, but as I've said, ... I would not recommend doing so. > Any comments on this sort of problem, and solutions for it, would be > very helpful. I recommend to try to "KISS", i.e. as little magic as possible. Simply stay with AC_CHECK_HEADERS, AC_CHECK_LIBS etc. and let your configure script error out/complain if something can't be found. Ralf _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf