]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* update all copyright notices to 2000
authorThomas Tanner <tanner@ffii.org>
Thu, 13 Jan 2000 00:28:09 +0000 (00:28 +0000)
committerGary V. Vaughan <gary@gnu.org>
Thu, 13 Jan 2000 00:28:09 +0000 (00:28 +0000)
* doc/libtool.texi (using libltdl): document new lt_dlinfo struct,
  replace NULL with @code{NULL}, document lt_dlsetdata(),
  lt_dlgetdata() and lt_dlgetinfo()
* libltdl/Makefile.am: increment interface version number
* libltdl/configure.in: set version number to 1.1
* libltdl/ltdl.c: make some variables public by moving them
  to the info struct, add support for application specific data
  within module handles, new lt_dlsetdata(), lt_dlgetdata() and
  lt_dlgetinfo() functions,
  fix memory leaks, minor cleanups
* libltdl/ltdl.h: ditto
* mdemo/main.c: demonstrate use of lt_dlgetinfo,
  improved handling of errors

* ltconfig.in: set hardcode_into_libs = yes for GNU/Hurd, Linux
  and Solaris, only hardcode *all* run-paths if hardcode_into_libs
  is set to 'all', otherwise hardcode only user-specified rpaths
  into libraries
* ltmain.in: minor cleanups, we don't need to add user-specified
  rpaths to compile_rpath, finalize_rpath is sufficient

* ltconfig.in: transform linux* -> *linux-gnu* _after_ host_os has
  been set! (reported by Bruno Haible <haible@ilog.fr>)

* configure.in: AC_SUBST reload_flag, deplibs_check_method
  and file_magic_cmd

* README: use 'libtool --version' instead of 'ltconfig --version'
  (suggested by Francios Pinard <pinard@iro.umontreal.ca>

42 files changed:
ChangeLog
NEWS
README
bootstrap
cdemo/foo.c
cdemo/foo.h
cdemo/main.c
configure.in
demo/dlmain.c
demo/foo.c
demo/foo.h
demo/hello.c
demo/main.c
depdemo/l1/l1.c
depdemo/l1/l1.h
depdemo/l2/l2.c
depdemo/l2/l2.h
depdemo/l3/l3.c
depdemo/l3/l3.h
depdemo/l4/l4.c
depdemo/l4/l4.h
depdemo/main.c
depdemo/sysdep.h
doc/libtool.texi
libltdl/Makefile.am
libltdl/configure.in
libltdl/ltdl.c
libltdl/ltdl.h
libtool.m4
libtoolize.in
lineno
ltconfig.in
ltdl.m4
ltmain.c
ltmain.in
mdemo/foo.h
mdemo/foo1.c
mdemo/foo2.c
mdemo/main.c
mkstamp
tests/build-relink.test
tests/build-relink2.test

index 1ad32d19ee848140c5a7e7bf8f375c0f97156def..69c8b919e595d70b4b902112abf660cbe5162bfa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2000-01-12  Thomas Tanner  <tanner@ffii.org>
+
+       * update all copyright notices to 2000
+       
+       * doc/libtool.texi (using libltdl): document new lt_dlinfo struct,
+         replace NULL with @code{NULL}, document lt_dlsetdata(),
+         lt_dlgetdata() and lt_dlgetinfo()
+       * libltdl/Makefile.am: increment interface version number
+       * libltdl/configure.in: set version number to 1.1
+       * libltdl/ltdl.c: make some variables public by moving them
+         to the info struct, add support for application specific data
+         within module handles, new lt_dlsetdata(), lt_dlgetdata() and
+         lt_dlgetinfo() functions,
+         fix memory leaks, minor cleanups
+       * libltdl/ltdl.h: ditto
+       * mdemo/main.c: demonstrate use of lt_dlgetinfo,
+         improved handling of errors
+       
+       * ltconfig.in: set hardcode_into_libs = yes for GNU/Hurd, Linux
+         and Solaris, only hardcode *all* run-paths if hardcode_into_libs
+         is set to 'all', otherwise hardcode only user-specified rpaths
+         into libraries
+       * ltmain.in: minor cleanups, we don't need to add user-specified
+         rpaths to compile_rpath, finalize_rpath is sufficient
+
+       * ltconfig.in: transform linux* -> *linux-gnu* _after_ host_os has
+         been set! (reported by Bruno Haible <haible@ilog.fr>)
+       
+       * configure.in: AC_SUBST reload_flag, deplibs_check_method
+         and file_magic_cmd
+       
+       * README: use 'libtool --version' instead of 'ltconfig --version'
+         (suggested by Francios Pinard <pinard@iro.umontreal.ca>
+
 2000-01-10  Gary V. Vaughan  <gary@oranda.demon.co.uk>
 
        * libltdl/ltdl.h (LTDL_DIRSEP_CHAR): Leave undefined when
diff --git a/NEWS b/NEWS
index 70057d4dbbde895b15755ee541286c56887b913d..ba55ddc29e58e8488025f3b06c20a12214b5554a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
 NEWS - list of user-visible changes between releases of GNU Libtool
 
-New in 1.3d: 1999-??-??; CVS version 1.3c, Libtool team:
+New in 1.3d: 2000-??-??; CVS version 1.3c, Libtool team:
 * libltdl can now be built as a dll with win32.
 * m4 macros needed to configure libltdl split out into libltdl/ltdl.m4.
 * Start of support code for cross-compiling to win32.
diff --git a/README b/README
index 27fde37a4d8cf7ab1ac060c56a952577afc4c427..a8d16bc99400fb8f79ac95562d21d26eddec5d81 100644 (file)
--- a/README
+++ b/README
@@ -64,4 +64,4 @@ If you have any suggestions or bug reports, or you wish to port
 libtool to a new platform, please send electronic mail to the libtool
 mailing list <libtool@gnu.org> or bug reports to <bug-libtool@gnu.org>.
 Don't forget to mention the version of libtool that you are currently
-using (by typing `ltconfig --version').
+using (by typing `libtool --version').
index 35d69793c323c311eb610c822dc55be99593f7a6..8275101ddd5ae3b0c3c7385ca1b930c16948ae48 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -18,7 +18,7 @@ for sub in libltdl demo depdemo mdemo cdemo; do
   cd $sub
   rm -f acinclude.m4
   cat ../libtool.m4 > acinclude.m4
-  case "$sub" in libltdl) cat ../ltdl.m4 >> acinclude.m4 ;; esac
+  test "$sub" = libltdl && cat ../ltdl.m4 >> acinclude.m4
   aclocal
   test "$sub" = libltdl && autoheader
   automake --gnits --add-missing
index 3854c435426744eb8fcc19cec2c91e76a753e934..f27c173c5c8be84e28bb3504f8dea9cec9461fa5 100644 (file)
@@ -1,5 +1,5 @@
 /* foo.c -- trivial test library
-   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Copyright (C) 1998-2000 Free Software Foundation, Inc.
    Originally by Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
index 48dc9127ed52940c517e13d6d48c6ce4f6a83546..d6d5bdc4acf879aceeccc4eab2a0e2e072647c05 100644 (file)
@@ -1,5 +1,5 @@
 /* foo.h -- interface to the libfoo* libraries
-   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Copyright (C) 1998-2000 Free Software Foundation, Inc.
    Originally by Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
index 89da831bbf4113c15b67a79d2c47dace408c23d2..15df0900cbd123e2c6ef5bf5d6b742d2fc5a30cc 100644 (file)
@@ -1,5 +1,5 @@
 /* main.c -- cdemo test program
-   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Copyright (C) 1998-2000 Free Software Foundation, Inc.
    Originally by Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
index 33c52beb2a3e1107a913fe6902ebe58309a9ca2a..7c4a429f762bc07d277c90ed9e3e773810b66509 100644 (file)
@@ -49,6 +49,9 @@ AC_SUBST(DLLTOOL)
 AC_SUBST(FILE)
 AC_SUBST(OBJDUMP)
 AC_SUBST(AS)
+AC_SUBST(reload_flag)
+AC_SUBST(file_magic_cmd)
+AC_SUBST(deplibs_check_method)
 
 LIBTOOL_FLAGS="$libtool_flags"
 AC_SUBST(LIBTOOL_FLAGS)
index 7c123bb8e285d1e93910fb7f61dd2af0569b1e36..026f766dfcd20d02457c86aa4878b48319516d45 100644 (file)
@@ -1,5 +1,5 @@
 /* dlmain.c -- hello test program that uses simulated dynamic linking
-   Copyright (C) 1996-1999 Free Software Foundation, Inc.
+   Copyright (C) 1996-2000 Free Software Foundation, Inc.
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
index 4b67739970b8bbbe44e3d5277aaea1c254d7cf77..ae9b6d8b4c3ecc18ded5af958c0ec33790de8e75 100644 (file)
@@ -1,5 +1,5 @@
 /* foo.c -- trivial test function for libfoo
-   Copyright (C) 1996-1999 Free Software Foundation, Inc.
+   Copyright (C) 1996-2000 Free Software Foundation, Inc.
    Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    This file is part of GNU Libtool.
 
index 6d4fee709d542486c2ff1f61179254ba05287a5f..2979874d9ab0116ff63ac324ca826ca424e3761f 100644 (file)
@@ -1,5 +1,5 @@
 /* foo.h -- interface to the libfoo library
-   Copyright (C) 1996-1999 Free Software Foundation, Inc.
+   Copyright (C) 1996-2000 Free Software Foundation, Inc.
    Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    This file is part of GNU Libtool.
 
index ec9a639b95709da85aa05fdb8ef02a253c27eeb7..848407a0d0c728b85289cf5ebea00e9314697687 100644 (file)
@@ -1,5 +1,5 @@
 /* hello.c -- trivial test function for libfoo
-   Copyright (C) 1996-1999 Free Software Foundation, Inc.
+   Copyright (C) 1996-2000 Free Software Foundation, Inc.
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
index d40dc5929ef8a3e9f2919555ad9d862e03a2ae36..d0de6e5c17f53783aee3237df501ea6666255c4c 100644 (file)
@@ -1,5 +1,5 @@
 /* main.c -- trivial hello test program
-   Copyright (C) 1996-1999 Free Software Foundation, Inc.
+   Copyright (C) 1996-2000 Free Software Foundation, Inc.
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
index ba2fa7734080f15bf6a03c3e025132da8f439972..574554d2f64c93fbb55ef5c115419447e5eba5ec 100644 (file)
@@ -1,5 +1,5 @@
 /* l1.c -- trivial test library
-   Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   Copyright (C) 1998-2000 Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
index fa70bb8b023b14fcc7e36dfa2b33248faffb8550..d140bfce4d30aee4e3a1139712f1bf5ace84e578 100644 (file)
@@ -1,5 +1,5 @@
 /* l1.h -- interface to a trivial library
-   Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   Copyright (C) 1998-2000 Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
index 555d0688fe61d072b35a8899f33ed3b57223f9d4..bcfea6846991eba2d5c1d32e16c1938ea0318986 100644 (file)
@@ -1,5 +1,5 @@
 /* l2.c -- trivial test library
-   Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   Copyright (C) 1998-2000 Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
index 893e26bde6d0b6fc583f4761ad77c0db80419777..97ac379fb5a195d60fae045011403d37fcb821b9 100644 (file)
@@ -1,5 +1,5 @@
 /* l2.h -- interface to a trivial library
-   Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   Copyright (C) 1998-2000 Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
index de75bd6f3ecfb8368b9c40d9a61eedf2cec93ab2..b41c5c52d70463fc8e0476239ea4d22a3c4fa10b 100644 (file)
@@ -1,5 +1,5 @@
 /* l3.c -- trivial test library
-   Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   Copyright (C) 1998-2000 Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
index d9b79fb081e2171ddb15b38c2ca9fa2b1b291d43..9fa7fffc70d91d418bf0f21afa4ace716348f239 100644 (file)
@@ -1,5 +1,5 @@
 /* l3.h -- interface to a trivial library
-   Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   Copyright (C) 1998-2000 Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
index d99d0200e04d98ef03b419643d985e51ce6f4182..bf5fdc8a653d534d1a6b4edb518cde6d65a87cb2 100644 (file)
@@ -1,5 +1,5 @@
 /* l4.c -- trivial test library
-   Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   Copyright (C) 1998-2000 Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
index 17ab6ea2201608d560217693c243dd8ab99633f0..c7f110bb42a3bcde8d1e9269b2207797f2c1b644 100644 (file)
@@ -1,5 +1,5 @@
 /* l4.h -- interface to a trivial library
-   Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   Copyright (C) 1998-2000 Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
index 6940b624beda1299f27736bfa3facf0077b1bb69..7339111f14b0b3a7ba32e01f7d06619323e0a6cd 100644 (file)
@@ -1,5 +1,5 @@
 /* main.c -- inter-library dependency test program
-   Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   Copyright (C) 1998-2000 Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
index 40dcfbd4f5c1c81736cc04cf863074cabf103b01..a241078fed7d42eb799bc8116aaa486c615ef4e6 100644 (file)
@@ -1,5 +1,5 @@
 /* sysdep.h -- system dependent declarations
-   Copyright (C) 1998-1999 Thomas Tanner <tanner@ffii.org>
+   Copyright (C) 1998-2000 Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
 This program is free software; you can redistribute it and/or modify
index 34e03d57dd5601ca513c7eaef9560cf958665982..f28659b4e6af49fca3bcb6bcd5feb002e1dabc35 100644 (file)
@@ -24,7 +24,7 @@
 @ifinfo
 This file documents GNU Libtool @value{VERSION}
 
-Copyright (C) 1996-1999 Free Software Foundation, Inc.
+Copyright (C) 1996-2000 Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of this
 manual provided the copyright notice and this permission notice are
@@ -59,7 +59,7 @@ approved by the Foundation.
 
 @page
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1996-1999 Free Software Foundation, Inc.
+Copyright @copyright{} 1996-2000 Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of this
 manual provided the copyright notice and this permission notice are
@@ -2612,7 +2612,7 @@ burger$
 Libtool provides special support for dlopening libtool object and
 libtool library files, so that their symbols can be resolved @emph{even
 on platforms without any @code{dlopen} and @code{dlsym}
-functions.}.
+functions}.
 
 Consider the following alternative ways of loading code into your
 program, in order of increasing ``laziness'':
@@ -2823,6 +2823,16 @@ The following types are defined in @file{ltdl.h}:
 Every dlopened module has a handle associated with it.
 @end deftp
 
+@deftypefn {Type} {struct} lt_dlinfo @{ @w{char *@var{filename};} @w{char *@var{name};} @w{int @var{ref_count};} @}
+@code{lt_dlinfo} is used to store information about a module.
+The @var{filename} attribute is a null-terminated character string of the
+real module file name.  If the module is a libtool module then @var{name}
+is its module name (e.g. @code{"libfoo"} for @code{"dir/libfoo.la"}),
+otherwise it is set to @code{NULL}.
+The @var{ref_count} attribute is a reference counter that describes how often
+the same module is currently loaded.
+@end deftypefn
+
 @deftp {Type} lt_dlsymlist
 @code{lt_dlsymlist} is a symbol list for dlpreopened modules.
 This structure is described in @pxref{Dlpreopening}.
@@ -2858,7 +2868,7 @@ executable using this module was linked with the @code{-export-dynamic}
 flag, then the global symbols in the executable will also be used to
 resolve references in the module.
  
-If @var{filename} is NULL and the program was linked with
+If @var{filename} is @code{NULL} and the program was linked with
 @code{-export-dynamic} or @code{-dlopen self}, @code{lt_dlopen} will
 return a handle for the program itself, which can be used to access its
 symbols.
@@ -2885,7 +2895,7 @@ Each search path must be a colon-separated list of absolute directories,
 for example, @code{"/usr/lib/mypkg:/lib/foo"}.
  
 If the same module is loaded several times, the same handle is returned.
-If @code{lt_dlopen} fails for any reason, it returns NULL.
+If @code{lt_dlopen} fails for any reason, it returns @code{NULL}.
 @end deftypefun
 
 @deftypefun lt_dlhandle lt_dlopenext (const char *@var{filename})
@@ -2916,19 +2926,19 @@ Return 0 on success.
 @deftypefun lt_ptr_t lt_dlsym (lt_dlhandle @var{handle}, const char *@var{name})
 Return the address in the module @var{handle}, where the symbol given 
 by the null terminated string @var{name} is loaded.
-If the symbol cannot be found, NULL is returned.
+If the symbol cannot be found, @code{NULL} is returned.
 @end deftypefun
  
 @deftypefun {const char *} lt_dlerror (void)
 Return a human readable string describing the most 
 recent error that occurred from any of libltdl's functions.
-Return NULL if no errors have occurred since initialization
+Return @code{NULL} if no errors have occurred since initialization
 or since it was last called.
 @end deftypefun
  
 @deftypefun int lt_dlpreload (const lt_dlsymlist *@var{preloaded})
 Register the list of preloaded modules @var{preloaded}.
-If @var{preloaded} is NULL, then all previously registered
+If @var{preloaded} is @code{NULL}, then all previously registered
 symbol lists, except the list set by @code{lt_dlpreload_default},
 are deleted. Return 0 on success.
 @end deftypefun
@@ -2975,6 +2985,22 @@ directories.  Return 0 on success.
 Return the current user-defined library search path.
 @end deftypefun
 
+@deftypefun int lt_dlsetdata (lt_dlhandle @var{handle}, lt_ptr_t @var{data})
+Set the application private data for the module @var{handle} to @var{data}.
+Return 0 on success.
+@end deftypefun
+
+@deftypefun lt_ptr_t lt_dlgetdata (lt_dlhandle @var{handle})
+Return the application private data for the module @var{handle}.
+If the handle @var{handle} is invalid or no data was set, it returns @code{NULL}.
+@end deftypefun
+
+@deftypefun {const lt_dlinfo *} lt_dlgetinfo (lt_dlhandle @var{handle})
+Return a pointer to a struct that contains some information about
+the module @var{handle}.  The contents of the struct must not be modified.
+Return @code{NULL} on failure. 
+@end deftypefun
+
 @deftypevar {lt_ptr_t (*} lt_dlmalloc ) (size_t size)
 @deftypevarx {void (*} lt_dlfree ) (lt_ptr_t ptr)
 These variables are set to @code{malloc} and @code{free}, by default,
index dafd5854d5180f44b823ac9abece4179103d6718..aafac4c948ca45917d5ded216122ded802184855 100644 (file)
@@ -14,7 +14,7 @@ noinst_LTLIBRARIES = libltdlc.la
 endif
 
 libltdl_la_SOURCES = ltdl.c
-libltdl_la_LDFLAGS = -no-undefined -version-info 1:2:1
+libltdl_la_LDFLAGS = -no-undefined -version-info 2:1:2
 libltdl_la_LIBADD = $(LIBADD_DL)
 
 libltdlc_la_SOURCES = ltdl.c
index ef9a1b2b428223a6a934f3ccd9fe66aa956b63a1..8192e539ba1ee837697a32f92f7af2b1a4877124 100644 (file)
@@ -21,7 +21,7 @@ if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then
   fi
 fi
 
-AM_INIT_AUTOMAKE(libltdl,1.0,-)
+AM_INIT_AUTOMAKE(libltdl,1.1,-)
 AM_CONFIG_HEADER(config.h)
 AM_MAINTAINER_MODE
 
index c1933cdde9723decfcd55ff9b13e9c7fde2943c5..9cb5887e7c8fcff0734997edc0aad22fcdc12ee5 100644 (file)
@@ -1,5 +1,5 @@
 /* ltdl.c -- system independent dlopen wrapper
-   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Copyright (C) 1998-2000 Free Software Foundation, Inc.
    Originally by Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
@@ -129,13 +129,12 @@ typedef struct lt_dltype_t {
 typedef        struct lt_dlhandle_t {
        struct lt_dlhandle_t *next;
        lt_dltype_t *type;      /* dlopening interface */
-       char    *filename;      /* file name */
-       char    *name;          /* module name */
-       int     usage;          /* usage */
+       lt_dlinfo info;
        int     depcount;       /* number of dependencies */
        lt_dlhandle *deplibs;   /* dependencies */
        lt_ptr_t handle;        /* system handle */
        lt_ptr_t system;        /* system specific data */
+       lt_ptr_t app_private;   /* application private data */
 } lt_dlhandle_t;
 
 #undef strdup
@@ -923,36 +922,37 @@ tryall_dlopen (handle, filename)
        /* check whether the module was already opened */
        cur = handles;
        while (cur) {
-               if (!cur->filename && !filename)
+               /* try to dlopen the program itself? */
+               if (!cur->info.filename && !filename)
                        break;
-               if (cur->filename && filename && 
-                   strcmp(cur->filename, filename) == 0)
+               if (cur->info.filename && filename && 
+                   strcmp(cur->info.filename, filename) == 0)
                        break;
                cur = cur->next;
        }
        if (cur) {
-               cur->usage++;
+               cur->info.ref_count++;
                *handle = cur;
                return 0;
        }
        
        cur = *handle;
        if (filename) {
-               cur->filename = strdup(filename);
-               if (!cur->filename) {
+               cur->info.filename = strdup(filename);
+               if (!cur->info.filename) {
                        last_error = memory_error;
                        return 1;
                }
        } else
-               cur->filename = 0;
+               cur->info.filename = 0;
        while (type) {
                if (type->lib_open(cur, filename) == 0)
                        break;
                type = type->next;
        }
        if (!type) {
-               if (cur->filename)
-                       lt_dlfree(cur->filename);
+               if (cur->info.filename)
+                       lt_dlfree(cur->info.filename);
                return 1;
        }
        cur->type = type;
@@ -987,9 +987,9 @@ find_module (handle, dir, libdir, dlname, old_name, installed)
                                return 1;
                        }
                        sprintf (filename, "%s/%s", libdir, dlname);
-                       error = tryall_dlopen(handle, filename) == 0;
+                       error = tryall_dlopen(handle, filename) != 0;
                        lt_dlfree(filename);
-                       if (error)
+                       if (!error)
                                return 0;
                }
                /* try to open the not-installed module */
@@ -1008,12 +1008,12 @@ find_module (handle, dir, libdir, dlname, old_name, installed)
                        strcat(filename, objdir);
                        strcat(filename, dlname);
 
-                       error = tryall_dlopen(handle, filename) == 0;
+                       error = tryall_dlopen(handle, filename) != 0;
                        lt_dlfree(filename);
-                       if (error)
+                       if (!error)
                                return 0;
                }
-               /* hmm, maybe it was moved to another directory */
+               /* maybe it was moved to another directory */
                {
                        filename = (char*)
                                lt_dlmalloc((dir ? strlen(dir) : 0)
@@ -1023,9 +1023,9 @@ find_module (handle, dir, libdir, dlname, old_name, installed)
                        else
                                *filename = 0;
                        strcat(filename, dlname);
-                       error = tryall_dlopen(handle, filename) == 0;
+                       error = tryall_dlopen(handle, filename) != 0;
                        lt_dlfree(filename);
-                       if (error)
+                       if (!error)
                                return 0;
                }
        }
@@ -1212,7 +1212,7 @@ lt_dlopen (filename)
        lt_dlhandle handle = 0, newhandle;
        const char *ext;
        const char *saved_error = last_error;
-       char    *basename = 0, *dir = 0, *name = 0;
+       char    *canonical = 0, *basename = 0, *dir = 0, *name = 0;
        
        if (!filename) {
                handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t));
@@ -1220,7 +1220,7 @@ lt_dlopen (filename)
                        last_error = memory_error;
                        return 0;
                }
-               handle->usage = 0;
+               handle->info.ref_count = 0;
                handle->depcount = 0;
                handle->deplibs = 0;
                newhandle = handle;
@@ -1230,28 +1230,26 @@ lt_dlopen (filename)
                }
                goto register_handle;
        }
-       {
-               char *canonical = canonicalize_path (filename);
-               if (!canonical) {
+       canonical = canonicalize_path (filename);
+       if (!canonical) {
+               last_error = memory_error;
+               if (handle)
+                       lt_dlfree(handle);
+               return 0;
+       }
+       basename = strrchr(canonical, '/');
+       if (basename) {
+               basename++;
+               dir = (char*) lt_dlmalloc(basename - canonical + 1);
+               if (!dir) {
                        last_error = memory_error;
-                       if (handle)
-                               lt_dlfree(handle);
-                       return 0;
+                       handle = 0;
+                       goto cleanup;
                }
-               basename = strrchr(canonical, '/');
-               if (basename) {
-                       basename++;
-                       dir = (char*) lt_dlmalloc(basename - canonical + 1);
-                       if (!dir) {
-                               last_error = memory_error;
-                               handle = 0;
-                               goto cleanup;
-                       }
-                       strncpy(dir, canonical, basename - canonical);
-                       dir[basename - canonical] = '\0';
-               } else
-                       basename = canonical;
-       }
+               strncpy(dir, canonical, basename - canonical);
+               dir[basename - canonical] = '\0';
+       } else
+               basename = canonical;
        /* check whether we open a libtool module (.la extension) */
        ext = strrchr(basename, '.');
        if (ext && strcmp(ext, ".la") == 0) {
@@ -1367,7 +1365,7 @@ lt_dlopen (filename)
                        /* handle is already set to 0 */
                        goto cleanup;
                }
-               handle->usage = 0;
+               handle->info.ref_count = 0;
                if (load_deplibs(handle, deplibs) == 0) {
                        newhandle = handle;
                        /* find_module may replace newhandle */
@@ -1378,15 +1376,14 @@ lt_dlopen (filename)
                        }
                } else
                        error = 1;
+               free_vars(dlname, old_name, libdir, deplibs);
                if (error) {
                        lt_dlfree(handle);
                        handle = 0;
-                       free_vars(dlname, old_name, libdir, deplibs);
                        goto cleanup;
                }
-               if (handle != newhandle) {
+               if (handle != newhandle)
                        unload_deplibs(handle);
-               }
        } else {
                /* not a libtool module */
                handle = (lt_dlhandle) lt_dlmalloc(sizeof(lt_dlhandle_t));
@@ -1395,7 +1392,7 @@ lt_dlopen (filename)
                        /* handle is already set to 0 */
                        goto cleanup;
                }
-               handle->usage = 0;
+               handle->info.ref_count = 0;
                /* non-libtool modules don't have dependencies */
                handle->depcount = 0;
                handle->deplibs = 0;
@@ -1423,9 +1420,10 @@ register_handle:
                lt_dlfree(handle);
                handle = newhandle;
        }
-       if (!handle->usage) {
-               handle->usage = 1;
-               handle->name = name;
+       if (!handle->info.ref_count) {
+               handle->info.ref_count = 1;
+               handle->app_private = 0;
+               handle->info.name = name;
                handle->next = handles;
                handles = handle;
                name = 0;       /* don't free this during `cleanup' */
@@ -1436,6 +1434,8 @@ cleanup:
                lt_dlfree(dir);
        if (name)
                lt_dlfree(name);
+       if (canonical)
+               lt_dlfree(canonical);
        return handle;
 }
 
@@ -1514,8 +1514,8 @@ lt_dlclose (handle)
                last_error = invalid_handle_error;
                return 1;
        }
-       handle->usage--;
-       if (!handle->usage) {
+       handle->info.ref_count--;
+       if (!handle->info.ref_count) {
                int     error;
        
                if (handle != handles)
@@ -1524,10 +1524,10 @@ lt_dlclose (handle)
                        handles = handle->next;
                error = handle->type->lib_close(handle);
                error += unload_deplibs(handle);
-               if (handle->filename)
-                       lt_dlfree(handle->filename);
-               if (handle->name)
-                       lt_dlfree(handle->name);
+               if (handle->info.filename)
+                       lt_dlfree(handle->info.filename);
+               if (handle->info.name)
+                       lt_dlfree(handle->info.name);
                lt_dlfree(handle);
                return error;
        }
@@ -1555,8 +1555,8 @@ lt_dlsym (handle, symbol)
        lensym = strlen(symbol);
        if (handle->type->sym_prefix)
                lensym += strlen(handle->type->sym_prefix);
-       if (handle->name)
-               lensym += strlen(handle->name);
+       if (handle->info.name)
+               lensym += strlen(handle->info.name);
        if (lensym + LTDL_SYMBOL_OVERHEAD < LTDL_SYMBOL_LENGTH)
                sym = lsym;
        else
@@ -1565,15 +1565,15 @@ lt_dlsym (handle, symbol)
                last_error = buffer_overflow_error;
                return 0;
        }
-       if (handle->name) {
+       if (handle->info.name) {
                const char *saved_error = last_error;
                
                /* this is a libtool module */
                if (handle->type->sym_prefix) {
                        strcpy(sym, handle->type->sym_prefix);
-                       strcat(sym, handle->name);
+                       strcat(sym, handle->info.name);
                } else
-                       strcpy(sym, handle->name);
+                       strcpy(sym, handle->info.name);
                strcat(sym, "_LTX_");
                strcat(sym, symbol);
                /* try "modulename_LTX_symbol" */
@@ -1654,3 +1654,38 @@ lt_dlgetsearchpath LTDL_PARAMS((void))
 {
        return user_search_path;
 }
+
+int
+lt_dlsetdata (handle, data)
+       lt_dlhandle handle;
+       lt_ptr_t data;
+{
+       if (!handle) {
+               last_error = invalid_handle_error;
+               return 1;
+       }
+       handle->app_private = data;
+       return 0;
+}
+
+lt_ptr_t
+lt_dlgetdata (handle)
+       lt_dlhandle handle;
+{
+       if (!handle) {
+               last_error = invalid_handle_error;
+               return 0;
+       }
+       return handle->app_private;
+}
+
+const lt_dlinfo *
+lt_dlgetinfo (handle)
+       lt_dlhandle handle;
+{
+       if (!handle) {
+               last_error = invalid_handle_error;
+               return 0;
+       }
+       return &(handle->info);
+}
index 8dd43e225f88ae50f1e61c6ff2721b1ed49edee4..0fafa207c58fc94d5aa183030884831e4aaeb0be 100644 (file)
@@ -1,5 +1,5 @@
 /* ltdl.h -- generic dlopen functions
-   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Copyright (C) 1998-2000 Free Software Foundation, Inc.
    Originally by Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
@@ -107,6 +107,12 @@ typedef struct {
        lt_ptr_t address;
 } lt_dlsymlist;
 
+typedef        struct {
+       char    *filename;      /* file name */
+       char    *name;          /* module name */
+       int     ref_count;      /* reference count */
+} lt_dlinfo;
+
 __BEGIN_DECLS
 extern int lt_dlinit LTDL_PARAMS((void));
 extern int lt_dlpreload LTDL_PARAMS((const lt_dlsymlist *preloaded));
@@ -120,6 +126,9 @@ extern const char *lt_dlerror LTDL_PARAMS((void));
 extern int lt_dladdsearchdir LTDL_PARAMS((const char *search_dir));
 extern int lt_dlsetsearchpath LTDL_PARAMS((const char *search_path));
 extern const char *lt_dlgetsearchpath LTDL_PARAMS((void));
+extern int lt_dlsetdata LTDL_PARAMS((lt_dlhandle handle, lt_ptr_t data));
+extern lt_ptr_t lt_dlgetdata LTDL_PARAMS((lt_dlhandle handle));
+extern const lt_dlinfo *lt_dlgetinfo LTDL_PARAMS((lt_dlhandle handle));
 
 LTDL_SCOPE const lt_dlsymlist lt_preloaded_symbols[];
 #define LTDL_SET_PRELOADED_SYMBOLS() lt_dlpreload_default(lt_preloaded_symbols)
index cf4c53909c15ddf8320047bd7ca878fec20ffaef..8a2b5e6eac999529145c74d8bf9163c1bfa48c9b 100644 (file)
@@ -1,5 +1,5 @@
 ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
-## Copyright (C) 1996-1999 Free Software Foundation, Inc.
+## Copyright (C) 1996-2000 Free Software Foundation, Inc.
 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 ##
 ## This program is free software; you can redistribute it and/or modify
index 71e4be5caea2f5b908dfa0824a23af42bc22cf2f..5b90ae1de178c64afcb1d2b1c1dbb90e32b24a22 100644 (file)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # libtoolize - Prepare a package to use libtool.
 # @configure_input@
-# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Copyright (C) 1996-2000 Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
 # This program is free software; you can redistribute it and/or modify
diff --git a/lineno b/lineno
index e4264f895c4f096b2c95063c7cf607e46ac10e53..7ee92da8bde60d3be7f7c133ff344211794ffbb8 100755 (executable)
--- a/lineno
+++ b/lineno
@@ -2,7 +2,7 @@
 # lineno - Replace instances of @LINENO@ with the file's current line number
 # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1997
 
-# Copyright (C) 1992-1999 Free Software Foundation, Inc.
+# Copyright (C) 1992-2000 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
index 88f98259401617d342865712d563f54eab118ac1..0ce7f48b8341a7227ec7c440c799d27ad405d3b2 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 # ltconfig - Create a system-specific libtool.
-# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Copyright (C) 1996-2000 Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
 # This file is free software; you can redistribute it and/or modify it
@@ -492,16 +492,16 @@ else
   ac_tool_prefix=
 fi
 
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
 case "$host_os" in
 linux-gnu*) ;;
 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
 esac
 
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
 case "$host_os" in
 aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
@@ -1587,6 +1587,7 @@ gnu*)
   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
   soname_spec='${libname}${release}.so$major'
   shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
   ;;
 
 hpux9* | hpux10* | hpux11*)
@@ -1647,7 +1648,7 @@ linux-gnu*)
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
-  hardcode_into_libs=yes
+  hardcode_into_libs=yes
 
   if test -f /lib/ld.so.1; then
     dynamic_linker='GNU ld.so'
@@ -1718,6 +1719,7 @@ solaris*)
   soname_spec='${libname}${release}.so$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
   # ldd complains unless libraries are executable
   postinstall_cmds='chmod +x $lib'
   ;;
@@ -1990,7 +1992,7 @@ test "$enable_shared" = yes || enable_static=yes
 
 echo "checking whether to build static libraries... $enable_static" 1>&6
 
-if test "$hardcode_action" = relink || test "$hardcode_into_libs" = yes; then
+if test "$hardcode_action" = relink || test "$hardcode_into_libs" = all; then
   # Fast installation is not supported
   enable_fast_install=no
 elif test "$shlibpath_overrides_runpath" = yes ||
@@ -2516,7 +2518,7 @@ case "$ltmain" in
 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
 # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
 #
-# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Copyright (C) 1996-2000 Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
 # This program is free software; you can redistribute it and/or modify
@@ -2872,7 +2874,7 @@ EOF
       # on Windows for dlls which lack them. Don't remove nor modify the
       # starting and closing comments
 # /* impgen.c starts here */
-# /*   Copyright (C) 1999 Free Software Foundation, Inc.
+# /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
 # 
 #  This file is part of GNU libtool.
 # 
diff --git a/ltdl.m4 b/ltdl.m4
index 1601efc24463aae423805dfa3c87a68d927338c6..84e1c667cdaebcddb42adf2f9c3c0c8b97955bb6 100644 (file)
--- a/ltdl.m4
+++ b/ltdl.m4
@@ -1,5 +1,5 @@
-## libltdl.m4 - Configure ltdl for the target system. -*-Shell-script-*-
-## Copyright (C) 1999 Free Software Foundation, Inc.
+## ltdl.m4 - Configure ltdl for the target system. -*-Shell-script-*-
+## Copyright (C) 1999-2000 Free Software Foundation, Inc.
 ##
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
index 8252dc4d7b430f2d30533fc09c8cd58933fdb6a3..eb60e742a22ef5ab65f57c2509b8318bc7cc09be 100644 (file)
--- a/ltmain.c
+++ b/ltmain.c
@@ -1,5 +1,5 @@
 /* ltmain.c - C implementation of GNU Libtool
- * Copyright (C) 1998-1999 Free Software Foundation, Inc.
+ * Copyright (C) 1998-2000 Free Software Foundation, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index ff68bfedd9f0672b8e8d7ab1c9c3444fa2e2464a..8fc3deeaa52d250b4c6af15a79af6ecd264083cc 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1,7 +1,7 @@
 # ltmain.sh - Provide generalized library-building support services.
 # NOTE: Changing this file will not affect anything until you rerun ltconfig.
 #
-# Copyright (C) 1996-1999 Free Software Foundation, Inc.
+# Copyright (C) 1996-2000 Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
 # This program is free software; you can redistribute it and/or modify
@@ -694,8 +694,6 @@ compiler."
   # libtool link mode
   link | relink)
     modename="$modename: link"
-    relink=no
-    test "$mode" = "relink" && relink=yes
     case "$host" in
     *-*-cygwin* | *-*-mingw* | *-*-os2*)
       # It is impossible to link a dll without this setting, and
@@ -1640,7 +1638,7 @@ compiler."
        fi
       fi
 
-      if test "$relink" = no; then
+      if test "$mode" != relink; then
        # Remove our outputs.
        $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
        $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
@@ -1784,7 +1782,7 @@ compiler."
        if test -n "$library_names" &&
           { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
          # This is a shared library
-         if test "$hardcode_into_libs" = yes; then
+         if test "$hardcode_into_libs" = all; then
            # Hardcode the library path.
            # Skip directories that are in the system default run-time
            # search path.
@@ -1857,7 +1855,7 @@ compiler."
          add_dir=
          add_shlibpath=
          add_name=no
-         if test "$relink" = no; then
+         if test "$mode" != relink; then
            lib_linked=yes
            case "$hardcode_action" in
            immediate | unsupported)
@@ -1952,7 +1950,9 @@ compiler."
          fi
        fi
 
-       if test -n "$dependency_libs"; then
+       if test -n "$dependency_libs" &&
+          { test "$hardcode_into_libs" = no || test $build_old_libs = yes ||
+            test $link_static = yes; }; then
          # Extract -R from dependency_libs
          temp_deplibs=
          for libdir in $dependency_libs; do
@@ -2039,16 +2039,14 @@ compiler."
        temp_xrpath=
        for libdir in $xrpath; do
          temp_xrpath="$temp_xrpath -R$libdir"
-         case "$compile_rpath " in
-         *" $libdir "*) ;;
-         *) compile_rpath="$compile_rpath $libdir" ;;
-         esac
          case "$finalize_rpath " in
          *" $libdir "*) ;;
          *) finalize_rpath="$finalize_rpath $libdir" ;;
          esac
        done
-       dependency_libs="$temp_xrpath $dependency_libs"
+       if test "$hardcode_into_libs" = no || test $build_old_libs = yes; then
+         dependency_libs="$temp_xrpath $dependency_libs"
+       fi
       fi
 
       # Restore the variables
@@ -2278,12 +2276,12 @@ EOF
       
       # Test again, we may have decided not to build it any more
       if test "$build_libtool_libs" = yes; then
-       if test "$hardcode_into_libs" = yes; then
+       if test "$hardcode_into_libs" != no; then
          # Hardcode the library paths
          hardcode_libdirs=
          dep_rpath=
          rpath="$finalize_rpath"
-         test "$relink" = no && rpath="$compile_rpath$rpath"
+         test "$mode" != relink && rpath="$compile_rpath$rpath"
          for libdir in $rpath; do
            if test -n "$hardcode_libdir_flag_spec"; then
              if test -n "$hardcode_libdir_separator"; then
@@ -2328,7 +2326,7 @@ EOF
        fi
 
        shlibpath="$finalize_shlibpath" 
-       test "$relink" = no && shlibpath="$compile_shlibpath$shlibpath" 
+       test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"      
        if test -n "$shlibpath"; then
          eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
        fi
@@ -2444,7 +2442,7 @@ EOF
        fi
 
        # Make a backup of the uninstalled library when relinking
-       if test "$relink" = yes && test "$hardcode_into_libs" = yes ; then
+       if test "$mode" = relink && test "$hardcode_into_libs" = all; then
          $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
        fi
 
@@ -2463,7 +2461,7 @@ EOF
        IFS="$save_ifs"
 
        # Restore the uninstalled library and exit
-       if test "$relink" = yes && test "$hardcode_into_libs" = yes; then
+       if test "$mode" = relink && test "$hardcode_into_libs" = all; then
          $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
          exit 0
        fi
@@ -2762,15 +2760,7 @@ EOF
          fi
        done
       done
-      
-      # Eliminate all dependency_libs that are already contained in deplibs
-      dependency_libs=
-      for deplib in $newdependency_libs; do
-       case "$deplibs " in
-       *" $deplib "*) ;;
-       *) dependency_libs="$dependency_libs $deplib" ;;
-       esac
-      done
+      dependency_libs="$newdependency_libs"
 
       # Make sure lib_search_path contains only unique directories.
       lib_search_path=
@@ -2899,7 +2889,7 @@ EOF
        name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
 
        hardcode=yes
-       test "$hardcode_into_libs" = yes && test "$alldeplibs" = yes && hardcode=no
+       test "$hardcode_into_libs" = all && test "$alldeplibs" = yes && hardcode=no
        if test "$hardcode" = yes && test -n "$library_names" &&
           { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
          # We need to hardcode the library path
@@ -3113,10 +3103,6 @@ EOF
        # If the user specified any rpath flags, then add them.
        for libdir in $rpath $xrpath; do
          # This is the magic to use -rpath.
-         case "$compile_rpath " in
-         *" $libdir "*) ;;
-         *) compile_rpath="$compile_rpath $libdir" ;;
-         esac
          case "$finalize_rpath " in
          *" $libdir "*) ;;
          *) finalize_rpath="$finalize_rpath $libdir" ;;
@@ -3475,7 +3461,7 @@ static const void *lt_preloaded_setup() {
        exit 0
       fi
 
-      if test "$hardcode_action" = relink || test "$hardcode_into_libs" = yes; then
+      if test "$hardcode_action" = relink || test "$hardcode_into_libs" = all; then
        # Fast installation is not supported
        link_command="$compile_var$compile_command$compile_rpath"
        relink_command="$finalize_var$finalize_command$finalize_rpath"
@@ -4082,7 +4068,7 @@ relink_command=\"$relink_command\""
        test "X$dir" = "X$file/" && dir=
        dir="$dir$objdir"
 
-       if test "$hardcode_into_libs" = yes; then
+       if test "$hardcode_into_libs" = all; then
          if test -z "$relink_command"; then
            $echo "$modename: invalid libtool pseudo library \`$file'" 1>&2
            exit 1
@@ -4104,7 +4090,7 @@ relink_command=\"$relink_command\""
          shift
 
          srcname="$realname"
-         test "$hardcode_into_libs" = yes && srcname="$realname"T
+         test "$hardcode_into_libs" = all && srcname="$realname"T
 
          # Install the shared library and build the symlinks.
          $show "$install_prog $dir/$srcname $destdir/$realname"
index 48dc9127ed52940c517e13d6d48c6ce4f6a83546..d6d5bdc4acf879aceeccc4eab2a0e2e072647c05 100644 (file)
@@ -1,5 +1,5 @@
 /* foo.h -- interface to the libfoo* libraries
-   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Copyright (C) 1998-2000 Free Software Foundation, Inc.
    Originally by Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
index a6a28dd2c012f155d405090c47b581335c9e3df1..67144c98590d5db8722adde8ba7fd6fd9ee0a2ee 100644 (file)
@@ -1,5 +1,5 @@
 /* foo1.c -- trivial test library
-   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Copyright (C) 1998-2000 Free Software Foundation, Inc.
    Originally by Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
index a747d4c69f5d0eedd5a2dae2f16223ddb28d4622..503dc402bc7bce5e86888172b8a883cff1358824 100644 (file)
@@ -1,5 +1,5 @@
 /* foo2.c -- trivial test library
-   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Copyright (C) 1998-2000 Free Software Foundation, Inc.
    Originally by Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
index afe02a2d1362426d5ba58aeedeac92f1200ea516..312fd10edb21873082fdd9da4a4a7f4db8308bed 100644 (file)
@@ -1,5 +1,5 @@
 /* main.c -- mdemo test program
-   Copyright (C) 1998-1999 Free Software Foundation, Inc.
+   Copyright (C) 1998-2000 Free Software Foundation, Inc.
    Originally by Thomas Tanner <tanner@ffii.org>
    This file is part of GNU Libtool.
 
@@ -27,6 +27,7 @@ test_dl (filename)
   char *filename;
 {
   lt_dlhandle handle;  
+  const lt_dlinfo *info;
   int (*pfoo1)() = 0;
   int (*pfoo2)() = 0;
   int (*phello)() = 0;
@@ -39,11 +40,21 @@ test_dl (filename)
     fprintf (stderr, "error was: %s\n", lt_dlerror());
     return 1;
   }
-  phello = (int(*)())lt_dlsym(handle, "hello");  
-  pfoo1 = (int(*)())lt_dlsym(handle, "foo1");  
-  pfoo2 = (int(*)())lt_dlsym(handle, "foo2");  
-  pnothing = (int*)lt_dlsym(handle, "nothing");  
 
+  info = lt_dlgetinfo(handle);
+  if (!info) {
+    fprintf (stderr, "can't get module info: %s\n", lt_dlerror());
+    return 1;
+  }
+  if (info->name) {
+    printf ("module name: %s\n", info->name);
+  } else {
+    printf ("module is not a libtool module\n");
+  }
+  printf ("module filename: %s\n", info->filename);
+  printf ("module reference count: %i\n", info->ref_count);
+  
+  phello = (int(*)())lt_dlsym(handle, "hello");  
   if (phello)
     {
       int value = (*phello) ();
@@ -55,18 +66,22 @@ test_dl (filename)
   else
     {
       fprintf (stderr, "did not find the `hello' function\n");
+      fprintf (stderr, "error was: %s\n", lt_dlerror());
       ret = 1;
     }
 
+  pnothing = (int*)lt_dlsym(handle, "nothing");  
   /* Try assigning to the nothing variable. */
   if (pnothing)
     *pnothing = 1;
   else
     {
       fprintf (stderr, "did not find the `nothing' variable\n");
+      fprintf (stderr, "error was: %s\n", lt_dlerror());
       ret = 1;
     }
 
+  pfoo1 = (int(*)())lt_dlsym(handle, "foo1");  
   /* Just call the functions and check return values. */
   if (pfoo1)
     {
@@ -75,18 +90,21 @@ test_dl (filename)
       else
        ret = 1;
     }
-  else if (pfoo2)
-    {
-      if ((*pfoo2) () == FOO_RET)
-        printf("foo2 is ok!\n");
-      else ret = 1;
-    }
-  else
-    {
-      fprintf (stderr, "did not find the `foo' function\n");
-      ret = 1;
-    }
-
+  else {
+    pfoo2 = (int(*)())lt_dlsym(handle, "foo2");  
+    if (pfoo2)
+      {
+        if ((*pfoo2) () == FOO_RET)
+          printf("foo2 is ok!\n");
+        else ret = 1;
+      }
+    else
+      {
+        fprintf (stderr, "did not find any of the `foo' functions\n");
+        fprintf (stderr, "error was: %s\n", lt_dlerror());
+        ret = 1;
+      }
+  }
   lt_dlclose(handle);
   return ret;
 }
@@ -113,9 +131,8 @@ test_dlself ()
     fprintf (stderr, "error was: %s\n", lt_dlerror());
     return 1;
   }
-  pmyfunc = (int(*)())lt_dlsym(handle, "myfunc");  
-  pmyvar  = (int*)lt_dlsym(handle, "myvar");  
 
+  pmyfunc = (int(*)())lt_dlsym(handle, "myfunc");  
   if (pmyfunc)
     {
       int value = (*pmyfunc) ();
@@ -127,15 +144,18 @@ test_dlself ()
   else
     {
       fprintf (stderr, "did not find the `myfunc' function\n");
+      fprintf (stderr, "error was: %s\n", lt_dlerror());
       ret = 1;
     }
 
+  pmyvar = (int*)lt_dlsym(handle, "myvar");  
   /* Try assigning to the variable. */
   if (pmyvar)
     *pmyvar = 1;
   else
     {
       fprintf (stderr, "did not find the `myvar' variable\n");
+      fprintf (stderr, "error was: %s\n", lt_dlerror());
       ret = 1;
     }
 
diff --git a/mkstamp b/mkstamp
index 08239af9ef54eb437d7502b114915fdb072f0b0a..ff4fd0d1e016740dde733eafdbddcd8a55ac6c53 100755 (executable)
--- a/mkstamp
+++ b/mkstamp
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 # mkstamp - extract data from Revision and Date RCS tags in a file
-# Copyright (C) 1999 Free Software Foundation, Inc.
+# Copyright (C) 1999-2000 Free Software Foundation, Inc.
 # Alexandre Oliva <oliva@dcc.unicamp.br>
 #
 # This file is free software; you can redistribute it and/or modify it
index dd5b4856ecc549f56d173773c9cb6a6683c99ae1..5a59e732ed502506f75e67fe26a36776a9d5533a 100755 (executable)
@@ -100,7 +100,7 @@ else
 fi
 
 if test "x$hardcode_action" = xrelink ||
-   test "x$hardcode_into_libs" = xyes; then
+   test "x$hardcode_into_libs" = xall; then
   echo "= Exiting: install-time relinking is required"
   exit 0
 fi
index 370fb4fc6edaa3213605db9bbbbb1795574246f2..b31b1541e63e5670b5b191dec49bd3ea5525caeb 100755 (executable)
@@ -100,7 +100,7 @@ else
 fi
 
 if test "x$hardcode_action" = xrelink ||
-   test "x$hardcode_into_libs" = xyes; then
+   test "x$hardcode_into_libs" = xall; then
   echo "= Exiting: install-time relinking is required"
   exit 0
 fi