You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by jean-frederic clere <jf...@fujitsu-siemens.com> on 2004/07/06 15:35:30 UTC

libtool (jlibtool)

Hi,

I am using jlibtool and I have found something weird in httpd:
In Makefile.in:
+++
         cp build/*.mk $(DESTDIR)$(installbuilddir); \
         sed 's#LIBTOOL = \(.*\)#LIBTOOL = $(SHELL) $(installbuilddir)/libtool 
$(LTFLAGS)#' \
             build/config_vars.mk > $(DESTDIR)$(installbuilddir)/config_vars.mk; +++
In configure.in:
+++
       my_libtool=`$apr_config --apr-libtool`
       LIBTOOL="$my_libtool \$(LTFLAGS)"
       libtoolversion=`$my_libtool --version`
       case $libtoolversion in
           *1.[[45]]*)
               SH_LIBTOOL='$(LIBTOOL)'
               SHLTCFLAGS="-prefer-pic"
               LTCFLAGS="-prefer-non-pic -static"
               ;;
           *)
               SH_LIBTOOL='$(SHELL) $(top_builddir)/shlibtool $(LTFLAGS)'
               SHLTCFLAGS=""
               LTCFLAGS=""
               ;;
       esac
+++
Shouldn't be all the logic in configure.in?
Like using LIBTOOL="\$(SHELL) $my_libtool \$(LTFLAGS)" when gnu libtool and 
LIBTOOL="$my_libtool \$(LTFLAGS)" otherwise.

Cheers

Jean-Frederic

Re: libtool (jlibtool)

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Joe Orton wrote:
> On Wed, Jul 07, 2004 at 09:44:00AM +0200, jean-frederic clere wrote:
> 
>>Joe Orton wrote:
>>
>>>On Tue, Jul 06, 2004 at 03:35:30PM +0200, jean-frederic clere wrote:
>>>The aim is to ensure that the LIBTOOL variable in the installed
>>>config_vars.mk points at the installed copy of the libtool script.
>>
>>Yes, but I see 3 problems:
>>- On os2 host configure uses aplibtool, not libtool.
>>- When using jlibtool the command "sh libtool" fails.
>>- shlibtool (in SH_LIBTOOL) is changed into libtool.
> 
> 
> - it breaks if not using the bundled APR, since there is no 
> $(installbuilddir)/libtool then either
> 
> 
>>To solve those I would use 2 new variables INSTALL_LIBTOOL and 
>>INSTALL_SH_LIBTOOL and fill them in configure by something like:
> 
> 
> `basename $LIBTOOL` is known by configure so I wouldn't do that in the
> Makefile necessarily.  Is there a simpler fix for all four cases by
> changing the existing sed substitution on config_vars.mk to something
> like:
> 
>    /LIBTOOL = /s,$(top_builddir)\(srclib/apr\),$(installbuilddir),
> 
> Can you try that?  

Won't be: /LIBTOOL = /s,$(top_builddir)\(/srclib/apr/\|/\),$(installbuilddir)/,
better?

And we add the "$(SHELL)" at the configure time if needed, don't we?

> Does APR really install {sh,ap,j}libtool in
> $installbuilddir already anyway? I can't see where that happens.

The configure of APR "replaces" libtool by the executable it compiles. (See the 
configure.in of APR around line 150)
+++
*-os2*)
     # Use a custom-made libtool replacement
     echo "using aplibtool"
     LIBTOOL="$srcdir/build/aplibtool"
     gcc $CFLAGS $CPPFLAGS -o $LIBTOOL.exe $LIBTOOL.c
     ;;
*)
     if test "x$LTFLAGS" = "x"; then
         LTFLAGS='--silent'
     fi
     if test "$experimental_libtool" = "yes"; then
         # Use a custom-made libtool replacement
         echo "using jlibtool"
         LIBTOOL="$apr_builddir/libtool"
         LIBTOOL_SRC="$apr_srcdir/build/jlibtool.c"
         if test ! -f $LIBTOOL_SRC; then
           AC_MSG_ERROR([Experimental libtool source not found.  It is not 
included with APR by default.])
         fi
         $CC $CFLAGS $CPPFLAGS -o $LIBTOOL $LIBTOOL_SRC
     else
+++

shlibtool is not installed. BTW shlibtool is/was for libtool 1.3.x, isn't?


> 
> joe
> 
> 


Re: libtool (jlibtool)

Posted by Joe Orton <jo...@redhat.com>.
On Wed, Jul 07, 2004 at 09:44:00AM +0200, jean-frederic clere wrote:
> Joe Orton wrote:
> >On Tue, Jul 06, 2004 at 03:35:30PM +0200, jean-frederic clere wrote:
> >The aim is to ensure that the LIBTOOL variable in the installed
> >config_vars.mk points at the installed copy of the libtool script.
> 
> Yes, but I see 3 problems:
> - On os2 host configure uses aplibtool, not libtool.
> - When using jlibtool the command "sh libtool" fails.
> - shlibtool (in SH_LIBTOOL) is changed into libtool.

- it breaks if not using the bundled APR, since there is no 
$(installbuilddir)/libtool then either

> To solve those I would use 2 new variables INSTALL_LIBTOOL and 
> INSTALL_SH_LIBTOOL and fill them in configure by something like:

`basename $LIBTOOL` is known by configure so I wouldn't do that in the
Makefile necessarily.  Is there a simpler fix for all four cases by
changing the existing sed substitution on config_vars.mk to something
like:

   /LIBTOOL = /s,$(top_builddir)\(srclib/apr\),$(installbuilddir),

Can you try that?  Does APR really install {sh,ap,j}libtool in
$installbuilddir already anyway? I can't see where that happens.

joe

Re: libtool (jlibtool)

Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Joe Orton wrote:
> On Tue, Jul 06, 2004 at 03:35:30PM +0200, jean-frederic clere wrote:
> 
>>I am using jlibtool and I have found something weird in httpd:
>>In Makefile.in:
>>+++
>>        cp build/*.mk $(DESTDIR)$(installbuilddir); \
>>        sed 's#LIBTOOL = \(.*\)#LIBTOOL = $(SHELL) 
>>        $(installbuilddir)/libtool $(LTFLAGS)#' \
>>            build/config_vars.mk > 
>>            $(DESTDIR)$(installbuilddir)/config_vars.mk; +++
> 
> 
> The aim is to ensure that the LIBTOOL variable in the installed
> config_vars.mk points at the installed copy of the libtool script.

Yes, but I see 3 problems:
- On os2 host configure uses aplibtool, not libtool.
- When using jlibtool the command "sh libtool" fails.
- shlibtool (in SH_LIBTOOL) is changed into libtool.

To solve those I would use 2 new variables INSTALL_LIBTOOL and 
INSTALL_SH_LIBTOOL and fill them in configure by something like:
+++
INSTALL_LIBTOOL=$installbuilddir/`basename $LIBTOOL`
INSTALL_SH_LIBTOOL=$installbuilddir/`basename $LIBTOOL`
+++
and change the name of the variables at installation:
LIBTOOL to SRC_LIBTOOL
SH_LIBTOOL to SRC_SH_LIBTOOL
INSTALL_LIBTOOL to LIBTOOL
INSTALL_SH_LIBTOOL to SH_LIBTOOL

> 
> joe
> 
> 


Re: libtool (jlibtool)

Posted by Joe Orton <jo...@redhat.com>.
On Tue, Jul 06, 2004 at 03:35:30PM +0200, jean-frederic clere wrote:
> I am using jlibtool and I have found something weird in httpd:
> In Makefile.in:
> +++
>         cp build/*.mk $(DESTDIR)$(installbuilddir); \
>         sed 's#LIBTOOL = \(.*\)#LIBTOOL = $(SHELL) 
>         $(installbuilddir)/libtool $(LTFLAGS)#' \
>             build/config_vars.mk > 
>             $(DESTDIR)$(installbuilddir)/config_vars.mk; +++

The aim is to ensure that the LIBTOOL variable in the installed
config_vars.mk points at the installed copy of the libtool script.

joe