Raja R Harinath [Mon, 24 Jul 2000 05:33:28 +0000 (05:33 +0000)]
* tests/Makefile.am (COMMON_TESTS): New variable.
(CXX_TESTS): Define unconditionally.
(TESTS): Move all tests to COMMON_TESTS, and conditionally
include CXX_TESTS.
(EXTRA_DIST): Don't use $(TESTS).
* ltcf-c.sh, ltcf-cxx.sh: Check if -lc is necessary for building
shared library.
* ltcf-gcj.sh: Assume -lc is implicitly linked in.
* ltconfig.in: Set build_libtool_need_lc to indicate it.
* ltmain.in: Add -lc when building shared libary only if
necessary.
* ltcf-c.sh (wlarc, netbsd, aout): Set wlarc to empty.
(hardcode_dynamic_flag_spec, export_dynamic_flag_spec): Use
wlarc instead of wl.
* ltcf-gcj.sh (wlarc, netbsd, aout): Set wlarc to empty.
(hardcode_dynamic_flag_spec, export_dynamic_flag_spec): Use
wlarc instead of wl.
* libtool.m4 (AC_LIBTOOL_GCJ): Require either AC_PROG_GCJ or
AM_PROG_GCJ.
(AC_PROG_LIBTOOL): Change internal comments to dnl, so that they
don't make it to the `configure' script.
* libtool.m4 (AM_PROG_GCJ): Quote it so that aclocal won't bring
it in if it only appears in libtool.m4.
(AC_PROG_LIBTOOL): Move AC_PROG_CXX, AC_PROG_GCJ and AM_PROG_GCJ
hooks here, so that they can be far simpler!
Ossama Othman [Tue, 13 Jun 2000 21:52:34 +0000 (21:52 +0000)]
* libtool.m4: Updated comment.
* ltcf-cxx.sh (archive_cmds, archive_expsym_cmds,
hardcode_libdir_flag_spec, export_dynamic_flag_spec,
whole_archive_flag_spec, with_gnu_ld): Added two default
configurations for GNU g++ (one for g++ with GNU ld, and one for
g++ with native linker). Updated all platform-specific g++
configurations to only be used if GNU ld isn't the backend linker.
Added support for the KCC (Kuck and Associates, Inc. (KAI) C++
Compiler) to the Linux and OSF/1 configurations.
(ac_cv_prog_cc_wl): Added KAI C++ configuration.
(archive_expsym_cmds): Some configurations were missing the
argument that sets the name of the output library.
* libltdl/ltdl.c, libltdl/libltdl.h: Synchronized with HEAD branch
versions.
* ltcf-cxx.sh (whole_archive_flag_spec): Added missing back quotes
(`) around a command that had to be evaluated. This fixes GNU ld
"--whole-archive" support detection.
(wlarc): Fixed usage of $wlarc, which must be $wl in all cases,
but when really using $LD for linking.
* ltmain.in (deplibs): Add the library paths to end of the
deplibs, instead of the beginning, since deplibs is reordered
later on.
Ossama Othman [Tue, 6 Jun 2000 03:23:51 +0000 (03:23 +0000)]
* ltcf-cxx.sh (compiler_lib_search_path), ltconfig.in
(compiler_lib_search_path), ltmain.in (libs): The library path
that the compiler uses internally was being placed before the one
supplied by the user. Added a loop that moves that path after the
user supplied one.
Reported by Stephan Kulow <coolo@kde.org> and Michael Matz
<matz@ifh.de>
Gary V. Vaughan [Tue, 30 May 2000 00:21:05 +0000 (00:21 +0000)]
* ltcf-c.sh (netbsd*): archive_cmds and archive_expsym_cmds
were reversed with respect to definition of __ELF__.
* ltcf-gcj.sh (netbsd*): ditto.
From Keisuke Inoue <keisuke@csl.sony.co.jp>
Gary V. Vaughan [Mon, 29 May 2000 17:39:25 +0000 (17:39 +0000)]
* libtool.m4 (netbsd*): Use -L option to file_magic_cmd as for
freebsd (below).
* libtool.m4 (netbsd ELF): support file_magic.
From Dan Winship <danw@helixcode.com>.
* libtool.m4 (bsdi4*): Add -L option to bsdi4's file_magic_cmd
command. Under BSD/OS 4.1 several libraries are now symlinks
rather than regular files. Adding -L tells the file program
to follow the symlink.
Fred Fish [Mon, 29 May 2000 16:25:23 +0000 (16:25 +0000)]
Support AR=mwld AR_FLAGS='-xml -o' for PPC Beos:
* ltconfig (old_AR_FLAGS): Add.
(old_archive_cmds): Use AR_FLAGS rather than hardcoding "cru".
(archive_cmds): Use AR_FLAGS rather than hardcoding "cru".
(AR_FLAGS): Default to "cru" if not set.
* ltcf-c.sh: ditto.
* ltcf-gcj.sh: ditto.
Gary V. Vaughan [Mon, 29 May 2000 15:07:28 +0000 (15:07 +0000)]
* ltconfig.in (echo): The following code actually prints the
double quotes -- so I removed them:
echo='printf "%sn"' $echo 't'
From Tuukka Toivonen <tutoivon@mail.student.oulu.fi>
Ossama Othman [Sun, 28 May 2000 23:40:05 +0000 (23:40 +0000)]
* ltmain.in: Make sure $arg is set when linking `.lo' files into a
program. Moved tag decision code after check for recognized
source file extension (fixes "suffix" test failure). Merged
Rhapsody support from main trunk.
(output_obj) Added missing '$' before "echo" command (fixes "sh"
test failure).
* tests/suffix.test: Corrected typo in error message, and improved
the message.
Alexandre Oliva [Fri, 26 May 2000 05:41:51 +0000 (05:41 +0000)]
* libtool.m4 (_AC_PROG_LIBTOOL): Run before AC_LIBTOOL_GCJ.
Add ltcf-c.sh to LIBTOOL_DEPS. Run AC_LIBTOOL_CXX and
AC_LIBTOOL_GCJ on demand.
(AC_PROVIDE_IFELSE): Define for non-CVS autoconf compatibility.
(AC_LIBTOOL_CXX): Accept multiple executions. Add ltcf-cxx.sh
to LIBTOOL_DEPS. Reset config.log output.
(AC_LIBTOOL_GCJ): New macro.
* libtoolize.in: Copy ltcf-cxx.sh if AC_PROG_CXX is found.
Copy ltcf-gcj.sh when appropriate.
* doc/libtool.texi (AC_LIBTOOL_CXX): Doesn't have to be
explicitly called.
(AC_LIBTOOL_GCJ): Document.
* tagdemo/configure.in (AC_LIBTOOL_CXX): Don't call.
Ossama Othman [Wed, 24 May 2000 21:21:37 +0000 (21:21 +0000)]
* libtool.m4 (AC_LIBTOOL_PICMODE): Merged this macro from the HEAD
branch.
(AC_LIBTOOL_CXX): Made sure CXX is exported to ltconfig.
* ltcf-cxx.sh (ac_ext): Changed test source extension to "cc" to
avoid potential ambiguities when using case-insensitive shells.
(archive_expsym_cmds): Make sure soname is set otherwise
-retain-symbol-file feature won't work. The change was made for
the Linux Compaq C++ and GNU G++ configurations.
Reported by Stephan Kulow <coolo@kde.org>.
* ltconfig.in, ltmain.in: Merged in changes from the HEAD branch.
* tests/Makefile.am (clean-local): Fixed typo where a "distclean"
was done in `mdemo' instead of the `tagdemo'.
Alexandre Oliva [Sun, 14 May 2000 08:07:23 +0000 (08:07 +0000)]
* libtool.m4 (AC_LIBLTDL_CONVENIENCE, AC_LIBLTDL_INSTALLABLE):
Pick LIBLTLD from top_builddir and INCLTDL from top_srcdir.
* mdemo/configure.in: Remove comments on
AC_LIBLTLD_CONVENIENCE.
Alexandre Oliva [Sun, 14 May 2000 07:54:41 +0000 (07:54 +0000)]
* libtool.m4 (_AC_PROG_LIBTOOL): Renamed from...
(AC_PROG_LIBTOOL): Just AC_REQUIRE(_AC_PROG_LIBTOOL), to avoid
effects of multiple runs.
(_AC_PROG_LIBTOOL): Use AC_BEFORE to warn if called before
AC_LIBTOOL_CXX.
Ossama Othman [Mon, 28 Feb 2000 17:51:35 +0000 (17:51 +0000)]
* ltmain.in (libobjs, reload_conv_objs): When searching for object
files, search for "*.$objext," not "*.o."
(compile_command, finalize_command, progfiles): No need to
transform `.lo' objects into standard `.o' objects. `.lo' files
are converted to the appropriate `.o' file earlier in the link
mode code.
* doc/libtool.texi (AC_LIBTOOL_CXX): Documented this
macro, and the `tagdemo' test that utilizes it. Updated C++ and
tagged configuration documentation.
Ossama Othman [Sat, 26 Feb 2000 00:04:12 +0000 (00:04 +0000)]
* libtool.m4, ltconfig.in: Merged in changes from most recent HEAD
branch version.
* ltmain.in: Merged in changes from most recent HEAD branch
version (ILD updates), and fixed parallel build error.
* tagdemo/acinclude.m4, tagdemo/aclocal.m4, tagdemo/configure:
regenerated these files against updated libtool.m4.
Ossama Othman [Wed, 23 Feb 2000 02:44:31 +0000 (02:44 +0000)]
* libtool.m4 (AC_PROG_LIBTOOL): Added missing "$lt_target" command
line argument in call to `ltconfig'. This fixes a problem that
was occuring when a host type was specified by the user. Also
added missing "$reload_flag" environment.
Ossama Othman [Thu, 17 Feb 2000 18:01:32 +0000 (18:01 +0000)]
* libtoolize.in (files): Add C++ support if configure.in uses
AC_LIBTOOL_CXX, i.e. add `ltcf-cxx.sh' to list of files to be
copied during libtoolization.
* ltdl.m4: Added this file to the multi-language branch.
Ossama Othman [Tue, 8 Feb 2000 18:47:30 +0000 (18:47 +0000)]
* ltcf-cxx.sh (predeps, postdeps, predep_objects,
postdep_objects): Split {pre,post}deps into a variable that hold
library dependencies and another that holds objects needed during
shared library generation. This was needed so that the objects
needed for shared library generation do not get analyzed by the
ILD mechanism. The objects are only used during the initial
creation of the shared library, not during subsequent links to
that library.
(archive_cmds, archive_expsym_cmds): Added $predep_objects before
all objects and libraries, and $postdep_objects after them. This
is necessary when linking C++ shared libraries.
(output_verbose_link_cmds): Added shared library generation
compiler flag. The objects and libraries the compiler links when
creating shared libraries may be different than those used when
linking programs, particulary for object files.
* ltconfig.in (predep_objects, postdep_objects): Include these
variables in the generated libtool script.
* ltmain.in: Quote regular expression used for automatic tagged
configuration selection. Also improved the regular expression
used for matching.
Updated clean mode to work properly with the new `.lo' files.
(libs): Only add $predeps and $postdeps to the list of dependency
libraries when linking a library.
* tagdemo/Makefile.am (noinst_LTLIBRARIES): Added another test
library that depends on the existing test library. It was added
to exercise the ILD mechanism when using tagged configurations.
(tagdemo_LDADD): The tagdemo program now depends on the new test
library. Since the new test library depends on the previous one,
the previous library should be linked to the program as well.
* Makefile.in: Regenerated from updated Makefile.am.
* tagdemo/baz.cpp, tagdemo/baz.h: Added these sources. They are
new test library sources.
* tagdemo/main.cpp (main): Added call to method in new test
library.
Ossama Othman [Sun, 6 Feb 2000 03:54:56 +0000 (03:54 +0000)]
* ltmain.in: The "-R*" case in the loop that iterates through
library dependencies doesn't handle the case of the "lib" link
mode. As such, the next iteration should immediately follow. The
"continue" inside the "if" block has been moved outside that
block. Previously, the "-R*" case would just "fall through" when
in "lib" link mode, but $lib="" which caused a "library not found"
error later on.
Reported by Stephan Kulow <coolo@kde.org>
Ossama Othman [Sun, 6 Feb 2000 00:29:57 +0000 (00:29 +0000)]
* bootstrap: Merged updates from HEAD branch.
(sub): Added tagdemo to list of subdirectories to be
bootstrapped.
* ltcf-cxx.sh (AR): Removed redefinition of $AR to C++ compiler on
Solaris for the Sun C++ and Green Hills C++ compilers. `ar' must
be used to extract object files from the archives, despite the
fact that the archive must be created by the compiler.
Reported by Stephan Kulow <coolo@kde.org>
(predeps, postdeps): Remove any space between "-{L,R}" and the
path. Some compilers, such as HP aCC add space between them.
* ltconfig.in (dlopen, dlopen_support): Merged updates from HEAD
branch.
* ltmain.in: Merged updates from HEAD branch.
(libext): Do not reset $libext to `al' when creating convenience
libraries. Some compilers have problems with such a non-standard
extension.
Reported by Stephan Kulow <coolo@kde.org>
* doc/libtool.texi: Merged updates from HEAD branch.
* libltdl/Makefile.am, libltdl/configure.in, libltdl/ltdl.c,
libltdl/ltdl.h: Merged updates from HEAD branch.
Ossama Othman [Fri, 4 Feb 2000 03:53:36 +0000 (03:53 +0000)]
* ltconfig.in (available_tags): The name of each newly added
tagged configuration is appended to this list. This is done at
ltconfig time so that the generated `libtool' script need not
determine which tags it supports everytime it is used. The
available_tags variable is used by `ltmain.in' to iterate over
each of the tagged configurations when attempting to automatically
choose which one to use for the supplied compile/link command.
* ltmain.in: Added ability to automatically determine which tagged
configuration to use based on the compiler found in the supplied
base compile command.
(available_tags): This new variable contains a list of available
tagged configurations. This gets generated at ltconfig time.
(object_name, old_object): Renamed these to pic_object and
non_pic_object, respectively.
* doc/libtool.texi (Configuration tags): Updated documentation.
Libtool now has the ability to infer which tagged configuration to
use based on the compiler found in the supplied base compile
command.
* tagdemo/configure.in, tagdemo/configure: Removed explicit
substitution of "--tag=CXX" in $LIBTOOL. The newly added
automatic selection of tagged configurations obviates the need to
explicitly specify which tag to use.
Ossama Othman [Tue, 1 Feb 2000 23:14:36 +0000 (23:14 +0000)]
* ltcf-cxx.sh: Added some untested HPUX aCC support.
* ltmain.in: Inadvertently removed some of the tags patch.
* tagdemo/Makefile.am, tagdemo/Makefile.in, tagdemo/README,
tagdemo/acinclude.m4, tagdemo/aclocal.m4, tagdemo/configure,
tagdemo/configure.in, tagdemo/foo.cpp, tagdemo/foo.h,
tagdemo/main.cpp: *sigh* I checked this directory into the HEAD
branch instead of the multi-language-branch.
Reported by Stephan Kulow <coolo@kde.org>
Ossama Othman [Tue, 1 Feb 2000 05:42:00 +0000 (05:42 +0000)]
* configure.in (CONF_SUBDIRS): Added the `tagdemo' directory to
the list.
* ltcf-cxx.sh: Remove any residual `a.out' files resulting from
the "eval $output_verbose_link_cmds."
* ltconfig.in: Cleaned up nested quotes that were introduced with
the tags patch. This fixes part sh.test failure.
* ltmain.in: Check if "$run" is of zero length before creating a
`.lo' file. This fixes the dryrun.test failure.
Cleaned up nested quotes that were introduced with
the tags patch. This fixes another part sh.test failure.
Remove "$libobj" not "libobj."
Exit with an error if both $object_name and $old_object are set to
"none" in the corresponding `.lo' file. This should never happen.
Changed remaining uses of "mkdir" to "$mkdir."
Added dry run case to `.lo' case in link mode. This fixes the
link-2.test failure.
(object_name, old_object): Prepend the subdirectory the `.lo'
resides in to the object names extracted from the `.lo' file.
This fixes the build-relink2.test failure.
(tempemovelist): Use $echo "X..." instead of echo "..." since
$Xsed is being used. This fixes the last part of the sh.test
failure.
* tagdemo/Makefile.am, tagdemo/Makefile.in, tagdemo/README,
tagdemo/acinclude.m4, tagdemo/aclocal.m4, tagdemo/configure,
tagdemo/configure.in, tagdemo/foo.cpp, tagdemo/foo.h,
tagdemo/main.cpp, tests/tagdemo-conf.test tests/tagdemo-exec.test
tests/tagdemo-make.test tests/tagdemo-shared.test
tests/tagdemo-static.test: Added a new tagdemo that exercises
libtool's tagged configuration support found in the multilanguage
branch.
* tests/Makefile.am (TESTS): Added the tagdemo tests to the list.
* tests/quote.test: Updated to HEAD branch version. This fixes
the quote.test failure.
Ossama Othman [Mon, 31 Jan 2000 19:23:44 +0000 (19:23 +0000)]
* ltconfig.in (compile_c_lo): Removed the test that checks if
compiler support "-c -o file.lo" since the changes made to
ltmain.in remove the need to do this.
* ltmain.in: Changed compile mode to generate `.lo' libtool
objects, instead of generating PIC objects that end in `.lo'.
These are analogous to libtool archive `.la' files. They contain
the name of the PIC and non-PIC objects. All PIC objects will now
be placed in `$objdir' (usually `.libs'). No changes to existing
Makefiles should be necessary. Libtool should work the same as it
did prior to this change. This change was necessary to correct a
problem with Sun C++'s template repository mechanism since it
couldn't handle repository objects ending in `.lo'. This change
causes some tests to fail, so it still needs some work. The tests
that fail are: dryrun.test, build-relink2.test, link-2.test. The
quote.test and sh.test tests also fail but they failed after the
initial multi-language changes were made.
Ossama Othman [Sun, 23 Jan 2000 03:10:33 +0000 (03:10 +0000)]
* ltcf-c.sh: split off the osf3 section, so that the osf4 and osf5
sections can add `-msym' to arguments passed to the linker for
shared libs.
Reported by Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>
Ossama Othman [Sun, 23 Jan 2000 03:07:22 +0000 (03:07 +0000)]
* libtool.m4 (AC_LIBTOOL_CXX): Added LDFLAGS to list of variables to
pass to ltconfig when creating C++ compiler tag.
* ltcf-cxx.sh: Added support for the DEC/Compaq C++ compiler on
Linux and osf[3,4,5].
(whole_archive_flag_spec): Corrected commands that check if GNU
linker supports "--whole-archive" flag. GNU C++'s
"-print-prog-name" flag is used to determine what the linker is
instead of using the 'LD' variable.
(ac_cv_prog_cc_wl): Corrected value for Sun C++. Previously it
was set to '-Wl,' when it should have been '-Qoption ld '.
* ltconfig.in (ac_cv_prog_cc_pic_works,
ac_cv_prog_cc_static_works): Make sure variable is not an empty
string, even if it is set.
Ossama Othman [Mon, 6 Dec 1999 01:50:10 +0000 (01:50 +0000)]
Temporarily reset the test language to C just before calling
AC_OBJEXT and AC_EXEEXT and then restore the previous one when
done, instead of doing an AC_BEFORE(...AC_LANG_CPLUSPLUS...). A
warning would always occur anyway because AC_PROG_CXX calls
AC_LANG_CPLUSPLUS.
Ossama Othman [Sun, 5 Dec 1999 22:41:28 +0000 (22:41 +0000)]
Make sure AC_LIBTOOL_SETUP is called before any macros that set
the autoconf test language (e.g. AC_LANG_CPLUSPLUS). Autoconf's
AC_EXEEXT macro only works for C compilers. AC_EXEEXT gets
confused and thinks that an extension such as the C++ source file
extenstion ".C" is an executable file extension, which screws up
the libtool configuration.
Pass the same autoconf variables used in the main ltconfig run to
the ltconfig configuration tag run (with the exception of a few).
This probably isn't necessary but I think it is a good idea to do
so.
Ossama Othman [Sun, 5 Dec 1999 00:35:57 +0000 (00:35 +0000)]
Make sure $ac_cv_prog_cc_pic_works and $ac_cv_prog_cc_static_works
are unset since their C compiler cached values will override their
C++ compiler specific values. Note that it was not enough to
reset their values. They had to be unset.
Ossama Othman [Sun, 5 Dec 1999 00:34:58 +0000 (00:34 +0000)]
Made invocation of ltconfig in AC_LIBTOOL_CXX macro more like the
one in AC_PROG_LIBTOOL. This adds some ILD related flags to the
invocation, in addition to providing the $libtool_flags to
ltconfig that was previously in AC_PROG_LIBTOOL (via
AC_LIBTOOL_SETUP). This fixes an ILD related bug with the C++
support, and also fixes a problem where both the static and shared
libraries were being built even if one of them was explicitly
disabled.
Ossama Othman [Sat, 4 Dec 1999 21:07:54 +0000 (21:07 +0000)]
Added ltcf-c.sh to list of files related to "libtoolization."
Until we decide if other compiler/language libtool configuation
scripts should also be included in the file list, leave out
ltcf-cxx.sh for now.
Ossama Othman [Sat, 4 Dec 1999 21:06:46 +0000 (21:06 +0000)]
Change name of macro that enables C++ support in libtool from
"AC_LIBTOOL_CPP" to "AC_LIBTOOL_CXX." "CPP" is typically
associated with preprocessors, whereas CXX is associated with C++
compilers.
Moved LTCC before CC in call to ltconfig to make sure LTCC is not
set to the compiler pointed to by CC after CC has been reset to
another compiler.
Call ltconfig with ${CONFIG_SHELL-/bin/sh} just like we do in
AC_PROG_LIBTOOL.
Save value of $CC and $CFLAGS before resetting them for use with
configuration tags.
Ossama Othman [Sat, 4 Dec 1999 21:04:41 +0000 (21:04 +0000)]
Moved "LTCC" in "--add-tag" example before "CC" because users may
inadvertently do something like the following:
CC=$CXX LTCC=$CC ./ltconfig --add-tag=...
Doing the above would set LTCC to the C++ compiler ($CXX), which
is incorrect since LTCC should be the C compiler. Also added
documentation explaining this potential problem.
Alexandre Oliva [Sat, 4 Dec 1999 02:57:27 +0000 (02:57 +0000)]
Moved the contents of the ChangeLog of the head branch to this file so
that the ChangeLog for the multi-language branch is "clean." I may
merge the two change logs before the multi-language branch is merged
into the main trunk.
I did *not* change the ChangeLog on the main trunk!
Alexandre Oliva [Sat, 4 Dec 1999 02:55:16 +0000 (02:55 +0000)]
Added this file. It contains C++ compiler related configuration
code (e.g. C++ compiler as linker, etc). It is meant to be used
when creating configuration tags using the newly added "--add-tag"
ltconfig option. See the libtool documentation for more details.
Eventually, the contents of this file will be moved to
`libtool.m4'.
This script also includes support for extracting the objects and
libraries the compiler would use when linking a C++ binary. This
support should allow static constructors and the like to work
properly.
Alexandre Oliva [Sat, 4 Dec 1999 02:54:45 +0000 (02:54 +0000)]
Added this file. It contains all of the C compiler related
configuration code that was previously in ltconfig.in. This
script is meant to be source by the ltconfig script alone. It is
not meant for use by the user. Eventually, the contents of this
file will be moved to `libtool.m4'.