Re: static part of a shared library

2008-11-16 Thread Ralf Wildenhues
Hello Bill,

* Bill Northcott wrote on Sun, Nov 16, 2008 at 07:07:38AM CET:
>
> As others wrote you need a convenience library.
>
> However, as the code you are compiling will be part of a shared library, 
> you need to use appropriate compiler flags.  -fPIC is defaulted on the 
> Apple compilers but I don't know if you need -fno-common anymore.

Libtool takes care of adding the respective PIC flags when building a
convenience archive.

Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: Dependencies with static library

2008-11-16 Thread Erich Hoover
>
> Is (B) also linked with libtool?  If so, is the *.la file installed?
> That's where libtool gets the metadata required to know when to link to
> additional libraries.
>

Yes, and yes.  I'm using libtool through autoconf/automake for both the
library "B" and the application "A".  Everything works fine when I have
things linked dynamically, it appears that some of my LDFLAGS were messing
with libtool and gcc.

After a combination of guessing and searching I discovered that by fixing my
LDFLAGS and adding the flag "-static-libtool-libs" that everything appears
to link OK.  However, what I'd really like to do is just include "B" and "C"
statically and not statically include all of the other more common libraries
(in this case, all of GTK+).

Erich Hoover
[EMAIL PROTECTED]
___
http://lists.gnu.org/mailman/listinfo/libtool


Re: mingw win64 comatibility

2008-11-16 Thread Ralf Wildenhues
Hello Alon,

* Alon Bar-Lev wrote on Thu, Nov 13, 2008 at 10:45:23AM CET:
> On Wednesday 12 November 2008, Ralf Wildenhues wrote:
> > verify that this command fails:
> >   make check-local TESTSUITEFLAGS='-v -d -x -k AC_WITH_LTDL'
> > 
> > and post the output, then find out where exactly the failure happens
> > during configure:
> >   cd tests/testsuite.dir/42
> >   ./configure --prefix=/nowhere
> > 
> > You may have to look at the output, and/or config.log.
> > Do you have the ECHO, RM, environment variables set?
> 
> I tried with clean checkout, BTW: make maintainer-clean does not work.

Ah, yes; maintainer-clean only works if you have run 'make check' before
(and no 'make clean' in between), so that all the old test subdirs have
a Makefile.  Same thing with distclean.

> Following is the patch I use... I don't know if the old-m4-iface.at is
> correct. But it solved at least one issue.

Thanks.  The .gitignore issue is obvious, I've pushed that; the
old-m4-iface.m4 change should be obsolete with the pending patch.
I'll deal with the ltmain.m4sh change when we're through with this.

> I also don't know which test should be skipped. Now only the following tests 
> fails:
>  32: sys_lib_search_pathtestsuite: WARNING: A 
> failure happened in a test group before any test could be
> testsuite: WARNING: run. This means that test suite is improperly designed.  
> Please
> testsuite: WARNING: report this failure to <[EMAIL PROTECTED]>.
>  ok

Thanks; fixed like this, and put you in THANKS.

Cheers,
Ralf

Skip sys_lib_search_path on systems without libz.
* tests/search-path.at (sys_lib_search_path): Autotest needs at
least one AT_CHECK executed in a test group.  So if we haven't
found -lz anywhere, as may happen with cross-compilers, skip the
test.
* THANKS: Update.
Report by Alon Bar-Lev.

diff --git a/tests/search-path.at b/tests/search-path.at
index 2bc56c0..929d2dd 100644
--- a/tests/search-path.at
+++ b/tests/search-path.at
@@ -1,6 +1,6 @@
 # search-path.at -- test sys_lib_search_path_spec -*- Autotest -*-
 #
-#   Copyright (C) 2006 Free Software Foundation, Inc.
+#   Copyright (C) 2006, 2008 Free Software Foundation, Inc.
 #   Written by Ralf Wildenhues, 2006
 #
 #   This file is part of GNU Libtool.
@@ -41,13 +41,20 @@ int main()
 $CC $CPPFLAGS $CFLAGS -c main.c
 eval `$LIBTOOL --config | $EGREP '^(sys_lib_search_path_spec)='`
 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+no_libz=:
 for path in $sys_lib_search_path; do
   if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT -L$path -lz
   then
 AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT 
-lz],
  [], [ignore], [ignore])
+no_libz=false
 break
   fi
 done
 
+# If -lz doesn't exist (hello, cross compiler!), we need a dummy test.
+if $no_libz; then
+  AT_CHECK([exit 77])
+fi
+
 AT_CLEANUP


___
http://lists.gnu.org/mailman/listinfo/libtool