delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/08/09/02:53:35

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SARE_OBFU_PART_INA,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4A7E725C.8010706@users.sourceforge.net>
Date: Sun, 09 Aug 2009 01:53:16 -0500
From: "Yaakov (Cygwin/X)" <yselkowitz AT users DOT sourceforge DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.1) Gecko/20090715 Thunderbird/3.0b3
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: How to install-libLTLIBRARIES dll to bin?
References: <6910a60907272310q54f29289l454117aff82afd5a AT mail DOT gmail DOT com> <4A6ED94B DOT 8020003 AT gmail DOT com>
In-Reply-To: <4A6ED94B.8020003@gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

--------------060607060607080206080201
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 28/07/2009 05:56, Dave Korn wrote:
>    Yeh, me too.  I have a horrible hack in the distro gcc that ascends
> directories until it finds ...../lib/ and replaces that with ..../bin/

I'm not sure how you did it, so I just made the attached patch to do 
just that.  It's a bit of a hack but I don't think it's so horrible. 
Chuck, what do you think?

>    Only libtool knows about the DLL.  Only the Makefile knows about the setting
> of $bindir from configure.  Currently however the Makefile only passes the
> path to the output in $libdir.  Therefore ISTM that the only correct solution
> is to add a --bindir= option to libtool and modify automake or libtoolise to
> ensure it gets passed by the makefiles when they invoke libtool.

It might be more correct, but implementing this would be *VERY* messy. 
Trust me.  The first solution would be much, much easier.


Yaakov

--------------060607060607080206080201
Content-Type: text/plain;
 name="2.2.7a-lib-subdir-dll-into-bin.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="2.2.7a-lib-subdir-dll-into-bin.patch"

2009-08-09  Yaakov Selkowitz  <yselkowitz AT users DOT sourceforge DOT net>

	* libltdl/config/ltmain.m4sh (func_mode_link) [cygwin*]:
	If a shared library is installed into a subdirectory of $prefix/lib,
	install the DLL into $prefix/bin so that it will be in $PATH.

--- origsrc/libtool-2.2.7a/libltdl/config/ltmain.m4sh	2009-08-08 23:47:33.051542300 -0500
+++ src/libtool-2.2.7a/libltdl/config/ltmain.m4sh	2009-08-09 01:39:35.688299700 -0500
@@ -7741,7 +7741,21 @@ EOF
 	  # place dlname in correct position for cygwin
 	  tdlname=$dlname
 	  case $host,$output,$installed,$module,$dlname in
-	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	    *cygwin*,*lai,yes,no,*.dll)
+          tdlname=../$dlname
+          case "$install_libdir" in
+            */lib/*)
+              tlibdir="$install_libdir"
+              while :; do
+                func_dirname_and_basename "$tlibdir"
+                test "$func_basename_result" = "lib" && break
+                tlibdir="$func_dirname_result"
+                tdlname=../$tdlname
+              done
+            ;;
+          esac
+        ;;
+	    *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
 	  esac
 	  $ECHO > $output "\
 # $outputname - a libtool library file


--------------060607060607080206080201
Content-Type: text/plain; charset=us-ascii

--
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
--------------060607060607080206080201--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019