From: Gary V. Vaughan Date: Mon, 13 Dec 1999 13:44:29 +0000 (+0000) Subject: * doc/libtool.texi (Distributing libltdl): document use of X-Git-Tag: release-1-3d~242 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b94899573da7ddbe0d3da9b6cd008f1b5882f1f5;p=thirdparty%2Flibtool.git * doc/libtool.texi (Distributing libltdl): document use of ltdl.m4. * libltdl/configure.in: Removed header checks, as they are * libltdl/ltdl.m4: Added header checks from configure.in, so that AC_LIB_LTDL is sufficient to compile ltdl.c. Reported by Stephan Kulow . --- diff --git a/ChangeLog b/ChangeLog index d0a69f155..dd3eb127b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 1999-12-13 Gary V. Vaughan + * doc/libtool.texi (Distributing libltdl): document use of + ltdl.m4. + * libltdl/configure.in: Removed header checks, as they are + automatically performed by AC_LIB_LTDL. + * libltdl/ltdl.m4: Added header checks from configure.in, so that + AC_LIB_LTDL is sufficient to compile ltdl.c. + Reported by Stephan Kulow . + * ltconfig.in (ltdll_obj): fixed typo: objdir -> $objdir 1999-12-12 Gary V. Vaughan diff --git a/NEWS b/NEWS index 85dc5c387..c43cbed49 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,7 @@ NEWS - list of user-visible changes between releases of GNU Libtool New in 1.3d: 1999-??-??; CVS version 1.3c, Libtool team: -:* m4 macros needed to configure libltdl split out into libltdl/ltdl.m4. +* m4 macros needed to configure libltdl split out into libltdl/ltdl.m4. * Start of support code for cross-compiling to win32. * Improved support for mingw32. * Improved support for Compaq Tru64 V5.0, and Digital Unix V4.*. diff --git a/doc/libtool.texi b/doc/libtool.texi index faa635c0b..19b8d3d5c 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -3056,8 +3056,25 @@ foo1_la_LDFLAGS = -module Even though libltdl is installed together with libtool, you may wish to include libltdl in the distribution of your package, for the convenience of users of your package that don't have libtool or libltdl installed. -In this case, you may decide which flavor of libltdl you want to use: a -convenience library or an installable libtool library. +In this case, you must decide whether to manually add the @code{ltdl} +objects to your package, or else which flavor of libltdl you want to use: +a convenience library or an installable libtool library. + +The most simplistic way to add @code{ltdl} to your package is to copy +the source files, @file{ltdl.c} and @file{ltdl.h}, to a source +directory withing your package and to build and link them along with +the rest of your sources. To help you do this, the m4 macros for +autoconf are available in @file{ltdl.m4}. You must ensure that they +are available in @file{aclocal.m4} before you run autoconf -- either +by copying @file{ltdl.m4} to the macro directory of your package (if +you have one) before running aclocal, or else @code{cat}ting its contents +directly to the end of @file{aclocal.m4} if you are not using automake. +Having made the macros available, you must add a call to the +@samp{AC_LIB_LTDL} macro to your package's @file{configure.in} to perform +the configure time checks required to build @file{ltdl.o} correctly. +This method has problems if you then try to link the package binaries +with an installed libltdl, or a library which depends on libltdl, which +will cause problems with multiple symbol definitions. One advantage of the convenience library is that it is not installed, so the fact that you use libltdl will not be apparent to the user, and it diff --git a/libltdl/configure.in b/libltdl/configure.in index 31e46f906..d03069427 100644 --- a/libltdl/configure.in +++ b/libltdl/configure.in @@ -24,12 +24,6 @@ AC_C_INLINE AM_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) -AC_HEADER_STDC -AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h) -AC_CHECK_HEADERS(string.h strings.h, break) -AC_CHECK_FUNCS(strchr index, break) -AC_CHECK_FUNCS(strrchr rindex, break) - AC_LIB_LTDL dnl Output the makefile diff --git a/libltdl/ltdl.m4 b/libltdl/ltdl.m4 index 23b0646ac..1601efc24 100644 --- a/libltdl/ltdl.m4 +++ b/libltdl/ltdl.m4 @@ -24,6 +24,20 @@ AC_DEFUN(AC_LIB_LTDL, [AC_PREREQ(2.13)dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_C_CONST])dnl +AC_REQUIRE([AC_C_INLINE])dnl + +dnl AC_LIB_LTDL must perform all the checks necessary for compilation +dnl of the ltdl objects -- including compiler checks (above) and header +dnl checks (below). +AC_REQUIRE([AC_HEADER_STDC])dnl + +AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h) +AC_CHECK_HEADERS(string.h strings.h, break) +AC_CHECK_FUNCS(strchr index, break) +AC_CHECK_FUNCS(strrchr rindex, break) + AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])dnl AC_REQUIRE([AC_LTDL_SHLIBEXT])dnl AC_REQUIRE([AC_LTDL_SHLIBPATH])dnl