]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* use the same header in all configure.in's and Makefile.am's
authorThomas Tanner <tanner@gmx.de>
Sat, 20 Mar 1999 00:27:33 +0000 (00:27 +0000)
committerThomas Tanner <tanner@gmx.de>
Sat, 20 Mar 1999 00:27:33 +0000 (00:27 +0000)
* NEWS: improved support for BeOS and Cygwin
* TODO: ILD branch was merged, all internal variables and macros
  are now documented
* demo/Makefile.am: use $(LIBS) instead of -lm
* doc/libtool.texi: documented new variable hardcode_into_libs
  and thread_safe_flag_spec, renamed all AM_ENABLE/DISABLE_* macros
  to AC_*, documented AC_DISABLE_FAST_INSTALL and AC_LIBTOOL_DLOPEN
* libltdl/ltdl.c: added two new error messages (cannot_open_error,
  cannot_close_error), use them where approriate,
  BeOS support (thanks to Xavier Pianet), on BeOS search modules
  additionally in ADDON_PATH
* libtool.m4: rewrote AC_CHECK_LIBM: BeOS and Cygwin don't have
  libm and *-ncr-sysv4.3* requires libmw
* ltconfig.in: don't check for LoadLibrary, hardcode dlopen
  configuration for BeOS and Cygwin
* ltmain.in: fix sourcing of .la files on Solaris
  (patch by Raja R Harinath)

25 files changed:
ChangeLog
Makefile.am
NEWS
TODO
cdemo/Makefile.am
cdemo/configure.in
demo/Makefile.am
demo/configure.in
depdemo/Makefile.am
depdemo/configure.in
depdemo/l1/Makefile.am
depdemo/l2/Makefile.am
depdemo/l3/Makefile.am
depdemo/l4/Makefile.am
doc/Makefile.am
doc/libtool.texi
libltdl/Makefile.am
libltdl/configure.in
libltdl/ltdl.c
libtool.m4
ltconfig.in
ltmain.in
mdemo/Makefile.am
mdemo/configure.in
tests/Makefile.am

index 2db68ee584a5262ac33490cf03e118c6ebfe67c3..021ee495db19cac408f793f85de7f231b059d193 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+1999-03-19 Thomas Tanner  <tanner@gmx.de>
+
+       * use the same header in all configure.in's and Makefile.am's
+       * NEWS: improved support for BeOS and Cygwin
+       * TODO: ILD branch was merged, all internal variables and macros
+         are now documented
+       * demo/Makefile.am: use $(LIBS) instead of -lm
+       * doc/libtool.texi: documented new variable hardcode_into_libs
+         and thread_safe_flag_spec, renamed all AM_ENABLE/DISABLE_* macros
+         to AC_*, documented AC_DISABLE_FAST_INSTALL and AC_LIBTOOL_DLOPEN
+       * libltdl/ltdl.c: added two new error messages (cannot_open_error,
+         cannot_close_error), use them where approriate,
+         BeOS support (thanks to Xavier Pianet), on BeOS search modules
+         additionally in ADDON_PATH
+       * libtool.m4: rewrote AC_CHECK_LIBM: BeOS and Cygwin don't have
+         libm and *-ncr-sysv4.3* requires libmw
+       * ltconfig.in: don't check for LoadLibrary, hardcode dlopen
+         configuration for BeOS and Cygwin
+       * ltmain.in: fix sourcing of .la files on Solaris 
+         (patch by Raja R Harinath)
+
 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * ltconfig.in (sunos4*, with_gnu_ld, hardcode_minus_L): remove, we
index 14005eea0008af30fd636b93fe14f2c3cdf5ae89..a43a37cfeb16e162fe24e18bed9bb5428d4de7a1 100644 (file)
@@ -1,5 +1,4 @@
-## Process Makefile.am with automake to create Makefile.in. -*-Makefile-*-
-## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+## Process this file with automake to produce Makefile.in
 
 AUTOMAKE_OPTIONS = 1.3e gnits readme-alpha
 
diff --git a/NEWS b/NEWS
index 51c0e8d4161d08d82e7c9d166d7ff9ce043bff5b..674c25f2fd9b780a4b9785027e075a62e7f388ef 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,8 @@ New in 1.3a: CVS version, Libtool team:
 * Various bugfixes
 \f
 New in 1.2g: CVS version, Libtool team:
-* Nothing so far
+* dlopen support for BeOS
+* Improved support for BeOS and Cygwin
 \f
 New in 1.2e: CVS version; 1.2f: 1999-03-15, Libtool team:
 * libtool will correctly link uninstalled libraries into programs
diff --git a/TODO b/TODO
index 26e8254593bd785efdae0ec012b07054cf6b6b51..e55a4a9d5b92438974b9decc4a7c62dcbb58e558 100644 (file)
--- a/TODO
+++ b/TODO
@@ -4,11 +4,6 @@ For next public release:
 * check whether the version of libtool.m4 is compatible
 with ltconfig/ltmain.sh
 
-* Inter-library dependencies should be fully tracked by libtool
-and need to work for ltlibraries too. This requires looking up 
-installed libtool libraries for transparent support.
-Thomas Tanner has a patch for this. 
-
 * Alexandre Oliva suggests that we should have an option to hardcode
 paths into libraries, as well as binaries: `... -Wl,-soname
 -Wl,/tmp/libtest.so.0 ...'.  Tim Mooney wants the same thing.
@@ -16,14 +11,7 @@ paths into libraries, as well as binaries: `... -Wl,-soname
 * Lists of exported symbols should be stored in the pseudo library
 so that the size of lt_preloaded_symbols can be reduced.
 
-* Documentation:
-
-- AC_PROG_LIBTOOL, AC_ENABLE/DISABLE_SHARED/STATIC/FAST_INSTALL,
-  AC_LIBTOOL_DLOPEN, AC_LIBLTDL_CONVENIENCE/INSTALLABLE are not documented
-
-- Purpose and usage of convenience libraries must be better documented
-
-- some new internal variables are not documented yet.
+* Purpose and usage of convenience libraries must be better documented
 
 In the future:
 **************
index 4fe0994716e8c494ada2f7f00bab935cbb951493..ab054957cdc331b20454ead41cd800899b6b490e 100644 (file)
@@ -1,5 +1,5 @@
-# A brief demonstration of Libtool modules. -*-Makefile-*-
-#
+## Process this file with automake to produce Makefile.in
+
 AUTOMAKE_OPTIONS = no-dependencies foreign
 
 EXTRA_DIST = acinclude.m4
index cf28fa653f3cae9ce25278a3503630ca654bffd6..eea60fb90c21e48e62c31fef9956eddccaad15a1 100644 (file)
@@ -1,4 +1,5 @@
-dnl Initialize the cdemo package.
+dnl Process this file with autoconf to create configure.
+
 AC_INIT(main.c)
 AM_INIT_AUTOMAKE(cdemo,0.1)
 
index 1df6fec29517bade04b1fa37a1c27ba32553d643..87b7ef3f6a514dc096c6a6999d28c649ab9fef3d 100644 (file)
@@ -1,5 +1,5 @@
-# A brief demonstration of using Automake with Libtool. -*-Makefile-*-
-#
+## Process this file with automake to produce Makefile.in
+
 AUTOMAKE_OPTIONS = no-dependencies foreign
 
 EXTRA_DIST = $(TESTS) acinclude.m4
@@ -76,8 +76,8 @@ hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
          eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \
          libdir=$(libdir); \
          flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
-         echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib -lm $$flag || echo unsupported > $@"; \
-         eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib -lm $$flag || echo unsupported > $@"
+         echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $$flag || echo unsupported > $@"; \
+         eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $$flag || echo unsupported > $@"
 
 hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
        @eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \
@@ -87,8 +87,8 @@ hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
            echo "echo unsupported > $@"; \
            echo unsupported > $@ || status="$$?"; \
          else \
-           echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello -lm"; \
-           $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello -lm || status="$$?"; \
+           echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello $(LIBS)"; \
+           $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$flag -L$(libdir) -lhello $(LIBS) || status="$$?"; \
          fi; \
          exit $$status
 
@@ -98,16 +98,16 @@ hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la
        @eval `egrep -e '^(shlibpath_var|hardcode_.*|wl)=' libtool`; \
          libdir=$(libdir); \
          flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
-         echo "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello -lm $$flag || echo unsupported > $@"; \
-         eval "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello -lm $$flag || echo unsupported > $@"
+         echo "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) $$flag || echo unsupported > $@"; \
+         eval "$$shlibpath_var=./$(objdir) $(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) $$flag || echo unsupported > $@"
 
 hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES)
        @rm -f hc-minusL
        @eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \
          libdir=$(libdir); \
          flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \
-         echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello -lm $$flag || echo unsupported > $@"; \
-         eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello -lm $$flag || echo unsupported > $@"
+         echo "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello $(LIBS) $$flag || echo unsupported > $@"; \
+         eval "$(CC) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello $(LIBS) $$flag || echo unsupported > $@"
 
 $(OBJECTS): libtool
 libtool: $(LIBTOOL_DEPS)
index 2641d8614b89505f1b0e2010a05d0bdcf33ba0e4..c419b56b601ec682b6b38dcf280262fa97b72a38 100644 (file)
@@ -1,4 +1,5 @@
-dnl Initialize the hell package.
+dnl Process this file with autoconf to create configure.
+
 AC_INIT(hello.c)
 AM_INIT_AUTOMAKE(hell,1.0)
 
index c3d3aa3d65ee6f51e6452c3cdb9dfebe7dcf9921..64dd5871283d893aad7b8f304df62b9c99276854 100644 (file)
@@ -1,5 +1,5 @@
-# A brief demonstration of inter-library dependencies
-#
+## Process this file with automake to produce Makefile.in
+
 AUTOMAKE_OPTIONS = no-dependencies foreign
 
 SUBDIRS = l1 l2 l3 l4
index bfd04c2b880cae5b0d8db43932df68a8e9e9fb30..e4e317e7bdc4fde999022a89bf3ed99abf656e77 100644 (file)
@@ -1,4 +1,5 @@
-dnl Initialize the depdemo package.
+dnl Process this file with autoconf to create configure.
+
 AC_INIT(main.c)
 AM_INIT_AUTOMAKE(depdemo,0.1)
 
index c5a22ed498e36d03dca1dc58c1a072c0088329f4..9ab4f6a0d0b17586d3e32d08d3e255d8f92cd3cc 100644 (file)
@@ -1,5 +1,4 @@
-# A brief demonstration of inter-library dependencies
-#
+## Process this file with automake to produce Makefile.in
 
 INCLUDES = -I$(top_srcdir)
 
index 6509f3b0e8b0b72a08608daaee1b4d5d0b5f65d2..2b8d44a654d0d115514062158f20d7bba66bedb2 100644 (file)
@@ -1,5 +1,4 @@
-# A brief demonstration of inter-library dependencies
-#
+## Process this file with automake to produce Makefile.in
 
 INCLUDES = -I$(top_srcdir)
 
index ed28ea14a1d1eb7e6586459c4f2630e2da819b9c..8dbca82079c2de8dfb346ea1a7efc9d0cc733f31 100644 (file)
@@ -1,5 +1,4 @@
-# A brief demonstration of inter-library dependencies
-#
+## Process this file with automake to produce Makefile.in
 
 INCLUDES = -I$(top_srcdir)
 
index 1bfea223cf32b57880322c647a6157e53217e4f4..45c6b675dbc509cc0f00da9d7d9565cc10492fe0 100644 (file)
@@ -1,5 +1,4 @@
-# A brief demonstration of inter-library dependencies
-#
+## Process this file with automake to produce Makefile.in
 
 INCLUDES = -I$(top_srcdir)
 
index 9df4e7f8197b0e82a991827903473bc076965ee6..b07461d5cdbb9bc5e6374ef9de00a1e16c195e8c 100644 (file)
@@ -1,10 +1,5 @@
-## Process Makefile.am with automake to create Makefile.in. -*-Makefile-*-
-##
-## Copyright (C) 1996 Free Software Foundation, Inc.
-## This Makefile.am is free software; the Free Software Foundation
-## gives unlimited permission to copy, distribute and modify it.
-##
-## Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+## Process this file with automake to produce Makefile.in
+
 AUTOMAKE_OPTIONS = gnits
 info_TEXINFOS = libtool.texi
 libtool_TEXINFOS = PLATFORMS
index 12dc09d3afa4ccaac3e66899a4ca26740f81c3f6..0ec3961d397e984956cb0eccd7fae42e11d8abbb 100644 (file)
@@ -1619,12 +1619,12 @@ example).}
 By default, this macro turns on shared libraries if they are available,
 and also enables static libraries if they don't conflict with the shared
 libraries.  You can modify these defaults by calling either the
-@code{AM_DISABLE_SHARED} or @code{AM_DISABLE_STATIC} macros:
+@code{AC_DISABLE_SHARED} or @code{AC_DISABLE_STATIC} macros:
 
 @example
 # Turn off shared libraries during beta-testing, since they
 # make the build process take too long.
-AM_DISABLE_SHARED
+AC_DISABLE_SHARED
 AM_PROG_LIBTOOL
 @end example
 
@@ -1644,7 +1644,9 @@ configuring with @samp{--enable-shared} every package named in the
 comma-separated @var{pkgs} list, and every other package with
 @samp{--disable-shared}.  The @samp{--enable-static=@var{pkgs}} flag
 behaves similarly, but it uses @samp{--enable-static} and
-@samp{--disable-static}.
+@samp{--disable-static}. The same applies to the 
+@samp{--enable-fast-install=@var{pkgs}} flag, which uses
+@samp{--enable-fast-install} and @samp{--disable-fast-install}.
 
 The package name @samp{default} matches any packages which have not set
 their name in the @code{PACKAGE} environment variable.
@@ -1672,13 +1674,28 @@ on @file{libtool}.
 
 @end defmac
 
-@defmac AM_DISABLE_SHARED
+@defmac AC_LIBTOOL_DLOPEN
+Enable checking for dlopen support. This macro should be used if
+the package makes use of the -dlopen and -dlpreopen flags, otherwise
+libtool will assume that the system does not support dlopening.
+The macro must be called *before* @code{AM_PROG_LIBTOOL}.
+@end defmac
+
+@defmac AC_DISABLE_FAST_INSTALL
+Change the default behaviour for @code{AM_PROG_LIBTOOL} to disable
+optimization for fast installation.  The user may still override
+this default by specifying @samp{--enable-fast-install}.
+@end defmac
+
+@defmac AC_DISABLE_SHARED
+@defmacx AM_DISABLE_SHARED
 Change the default behaviour for @code{AM_PROG_LIBTOOL} to disable
 shared libraries.  The user may still override this default by
 specifying @samp{--enable-shared}.
 @end defmac
 
-@defmac AM_DISABLE_STATIC
+@defmac AC_DISABLE_STATIC
+@defmacx AM_DISABLE_STATIC
 Change the default behaviour for @code{AM_PROG_LIBTOOL} to disable
 static libraries.  The user may still override this default by
 specifying @samp{--enable-static}.
@@ -3594,7 +3611,7 @@ aren't defined in that library.
 @defvar always_export_symbols
 Whether libtool should automatically generate a list of exported symbols
 using @var{export_symbols_cmds} before linking an archive.
-Set to @samp{yes} or @samp{no}.  Default is @samp{no}
+Set to @samp{yes} or @samp{no}.  Default is @samp{no}.
 @end defvar
 
 @defvar archive_cmds
@@ -3753,6 +3770,12 @@ line (such as @samp{@var{dir}/lib@var{name}.a}) when
 @var{hardcode_libdir_flag_spec} is specified.
 @end defvar
 
+@defvar hardcode_into_libs
+Whether the platform supports hardcoding of run-paths into libraries.
+If enabled, linking of programs will be much simpler but libraries will
+need to be relinked during installation.
+@end defvar
+
 @defvar hardcode_libdir_flag_spec
 Flag to hardcode a @var{libdir} variable into a binary, so that the
 dynamic linker searches @var{libdir} for shared libraries at runtime.
@@ -3913,6 +3936,11 @@ this variable to extend the library search path.  Linker switches such
 as @code{-L} also augment the search path.
 @end defvar
 
+@defvar thread_safe_flag_spec
+Linker flag (passed through the C compiler) used to generate thread-safe
+libraries.
+@end defvar
+
 @defvar version_type
 The library version numbering type.  One of @samp{libtool},
 @samp{linux}, @samp{osf}, @samp{sunos}, or @samp{none}.
index fd4e05e26ac9e1849f0c79a19a5aa9d72ba832b0..22dfc45bda8ae68b055b8083e91b12d7fe27f862 100644 (file)
@@ -1,5 +1,5 @@
-# A brief demonstration of using Automake with Libtool. -*-Makefile-*-
-#
+## Process this file with automake to produce Makefile.in
+
 AUTOMAKE_OPTIONS = no-dependencies foreign
 
 if INSTALL_LTDL
index 8eaaede816b3533c620ac213d2f5593700321ebd..0d3b45351efa498427932fc2134031c4eecd6081 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to create configure.
-dnl Initialize the libltdl package.
+
 AC_INIT(ltdl.c)
 
 if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then
index 571215638d1d8aa55d221dc26f2ade7533ddb4f4..221da12374218eb09b7f266fd3110c68ef7b786e 100644 (file)
@@ -82,6 +82,8 @@ static const char unknown_error[] = "unknown error";
 static const char dlopen_not_supported_error[] = "dlopen support not available";
 static const char file_not_found_error[] = "file not found";
 static const char no_symbols_error[] = "no symbols defined";
+static const char cannot_open_error[] = "can't open the module";
+static const char cannot_close_error[] = "can't close the module";
 static const char symbol_error[] = "symbol not found";
 static const char memory_error[] = "not enough memory";
 static const char invalid_handle_error[] = "invalid handle";
@@ -204,10 +206,6 @@ strrchr(str, ch)
 # include <dlfcn.h>
 #endif
 
-#if ! HAVE_DLERROR     /* not all platforms have dlerror() */
-#define        dlerror()       unknown_error
-#endif
-
 #ifdef RTLD_GLOBAL
 # define LTDL_GLOBAL   RTLD_GLOBAL
 #else
@@ -259,7 +257,11 @@ dl_open (handle, filename)
 {
        handle->handle = dlopen(filename, LTDL_GLOBAL | LTDL_LAZY_OR_NOW);
        if (!handle->handle) {
+#if HAVE_DLERROR
                last_error = dlerror();
+#else
+               last_error = cannot_open_error;
+#endif
                return 1;
        }
        return 0;
@@ -270,7 +272,11 @@ dl_close (handle)
        lt_dlhandle handle;
 {
        if (dlclose(handle->handle) != 0) {
+#if HAVE_DLERROR
                last_error = dlerror();
+#else
+               last_error = cannot_close_error;
+#endif
                return 1;
        }
        return 0;
@@ -284,7 +290,11 @@ dl_sym (handle, symbol)
        lt_ptr_t address = dlsym(handle->handle, symbol);
        
        if (!address)
+#if HAVE_DLERROR
                last_error = dlerror();
+#else
+               last_error = symbol_error;
+#endif
        return address;
 }
 
@@ -365,7 +375,7 @@ shl_open (handle, filename)
 {
        handle->handle = shl_load(filename, LTDL_BIND_FLAGS, 0L);
        if (!handle->handle) {
-               last_error = unknown_error;
+               last_error = cannot_open_error;
                return 1;
        }
        return 0;
@@ -376,7 +386,7 @@ shl_close (handle)
        lt_dlhandle handle;
 {
        if (shl_unload((shl_t) (handle->handle)) != 0) {
-               last_error = unknown_error;
+               last_error = cannot_close_error;
                return 1;
        }
        return 0;
@@ -391,7 +401,7 @@ shl_sym (handle, symbol)
 
        if (shl_findsym((shl_t) (handle->handle), symbol, TYPE_UNDEFINED,
            &address) != 0 || !(handle->handle) || !address) {
-               last_error = unknown_error;
+               last_error = symbol_error;
                return 0;
        }
        return address;
@@ -438,7 +448,7 @@ dld_open (handle, filename)
                return 1;
        }
        if (dld_link(filename) != 0) {
-               last_error = unknown_error;
+               last_error = cannot_open_error;
                lt_dlfree(handle->handle);
                return 1;
        }
@@ -450,7 +460,7 @@ dld_close (handle)
        lt_dlhandle handle;
 {
        if (dld_unlink_by_file((char*)(handle->handle), 1) != 0) {
-               last_error = unknown_error;
+               last_error = cannot_close_error;
                return 1;
        }
        lt_dlfree(handle->filename);
@@ -465,7 +475,7 @@ dld_sym (handle, symbol)
        lt_ptr_t address = dld_get_func(symbol);
        
        if (!address)
-               last_error = unknown_error;
+               last_error = symbol_error;
        return address;
 }
 
@@ -504,7 +514,7 @@ wll_open (handle, filename)
 {
        handle->handle = LoadLibrary(filename);
        if (!handle->handle) {
-               last_error = unknown_error;
+               last_error = cannot_open_error;
                return 1;
        }
        return 0;
@@ -515,7 +525,7 @@ wll_close (handle)
        lt_dlhandle handle;
 {
        if (FreeLibrary(handle->handle) != 0) {
-               last_error = unknown_error;
+               last_error = cannot_close_error;
                return 1;
        }
        return 0;
@@ -529,7 +539,7 @@ wll_sym (handle, symbol)
        lt_ptr_t address = GetProcAddress(handle->handle, symbol);
        
        if (!address)
-               last_error = unknown_error;
+               last_error = symbol_error;
        return address;
 }
 
@@ -543,6 +553,84 @@ wll = { LTDL_TYPE_TOP, 0, wll_init, wll_exit,
 
 #endif
 
+#ifdef __BEOS__
+
+/* dynamic linking for BeOS */
+
+#include <kernel/image.h>
+
+static int
+bedl_init ()
+{
+       return 0;
+}
+
+static int
+bedl_exit ()
+{
+       return 0;
+}
+
+static int
+bedl_open (handle, filename)
+       lt_dlhandle handle;
+       const char *filename;
+{
+       image_id image = 0;
+       
+       if (filename) {
+               image = load_add_on(filename);
+       } else {
+               image_info info; 
+               int32 cookie = 0; 
+               if (get_next_image_info(0, &cookie, &info) == B_OK)
+                       image = load_add_on(info.name);
+       }
+       if (image <= 0) {
+               last_error = cannot_open_error;
+               return 1;
+       }
+       handle->handle = (void*) image;
+       return 0;
+}
+
+static int
+bedl_close (handle)
+       lt_dlhandle handle;
+{
+       if (unload_add_on((image_id)handle->handle) != B_OK) {
+               last_error = cannot_close_error;
+               return 1;
+       }
+       return 0;
+}
+
+static lt_ptr_t
+bedl_sym (handle, symbol)
+       lt_dlhandle handle;
+       const char *symbol;
+{
+       lt_ptr_t address = 0;
+       image_id image = (image_id)handle->handle;
+   
+       if (get_image_symbol(image, symbol, B_SYMBOL_TYPE_ANY,
+               &address) != B_OK) {
+               last_error = symbol_error;
+               return 0;
+       }
+       return address;
+}
+
+static
+lt_dltype_t
+bedl = { LTDL_TYPE_TOP, 0, bedl_init, bedl_exit,
+       bedl_open, bedl_close, bedl_sym };
+
+#undef LTDL_TYPE_TOP
+#define LTDL_TYPE_TOP &bedl
+
+#endif
+
 /* emulate dynamic linking using preloaded_symbols */
 
 typedef struct lt_dlsymlists_t {
@@ -1117,6 +1205,12 @@ lt_dlopen (filename)
                                file = (FILE*) find_file(basename,
                                                 getenv("LTDL_LIBRARY_PATH"),
                                                 &dir, 0);
+#ifdef __BEOS__
+                       if (!file)
+                               file = (FILE*) find_file(basename,
+                                                getenv("ADDON_PATH"),
+                                                &dir, 0);
+#endif
 #ifdef LTDL_SHLIBPATH_VAR
                        if (!file)
                                file = (FILE*) find_file(basename,
index f7661efd2d2159e94451b5516c943ce32cf91206..7b3dd4615a562b7bb67a45b9c822239938086c31 100644 (file)
@@ -568,9 +568,20 @@ AC_SUBST(USE_SYMBOL_UNDERSCORE)dnl
 ])
 
 # AC_CHECK_LIBM - check for math library
-AC_DEFUN(AC_CHECK_LIBM, [
-AC_CHECK_LIB(mw, _mwvalidcheckl)
-AC_CHECK_LIB(m, cos)
+AC_DEFUN(AC_CHECK_LIBM,
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+case "$host" in
+*-*-beos* | *-*-cygwin*)
+  # These system don't have libm
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl)
+  AC_CHECK_LIB(m, cos)
+  ;;
+*)
+  AC_CHECK_LIB(m, cos)
+  ;;
+esac
 ])
 
 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
index 7d663efbbef58f3432bd61a70539c392da7a084a..522c1e2b6dc80ffe999494f1cedd40c34597d42a 100755 (executable)
@@ -1628,6 +1628,9 @@ beos*)
   library_names_spec='${libname}.so'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
+  lt_cv_dlopen="load_add_on"
+  lt_cv_dlopen_libs=
+  lt_cv_dlopen_self=yes
   ;;
 
 bsdi4*)
@@ -1659,6 +1662,8 @@ cygwin* | mingw*)
   need_lib_prefix=no
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
+  lt_cv_dlopen="LoadLibrary"
+  lt_cv_dlopen_libs=
   ;;
 
 freebsd1*)
@@ -2138,54 +2143,6 @@ if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
   lt_cv_dlopen="shl_load"
 else
   echo "$ac_t""no" 1>&6
-echo $ac_n "checking for LoadLibrary""... $ac_c" 1>&6
-echo "$progname:@LINENO@: checking for LoadLibrary" >&5
-if eval "test \"`echo '$''{'ac_cv_func_LoadLibrary'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line @LINENO@ "ltconfig"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char LoadLibrary(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char LoadLibrary();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_LoadLibrary) || defined (__stub___LoadLibrary)
-choke me
-#else
-LoadLibrary();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_func_LoadLibrary=yes"
-else
-  echo "$progname: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_LoadLibrary=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'LoadLibrary`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  lt_cv_dlopen="LoadLibrary"
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-      
 fi
 
     
index 74156c68c443e8577dbafde39b48c4c4aa53eb18..fa5f869b3f4979c71315954d42f0c2b00975b99e 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1621,7 +1621,10 @@ compiler."
        installed=yes
 
        # Read the .la file
-       . $lib
+       case "$lib" in
+       */* | *\\*) . $lib ;;
+       *) . ./$lib ;;
+       esac
 
        # Get the name of the library we link against.
        linklib=
@@ -2431,7 +2434,10 @@ EOF
        installed=yes
 
        # Read the .la file
-       . $lib
+       case "$lib" in
+       */* | *\\*) . $lib ;;
+       *) . ./$lib ;;
+       esac
 
        # Get the name of the library we link against.
        linklib=
@@ -2556,7 +2562,10 @@ EOF
        installed=yes
 
        # Read the .la file
-       . $lib
+       case "$lib" in
+       */* | *\\*) . $lib ;;
+       *) . ./$lib ;;
+       esac
 
        # Get the name of the library we link against.
        linklib=
@@ -3703,7 +3712,10 @@ relink_command=\"$relink_command\""
            # Check to see that each library is installed.
            libdir=
            if test -f "$lib"; then
-             . $lib
+             case "$lib" in
+             */* | *\\*) . $lib ;;
+             *) . ./$lib
+             esac
            fi
            libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
            if test -n "$libdir" && test ! -f "$libfile"; then
index 67806b8870cfb69f7cc061e89b015dd5b37abb3c..c6f5f48f42cd0431325eb5a7acb11c9fc0273981 100644 (file)
@@ -1,5 +1,5 @@
-# A brief demonstration of Libtool modules. -*-Makefile-*-
-#
+## Process this file with automake to produce Makefile.in
+
 AUTOMAKE_OPTIONS = no-dependencies foreign
 
 INCLUDES = -I$(srcdir)/../libltdl
index 1c17ed5bc8f2ba6edbb05b6299979619bcf98989..495670dd57208a9108af327332f2149dabf9c3a0 100644 (file)
@@ -1,4 +1,5 @@
-dnl Initialize the mdemo package.
+dnl Process this file with autoconf to create configure.
+
 AC_INIT(main.c)
 AM_INIT_AUTOMAKE(mdemo,0.1)
 
index 3dd45e8b4bb13d716725694cdb858df7ba82a0ea..23aed736246af7a7cdd43d8610c1edf0d3c4b32e 100644 (file)
@@ -1,4 +1,4 @@
-## Process this file with automake to create Makefile.in -*-Makefile-*-
+## Process this file with automake to produce Makefile.in
 
 AUTOMAKE_OPTIONS = gnits