Subject: Re: libtool question...
To: Nick Hudson <skrll@netbsd.org>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-pkg
Date: 03/21/2001 15:58:19
On Wed, 21 Mar 2001, Nick Hudson wrote:

: 	$ libtool --config | grep ^deplibs_check_method=
: 	$ file /usr/lib/libz.so.0.1

Could we possibly simplify the deplibs_check_method to something more like
the following (in libtool.m4/configure)?  We shouldn't be using file(1), if
possible, since its output could easily change between releases and
architectures.

From my reading of the file_magic handling in ltmain.sh, this should be
adequate.  The ELF linker searches for a file ending in ".so"--typically a
symlink, and the a.out linker searches for a file with a two-part version
number.

As to whether this really should test for a shared object file:  If the
filename matches a linkable library, and it isn't physically a shared
object, let the linker try to use it and fail, as it would without the
presence of libtool.  That will point out important installation snafus on
the compiling system.

===

netbsd*)
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
    [lt_cv_deplibs_check_method='file_magic ^lib[^\.]\.so$'
  else
    [lt_cv_deplibs_check_method='file_magic ^lib[^\.]\.so\.[0-9]+\.[0-9]+$'
  fi
  lt_cv_file_magic_cmd='echo'
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  ;;

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  Wasabi NetBSD:  Run with it.
-- NetBSD 1.5 now available on CD-ROM  --  http://www.wasabisystems.com/