libtool-patches
[Top][All Lists]
Advanced

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

Re: shl_load/dld_link


From: Gary V . Vaughan
Subject: Re: shl_load/dld_link
Date: Tue, 7 Aug 2001 02:28:54 +0100

Moving the thread to libtool-patches -- there is a patch at the end =)O|

On Monday 06 August 2001 5:25 am, address@hidden wrote:
> On Sun, Aug 05, 2001 at 02:05:57PM +0100, Gary V. Vaughan wrote:
> > On Tuesday 31 July 2001 4:29 pm, address@hidden wrote:
> > > On Mon, Jul 30, 2001 at 03:03:39PM -0700, Steve Ellcey wrote:
> > > > I am not an autoconf expert so I may be missing something, but is
> > > > this right?
> > > >
> > > > >From line 741 of the latest mainline libtool.m4
> > > >
> > > >   *)
> > > >     AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load",
> > > >       [AC_CHECK_LIB(dld, shl_load,
> > > >         [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"],
> > > >         [AC_CHECK_LIB(dl, dlopen,
> > > >           [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
> > > >           [AC_CHECK_FUNC(dlopen, lt_cv_dlopen="dlopen",
> > > >             [AC_CHECK_LIB(svld, dlopen,
> > > >              [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"])
> > > >             ])
> > > >           ])
> > > >         ])
> > > >       ])
> > > >     ;;
> > > >   esac
> > > >
> > > > Is it the case that if shl_load is found in libdld, then lt_cv_dlopen
> > > > is set to "dld_link"?  That should be "shl_load", right?  Did someone
> > > > make a cut-n-paste error here?
> > >
> > > I think you're correct. The 1.4 branch has the same error. I made the
> > > change you suggested and HP-UX 10.20 and 11.00 pass all tests.
> >
> > I'm not so sure.  Are there two flavours of shl_load (not necessarily on
> > HP-UX I guess), one in the standard libraries (lt_cv_dlopen="shl_load")
> > and one with the function in libdld (lt_cv_dlopen="shl_load";
> > lt_cv_dlopen_libs="-dld")?
>
> From the shl_load(3X):
>  DESCRIPTION
>       These routines can be used to programmatically load and unload shared
>       libraries, and to obtain information about the libraries (such as the
>       addresses of symbols defined within them).  On PA32, the routines
>       themselves are accessed by specifying the -ldld option on the command
>       line with the cc or ld command (see cc(1) and ld(1)).  On PA64, the
>       routines are accessed by specifying either -ldld or -ldl on the
>       command line.
>
> > What do you think?
>
> AC_CHECK_FUNC([shl_load],
>     [lt_cv_dlopen="shl_load"],
>   [AC_CHECK_LIB([dld], [shl_load],
>       [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
>     [AC_CHECK_FUNC([dlopen],
>         [lt_cv_dlopen="dlopen"],
>       [AC_CHECK_LIB([dl], [dlopen],
>           [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
>         [AC_CHECK_LIB([svld], [dlopen],
>             [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"])
>         ])
>       ])
>     ])
>   ])
>
> This does two things differently:
>   1. Does not check for dld_link for the reasons stated above.
>   2. Preceeds the check for dlopen in -ldl with AC_CHECK_FUNC
>      because -ldl might already be in $LIBS (same reason why
>      we AC_CHECK_FUNC for shl_load first).

Excuse the long context, I have added Mr. Golubev to the Cc: list, since I 
think the attached patch also fixes a problem he reported with dlopen on sco5 
a while ago.  I have kept a check for dld_link right at the end if everything 
else fails since it (GNU dld support) is one of the touted features of 
libtool.  It correctly identifies "dlopen" with "-ldl" on my linux box...

Okay to commit?

Cheers,
        Gary.
-- 
  ())_. Gary V. Vaughan     gary@(oranda.demon.co.uk|gnu.org)
  ( '/  Research Scientist  http://www.oranda.demon.co.uk       ,_())____
  / )=  GNU Hacker          http://www.gnu.org/software/libtool  \'      `&
`(_~)_  Tech' Author        http://sources.redhat.com/autobook   =`---d__/

Attachment: 2001-08-06-gvv-dlopen-try-link.patch
Description: Text Data


reply via email to

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