X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_46,J_CHICKENPOX_47,J_CHICKENPOX_62,SARE_OBFU_PART_INA,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4A701A8C.40905@gmail.com> Date: Wed, 29 Jul 2009 10:46:52 +0100 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) 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> <4A6EE39A DOT 6040103 AT cwilson DOT fastmail DOT fm> In-Reply-To: <4A6EE39A.6040103@cwilson.fastmail.fm> Content-Type: multipart/mixed; boundary="------------030803070404080102040809" Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------030803070404080102040809 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Charles Wilson wrote: > Dave Korn wrote: > >> 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. > > Agreed. This is still on my TODO list for the cygwin version of > libtool, and (obviously) for eventual submission to upstream. However, > if somebody beats me to it, PTC. Something like this? Untested as yet, I'm going to put it through a gcc bootstrap cycle. Should I be worried about stripping any final slash off the -bindir option to avoid inadvertent doubling-up when I append "/bin/...", do you reckon? cheers, DaveK --------------030803070404080102040809 Content-Type: text/x-c; name="libtool-bindir-for-dlls.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libtool-bindir-for-dlls.diff" diff --git a/Makefile.am b/Makefile.am index a18955e..129b890 100644 --- a/Makefile.am +++ b/Makefile.am @@ -494,7 +494,8 @@ TESTSUITE_AT = tests/testsuite.at \ tests/configure-iface.at \ tests/stresstest.at \ tests/cmdline_wrap.at \ - tests/darwin.at + tests/darwin.at \ + tests/win32.at EXTRA_DIST += $(srcdir)/$(TESTSUITE) $(TESTSUITE_AT) $(srcdir)/tests/package.m4 diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh old mode 100644 new mode 100755 index ebd3909..a1889d3 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -1129,6 +1129,8 @@ The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to $prefix/bin (needed only when installing + a Windows DLL) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) @@ -3659,6 +3661,7 @@ func_mode_link () new_inherited_linker_flags= avoid_version=no + bindir= dlfiles= dlprefiles= dlself=no @@ -3751,6 +3754,11 @@ func_mode_link () esac case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. @@ -4012,6 +4020,11 @@ func_mode_link () continue ;; + -bindir) + prev=bindir + continue + ;; + -dlopen) prev=dlfiles continue @@ -7706,7 +7719,13 @@ 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 | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + tdlname=../bin/$dlname + if test "x$bindir" != "x" ; + then + tdlname=$bindir/$dlname + fi + ;; esac $ECHO > $output "\ # $outputname - a libtool library file --------------030803070404080102040809 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 --------------030803070404080102040809--