X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 	tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4A6EAB22.7080200@lysator.liu.se>
Date: Tue, 28 Jul 2009 09:39:14 +0200
From: Peter Rosin <peda@lysator.liu.se>
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: How to install-libLTLIBRARIES dll to bin?
References: <6910a60907272310q54f29289l454117aff82afd5a@mail.gmail.com>
In-Reply-To: <6910a60907272310q54f29289l454117aff82afd5a@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Den 2009-07-28 08:10 skrev Reini Urban:
> I have an issue with properly autotooled + libtoolized shared libraries
> where the resulting dll should end up in bindir instead of libdir.
> 
> Can we cygwin-spezialize that either in automake or libtool?
> The --mode=install $(DESTDIR)$(libdir) looks like a job for automake
> but only libtool knows about the .dll
> in contrast to the .dll.a .la and .a
> Maybe libtool --mode=install can outsmart $libdir in the dll case.
> Or better automake can check for the dll and install this into bindir.

Automake does not "know" that it is a dll, it only sees a libtool
library (.la), and I think "libtool --mode=install" is supposed to
outsmart $libdir, by adding ../bin to the end of the directory
part of the path (i.e. copy the dll to $DESTDIR)$(libdir)/../bin
in this case).

I.e. if the dll does not end up in $libdir/../bin you need to find
out why, perhaps because the dll was linked with
"libtool ... -module ..." (in which case the outsmarting code
isn't activated and ../bin isn't added).

> Typical segment:
> 
> install-libLTLIBRARIES: $(lib_LTLIBRARIES)
> 	@$(NORMAL_INSTALL)
> 	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
> 	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
> 	  if test -f $$p; then \
> 	    f=$(am__strip_dir) \
> 	    echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL)
> $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
> 	    $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL)
> $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
> 	  else :; fi; \
> 	done

That snippet looks correct, it is libtool that "knows" that the
dll is supposed to end up in $libdir/../bin

Cheers,
Peter

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

