$top_srcdir.
* m4/ltdl.m4 (AC_LIB_LTDL): Run AC_CONFIG_HEADERS for the user if
necessary. Calculate filename from first argument to
AC_CONFIG_HEADERS, and substitute as CONFIG_H.
* libltdl/Makefile.am (AM_CPPFLAGS): Make sure we are searching in
$top_srcdir for headers.
(DEFS): Override the default HAVE_CONFIG_H with the config.h
filename.
(ltdl.lo): Reference config.h via $(CONFIG_H).
* libltdl/ltdl.c (HAVE_CONFIG_H): Ditto.
+2004-01-16 Gary V. Vaughan <gary@gnu.org>
+
+ * configure.ac (AC_CONFIG_HEADERS): Create config.h in
+ $top_srcdir.
+ * m4/ltdl.m4 (AC_LIB_LTDL): Run AC_CONFIG_HEADERS for the user if
+ necessary. Calculate filename from first argument to
+ AC_CONFIG_HEADERS, and substitute as CONFIG_H.
+ * libltdl/Makefile.am (AM_CPPFLAGS): Make sure we are searching in
+ $top_srcdir for headers.
+ (DEFS): Override the default HAVE_CONFIG_H with the config.h
+ filename.
+ (ltdl.lo): Reference config.h via $(CONFIG_H).
+ * libltdl/ltdl.c (HAVE_CONFIG_H): Ditto.
+
2004-01-15 Scott James Remnant <scott@netsplit.com>
* m4/lt~obsolete.m4: Add a file containing aclocal-fooling
2004-01-13 Peter O'Gorman <peter@pogma.com>
* m4/libtool.m4: Quote shrext as it is evaled in ltmain.
-
+
2004-01-11 Scott James Remnant <scott@netsplit.com>
* ltmain.in: new -precious-files-regex link mode option
## Autoconf initialisation. ##
## ------------------------ ##
AC_INIT([libtool], [1.5a], [bug-libtool@gnu.org])
-AC_CONFIG_HEADERS([libltdl/config.h:libltdl/config-h.in])
+AC_CONFIG_HEADERS([config.h:config-h.in])
AC_CONFIG_SRCDIR([ltmain.in])
AC_CONFIG_AUX_DIR([config])
AUTOMAKE_OPTIONS = no-dependencies foreign
ACLOCAL_AMFLAGS = -I ../m4
+AM_CPPFLAGS = -I$(top_srcdir)
+DEFS = -DHAVE_CONFIG_H="<$(CONFIG_H)>"
if INSTALL_LTDL
include_HEADERS = ltdl.h
libltdlc_la_LIBADD = $(LIBADD_DL)
## Because we do not have automatic dependency tracking:
-ltdl.lo: ltdl.h config.h
+ltdl.lo: ltdl.h $(top_srcdir)/$(CONFIG_H)
## This allows us to install libltdl without using ln and without creating
## a world writeable directory.
*/
-#if HAVE_CONFIG_H
-# include <config.h>
+#ifdef HAVE_CONFIG_H
+# include HAVE_CONFIG_H
#endif
#if HAVE_UNISTD_H
AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])
AC_REQUIRE([AC_LTDL_FUNC_ARGZ])
+# In order that ltdl.c can compile, run AC_CONFIG_HEADERS for the user
+# if they did not call it themself. This is so that ltdl.h can pick up
+# the parent projects config.h file, The first file in AC_CONFIG_HEADERS
+# must contain the definitions required by ltdl.c.
+m4_ifset([AC_LIST_HEADERS],
+ [CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
+ [CONFIG_H=config.h;AC_CONFIG_HEADERS([config.h])])
+AC_SUBST([CONFIG_H])
+
AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \
stdio.h unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h],
[], [], [AC_INCLUDES_DEFAULT])