Re: Bug in conditional library building

2002-05-23 Thread Alexandre Duret-Lutz

>>> "Patrick" == Patrick Guio <[EMAIL PROTECTED]> writes:

[...]
 Patrick> am_libmudfas2d_la_OBJECTS = $(am__objects_1)
 Patrick> am_libmudfas3d_la_OBJECTS = $(am__objects_1)
[...]

This will be fixed in Automake 1.6.2.  It is already fixed in CVS.

-- 
Alexandre Duret-Lutz


___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool



libtool.m4.in patch for Intel C++ compiler

2002-05-23 Thread Allan Sandfeld Jensen

Hi.

 I made a patch for supporting Intel's C and C++ compiler against 
libtool.m4.in in KDE-CVS, but I was told we more less used libtool from your 
cvs, and I therefore should go to the source.

I have attached the patch (I hope it applies) If you have questions or 
comments please CC me since I am not a member of this mailing-list.

Greetings
`Allan


libtool.m4.in support for Intel C++ compiler v6.0:
Besides some simple extentions of existing case statement, I have changed the 
override of build_libtool_need_lc from yes to no for non-gcc compilers. The 
reason is compilation breaks if -lc is specified to icc and I guess gcc is 
the only compiler that needs this silly hack. A better solution might be to 
remove the override since this flag is set a few places in the architecture 
specific code.

There is also one remaining issue with the generated libtool: One case (the 
first) of wl is still set to "". I can figure out where this instance is set.

Index: libtool.m4.in
===
RCS file: /home/kde/kde-common/admin/libtool.m4.in,v
retrieving revision 1.73
diff -u -3 -p -r1.73 libtool.m4.in
--- libtool.m4.in   2002/05/16 18:16:13 1.73
+++ libtool.m4.in   2002/05/18 19:16:09
@@ -2364,7 +2364,7 @@ compiler="[$]2"
 _LT_AC_TAGVAR(compiler, $1)=$CC
 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
-# We don't want -fno-exception wen compiling C++ code, so set the
+# We don't want -fno-exception when compiling C++ code, so set the
 # no_builtin_flag separately
 if test "$GXX" = yes; then
   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
@@ -2710,6 +2710,17 @@ case $host_os in
# dependencies.
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v 
conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed 
"s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in 
conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; 
done; echo $list'
;;
+  icc|icpc)
+   # Intel C++
+   # -Tused tells icpc to instantiate all used templates.
+   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -Tused $predep_objects 
$libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname,$soname -o 
$lib'
+   _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects 
$libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname,$soname  -o 
$lib ${wl}-retain-symbols-file,$export_symbols'
+   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+   runpath_var=LD_RUN_PATH
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+   ;;
 esac
 ;;
   lynxos*)
@@ -4021,6 +4032,12 @@ AC_MSG_CHECKING([for $compiler option to
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
+ icc|icpc)
+   # Intel C++
+   _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption,ld,'
+   _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+   _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+   ;;
  *)
;;
esac
@@ -5036,7 +5073,7 @@ fi
 #
 # Do we need to explicitly link libc?
 #
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 if test "$enable_shared" = yes && test "$GCC" = yes; then
   case $_LT_AC_TAGVAR(archive_cmds, $1) in
   *'~'*)

___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool



AIX library creation for dynamic loading

2002-05-23 Thread Don Anderson

Hello,

I seek your advice on some weirdness I've noticed with AIX 4.3.3.  I
want to create a shared library for dynamic loading using libtool with
the -module option.  When the AIX linker (or something in the compiler
chain) creates the shared library, it is put into a .a file.  That is,
it creates libfoo.a, a static archive of one element, which is
libfoo.so.0, and that shared object has an SONAME of libfoo.so.
Apparently, the linker knows how to link and run against that animal
if you just wanted to link.  But if you want to dynamically load it
(say from java or Tcl), these programs cannot dlopen the .a.  So I
need to do a post-install step like this:

   $ ar xv libfoo.a
   x - libfoo.so.0
   $ ln -s libfoo.so.0 libfoo.so

This gives me a libfoo.so that I can dlopen directly.

Anybody understand AIX?  Am I missing something basic here?
Do I need a post install step to accomplish my mission?

I don't think this is related, but I needed to patch libtool
to use the linker's -qmkshrobj rather than -Wl,-Bexport:foo.exp.
That's in order to all the symbols I needed exported.  I'll
submit that patch in a separate message.

- Don

-- 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Anderson[EMAIL PROTECTED]
Sleepycat Software Inc. +1-978-287-4781
118 Tower Rd.   http://www.sleepycat.com
Lincoln, MA 01773


___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool