libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

73-gary-ltdl-use-parent-config.patch


From: Gary V. Vaughan
Subject: 73-gary-ltdl-use-parent-config.patch
Date: Thu, 15 Jan 2004 16:44:11 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 Thunderbird/0.3

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Okay to commit?
- --
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://www.oranda.demon.co.uk
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFABsNbFRMICSmD1gYRApYcAJwOSmckis5trTDSWBTjKBjD/bxf1gCglnED
H8mwTYNEQ8PwIN8TD8gjYwE=
=cH/y
-----END PGP SIGNATURE-----
Index: ChangeLog
from  Gary V. Vaughan  <address@hidden>
        * 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.

        * m4/libtool.m4 (_LT_COPYING): Factor out copyright message so it

Index: configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/configure.ac,v
retrieving revision 1.30
diff -u -p -u -r1.30 configure.ac
--- configure.ac 4 Jan 2004 20:45:24 -0000 1.30
+++ configure.ac 15 Jan 2004 16:43:04 -0000
@@ -25,7 +25,7 @@ AC_PREREQ(2.58) ## We use AS_HELP_STRING
 ## Autoconf initialisation. ##
 ## ------------------------ ##
 AC_INIT([libtool], [1.5a], address@hidden)
-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])
 
Index: libltdl/Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/Makefile.am,v
retrieving revision 1.44
diff -u -p -u -r1.44 Makefile.am
--- libltdl/Makefile.am 27 Nov 2003 13:32:33 -0000 1.44
+++ libltdl/Makefile.am 15 Jan 2004 16:43:04 -0000
@@ -2,6 +2,8 @@
 
 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
@@ -26,7 +28,7 @@ libltdlc_la_SOURCES = ltdl.c
 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.
Index: libltdl/ltdl.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.c,v
retrieving revision 1.186
diff -u -p -u -r1.186 ltdl.c
--- libltdl/ltdl.c 4 Jan 2004 20:45:24 -0000 1.186
+++ libltdl/ltdl.c 15 Jan 2004 16:43:05 -0000
@@ -25,8 +25,8 @@ Foundation, Inc., 59 Temple Place, Suite
 
 */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
+#ifdef HAVE_CONFIG_H
+#  include HAVE_CONFIG_H
 #endif
 
 #if HAVE_UNISTD_H
Index: m4/ltdl.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/ltdl.m4,v
retrieving revision 1.2
diff -u -p -u -r1.2 ltdl.m4
--- m4/ltdl.m4 2 Jan 2004 01:59:11 -0000 1.2
+++ m4/ltdl.m4 15 Jan 2004 16:43:05 -0000
@@ -96,6 +96,15 @@ AC_REQUIRE([AC_LTDL_DLSYM_USCORE])
 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])


reply via email to

[Prev in Thread] Current Thread [Next in Thread]