]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* TODO: support -dlopen for libraries
authorThomas Tanner <tanner@gmx.de>
Wed, 24 Mar 1999 22:42:59 +0000 (22:42 +0000)
committerThomas Tanner <tanner@gmx.de>
Wed, 24 Mar 1999 22:42:59 +0000 (22:42 +0000)
* doc/PLATFORMS: Erez Zadok reported that libtool works on bsdi 4.0.1
* doc/libtool.texi (libltdl): libltdl supports BeOS
* libltdl/ltdl.c: shlib_ext was declared even if LTDL_SHLIB_EXT
  didn't exist, partially reverted my previous patch: BeOS will
  automatically search in ADDON_PATH
* ltmain.in: don't allow relative run-paths, fixed a typo in a warning,
  ignore -dlopen self for libraries and objects,
  only accept -L paths that exist, minor cleanups,
  bugfix: add -lc for normal libraries, not convenicence libraries
  removed offensive warnings/comments

ChangeLog
TODO
doc/PLATFORMS
doc/libtool.texi
libltdl/ltdl.c
ltmain.in

index 7d2c01122845c42b56d81e33d3bbb454cafee16f..a0ef98ef15ecdecf0bcc17a7c8d692b66494fd2d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+1999-03-24 Thomas Tanner  <tanner@gmx.de>
+
+       * TODO: support -dlopen for libraries
+       * doc/PLATFORMS: Erez Zadok reported that libtool works on bsdi 4.0.1
+       * doc/libtool.texi (libltdl): libltdl supports BeOS
+       * libltdl/ltdl.c: shlib_ext was declared even if LTDL_SHLIB_EXT
+         didn't exist, partially reverted my previous patch: BeOS will
+         automatically search in ADDON_PATH
+       * ltmain.in: don't allow relative run-paths, fixed a typo in a warning,
+         ignore -dlopen self for libraries and objects,
+         only accept -L paths that exist, minor cleanups,
+         bugfix: add -lc for normal libraries, not convenicence libraries
+         removed offensive warnings/comments
+
 1999-03-24  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * ltconfig.in (ld_shlibs, amigaos*): disable shared libraries
diff --git a/TODO b/TODO
index f4b855a35c8320282d1f9c871ed1a2eba6efe506..eb9ff598f5b06b6c60ba4a12c699fbd000181175 100644 (file)
--- a/TODO
+++ b/TODO
@@ -30,6 +30,11 @@ In the future:
   possible would greatly improve libltdl's ability to be embedded in and 
   used by other systems.
 
+* Support -dlopen/dlpreopen for libraries.
+  This requires adding two new variables (dlopen/dlpreopen) to
+  the pseudo-library and later dlopening them when a program is linked
+  against such a library.
+
 * Fix */demo on win32.
 This may simply require resolving the item below.
 
index 2a417b82d9ea08755d4e9937aa7bac9eb85213f6..fbbc145ec815da152866d1bd97e60c9025f7dc9a 100644 (file)
@@ -21,6 +21,7 @@ hppa1.1-hp-hpux9.07             cc       1.0f     ok
 hppa1.1-hp-hpux9.05             gcc      1.2f     ok
 hppa1.1-hp-hpux9.01             gcc      1.2f     ok
 i*86-*-bsdi4.0                  gcc      1.2f     ok
+i*86-*-bsdi4.0.1                gcc      1.2f     ok
 i*86-*-bsdi3.1                  gcc      1.2e     NS
 i*86-*-bsdi3.0                  gcc      1.2e     NS
 i*86-*-bsdi2.1                  gcc      1.2e     NS
index 708a3c2f946393c6e8120951a6c3010fc2a4561d..5f6a95e2a847dbb6b57e40507448126aed8f106b 100644 (file)
@@ -2599,6 +2599,8 @@ shl_load (HP-UX)
 @item
 LoadLibrary (Win16 and Win32)
 @item
+load_add_on (BeOS)
+@item
 GNU DLD (emulates dynamic linking for static libraries)
 @item
 libtool's dlpreopen (see @pxref{Dlpreopening})
index 221da12374218eb09b7f266fd3110c68ef7b786e..df93ce07773d289c7dc412eae16bb15d1130a9c7 100644 (file)
@@ -76,7 +76,9 @@ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 #define LTDL_SYMBOL_OVERHEAD   5
 
 static const char objdir[] = LTDL_OBJDIR;
+#ifdef LTDL_SHLIB_EXT
 static const char shlib_ext[] = LTDL_SHLIB_EXT;
+#endif
 
 static const char unknown_error[] = "unknown error";
 static const char dlopen_not_supported_error[] = "dlopen support not available";
@@ -1205,12 +1207,6 @@ 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 70e84d6b755a032a82b88c2ca2bfa04cfb58e9d4..0d881ebdf0baf4c3458bf07d5f511409020d79db 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -877,6 +877,7 @@ compiler."
            elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
              dlself=yes
            else
+             dlself=needless
              export_dynamic=yes
            fi
            prev=
@@ -916,12 +917,8 @@ compiler."
          case "$arg" in
          /* | [A-Za-z]:[/\\]*) ;;
          *)
-           absdir=`cd "$arg" && pwd`
-           if test -z "$absdir"; then
-             $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-             exit 1
-           fi
-           arg="$absdir"
+           $echo "$modename: only absolute run-paths are allowed" 1>&2
+           exit 1
            ;;
          esac
          if test "$prev" = rpath; then
@@ -998,6 +995,11 @@ compiler."
 
       -L*)
        dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+       if test -d "$dir"; then :
+       else
+         $echo "$modename: directory \`$dir' does not exist" 1>&2
+         exit 1
+       fi
        # We need an absolute path.
        case "$dir" in
        /* | [A-Za-z]:[/\\]*) ;;
@@ -1073,12 +1075,8 @@ compiler."
        case "$dir" in
        /* | [A-Za-z]:[/\\]*) ;;
        *)
-         absdir=`cd "$dir" && pwd`
-         if test -z "$absdir"; then
-           $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-           exit 1
-         fi
-         dir="$absdir"
+         $echo "$modename: only absolute run-paths are allowed" 1>&2
+         exit 1
          ;;
        esac
        case "$xrpath " in
@@ -1282,7 +1280,7 @@ compiler."
        $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
       fi
 
-      if test -n "$dlfiles$dlprefiles"; then
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
        $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
       fi
 
@@ -1346,7 +1344,7 @@ compiler."
        exit 1
       fi
 
-      if test -n "$dlfiles$dlprefiles"; then
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
        $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
       fi
 
@@ -1553,16 +1551,12 @@ compiler."
       # Save some variables
       name_save=$name
       libname_save=$libname
-      release_save=$release
-      versuffix_save=$versuffix
-      major_save=$major
        
-      old_deplibs="$deplibs"
       # Find libtool libraries and add their dependencies and directories
+      old_deplibs="$deplibs"
       deplibs=            # libraries to link (used in archive_cmds)
       newdependency_libs= # all dependency libraries
       uninst_path=        # paths that contain uninstalled libtool libraries
-      shlibpath=
       new_lib_search_path=
       for deplib in $old_deplibs; do
        lib=
@@ -1610,6 +1604,13 @@ compiler."
        library_names=
        old_library=
 
+       # Check to see that this really is a libtool archive.
+       if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       else
+         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+         exit 1
+       fi
+
        ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
        test "X$ladir" = "X$lib" && ladir="."
        # We need an absolute path.
@@ -1625,13 +1626,6 @@ compiler."
        esac
        laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
 
-       # Check to see that this really is a libtool archive.
-       if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-       else
-         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-         exit 1
-       fi
-
        # If the library was installed with an old release of libtool,
        # it will not redefine variable installed.
        installed=yes
@@ -1653,6 +1647,14 @@ compiler."
          exit 1
        fi
 
+       if test -z "$libdir"; then
+         # It is a libtool convenience library, so add in its objects.
+         convenience="$convenience $dir/$old_library"
+         old_convenience="$old_convenience $dir/$old_library"
+         deplibs="$deplibs $dir/$old_library"
+         continue
+       fi
+
        # Find the relevant object directory and library name.
        if test "X$installed" = Xyes; then
          if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
@@ -1904,9 +1906,6 @@ compiler."
       fi
 
       # Restore the variables
-      versuffix=$versuffix_save
-      major=$major_save
-      release=$release_save
       libname=$libname_save
       name=$name_save
 
@@ -2121,7 +2120,7 @@ EOF
       
       # Test again, we may have decided not to build it any more
       if test "$build_libtool_libs" = yes; then
-       if test -z "$rpath"; then
+       if test -n "$rpath"; then
          case "$host" in
          *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
            # these systems don't actually have a c library (as such)!
@@ -2244,7 +2243,6 @@ EOF
 
        if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
          eval flag=\"$thread_safe_flag_spec\"
-
          linkopts="$linkopts $flag"
        fi
 
@@ -2321,7 +2319,7 @@ EOF
        $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
       fi
 
-      if test -n "$dlfiles$dlprefiles"; then
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
        $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
       fi
 
@@ -2547,7 +2545,7 @@ EOF
          continue
          ;;
        -R*)
-         dir=`$echo "X$deplib" | $Xsed -e 's/^-lR/'`
+         dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
          # Make sure the xrpath contains only unique directories.
          case "$xrpath " in
          *" $dir "*) ;;
@@ -2594,6 +2592,13 @@ EOF
        library_names=
        old_library=
 
+       # Check to see that this really is a libtool archive.
+       if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       else
+         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+         exit 1
+       fi
+
        ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
        test "X$ladir" = "X$lib" && ladir="."
        # We need an absolute path.
@@ -2609,13 +2614,6 @@ EOF
        esac
        laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
 
-       # Check to see that this really is a libtool archive.
-       if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-       else
-         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-         exit 1
-       fi
-
        # If the library was installed with an old release of libtool,
        # it will not redefine variable installed.
        installed=yes
@@ -3211,7 +3209,6 @@ static const void *lt_preloaded_setup() {
        link_command="$compile_var$compile_command$compile_rpath"
        relink_command="$finalize_var$finalize_command$finalize_rpath"
        
-       # AGH! Flame the AIX and HP-UX people for me, will ya?
        $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
        $echo "$modename: \`$output' will be relinked during installation" 1>&2
       else
@@ -3825,7 +3822,7 @@ relink_command=\"$relink_command\""
              continue
            fi
          else
-           $echo "$modename: error: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
+           $echo "$modename: error: cannot relink \`$file'" 1>&2
            continue
          fi
        fi
@@ -3987,7 +3984,6 @@ relink_command=\"$relink_command\""
              # Replace the output file specification.
              relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
 
-             $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
              $show "$relink_command"
              if $run eval "$relink_command"; then :
              else
@@ -3996,7 +3992,7 @@ relink_command=\"$relink_command\""
              fi
              file="$outputname"
            else
-             $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
+             $echo "$modename: warning: cannot relink \`$file'" 1>&2
            fi
          else
            # Install the binary that we compiled earlier.