Commit Graph

1098 Commits

Author SHA1 Message Date
Peter Rosin
18a85621b9 Fix dependency tracking for MSYS/MinGW.
* libltdl/config/ltmain.m4sh (func_to_tool_file): Add lazy
argument which allows the user to specify conversions that are
not desired.
(func_mode_compile): Don't convert source files on MSYS, as
MSYS does it for us. This fixes a regression introduced by
"Use func_to_tool_file instead of fix_srcfile_path".
Reported by Charles Wilson.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-09-09 20:51:27 +02:00
Peter Rosin
89819ce23b Adjust naming of MSVC import libraries.
* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [mingw, cygwin]
[pw32, cegcc] <cl*, library_names_spec>: Adjust naming of the
import library from foo-<major-version>.lib to foo.dll.lib, to
avoid clashes with the static library for unversioned libraries.
(_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG) [mingw, cygwin, pw32]
[cegcc] <cl*, archive_expsym_cmds>: Explicitely name the import
library to match the above.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-09-07 18:31:18 +02:00
Peter Rosin
25d44a7ae0 Convert POSIX file names to toolchain format for MSVC
* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG)
[cygwin, mingw, pw32, cegcc] <cl*, postlink_cmds>: Make
sure the -outputresource: file name for the manifest tool is
in w32 format.
<cl*, archive_expsym_cmds>: Likewise for the MSVC command file
containing the exports and the output file name.
* libltdl/config/ltmain.m4sh (func_mode_link): Precalculate the
toolchain format of the output_objdir file name and store it in
the tool_output_objdir variable. Also replace any occurrence of
@TOOL_OUTPUT@ in postlink_cmds with the toolchain version of the
@OUTPUT@ content.
* doc/libtool.texi (libtool script content): Update description
of postlink_cmds to mention @TOOL_OUTPUT@.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-09-07 07:04:49 +02:00
Peter Rosin
d243a1ec53 Use func_to_tool_file instead of fix_srcfile_path.
* libltdl/config/ltmain.m4sh (func_mode_compile): Replace the
fix_srcfile_path hook with a call to func_to_tool_file.
* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [cygwin,mingw,pw32]
[cegcc]: Drop fix_srcfile_path.
* doc/libtool.texi (libtool script contents): Likewise.
* NEWS: Mention that fix_srcfile_path has been replaced.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-09-06 10:40:25 +02:00
Peter Rosin
742873613d Convert file names to toolchain format in $NM and $AR @files.
* libltdl/config/ltmain.m4sh (func_mode_link): When listing
symbols and when creating archives using command files (or
response files), make sure that both the name of the command
file and the content are made up of file names in a format
appropriate for the tool. Fixes stresstest.at on MSYS when
run with low command line length.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-09-06 10:39:10 +02:00
Peter Rosin
4dcbe43583 Convert file names to toolchain format when linking.
* libltdl/config/ltmain.m4sh (func_mode_link): When exporting
symbols and when linking using command files (or response
files), make sure that both the name of the command file and
the content are made up of file names in a format appropriate
for the tool. Fixes problems in stresstest.at on MSYS when run
with low command line length.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-09-06 10:38:34 +02:00
Peter Rosin
375a576d09 Add file name conversion from $build to toolchain.
* configure.ac: Ensure to_tool_file_cmd is available to Makefile.
* libltdl/m4/libtool.m4 (_LT_PATH_CONVERSION_FUNCTIONS): Add
cache variable lt_cv_to_tool_file_cmd that describes how to
convert file names from $build to toolchain format.
* libltdl/config/ltmain.m4sh (func_to_tool_file): New function
that utilizes the above.
* Makefile.am: Ensure to_tool_file_cmd is included in
TEST_ENVIRONMENT so that it is passed to (old testsuite) tests.
* testsuite.at: Ensure to_tool_file_cmd is passed as a variable
setting on the configure line for (new testsuite) tests.
* doc/libtool.texi (libtool script content): Update with
to_tool_file_cmd description.
(Cygwin to MinGW Cross): Update to mention lt_cv_to_tool_file_cmd.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-09-06 08:23:52 +02:00
Ralf Wildenhues
327f014068 Merge branch 'master' into lto 2010-09-02 21:06:43 +02:00
Gary V. Vaughan
de0b9d8f70 Remove announce-gen.m4sh and mailnotify.m4sh.
* libltdl/config/announce-gen.m4sh: Removed.  This script has
no apparent connection to libtool functionality, and mostly
duplicates the better maintained gnulib announce-gen script.
* libltdl/config/mailnotify.sh: Removed. This script was used
by only clcommit.m4sh and announce-gen.m4sh, both of which are
now removed too.
* Makefile.maint (announce-gen, libltdl/config/mailnotify):
Targets removed.
* bootstrap: Remove the mailnotify regeneration warning.
* HACKING (Release Procedure): Remove references to
announce-gen.
(Alpha release note template, Full release note template):
Reinstated from before announce-gen was introduced.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-09-01 12:52:55 +07:00
Peter Rosin
185a2f71d0 Dump archiver output to the log when testing @file support.
* libltdl/m4/libtool.m4 (_LT_PROG_AR): Redirect stdout to config.log
when testing for @file support.
Suggested by Ralf Wildenhues.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-08-31 19:04:22 +02:00
Peter Rosin
34f87a6b07 Silence archiver output when testing @file support.
* libltdl/m4/libtool.m4 (_LT_PROG_AR): Redirect stdout and stderr
to the bit bucket when testing for @file support.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-08-31 13:38:47 +02:00
Gary V. Vaughan
d226dc44a3 Remove double `Generated from foo.m4sh' lines.
We now require a modern Autoconf to bootstrap libtool, which
will add the `Generated by ...' boiler-plate automatically,
so we can remove the hand-rolled @configure_input@
substitutions we had been doing:
* clcommit.m4sh, libtoolize.m4sh, tests/defs.sh,
libltdl/config/announce-gen.m4sh, libltdl/config/ltmain.m4sh,
libltdl/config/mailnotify.m4sh: Remove @configure_input@.
* Makefile.am (edit): Remove configure_input substitution.
(libtoolize, libltdl/config/ltmain.sh, libltdl/m4/ltversion.m4)
(tests/defs): Don't set `$input' shell variable.
* Makefile.maint (announce_gen, libltdl/config/mailnotify)
(commit): Likewise.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-08-31 17:54:10 +07:00
Charles Wilson
f91cf561ab Update path conversion warning messages
* libltdl/config/ltmain.m4sh (func_convert_file_check): Update
comments and warning message.
(func_convert_path_check): Update warning message.

Signed-off-by: Charles Wilson <libtool@cwilson.fastmail.fm>
2010-08-30 02:24:22 -04:00
Ralf Wildenhues
b81fd4ef00 Support GCC LTO on GNU/Linux.
* libltdl/config/ltmain.m4sh (func_mode_link): Allow through
flags matching -O*, -flto*, -fwhopr, -fuse-linker-plugin.
* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Drop symbols
starting with __gnu_lto.
(_LT_LINKER_SHLIBS) [linux] <archive_cmds, archive_expsyms_cmds>:
Add $pic_flag for GCC.
(_LT_LANG_CXX_CONFIG) [linux] <archive_cmds, archive_expsyms_cmds>:
Likewise.
(_LT_SYS_HIDDEN_LIBDEPS): Ignore files matching *.lto.o.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-29 17:31:57 +02:00
Ralf Wildenhues
ada610770b Disable GCC LTO for verbose library extraction.
* libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS): Temporarily
append -fno-lto or -fno-whopr to CFLAGS if CC or CFLAGS (which
are substituted with the per-language variables here) contain
-flto or match -fwhopr*, respectively.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-29 17:30:19 +02:00
Ralf Wildenhues
bf1d52eb53 Save and restore CFLAGS properly inside libtool.m4 macros.
* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Use different
temporary variables for saved and restored values of $LIBS,
$CFLAGS, to avoid overlap with the *_CONFIG macros.
(_LT_LANG_CXX_CONFIG, _LT_LANG_F77_CONFIG, _LT_LANG_FC_CONFIG)
(_LT_LANG_GCJ_CONFIG, _LT_LANG_RC_CONFIG): Also save and restore
$CFLAGS, and override it with per-language flags, so that in
case output_verbose_link_cmd uses $CFLAGS, the right flags are
used.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-29 17:28:29 +02:00
Charles Wilson
ae96006169 Merge branch 'sysroot'
* sysroot:
  Minor sysroot fixups.
2010-08-28 20:16:02 -04:00
Charles Wilson
83f5d15c88 Minor sysroot fixups.
* libltdl/m4/libtool.m4 (_LT_WITH_SYSROOT): Fix typo.
* tests/sysroot.at: Search also for crt0.o to accommodate cygwin.

Signed-off-by: Charles Wilson <libtool@cwilson.fastmail.fm>
2010-08-28 20:15:09 -04:00
Charles Wilson
fdd882b95b Merge remote branch 'origin/master' 2010-08-28 17:41:32 -04:00
Ralf Wildenhues
6df45ac3ae Fix symlist variable path to use _WIN32 instead of __WINDOWS__.
* libltdl/config/ltmain.m4sh, libltdl/libltdl/lt_system.h,
libltdl/m4/libtool.m4, tests/demo/foo.h, tests/pdemo/foo.h:
Change __WINDOWS__ to _WIN32.
Report by Charles Wilson.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-28 17:30:01 +02:00
Ralf Wildenhues
877260ff04 Add $pic_flag to archive_cmds and archive_expsym_cmds.
* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS)
<archive_cmds, archive_expsym_cmds>
[GNU ld, netbsd]: Add $pic_flag if ELF.
[GNU ld, solaris]: Likewise.
[GNU ld, default case]: Likewise.
[!GNU ld, freebsd, dragonfly]: Add $pic_flag.
[!GNU ld, GCC, hpux9]: Add $pic_flag.
[!GNU ld, GCC, hpux10]: Replace -fPIC with $pic_flag
[!GNU ld, GCC, hpux11, !hppa*64]: Replace -fPIC with $pic_flag.
[!GNU ld, GCC, irix5, irix6, nonstopux]: Add $pic_flag.
[!GNU ld, GCC, osf4, osf5]: Likewise.
[!GNU ld, GCC, solaris]: Likewise.
(_LT_LANG_CXX_CONFIG) <archive_cmds, archive_expsym_cmds>
[hpux9]: Add $pic_flag if $GXX.
[hpux10, hpux11, !hppa*64]: Replace -fPIC with $pic_flag.
[irix5, irix6]: Add $pic_flag if $GXX.
[osf4, osf5]: Likewise.
[solaris]: Add $pic_flag if $GXX and not GCC 2.7.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-28 15:43:52 +02:00
Ralf Wildenhues
5b79e16a32 Uniform const'ness of symlist variable lt_preloaded_symbols.
On some systems, lt_preloaded_symbols may not be declared
const due to relocation issues.  C99 requires qualification to
match for compatible declarations, so ensure we declare
const'ness in the same way everywhere; link-time optimization
may otherwise rightfully complain about inconsistencies.
Since ltdl.h may not depend upon config.h, rely on system
defines for choosing const'ness.

* NEWS: Update.
* doc/libtool.texi (Dlpreopening): Document this issue.
* libltdl/config/ltmain.m4sh (func_generate_dlsyms):
[__WINDOWS__, __CYGWIN__, _WIN32_WCE]: Define LT_DLSYM_CONST
according to system defines.  Remove old shell cruft.  Use
LT_DLSYM_CONST for lt_${my_prefix}_LTX_preloaded_symbols.
* libltdl/libltdl/lt_system.h (LT_DLSYM_CONST): Likewise,
define LT_DLSYM_CONST according to system defines.
* tests/demo/foo.h (LT_DLSYM_CONST): Likewise.
* tests/pdemo/foo.h (LT_DLSYM_CONST): Likewise.
* tests/demo/dlmain.c (lt_dlsymlist): Use LT_DLSYM_CONST.
* tests/pdemo/longer_file_name_dlmain.c (lt_dlsymlist):
Likewise.
* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Likewise
for configure test code.
* libltdl/ltdl.c (preloaded_symbols): Use LT_DLSYM_CONST.
* libltdl/ltdl.h (LTDL_SET_PRELOADED_SYMBOLS): Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-28 14:51:36 +02:00
Dave Korn
0373df7675 Ensure cwrapper magic string is not optimized away.
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src):
Declare MAGIC_EXE as volatile.
Report by Charles Wilson.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-28 14:43:02 +02:00
Ralf Wildenhues
82f2a825a7 Fix quoting in non-XSI func_xform, for IRIX sh.
* libltdl/config/ltmain.m4sh (func_xform): Remove spurious extra
M4 quotes.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-28 14:18:12 +02:00
Ralf Wildenhues
7f9878d026 Fix response file test for unreliable exit status of IRIX ar.
* libltdl/m4/libtool.m4 (_LT_PROG_AR): IRIX ar will not fail
over a command-line argument specifying a nonexistent file (such
as `@FILE'), so ensure failure with a reponse file containing
a nonexistent file.  Also, use lt_* variable prefix for
temporary variables.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-28 12:22:36 +02:00
Ralf Wildenhues
2680f79c22 Fix AC_LANG_PROGRAM warnings from git Autoconf.
* libltdl/m4/libtool.m4 (_LT_SYS_MODULE_PATH_AIX): Fix
underquoted AC_LANG_PROGRAM call.
(LT_PROG_AR): Use AC_LANG_PROGRAM.
(_LT_LINKER_SHLIBS) [irix, GCC]: Use the right source for the
given language.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-28 11:34:24 +02:00
Ralf Wildenhues
8f5c58990d Merge branch 'sysroot'
* sysroot:
  Add ChangeLog entries for the sysroot branch.
  fix AIX testsuite regression
  fix --mode=finish
  improve code for sysroot --mode=finish
  add libtool --mode=finish mode for sysroot
  reorganize parsing of --mode=finish arguments
  fix sysroot handling for deplibs of preopened libtool libs
  fix sysroot tests to pass on Fedora 13
  initial version of the NEWS entry
  add sysroot test
  emit sysrooted paths when installing .la files
  process postdeps to include sysrooted paths
  handle sysrooted paths when reading dependencies to la files
  teach libtool -L= and -R=
  add --with-sysroot
  handle sysroot flags
2010-08-28 10:39:40 +02:00
Charles Wilson
ac40b5f37a [cygwin|mingw|cross-compile]: Path conversion support.
* configure.ac: Ensure to_host_file_cmd is available to Makefile.
* TODO: Document QoI issue with file name conversion functions.
* libltdl/m4/libtool.m4 (_LT_PATH_CONVERSION_FUNCTIONS): New function
sets libtool variable $to_host_file_cmd, and employs cache.
(_LT_SETUP): Require it.
* tests/testsuite.at: Ensure to_host_file_cmd is passed as a
variable setting on the configure line for (new testsuite) tests.
* Makefile.am (TESTS_ENVIRONMENT): Ensure to_host_file_cmd is
included so that it is passed to (old testsuite) tests.
* libltdl/config/general.m4sh: Define $lt_sed_naive_backslashify here.
* libltdl/config/ltmain.m4sh ($to_host_file_cmd, $to_host_path_cmd):
New variables.
(func_cygpath): New function.
(func_init_to_host_path_cmd): New function.
(func_to_host_path): Renamed to...
(func_to_host_file): Refactored to... (now uses $to_host_file_cmd).
(func_convert_core_file_wine_to_w32): Here. New function.
(func_convert_core_msys_to_w32): Here. New function.
(func_convert_file_check): Here. New function.
(func_convert_file_noop): Here. New function.
(func_convert_file_msys_to_w32): Here. New function.
(func_convert_file_cygwin_to_w32): Here. New function.
(func_convert_file_nix_to_w32): Here. New function.
(func_convert_file_msys_to_cygwin): New function.
(func_convert_file_nix_to_cygwin): New function.
(func_to_host_pathlist): Renamed to...
(func_to_host_path): Refactored to... (now uses $to_host_path_cmd
and func_init_to_host_path_cmd).
(func_convert_path_check): Here. New function.
(func_convert_path_front_back_pathsep): Here. New function.
(func_convert_core_path_wine_to_w32): Here. New function.
(func_convert_path_noop): Here. New function.
(func_convert_path_msys_to_w32): Here. New function.
(func_convert_path_cygwin_to_w32): Here. New function.
(func_convert_path_nix_to_w32): Here. New function.
(func_convert_path_msys_to_cygwin): New function.
(func_convert_path_nix_to_cygwin): New function.

Signed-off-by: Charles Wilson <libtool@cwilson.fastmail.fm>
2010-08-28 03:32:31 -04:00
Charles Wilson
f8640925f8 Fix syntax for cygwin-cross
libltdl/m4/argz.m4: Add quotes around variable, which
may contain the multiword value 'guessing no'.

Signed-off-by: Charles Wilson <libtool@cwilson.fastmail.fm>
2010-08-23 01:53:08 -04:00
Ralf Wildenhues
92d24b3d80 configure: use Autobuild AB_INIT if available.
* configure.ac: Call AB_INIT if it is defined, with
$autobuild_mode as argument, to be set at configure time.
Set AB_VERSION to the Libtool version string.
* HACKING: Update.
* libltdl/m4/.gitignore: Ignore autobuild.m4.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-22 20:35:06 +02:00
Paolo Bonzini
75b9ac5fa2 Merge branch 'master' into sysroot 2010-08-22 09:54:55 +02:00
Paolo Bonzini
a662d7c46e Fix sed_make_literal_regex.
* libltdl/config/general.m4sh (sed_make_literal_regex): Fix
definition.
2010-08-22 09:52:26 +02:00
Ralf Wildenhues
a1d74f242c fix AIX testsuite regression
* libltdl/config/ltmain.m4sh (func_resolve_sysroot): Partly
revert v2.2.10-83-gc45a288: Do not absolutize path here, only do
sysroot replacement.
(func_mode_link): Adjust.
2010-08-22 09:42:51 +02:00
Paolo Bonzini
2bde23f84f Merge remote branch 'origin/master' into sysroot
* libltdl/config/ltmain.m4sh (func_mode_finish): Use sed_make_literal_regex.
2010-08-22 09:40:32 +02:00
Charles Wilson
5dca3212e1 fix --mode=finish
* libltdl/config/ltmain.m4sh (func_mode_finish): Invert then/else
blocks of the "if $opt_dry_run" conditional.
2010-08-22 09:39:21 +02:00
Paolo Bonzini
d7ed1f8f9f Factor the sed command used to make a regex from a literal.
* libltdl/config/general.m4sh (sed_make_literal_regex): New.
* libltdl/config/ltmain.m4sh (func_generate_dlsyms,
func_cygming_dll_for_implib_fallback_core): Use it.  Suggested
by Ralf Wildenhues.
2010-08-22 09:27:09 +02:00
Paolo Bonzini
b9accaaa3b improve code for sysroot --mode=finish
* libltdl/config/ltmain.m4sh (func_mode_finish): Change sysroot_regex
and sysroot_cmd delimiter from pipe to slash.  Wrap the entire for
loop with "if $opt_dry_run...fi" and print an explanatory message
for the --dry-run case.
2010-08-15 18:54:02 +02:00
Paolo Bonzini
d32c96ccd6 add libtool --mode=finish mode for sysroot
* doc/libtool.texi (Finish mode): Document behavior when *.la files
are passed.
* libltdl/config/ltmain.m4sh (func_mode_finish): Eliminate sysroot
or `=' signs representing it from files in $libs.
* tests/sysroot.at (SYSROOT_TESTS): Test for presence of sysroot
references before running libtool --mode=finish, and for absence
afterwards.
2010-08-15 18:45:39 +02:00
Paolo Bonzini
55e986b8b4 reorganize parsing of --mode=finish arguments
* libltdl/config/ltmain.m4sh (func_mode_finish): Split arguments for
directories and *.la files.
2010-08-15 18:45:31 +02:00
Paolo Bonzini
09a695acf9 fix sysroot handling for deplibs of preopened libtool libs
* libltdl/config/ltmain.m4sh: Pass $dependency_libs of preopened libtool
through func_resolve_sysroot.
2010-08-15 18:40:53 +02:00
Peter Rosin
66ce911b33 Allow the use of a listing file if the archiver supports it.
* libltdl/m4/libtool.m4 (_LT_CMD_OLD_ARCHIVE): Move detection
of a suitable archiver...
(_LT_PROG_AR): ...to here. New macro, also detect if the
archiver supports a listing file with the new variable
archiver_list_spec.
* libltdl/config/ltmain.m4sh: If the archiver supports a listing
file, use it when max_cmd_len is exceeded.  This is needed for
tool chains such as MSVC which do not support piece by piece
linking (-r -o).
* doc/libtool.texi (libtool script contents): Update with
archiver_list_spec description.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-08-13 13:11:54 +02:00
Paolo Bonzini
a3cff76611 emit sysrooted paths when installing .la files
* libltdl/config/ltmain.m4sh (func_replace_sysroot): New.
(func_mode_link): Prepend paths in $libdir with the sysroot.  Further,
replace the sysroot with = (using func_replace_sysroot) whenever
such a path is written in a .la file.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Charles Wilson <libtool@cwilson.fastmail.fm>
2010-08-11 14:43:04 -04:00
Paolo Bonzini
d77a3a5124 process postdeps to include sysrooted paths
* libltdl/m4/libtool.m4 (_LT_FUNC_STRIPNAME_CNF): New (from Charles Wilson).
(_LT_SYS_HIDDEN_LIBDEPS): Require it.  Use func_stripname_cnf to convert
sysroot (-L= and -R=) usage in postdeps.  Adjust the code because -L, -R
and -l flags will now always be separated from the rest of the argument.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Charles Wilson <libtool@cwilson.fastmail.fm>
2010-08-11 14:43:03 -04:00
Paolo Bonzini
adb8f844f3 handle sysrooted paths when reading dependencies to la files
* libltdl/config/ltmain.m4sh (func_mode_execute, func_mode_install,
func_mode_link): Whenever a .la file occurs in another .la file,
expand the sysroot path in it.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
2010-08-11 14:43:03 -04:00
Paolo Bonzini
c45a288134 teach libtool -L= and -R=
* libltdl/config/ltmain.m4sh (func_resolve_sysroot): New.
(func_mode_link): Always pass result of stripping -L and -R to
func_resolve_sysroot before using it.  Remove absolute path expansion
when func_resolve_sysroot subsumes it.  Expand sysroot in -rpath.
When processing dependent libraries also resolve sysroot paths there.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Charles Wilson <libtool@cwilson.fastmail.fm>
2010-08-11 14:43:03 -04:00
Paolo Bonzini
3334f7ed58 add --with-sysroot
* libltdl/m4/libtool.m4 (_LT_HOST_NONCANONICAL, _LT_WITH_SYSROOT): New.
(LT_SETUP): Require _LT_WITH_SYSROOT.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
2010-08-11 14:43:03 -04:00
Paolo Bonzini
a8f549c134 handle sysroot flags
* libltdl/config/ltmain.m4sh (func_mode_link): Recognize --sysroot
option.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
2010-08-11 14:38:08 -04:00
Ralf Wildenhues
3c1027fe21 Fix more problematic code from "Add func_append_quoted and do..."
* libltdl/config/ltmain.m4sh (func_mode_link): Revert back
func_append instances that as assignments relied on the shell
not performing word splitting on the right hand side of the
assignment.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-09 23:18:27 +02:00
Ralf Wildenhues
0f87df7fa6 Fix another typo on "Add func_append_quoted and do..."
* libltdl/config/ltmain.m4sh (func_mode_link): Fix regression in
computation of finalize_rpath introduced in v2.2.10-40-g0da7d80,
fixing several testsuite failures on AIX.
Report by Rainer Tammer.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-09 22:51:11 +02:00
Ralf Wildenhues
b7b0e70e98 Avoid unwanted error message in configure output.
* libltdl/m4/libtool.m4 (_LT_PROG_ECHO_BACKSLASH): Try print
in subshell, so eventual `print: not found' is hidden reliably.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-07 19:20:57 +02:00
Ralf Wildenhues
3078821c7f Ensure not to reverse preserving of --debug for relinking/finish.
* libltdl/config/ltmain.m4sh (func_check_version_match): Only
preserve '--debug' switch if $opt_debug is not equal to ':'.
* tests/help.at (debug tracing): New test group.
Report by Rainer Tammer.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-07 07:41:12 +02:00
Ralf Wildenhues
2fc264a8e2 Fix AC_NO_EXECUTABLES test failure on AIX.
* libltdl/m4/libtool.m4 (_LT_SYS_MODULE_PATH_AIX): Wrap link
test in AC_CACHE_VAL, using cache variable $lt_cv_aix_libpath.
* tests/no-executables.at (AC_NO_EXECUTABLES): Preset it, to
avoid link test.
Bug report by Rainer Tammer.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-06 22:03:19 +02:00
Ralf Wildenhues
21cffd15fb Let libtool' without arguments point to --help' again.
* libltdl/config/ltmain.m4sh (func_check_version_match):
Remove duplicate and wrong error check.
* tests/help.at (standard command line options): Extend test.
Report by Rainer Tammer.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-04 22:30:48 +02:00
Ralf Wildenhues
10f650c428 Avoid syntax error due to shift of nonexistent parameter.
* libltdl/config/ltmain.m4sh <command-line handling>: Only shift
if there is a positional parameter to shift.  Fixes `libtool
--help' when dash is used.
Report by Rainer Tammer.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-04 22:30:14 +02:00
Ralf Wildenhues
1162eebc69 Fix build failure with AIX sh due to shell quoting error.
* libltdl/config/ltmain.m4sh (func_append_quoted): Document
that this function inserts a separator space.
(func_mode_compile): Do not pass extra space here.
Fixes regression introduced in v2.2.10-49-gc13532a.
Report by Rainer Tammer.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-08-03 21:49:10 +02:00
Paolo Bonzini
a107f18041 fix bug in postdeps computation
* libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS): Actually concatenate
$prev and $p.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
2010-08-01 10:23:16 +02:00
Peter Rosin
0656b19eb9 Make preloading heed libname_spec.
Fixes testsuite failure for lt_dladvise.at on MSYS/MSVC.

* libltdl/ltdl.c (libprefix): New static variable describing
the prefix of static archives.
(try_dlopen): Use libprefix.
* libltdl/m4/ltdl.m4 (_LTDL_SETUP): Export prefix of static
archives to config.h. Also fix assignment of LTDLOPEN to be more
efficient and less error prone while at it.
2010-07-08 18:12:02 +02:00
Gary V. Vaughan
8c4dae1232 Fix a spurious trailing space and a botched merge.
* libltdl/m4/libtool.m4 (_LT_PROG_FUNCTION_REPLACE): Remove
spurious trailing space.
* ChangeLog: Reorder to match commit order after botched
merge.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-07-08 20:36:39 +07:00
Gary V. Vaughan
de8a0992b2 Rename _LT_PROG_XSI_REPLACE macro to _LT_PROG_FUNCTION_REPLACE.
* libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): Rename to
_LT_PROG_REPLACE_SHELLFNS.
(_LT_PROG_XSI_REPLACE): Rename to _LT_PROG_FUNCTION_REPLACE.
(_LT_PROG_FUNCTION_REPLACE): Change decorator comment to use
'Extended shell' rather than 'XSI' on successful replacement.
* libltdl/config/general.m4sh (func_dirname, func_basename)
(func_dirname_and_basename, func_stripname): Change decorator
comment to use 'extended shell' rather than 'XSI' on fallback
implementations.
* libltdl/config/getopt.m4sh (func_split_short_opt)
(func_split_long_opt): Ditto.
* libltdl/config/ltmain.m4sh (func_append, func_append_quoted)
(func_arith, func_len, func_lo2o, func_xform): Ditto.
* tests/getopt-m4sh.at (_LT_AT_XSI_FUNC_EXTRACT): Rename to
_LT_AT_EXTENDED_SHELL_FUNC_EXTRACT.
(_LT_AT_EXTENDED_SHELL_FUNC_EXTRACT): Change regular expression to
match new replacable function decorator comments.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-07-08 20:20:24 +07:00
Peter Rosin
3f22cab581 Optimize assignment of output_la.
* libltdl/config/ltmain.m4sh (func_mode_link): Save two fork/exec
instances.
Report by Ralf Wildenhues.
2010-07-08 14:23:02 +02:00
Gary V. Vaughan
2e5ed25df3 Fix a cut-n-pasto in "2010-07-07 Charles Wilson" patch.
* libltdl/config/ltmain.m4sh (func_mode_link): Remove spurious
variable dereference.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-07-08 18:33:31 +07:00
Gary V. Vaughan
94d129e2e3 Tidy m4 comment header underline.
* libltdl/m4/libtool.m4 (_LT_CHECK_SHAREDLIB_FROM_LINKLIB): Make
sure hyphens in function name comment header underline line up.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-07-07 15:02:07 +07:00
Charles Wilson
e83da49a1f [cygwin|mingw] fix dlpreopen with --disable-static
* libltdl/config/general.m4sh (func_tr_sh): New function.
* libltdl/config/ltmain.m4sh (func_generate_dlsyms) [cygwin|mingw]:
Obtain DLL name corresponding to import library by using value
stored in unique variable libfile_$(transliterated implib name).
If that fails, use $sharedlib_from_linklib_cmd to extract DLL
name from import library directly. Also, properly extract dlsyms
from the import library.
(func_mode_link) [cygwin|mingw]: Prefer to dlpreopen DLLs
over static libs when both are available.  When dlpreopening
DLLs, use linklib (that is, import lib) as dlpreopen file,
rather than DLL. Store name of associated la file in
unique variable libfile_$(transliterated implib name)
for later use.
(func_win32_libid): Accomodate pei-i386 import libs
as well as pe-i386.
(func_cygming_dll_for_implib): New function.
(func_cygming_dll_for_implib_fallback): New function.
(func_cygming_dll_for_implib_fallback_core): New function.
(func_cygming_gnu_implib_p): New function.
(func_cygming_ms_implib_p): New function.
* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Adjust sed
expressions for lt_cv_sys_global_symbol_to_c_name_address and
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
as trailing space after module name is optional.
(_LT_LINKER_SHLIBS) [cygwin|mingw][C++]:
Set exclude_expsyms correctly for $host. Simplify regular
expression in export_symbols_cmds.
(_LT_LINKER_SHLIBS) [cygwin|mingw|pw32][C]: Set exclude_expsyms
correctly for $host. Enable export_symbols_cmds to identify
DATA exports by _nm_ prefix.
(_LT_CHECK_SHAREDLIB_FROM_LINKLIB): New macro sets
sharedlib_from_linklib_cmd variable.
(_LT_DECL_DLLTOOL): New macro ensures DLLTOOL is always set.
2010-07-07 00:42:00 -04:00
Peter Rosin
0b56641c03 Support for response files with $NM.
* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS)
<nm_file_list_spec>: New tag variable. Set it to '@' if input
files can be passed to $NM in a file named with the '@' option.
* libltdl/config/ltmain.m4sh (func_mode_link): When
nm_file_list_spec is nonempty, use it to avoid skipped_export.
* doc/libtool.texi (libtool script contents): Document
new variable.
2010-07-05 07:09:07 +02:00
Peter Rosin
c13532ae1f Fix typo in "Add func_append_quoted and do..."
* libltdl/config/ltmain.m4sh (func_mode_compile): Use
func_append_quoted instead of func_append.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-07-03 10:14:35 +02:00
Peter Rosin
3ab9879a99 Don't trigger file name expansion when embedding manifests.
* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS)
[ cygwin, mingw, cegcc ] <cl*>: Remove all spaces in the
case statement of postlink_cmds to make file name expansion
more unlikely.
(_LT_LANG_CXX_CONFIG): Likewise, but also add the missing |.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-07-02 08:17:19 +02:00
Peter Rosin
60dde3d469 Fix regression caused by "Add func_append_quoted and do..."
* libltdl/config/ltmain.m4sh (func_mode_link): Remove leftover
"_libs" trash.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-07-01 19:22:29 +02:00
Peter Rosin
c20dbb8781 For MSVC, embed the manifest as a resource in the executable.
Fixes a lot of testsuite failures with MSVC 2003 (v8.0) and
above (and perhaps also MSVC .Net) related to running programs
that have been moved (e.g. installed) without their manifests
also having been moved.

* libltdl/m4/libtool.m4 (_LT_PATH_MANIFEST_TOOL): New macro
that locates the Manifest Tool (mt) and verifies that it is
indeed the manifest tool. The result is stored in the new
variable MANIFEST_TOOL.
(_LT_LINKER_SHLIBS) <postlink_cmds>: New tag variable.
[ cygwin, mingw, cegcc ] <cl*>: Embed the manifest file as a
resource. Make sure the embedding work regardless of if the
@OUTPUT@ file name includes a trailing $EXEEXT.
(_LT_LANG_CXX_CONFIG): Likewise.
(_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG): Require the above
_LT_PATH_MANIFEST_TOOL.
* libltdl/config/ltmain.m4sh (func_mode_link): After linking
a program, replace @OUTPUT@ in $postlink_cmds and then execute
the commands.
* doc/libtool.texi (libtool script contents): Document
new postlink_cmds variable.
(LT_INIT): Add that the MANIFEST_TOOL environment variable can
be used to override the manifest tool to use.
* tests/exeext.at: New. Make sure linking with both -o prog
and -o prog$EXEEXT works.
* Makefile.am (TESTSUITE_AT): Update.
(TESTS_ENVIRONMENT): Propagate $(MANIFEST_TOOL) to the
testsuite.
* NEWS: Add note of the new MANIFEST_TOOL environment variable.
2010-07-01 09:04:35 +02:00
Peter Rosin
1ac3ced59d Add MSVC support.
* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
(_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG) [mingw, cygwin]: Add
support for the Microsoft C/C++ Compiler (cl) relying on help
from the compile script in Automake.
* NEWS: Add note of the above.
2010-07-01 09:04:32 +02:00
Gary V. Vaughan
d8bdf9339b Add func_append test cases for smart and retarded implementations.
* tests/getopt-m4sh.at (_LT_AT_FALLBACK_FUNC_EXTRACT): New
macro to extract a fallback function implementation from
ltmain.m4sh.
[option appending]: Use it for a test of the fallback
implementation of func_append.
[enhanced shell option appending]: And also test the enhanced
implementation.
* libltdl/config/ltmain.m4sh (func_append_quoted): Fix missing \
to escape a quoted space for eval.
* libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): Fix missing $ in
dereference of func_append inline replacement for retarded
shells.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-30 05:12:42 +07:00
Gary V. Vaughan
e4edceb028 Correct func_split_short_opt comment cut-n-pasto.
* libtool/config/getopt.m4sh (func_split_short_opt): Fix
the function comment.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-29 16:32:46 +07:00
Gary V. Vaughan
6639fdbe2f Use a real XSI compliant func_split_short_opt substitution.
* libtool/m4/libtool.m4 (_LT_CHECK_SHELL_FEATURES): Remove
test ${foo:n:m} substrings, instead adding a ${foo%??} check
to the existing XSI tests.
(_LT_PROG_XSI_SHELLFNS): Remove the ${foo:n:m} based
func_split_short_opt substitution in favour of a properly
XSI compliant substitution.
Suggested by Paolo Bonzini.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-29 16:29:30 +07:00
Gary V. Vaughan
0da7d80909 Add func_append_quoted and do inline func_append substitutions.
* libtool/config/ltmain.m4sh: Replace all occurrences of
`foo="$foo bar"' with func_append. No decorator comment was
added since /func_append [a-zA-Z0-9_]* "/ is already an
excellent match regexp, and additional comments would only
complicate things.
(func_append_quoted): New function that quotes a value with
func_quote_for_eval before appending it.  To avoid quoting the
whitespace in the passed value, a single whitespace is added
automatically.  Changed callers where possible.
* libtool/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): Perform a
`+=' implementation substitution for func_append_quoted.  More
importantly, systematically replace matching func_append calls
with inline `+=' when supported (for maximum speed), and
longhand `foo="$foo bar"' otherwise to avoid the function
overhead.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-28 13:48:51 +07:00
Gary V. Vaughan
448445c6f8 Add an XSI replacement for func_split_short_opt, with test cases.
* libltdl/config/getopt.m4sh (m4go_shortnoargs): Remove 'v' now
that getopt.m4sh doesn't steal that letter for the --version
short option.
* libltdl/config/ltmain.m4sh (M4SH_GETOPTS): We can now use 'v'
as a short option for '--verbose'.
* libltdl/config/getopt.m4sh (m4go_printopts): Add back in the
leading '-' for remaining non-argument short options.
(func_split_short_opt): Use the correct sed script variable.
* libltdl/m4/libtool.m4 (_LT_CHECK_SHELL_FEATURES): Also ensure
that XSI substring extraction is supported.
(_LT_PROG_XSI_SHELLFNS): Use XSI substring extraction to split
short options to avoid unnecessary forks if the host shell
supports that.
* tests/getopt-m4sh.at: New tests for getopt.m4sh coverage.
* Makefile.am (TESTSUITE_AT): Add getopt-m4sh.at.
(TESTS_ENVIRONMENT): Pass M4SH and SED for substition into the
m4sh expansion performed in tests/getopt-m4sh.at.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-28 05:41:36 +07:00
Gary V. Vaughan
0483a52e8b Add missing case branch terminators.
* libltdl/config/ltmain.m4sh: Fixed everal case branches with
missing ';;' terminators.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-27 19:19:18 +07:00
Gary V. Vaughan
001f756ffa Use TAB-SPACE in preference to SPACE-TAB.
* libltdl/m4/libtool.m4 (_LT_PROG_XSI_REPLACE): Some editors
might optimise away the SPACE in SPACE-TAB sequences, so use
TAB-SPACE just in case.
Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-27 17:19:35 +07:00
Gary V. Vaughan
6767ed13de Amend a missed opt_mode rename instance in ltmain.m4sh.
* libltdl/config/ltmain.m4sh <mode>: Rename to opt_mode.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-27 14:54:57 +07:00
Gary V. Vaughan
ee2dde86ba Fix portability regressions in today's earlier changeset.
* libltdl/m4/libtool.m4 (_LT_PROG_XSI_REPLACE): `sed -i' is not
portable; use `mv -f ...|| cp -f ...' instead.
Add an initial backslash to sed `c' substitutions with leading
whitespace, so that indentation is not removed by some non-POSIX
compliant sed implementations.
(_LT_PROG_XSI_SHELLFNS): Display a diagnostic warning message if
one or more XSI function replacements failed.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-27 13:57:50 +07:00
Gary V. Vaughan
b8dd17aeba getopt.m4sh generated libtool option parser, and XSI improvements.
* libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): Moved portable
shell versions of various utility functions from here...
* libltdl/config/getopt.m4sh (func_split_long_opt): ...to here...
* libltdl/config/general.m4sh (func_dirname, func_basename)
(func_dirname_and_basename, func_strip_name): ...here...
* libltdl/config/ltmain.m4sh (func_append, func_arith, func_len)
(func_lo2o, func_xform): ...and here.
* libltdl/config/libtool.m4 (_LT_PROG_XSI_REPLACE): New macro that
expands into a sed command for replacing the contents of a
suitably decorated shell function with an alternate XSI
implementation.
(_LT_PROG_XSI_SHELLFNS): Use it to replace the portable shell
versions of the functions above with equivalent XSI
implementations that avoid unnecessary forks if the host shell
supports that.
* libltdl/config/ltmain.m4sh: Replace hand written shell code
with a call to M4SH_GETOPTS. Rename some option variables in
the client code to match the generated option parser settings.
* libltdl/config/general.m4sh (func_echo, func_error)
(func_warning): Use $opt_mode instead of obsoleted $mode in
message leader.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-27 00:13:42 +07:00
Gary V. Vaughan
3d2d3ef899 Ensure getopts.m4sh is compatible with Autoconf-2.61 and newer.
* libltdl/config/getopt.m4sh (m4_chomp): Ensure this macro is
implemented even if Autoconf's m4sugar.m4 doesn't provide it.
(m4go_expand): New macro based on Autoconf-2.64 m4_expand. Use
it everywhere incase m4sugar.m4 doesn't have an implementation.
(m4_ifnblank): Replace all uses with m4_ifval, which was
available long before m4_ifnblank was introduced.
2010-06-21 19:49:29 +07:00
Ralf Wildenhues
ef76a23497 Fix clean mode for HP-UX 11.31 sh.
* libltdl/config/ltmain.m4sh (func_mode_uninstall): Do not try
to match a null string in a case pattern, even with surrounding
spaces.  Fixes `lt_dlopenadvise library loading' test.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-20 19:12:20 +02:00
Ralf Wildenhues
64377ca9da Use config.cache variable for PIC flag, to allow override.
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) <lt_prog_compiler_pic>:
Save result, and allow override, through cache variable
lt_cv_prog_compiler_pic{,_CXX,_F77,_FC}.  The cache variable
needs to contain an eventual -DPIC.
* doc/libtool.texi (): Document it.
* tests/pic_flag.at (override pic_flag at configure time):
New file, new test.
* Makefile.am (TESTSUITE_AT): Update.
* NEWS, THANKS: Update.
Suggestion by Joakim Tjernlund and Paolo Bonzini.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-19 06:47:42 +02:00
Ralf Wildenhues
4d3ac408c8 Optimize func_ltwrapper_scriptname to assume a cwrapper.
* libltdl/config/ltmain.m4sh (func_ltwrapper_scriptname): Do not
call func_ltwrapper_executable_p again here, this function is
documented to allow being called with wrapper executables.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-16 06:04:36 +02:00
Ralf Wildenhues
47e4d7da64 Fix bootstrap script to cope with changed AC_INIT arguments.
* bootstrap: When extracting PACKAGE and VERSION from AC_INIT
arguments, be sure to remove a 'GNU ' prefix and lowercase the
package name for PACKAGE.  Also set PACKAGE_NAME and PACKAGE_URL
appropriately for GNU software.  Pass these variables to the
make commands creating tests/package.m4 and other files.
* Makefile.am (edit): Fix substitution of PACKAGE_NAME and
PACKAGE_STRING.
* libltdl/config/announce-gen.m4sh: Use @PACKAGE@ not
@PACKAGE_STRING@.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-16 06:04:36 +02:00
Peter Rosin
8cc72b48f6 On Windows, find potential libs regardless of file name case.
* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD),
libltdl/config/ltmain.m4sh (func_mode_link): On Windows,
find potential libs regardless of file name case.
* tests/nocase.at: New test, to check for regressions
of the above.
* Makefile.am: Add above new test.
* doc/libtool.texi (libtool script contents): Document
new variables.
* NEWS: Updated.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-15 22:52:33 +02:00
Philip Allison
e0c817e510 Avoid GCC -Wall compiler warning in dlopen self test.
* libltdl/m4/libtool.m4 (_LT_TRY_DLOPEN_SELF): Fix unused
variable warning in test program.
* THANKS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-15 20:10:04 +02:00
Ralf Wildenhues
66c97302ad Fix cleaning of uninstalled w32 shell wrapper in subdirs.
* libltdl/config/ltmain.m4sh (func_mode_uninstall): Do not
override global objdir variable, instead use odir for the
directory of to-be-removed files.  Drop unneeded origobjdir.
Report by Charles Wilson.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-15 19:17:00 +02:00
Ralf Wildenhues
6558f036e3 Print Libtool project URL in program --help output.
* configure.ac (AC_INIT): Set PACKAGE argument to `GNU Libtool',
so Autoconf knows this is GNU software.  For Autoconf < 2.64,
if AC_PACKAGE_URL is not defined, substitute PACKAGE_URL.
* Makefile.am (edit): Substitute PACKAGE_URL.
($(srcdir)/tests/package.m4): Also depend on Makefile.am.
Define AT_PACKAGE_URL, for `tests/testsuite --help' output.
* libltdl/config/getopt.m4sh (func_help): Also extract comment
lines that mention a home page and general GNU help.
* libltdl/config/ltmain.m4sh: Use @PACKAGE_BUGREPORT@ instead of
hard-coded list address.  Also mention Libtool home page and
general GNU help web page.
* libtoolize.m4sh: Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-13 19:14:58 +02:00
Peter Rosin
2a42785373 Improve libdir usage from within ltdl on MinGW.
* libltdl/ltdl.c (parse_dotla_file) [__WINDOWS__]: Read the
libdir entry in the .la file, but accept it only if it is not
a unix-style absolute name.
* tests/ltdl-libdir.at: New test that checks if ltdl finds an
installed module via the libdir variable in the .la file.  On
MinGW, use a Windows-style libdir name including drive spec.
* Makefile.am: Add above.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-12 10:09:26 +02:00
Peter O'Gorman
f5e292a4ee Create reloadable object files with non-pic objects too.
* libltdl/config/ltmain.m4sh: When not building a shared
library, use the non-pic objects to create a reloadable
object, because pic objects do not exist.
2010-06-10 23:00:43 -05:00
Gary V. Vaughan
cd0b95778b Support shell tracing inside functions even with ksh.
* libltdl/config/getopt.m4sh: Set $opt_debug to be either `:'
or `set -x' depending on whether --debug was parsed to match
usage in libtoolize.m4sh and ltmain.m4sh.
* clcommit.m4sh, libltdl/config/announce-gen.sh: Instead of
`$opt_debug && ...', use `test "$opt_debug" != ":" && ...'.
* clcommit.m4sh, libltdl/config/announce-gen.m4sh,
libltdl/config/getopt.m4sh, libltdl/connfig/mailnotify.m4sh:
Execute at the start of functions to cater to ksh, which
resets `-x' inside shell functions.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-10 21:02:48 +07:00
Gary V. Vaughan
d18372c98a Set SCM version number to 2.2.11a.
* configure.ac, libltdl/configure.ac (AC_INIT): Bump version
number to 2.2.11a.
* NEWS: Updated.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-09 22:17:47 +07:00
Gary V. Vaughan
c6b266a56f Prepare for next release.
* configure.ac, libltdl/configure.ac (AC_INIT): Bump version number
to 2.2.10.
* NEWS: Update version number.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-09 21:03:07 +07:00
Peter Rosin
1a3cd365c0 Don't try the MSYS libdir path on MinGW.
* libltdl/ltdl.c (parse_dotla_file) [mingw]: The absolute
libdir path in the .la file is recorded as an MSYS (POSIX
style) path. Make sure it isn't tried when locating the
shared library.
* NEWS: Updated.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-09 19:26:00 +07:00
Gary V. Vaughan
9bf1ccc71a Simplify license variations, and add missing license texts.
* ChangeLog, ChangeLog.1996, ChangeLog.1997, ChangeLog.1998,
ChangeLog.1999, ChangeLog.2000, ChangeLog.2001, ChangeLog.2002,
ChangeLog.2003, ChangeLog.2004, ChangeLog.2005, ChangeLog.2006,
ChangeLog.2007, ChangeLog.2008, ChangeLog.2009, NEWS: Add
all-permissive license.
* HACKING, README, README.alpha, TODO: Relax license to RMS
encouraged all-permissive terms.
* libltdl/README: Ditto. I added the original license text in
2007, and there's no need for it to be so long for such a trivial
file.
* libltdl/config/getopt.m4sh, libltdl/general.m4sh: Cvs-utils is
dead, and I am the author of these files, so consolidated license
terms to match regular Libtool licensing.
* HACKING (Licensing Rules): Update wording, and list of files for
the all permissive license.
(GPL with CVS-Utils exception clause): Removed.  No files have these
license any more.
(GPL with Libtool exception clause): Ditto, only libltdl/README
used to be distributed with this variation.
* AUTHORS: Add GPL license text.
2010-06-09 19:00:19 +07:00
Gary V. Vaughan
a50e0106ea Enable correct extraction of multiline copyright from --version.
* libltdl/config/getopt.m4sh: Wrap copyright notice at 76
columns.
(func_version): Don't omit spaces when merging multiline copyright
notices.
* clcommit.m4sh, libtoolize.m4sh: Wrap copyright notice at 76
columns.
2010-06-09 16:53:56 +07:00
Ralf Wildenhues
eb399e6a03 Avoid autom4te warning about unnamed diversion.
* libltdl/config/getopt.m4sh: Use diversion name KILL not -1.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-06-08 06:44:26 +02:00
Gary V. Vaughan
b33d82439a Update and simplify all m4sh scripts to use latest getopt.m4sh.
* clcommit.m4sh, libltdl/config/mailnotify.m4sh: Rewrite option
parsing loop over M4SH_GETOPTS macro, and adjust all clients of
option variables to use generated option names.
2010-06-05 05:40:40 +07:00
Gary V. Vaughan
540fbe5b32 Add missing quote for literal ? in a shell case statement.
* libltdl/config/getopt.m4sh (m4go_shortnoargs): Quote initial ?
correctly for use in a shell case statement.
2010-06-05 05:06:45 +07:00
Gary V. Vaughan
7a1821bead Quote command line arguments after --rcfile properly.
* libltdl/config/announce-gen.m4sh (--rcfile): Quote remaining
arguments shell variable expression correctly for eval.
2010-06-05 04:22:01 +07:00
Gary V. Vaughan
fd9aeebfe9 Shift correctly in numbered option argument collection.
* libltdl/config/getopt.m4sh (_m4go_option): Argument list also
needs to be `shift'ed in the shell option loop after processing a
numbered argument collection.
2010-06-05 04:19:11 +07:00
Gary V. Vaughan
8524eb8f5c Set SCM version number to 2.2.9a.
* configure.ac, libltdl/configure.ac (AC_INIT): Bump version
number to 2.2.9a.
* NEWS: Updated.
2010-06-05 02:29:56 +07:00
Gary V. Vaughan
2f666f7769 Prepare for next release.
* configure.ac, libltdl/configure.ac (AC_INIT): Bump version
number to 2.2.8.
* NEWS: Update version number.
* INSTALL, libltdl/config/install-sh, libltdl/config/config.guess,
libltdl/config/config.sub, libltdl/config/texinfo.tex: Updated
from canonical source.
2010-06-05 01:43:56 +07:00
Gary V. Vaughan
aa7558299c Provide an m4sh reimplementation of announce-gen.
* libltdl/config/getopt.m4sh (M4SH_GETOPTS): New macro that takes
a quoted m4 list of command line options to be parsed, and
generates the shell code to parse those options and collect the
results into appropriately named 'opt_xxx' shell variables.  Also,
add some private supporting macros, and improve the comments
radically.
* libltdl/config/announce-gen.m4sh: New file, to generate and
optionally post (an enhancement over the gnulib perl script of the
same name) a release announcement.
* Makefile.maint (announce-gen): Build a new announce-gen script
in the build directory, from the contents of
libltdl/config/announce-gen.m4sh.
* HACKING (Release Procedure): Update the instructions to use
announce-gen.
(Alpha release note template, Full release note template):
Removed.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
2010-06-05 00:50:24 +07:00
Gary V. Vaughan
1d0c6a58c8 Set SCM version number to 2.2.7c.
* configure.ac, libltdl/configure.ac (AC_INIT): Bump version
number to 2.2.7c.
* NEWS: Updated.

GNU Libtool 2.2.7b  was released.
2010-05-21 06:59:56 +07:00
Gary V. Vaughan
99da5501fc Prepare for next release candidate.
* configure.ac, libltdl/configure.ac (AC_INIT): Bump version
number to 2.2.7b.
* libltdl/m4/libtool.m4, libltdl/m4/ltdl.m4,
libltdl/m4/ltoptions.m4, libltdl/m4/lt~obsolete.m4: These files
have been updated without a serial bump since the last release.
* libltdl/Makefile.inc (LTDL_VERSION_INFO): Bump Revision, to
account for bugfixes since the last release.
* libltdl/config/install-sh, libltdl/config/config.guess,
libltdl/config/config.sub, libltdl/config/texinfo.tex,
INSTALL: Updated from canonical source.
* NEWS: Update with missing entries from ChangeLog.
* HACKING: Note workaround for developer tool-path leakage bug.
2010-05-21 04:24:18 +07:00
Peter O'Gorman
3ae7bf0b91 Ranlib is required with -force_load and fat archives.
* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Run
ranlib.
Reported by Jeremy Huddleston <jeremyhu@apple.com>
2010-05-04 00:51:33 -05:00
Ralf Wildenhues
519bf919cc Use linker_flags not compiler_flags with $LD.
* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [linux]
<archive_cmds, archive_expsym_cmds>: With xlf and bgxlf
compilers, when linking with $LD, use $linker_flags not
$compiler_flags.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-04-04 09:40:17 +02:00
Ralf Wildenhues
d7e8e16dd0 Add FAQ, and FAQ entry for flags stripped at library link time.
* doc/libtool.texi (FAQ, Stripped link flags): New nodes.
(Wrapper executables): Replace bug address with macro.
(Compile mode, Link mode): Document `-Wc,' and `-Xcompiler '
semantics better.
* libltdl/config/ltmain.m4sh (func_mode_link): Rewrite comment
for the flags that are passed through.
Prompted by reports from Simon Richter <Simon.Richter@hogyros.de>,
Török Edwin <edwintorok@gmail.com> and
Åke Sandgren <ake.sandgren@hpc2n.umu.se>.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-03-31 21:53:50 +02:00
Ralf Wildenhues
03feff4719 Fix preloader symbol list declaration in libltdl.
* libltdl/ltdl.c (preloaded_symbols): Fix declaration to include
array brackets.
(lt_dlinit): Do not take address of preloaded_symbols.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-03-28 22:21:55 +02:00
Ralf Wildenhues
0238e60a63 Fix typo in libtool --help output.
* libltdl/config/ltmain.m4sh (func_mode_help): Fix typo in help
output.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-03-28 22:21:17 +02:00
Chris Demetriou
74c8993c17 Sort output of 'find' to enable deterministic builds.
* libltdl/config/ltmain.m4sh (func_extract_archives): Sort
output of 'find'.
* libltdl/m4/libtool.m4 (_LT_LANG_CXX_CONFIG): Likewise.
* THANKS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-03-19 06:26:18 +01:00
Ralf Wildenhues
7877d1d13f Unconditionally normalize LC_ALL, LANGUAGE in libtool script.
* libltdl/config/ltmain.m4sh: Unconditionally set LC_ALL and
LANGUAGE to 'C', to avoid semantic differences on MinGW under
Chines locale.  SCO issues with e.g. LANG=C are not known to
be relevant today any more.
Report by Pete Batard <pbatard@gmail.com> and Xiaofan Chen
<xiaofanc@gmail.com>.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-03-19 06:24:23 +01:00
Peter Rosin
f21029c498 Preserve the last error when restoring the error mode.
* libltdl/loaders/loadlibrary.c (wm_open): Don't rely on
SetThreadErrorMode (or SetErrorMode) to not clobber the last
error.
Report by Ralf Wildenhues.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-03-17 09:01:57 +01:00
Peter Rosin
3f0fa1bae4 Use Get/SetThreadErrorMode if they are available.
* libltdl/loaders/loadlibrary.c (wrap_geterrormode): Replaced...
(wrap_getthreaderrormode): ...by this function that checks
first for GetThreadErrorMode, then GetErrorMode and makes use
of either of those or...
(fallback_getthreaderrormode): ...else falls back to this
replacement function that implements the old workaround, which
was previously implemented in...
(fallback_geterrormode): ...this now renamed function.
(geterrormode): Replaced...
(getthreaderrormode): ...by this function pointer that points
at either of wrap_getthreaderrormode, GetThreadErrorMode,
GetErrorMode or fallback_getthreaderrormode.
(wrap_setthreaderrormode): New function that checks if
SetThreadErrorMode is supported by the system and makes use of
it if it is.
(fallback_setthreaderrormode): New function that is used
otherwise that implements the old version using SetErrorMode.
(setthreaderrormode): New function pointer that points at
either of wrap_setthreaderrormode, SetThreadErrorMode or
fallback_setthreaderrormode.
(vm_open): Adjust to the above.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-03-17 08:54:16 +01:00
Ralf Wildenhues
d5ca75c82d Detect Sun compiler suite with 'sun'-prefixed names.
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LANG_CXX_CONFIG)
(_LT_SYS_HIDDEN_LIBDEPS) [solaris]: Accept compiler names sunCC,
sunf77, sunf90, sunf95 in addition to CC, f77, f90, f95.
* NEWS: Update.
Report by Vadim Zeitlin.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-02-28 13:38:34 +01:00
Pierre Ossman
7efdc2482e Fix deplibs check fallback for 64-bit Windows and Windows CE.
* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD): Accept file formats
'pe-arm-wince' and 'pe-x86-64'.  Add note about consistency with ...
* libltdl/config/ltmain.m4sh (func_win32_libid): ... the respective
pattern here; sync pattern from the former.
* tests/deplibs-mingw.at (deplibs without file command): New
file, new test.
* Makefile.am (TESTSUITE_AT): Update.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-02-28 05:46:16 +01:00
Scott McCreary
5627b263cc Update search path on Haiku for legacy system directory.
* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [haiku]
<sys_lib_dlsearch_path_spec>: Replace legacy
/boot/beos/system/lib directory with /boot/system/lib.
* THANKS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-02-24 22:10:52 +01:00
Charles Wilson
948e6bbecd Guard against strerror()==NULL
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src:main):
Check return value of strerror() using nonnull().
(func_emit_cwrapperexe_src:find_executable): Ditto.
(func_emit_cwrapperexe_src:chase_symlinks): Ditto.
2010-02-21 16:58:31 -05:00
Charles Wilson
efa4728055 Add --lt-* options to shell wrapper
* libltdl/config/ltmain.m4sh (func_emit_wrapper): Call
func_parse_lt_options early. Use func_exec_program.
(func_emit_wrapper:func_parse_lt_options): New function.
(func_emit_wrapper:func_lt_dump_args): New function.
(func_emit_wrapper:func_exec_program_core): New function.
(func_emit_wrapper:func_exec_program): New function.
2010-02-21 00:42:13 -05:00
Charles Wilson
2613ea3ab2 Enable runtime cwrapper debugging; add tests
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src):
Update comments. Initialize program_name. Eliminate _LENGTH
variables for string constants. In debug mode, print a
banner with known content before any other output. Remove
LTWRAPPER_DEBUGPRINTF macro. Add constants and variables
to support new --lt-debug option.
(func_emit_cwrapperexe_src:ltwrapper_debugprintf): Renamed to...
(func_emit_cwrapperexe_src:lt_debugprintf): this. Only print
messages if lt_debug != 0. Ensure appearance of messages
conforms to GCS.
(func_emit_cwrapperexe_src:lt_fatal): Ditto.
(func_emit_cwrapperexe_src:lt_error_core): Ditto.
(func_emit_cwrapperexe_src): Update all callers to lt_fatal.
Update all users of LTWRAPPER_DEBUGPRINTF (()) to call
lt_debugprintf () directly.
(func_emit_cwrapperexe_src:main): Consolidate option parsing.
Ensure first use of lt_debugprintf occurs after option parsing.
Add stanza to parse for --lt-debug and set lt_debug variable.
Use strcmp rather than strncmp, where safe.
* tests/cwrapper.at: Add new tests for --lt-debug and
-DLT_DEBUGWRAPPER.
2010-02-21 00:32:17 -05:00
Peter Rosin
080e088e42 Report proper errors from the loadlibrary loader.
* libltdl/loaders/loadlibrary.c (loadlibraryerror): New
helper function that returns the latest Windows error as a
string, or the provided default string on failure to do so.
(LOADLIB_SETERROR): New macro that wraps previous to make it
easy to use.
(vm_open, vm_close, vm_sym): Make use of previous.
(LOCALFREE): New macro to help free the Windows error string.
(vl_exit): Make use of previous.
* tests/loadlibarry.at: New file, new test that makes sure
the loadlibrary loader reports non-standard error messages.
* Makefile.am (TESTSUITE_AT): Add above test.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-01-21 08:42:12 +01:00
Peter Rosin
16362c656a Use GetErrorMode if it is available.
* libltdl/loaders/loadlibrary.c (wrap_geterrormode): New
function that checks if GetErrorMode is supported by the
system and makes use of it if it is.
(fallback_geterrormode): New function that is used otherwise
that implements the old workaround.
(geterrormode): New function pointer that points at either
of the above or directly at GetErrorMode.
(vm_open): Make use of the above.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2010-01-18 09:48:23 +01:00
Ralf Wildenhues
4d9381c8e1 Bump copyright years.
* ChangeLog.2009: New, rotated from ...
* ChangeLog: ... here.
* Makefile.am (EXTRA_DIST): Add ChangeLog.2009.
* NEWS, libltdl/config/ltmain.m4sh: Bump copyright years.
* libltdl/m4/libtool.m4 (_LT_COPYING, LT_OUTPUT): Likewise.
* libtoolize.m4sh: Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2010-01-06 08:03:33 +01:00
Peter Rosin
78f270a9ab * libltdl/ltdl.c (lt_dlerror): Remove meaningless conditional.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-12-30 03:18:19 +01:00
Peter Rosin
a2a8d8a663 * libltdl/ltdl.c (file_not_found): Fix typos in code comment.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-12-29 19:00:58 +01:00
Ralf Wildenhues
7ce92b0b9b Replace last __oline__ instance.
* libltdl/m4/libtool.m4 (_LT_TRY_DLOPEN_SELF): Replace last
__oline__ instance with $LINENO.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-12 08:51:02 +01:00
Ralf Wildenhues
93f5529731 Improve parsing of .la files in libltdl.
* libltdl/ltdl.c (trim): Do not dump core upon missing quote in
module .la file.
* tests/lalib-syntax.at (syntax of .la files): New file, new
test.
* Makefile.am (TESTSUITE_AT): Add tests/lalib-syntax.at.
Report by Bob Friesenhahn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-09 07:28:59 +01:00
Ralf Wildenhues
31eb92de4f Sane fallback initialization of $ECHO from $as_echo.
* libltdl/config/general.m4sh: Use 'printf %s\n' if $as_echo is
unset.
* tests/testsuite.at: Likewise.
* THANKS: Update.
Report by Vadim Zeitlin and Peter Rosin.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-05 15:50:56 +01:00
Ralf Wildenhues
c4e8bf31aa lt_dlloader_remove and lt_dlloader_find accept const arguments.
* libltdl/lt_dlloader.c (lt_dlloader_remove, lt_dlloader_find):
Accept `const char *' arguments, as documented.  Cast them to
`void *' for the slist machinery.
* libltdl/libltdl/lt_dlloader.h: Adjust prototypes.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-02 23:13:20 +01:00
Ralf Wildenhues
fea7fdee4e Test and fix slist.c.
* libltdl/libltdl/slist.h: Include stddef.h, for size_t.
(slist_remove): Return pointer to SList, not void.
* libltdl/slist.c: Include stdlib.h, for malloc and free.
(slist_remove): Adjust prototype as above.
(slist_sort): Do not loop forever on one-item list.
* tests/slist.at (SList functionality): New file, new test.
* Makefile.am (TESTSUITE_AT): Add tests/slist.at.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-12-02 23:13:05 +01:00
Peter Rosin
2c9c38d8a1 Please C++ compilers when calling strrchr.
* libltdl/ltdl.c (has_library_ext): Match the return type of
strrchr with the first argument to please C++ compilers.
Report by Peter O'Gorman.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-11-30 14:20:36 -05:00
Ralf Wildenhues
ef32f487d7 Enable symbol versioning with the GNU gold linker.
* libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS): Accept 'GNU gold'
in the version string.
* NEWS, THANKS: Update.
Report by Peter Fritzsche.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-29 23:02:34 +01:00
Ralf Wildenhues
79dc9e9c8a Tighten regex for Portland C++ compiler for version 10.
* libltdl/m4/libtool.m4 (_LT_LANG_CXX_CONFIG) [linux]:
Match a dot after version 1 through 5, so 10 and up don't match,
and use weak symbols.
* THANKS: Update.
Report by Jeff Squyres and Brent Leback.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-24 15:27:37 +01:00
Peter O'Gorman
614eb28c76 Update libltdl version to match 2.2.6b release.
libltdl/Makefile.inc: Make version 9:1:2
2009-11-16 09:26:29 -06:00
Bob Friesenhahn
e91f7b9600 Don't load module.la from current directory by default.
* libltdl/ltdl.c (try_dlopen): Do not attempt to load an
unqualified module.la file from the current directory (by
default) since doing so is insecure and is not compliant with
the documentation.
* tests/testsuite.at: Qualify access to module.la file in
current directory so that test passes.
2009-11-15 20:50:02 -06:00
Peter O'Gorman
3580cddcea Only use preopen loader to load preopened archives
* libltdl/ltdl.c: Limit checking of .a to preopen loader.
* tests/lt_dlopen_a.at: Add test.
* Makefile.am: Add test.
2009-11-15 20:49:55 -06:00
Ralf Wildenhues
c242ea638d Recognize `pgfortran' as Portland compiler.
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LINKER_SHLIBS):
Accept `pgfortran*' too.
Report by Jeff Squyres.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-14 11:32:18 +01:00
Alexandre Oliva
1d3560143c Fix verbose link extraction for multiply reconfigured GCC.
* libltdl/m4/libtool.m4 (_LT_LANG_CXX_CONFIG)
<output_verbose_link_cmd>: Drop GCC lines "Configured with" that
may contain unrelated flags.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-04 20:02:47 +01:00
Eric Blake
eae9d5832f Allow gcc builds with -Wall -Werror.
* libltdl/ltdl.c (try_dlopen): Use strlen rather than LT_STRLEN on
an array that will never be NULL.

Signed-off-by: Eric Blake <ebb9@byu.net>
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-02 20:08:17 -07:00
Ralf Wildenhues
5a46d6e5c1 Fix func_normal_abspath sed script for Solaris.
* libltdl/config/general.m4sh (pathcar, pathcdr, removedotparts)
(collapseslashes, finalslash): Use single quotes, for clarity.
(removedotparts): Avoid \{N,M\} after subexpression \(...\), for
Solaris /bin/sed.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-01 11:41:34 +01:00
Ingo Weinhold
a4cc3d2c9f Support for the Haiku operating system.
* libltdl/config/ltmain.m4sh (func_mode_link): Add cases for
`*-*-haiku*' alongside `*-*-beos*'.
* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
(_LT_CHECK_MAGIC_METHOD, LT_LIB_M, _LT_COMPILER_PIC)
(_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG): Add cases for
`haiku*'.
* NEWS, THANKS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-01 10:53:23 +01:00
Ralf Wildenhues
16988b3532 Fix quoting of AS, DLLTOOL, and OBJDUMP for the libtool script.
* libltdl/m4/ltoptions.m4 (AC_LIBTOOL_DLOPEN): Quote values of
$AS, $DLLTOOL, and $OBJDUMP, so they can contain arguments.
* THANKS: Update.
Report by Matthijs Kooijman.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-11-01 09:26:51 +01:00
Ralf Wildenhues
741a9867eb Initial support for the Cuda Compiler Driver on Linux.
* libltdl/config/ltmain.m4sh (func_mode_compile): Accept source
file extensions `.cu' and `.cup'.
* libltdl/m4/libtool.m4 (_LT_COMPILER_NO_RTTI, _LT_COMPILER_PIC)
(_LT_LINKER_SHLIBS): Support for `nvcc' compiler driver.
* NEWS, THANKS: Update.
Report by Mahesh Narayanamurthi.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-18 20:36:34 +02:00
Dave Korn
6858ed03d8 Control where win32 DLLs get installed.
* libltdl/config/general.m4sh (func_normal_abspath): New function.
(func_relative_path): Likewise.
* libltdl/config/ltmain.m4sh (func_mode_help): Document "-bindir".
(func_mode_link): Accept new "-bindir" option and use it, if
supplied, to place Windows DLLs.
* tests/bindir.at: New file for install tests using "-bindir".
* Makefile.am (TESTSUITE_AT): Add bindir.at.
* doc/libtool.texi (Link Mode): Update documentation.
* NEWS, THANKS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-12 08:23:03 +02:00
Akim Demaille
55e9cc469d libtool: clean libconftest.a.
* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Here.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-12 07:33:54 +02:00
Peter Rosin
3a4f0d3958 func_win32_libid doesn't work with MS dumpbin
* libltdl/m4/libtool.m4 (_LT_CHECK_MAGIC_METHOD): The $NM
interface is assumed to be BSD nm in func_win32_libid, so
check for that before using it.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-09-10 09:52:37 +02:00
Ralf Wildenhues
b03736353b Allow dlopen self test to work with gcc's -fvisibility=hidden.
* libltdl/m4/libtool.m4 (_LT_TRY_DLOPEN_SELF): Declare default
visibility for the symbol we are going to test dlopen (NULL)
when a GCC version is used that understands the visibility
attribute, under the assumption that if -fvisibility=hidden
will be used, the user code will be sufficiently annotated
for visibility of needed symbols from the main executable.
* THANKS: Update.
Report by Josh Hursey against OpenMPI.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-08 20:03:54 +02:00
Peter O'Gorman
4ad8b63bd1 Use darwin's -force_load flag if available for whole_archive_flag_spec
* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Check for
-force_load and use it if there.
* tests/darwin.at: Add a simple test.
2009-09-07 00:41:58 -05:00
Peter Rosin
c9bbeef468 Make -Wc,FLAG behave like -Xcompiler FLAG in link mode.
* libltdl/config/ltmain.m4sh (func_mode_link): Remove "-Wc,"
instead of replacing it with "$wl" when linking programs
through the compiler driver, just as is the case when linking
libraries.
* NEWS: Update.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
2009-09-04 22:19:36 +02:00