Commit Graph

3089 Commits

Author SHA1 Message Date
Ralf Wildenhues
6f7136fb2a Remove TABs from the manual.
* doc/libtool.texi (Linking executables, Static libraries)
(Modules for libltdl, Distributing libltdl): Remove TABs from
the manual.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-06-17 00:55:15 +02:00
Peter O'Gorman
a33319273b Support ifort on darwin.
* libltdl/m4/libtool.m4 (_LT_DARWIN_LINKER_FEATURES): Build
shared libraries with ifort.
Reported by Christopher Hulbert.
2008-06-13 10:53:34 -05:00
Charles Wilson
aedb76fb86 [mingw] fix cross-compile-with-wine case
* libltdl/config/ltmain.m4sh (func_to_host_path)
[host=mingw, build!=mingw|cygwin]: check that winepath
stdout is non-empty and exit code is 0, instead of checking
stderr.
Reported by: Roumen Petrov
2008-06-01 09:31:53 -04:00
Stas Maximov
154ca8a708 Check only regular files, not devices, for lalibs.
* libltdl/config/ltmain.m4sh (functions func_lalib_p)
(func_lalib_unsafe_p): Only read regular files and not device
files.  Avoids blocking libtool executing gdb, when a
pseudo-terminal device /dev/pts/NN is given as one of the
arguments to gdb, as in:
libtool --mode=execute gdb -q -nw -i mi -tty /dev/pts/4 prog

Signed-off-by: Stas Maximov <smaximov@ieee.org>
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-06-01 09:38:31 +02:00
Peter O'Gorman
be6f90aa33 Skip darwin test if fat link fails.
* tests/darwin.at: Skip if we can not link a fat program.
Reported by Daniel Macks <dmacks@netspace.org>
2008-05-31 12:12:31 -05:00
Ralf Wildenhues
49db3a0a4c libtoolize should not remove config.guess, config.sub.
* libtoolize.m4sh (all_pkgconfig_files): Do not list
config.guess nor config.sub.  We don't install them without
--install, and the project may not be using Automake.
Report by Andreas Schwab.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-05-26 21:54:51 +02:00
Ralf Wildenhues
1113cea29e Simplify argument parsing in cwrapper.
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src):
Use NULL where appropriate.  Do not compute length of arguments
needlessly.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-05-26 07:36:17 +02:00
Charles Wilson
af3b8c515e [mingw] Add cross-compile support to cwrapper
* libltdl/config/ltmain.m4sh (func_to_host_path) [$host=mingw]:
If present, use winepath to convert from $build to $host
if $build is neither mingw (msys) nor cygwin.  Use unconverted
path as fallback when conversion fails. Also update comments.
(func_to_host_pathlist) [$host=mingw]: Ditto. For fallback case,
use simplistic ':' to ';' path separator translation.
2008-05-25 19:08:40 -04:00
Charles Wilson
0e72f5793b Cwrapper should not eat -- arguments
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src)
[file scope]: Defined all option strings in terms of macro
LTWRAPPER_OPTION_PREFIX. Similarly defined all option string
lengths in terms of macro LTWRAPPER_OPTION_PREFIX_LENGTH.
[main]: Modified option parsing algorithm to pass -- on to
target, and to not stop processing arguments when -- is seen.
Added check for unrecognized options in reserved namespace
defined by LTWRAPPER_OPTION_PREFIX.
2008-05-25 17:35:13 -04:00
Ralf Wildenhues
ad01db1911 Fix ifort settings again.
* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [linux] <ifort>:
Unlike icc and ecc, not all ifort versions understand `-KPIC',
e.g. version 10.1, so use `-fPIC' instead.
Report by Jeff Squyres.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-05-25 10:40:26 +02:00
Eric Blake
d53ca5f67d Resynchronize argz whitespace changes from gnulib.
* libltdl/m4/argz.m4: Kill trailing whitespace.
* libltdl/argz.c: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-05-20 06:27:28 -06:00
Eric Blake
d4aec62a7e Fix regression from two days ago.
* libltdl/m4/ltdl.m4 (_LT_LIBOBJ): Don't refer to deleted macro.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-05-19 08:18:33 -06:00
Eric Blake
c44c8b3350 Speed up bootstrap by improving lt_combine.
* libltdl/m4/ltsugar.m4 (lt_combine): Mirror Autoconf 2.62
improvements.  Includes a semantic change where the separator can
now be empty, and where an empty fourth argument is now treated as
a valid suffix.
* libltdl/m4/libtool.m4 (_lt_decl_varnames_tagged): Adjust to new
semantics of lt_combine.
(lt_decl_varnames_tagged): Fix quoting and optimize.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-05-17 09:44:52 -06:00
Eric Blake
d6744bdb26 Kill _LT_LIBSOURCES; it wasn't checking anything useful.
* libltdl/m4/ltdl.m4 (_LT_LIBSOURCES): Delete.
(LTDL_INIT): Ignore arguments to AC_LIBSOURCES during _LTDL_SETUP,
on the assumption that libtoolize correctly installed them.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-05-17 09:00:30 -06:00
Charles Wilson
fae94962aa [mingw|cygwin] Modify cwrapper to invoke target directly.
* libltdl/config/ltmain.m4sh (func_to_native_path):
New function. If $host is mingw, and $build is mingw
or cygwin, convert path to mingw native format.
(func_to_native_pathlist): New function. Ditto, for
:-separated pathlists.
(func_emit_cwrapperexe_src) [__CYGWIN__ && __STRICT_ANSI__]:
Ensure putenv and setenv are declared. Define HAVE_SETENV.
(func_emit_cwrapperexe_src) [main]: Add new constants to
hold desired PATH settings; initialize and use functions
above to convert to $host format if necessary. Add new
command-line options --lt-env-set, --lt-env-prepend, and
--lt-env-append. No longer emit wrapper script as integral
part of launching child. Remove support for (now) unnecessary
$TARGETSHELL. Exec actual target executable directly.
(func_emit_cwrapperexe_src) [lt_setenv, lt_extend_str]
[lt_split_name_value, lt_opt_process_env_set]
[lt_opt_process_env_prepend, lt_opt_process_env_append]
[lt_update_exe_path, lt_update_lib_path]: New functions.
2008-05-13 20:19:15 -04:00
Charles Wilson
d34008adff Ensure cwrapper compiles without warnings under -std=c99.
* libltdl/config/ltmain.m4sh (func_emit_wrapper_part1):
new function.
(func_emit_wrapper_part2): new function.
(func_emit_wrapper): delegate to new functions.
(func_emit_cwrapperexe_src) [__CYGWIN__ && __STRICT_ANSI__]:
ensure realpath is declared.
(func_emit_cwrapperexe_src): declare two different strings
to each hold part of the wrapper script content. Initialize
using new func_emit_wrapper_partX functions.
(func_emit_cwrapperexe_src) [main]: when emitting wrapper
script content, use both strings.
Reported by Yaakov Selkowitz.
2008-05-11 12:41:14 -04:00
Charles Wilson
a50bd8f5bf Ensure $OBJDUMP is defined
* libltdl/m4/libtool.m4 (_LT_DECL_OBJDUMP): new macro ensures
that $OBJDUMP is always defined sanely.
(_LT_SYS_DYNAMIC_LINKER): call it.
(_LT_CHECK_MAGIC_METHOD): call it.
2008-05-06 22:02:32 -04:00
Gary V. Vaughan
fc6191fe1f Fix libtoolize test failure with aclocal < 1.10.1
* tests/libtoolize.at
(verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR): Older aclocal
requires a space between -I and the directory argument.
Reported by Daniel Macks <dmacks@netspace.org>
2008-05-05 01:07:14 -04:00
Gary V. Vaughan
f7306a6ac1 Set SCM version number to 2.2.5a.
* configure.ac, libltdl/configure.ac (AC_INIT): Bump version
number to 2.2.5a.
* NEWS: Updated.
2008-05-04 17:09:38 -04:00
Gary V. Vaughan
0ac678eb2a GNU Libtool 2.2.4 was released.
* configure.ac, libltdl/configure.ac (AC_INIT): Bump version
number to 2.2.4.
* libltdl/Makefile.inc (LTDL_VERSION_INFO): C:R+1:A because the
interfaces are unchanged, even though we improved the code some
more.
* NEWS: Updated.
2008-05-04 14:36:29 -04:00
Gary V. Vaughan
11c6afb5e5 Macro file serial updates for next stable release.
* libltdl/m4/libtool.m4, libltdl/m4/ltdl.m4,
libltdl/m4/ltoptions.m4, libltdl/m4/lt~obsolete.m4: Bump serial
numbers to account for changes since 2.2.2 release.
2008-05-04 12:37:02 -04:00
Gary V. Vaughan
851f873412 Make libtoolize tests work with distcheck.
* tests/testsuite.at (_LIBTOOLIZE_TRANSFORM): When $tst_aclocal
is set, transform paths that use it to generic
/usr/local/share/aclocal in time for AT_CHECK comparisons.
2008-05-04 12:31:22 -04:00
Gary V. Vaughan
505274fd58 Don't trip over outdated acinclude.m4.
* libtoolize.m4sh (all_pkgconfig_files, all_pkgmacro_files)
(all_pkgltdl_files): New variables listing all files ever
maintained by any release of libtoolize.
(func_install_pkgconfig_parent, func_install_pkgltdl_files)
(func_install_pkgconfig_subproject, func_install_pkgmacro_parent)
(func_install_pkgmacro_subproject): Carefully clean up any files
that may have been installed by previous libtoolize releases.
* tests/libtoolize.at: New test for libltdl/acinclude.m4 removal.
Reported by Andreas Schwab <schwab@suse.de>.
2008-05-02 16:12:38 -04:00
Peter O'Gorman
fe06ce018f It helps to close quotes.
* libltdl/config/ltmain.m4sh (func_mode_link): Add closing '.
2008-05-02 00:54:49 -05:00
Peter O'Gorman
92e15986a4 Use AC_CHECK_TOOL for otool and otool64.
* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Check.
* libltdl/config/ltmain.m4sh (func_mode_link): Use.
Reported by Richard Purdie <rpurdie@rpsys.net>
2008-05-01 12:40:24 -05:00
Eric Blake
fffd7e67b2 Ignore backup files.
Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-30 11:27:45 -06:00
Eric Blake
c35a08e87e Support cygwin 1.7.0 in loadlibrary loader.
* libltdl/m4/ltdl.m4 (LT_LIB_DLLOAD) <cygwin>: Check for modern
function.
* libltdl/loaders/loadlibrary.c (vm_open): Avoid deprecated
cygwin_conv_to_full_win32_path.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-30 11:27:44 -06:00
Gary V. Vaughan
a53fd09bed New libtoolize --no-warn option and LIBTOOLIZE_OPTIONS parsing.
* libltdl/config/general.m4sh (opt_warning): New option.
(func_warning): Only display a warning message if $opt_warning
is true.
* libtoolize.m4sh: Accept options in LIBTOOLIZE_OPTIONS
environment variable.
(--no-warn): Parse new option.
(func_serial_update_check, func_keyword_update): Use func_warning.
(func_check_macros): Bail out before style issues nags when
$opt_warning is false.
* doc/libtool.texi (Invoking Libtoolize): Document it.
* tests/libtoolize.at: Test it.
* NEWS: Updated.
2008-04-29 20:35:21 -04:00
Gary V. Vaughan
2826832999 Fix libtoolize test failure with aclocal-1.10.1.
* tests/libtoolize.at
(verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR): Force aclocal to
search the source tree for latest libtool macros.
2008-04-29 14:35:51 -04:00
Eric Blake
fe9c6440a3 Fix bug in 2008-04-21 type improvements.
* libltdl/ltdl.c (load_deplibs): Fix casting bug.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-24 10:24:24 -06:00
Michael Haubenwallner
4f2021de12 Use /nonexistent as destination for files not to be installed.
* tests/darwin.at (darwin fat compile): Fix typo.
* tests/inherited_flags.at (inherited_linker_flags): Change
-rpath to /nonexistent.  This helps to avoid accidentally
picking up libraries below /usr/local.
* tests/template.at (simple template test): Likewise.  Fixes
test failure for additional incompatible libstdc++ in
/usr/local.
* tests/testsuite.at (configure_options): Add
--prefix=/nonexistent.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-04-23 23:48:46 +02:00
Gary V. Vaughan
08015bb3c9 * libtoolize.m4sh (rerun_aclocal): Remove unused variable.
Reported by Olly Betts <olly@survex.com>
2008-04-23 11:05:16 -04:00
Ralf Wildenhues
cbd4eca591 * tests/static.at (ccache -all-static): Ignore link warnings.
Report by Gary V. Vaughan.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-04-23 07:48:45 +02:00
Gary V. Vaughan
4d777f8223 Libtoolize now advises AC_CONFIG_MACRO_DIR use where appropriate.
* libtoolize.at (func_check_macros): Always advise use of
AC_CONFIG_MACRO_DIR when not able to copy libtool macros into
the project tree.
* tests/libtoolize.at: New test for correct diagnosis of mismatch
between AC_CONFIG_MACRO_DIR and ACLOCAL_AMFLAGS.
Update expected output of other tests.
* NEWS: Updated.
2008-04-22 23:18:56 -04:00
Gary V. Vaughan
8e72f358d8 Only complain that files are up-to-date with --force.
As a side effect, this also means that when `aclocal' copies the
libtool macros into `aclocal.m4' libtoolize complains only about
the macro files that are missing or not up-to-date.
* libtoolize.m4sh (func_echo_once): New function that prints
the contents of a named variable only on the first call.
(func_aclocal_update_check): New function that compares serial
numbers of libtool macros in aclocal.m4 and only diagnoses the
missing files.
(func_copy, func_copy_cb, func_copy_some_files, func_serial_update)
(func_keyword_update, func_ltmain_update, func_config_update)
(func_install_update): Accept a new argument naming a variable
containing a header string to print with func_echo_once iff any
body text is output by this function.
(func_install_pkgmacro_subproject, func_install_pkgmacro_parent)
(func_install_pkgltdl_files, func_install_pkgconfig_subproject)
(func_install_pkgconfig_parent: Set and pass a suitable
header string variable for the above functions.
(func_serial_update_check): Don't advise rerunning `libtoolize
--force' when aclocal.m4 is not m4_including libtoolize installed
macro files.
* tests/testsuite.at (_LIBTOOLIZE_TRANSFORM): Transform generic
/usr/local/share/aclocal paths to point into the uninstalled
libtool macro directory.
* tests/libtoolize.at: Update tests that were checking for old
behaviour of outputing `file is already up to date' even when
--force was not passed.
* tests/libtoolize.at: New tests to prevent regressions of these
smarter messages.
* NEWS: Updated.
Reported by Olly Betts <olly@survex.com>
2008-04-22 18:55:20 -04:00
Ralf Wildenhues
9c3ae35db6 Fix regression over 1.5.26 with ccache $CC -all-static.
* libltdl/config/ltmain.m4sh (func_mode_link): Add
$link_static_flag to compile_command and link_command only
later, instead of right after a possible compiler wrapper.
* tests/static.at (ccache -all-static): New test.
* THANKS: Update.
Report by Richard Purdie.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-04-22 21:43:06 +02:00
Andreas Schwab
9b00a3a6e7 Fix default argument for AC_LIBLTDL_CONVENIENCE.
* libltdl/m4/ltdl.m4 (AC_LIBLTDL_CONVENIENCE): Default argument
to libltdl.
(AC_LIBLTDL_INSTALLABLE): Likewise.
* tests/configure-iface.at (convenience libltdl): New test.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-04-22 21:32:32 +02:00
Gary V. Vaughan
6a30ffc8e4 Capture lt~obsolete.m4 serial number correctly in libtoolize.
* libltdl/m4/lt~obsolete.m4: Add the filename to the #serial
marker so that libtoolize's serial number checks can find it
in a non-include using aclocal.m4.
* NEWS: Updated.
Reported by Olly Betts <olly@survex.com>
2008-04-22 02:39:06 -04:00
Gary V. Vaughan
7b707dae15 Allow better compile time type checking for lt_dladvise.
* libltdl/lt__private.h (lt__handle, lt__advise): Typedefs
removed in favour of...
* libltdl/ltdl.h (lt_dlhandle),
libltdl/libltdl/lt_dlloader.h (lt_dladvise): ...changing from
void* to forward declarations.
* libltdl/loaders/dlopen.c, libltdl/loaders/loadlibrary.c,
libltdl/lt_dlloader.c, libltdl/ltdl.c: Remove many redundant
type casts.
* NEWS: Updated.
Suggested by Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
2008-04-22 02:37:52 -04:00
Peter O'Gorman
d9a4d8f71a basename does not take a list of strings.
* libltdl/config/ltmain.m4sh(func_extract_archives): Use sed
$basename.
* tests/darwin.at: New. Check that we can built fat program,
shared library and convenience library.
* Makefile.am: Add test.
Reported by LiKai Liu <liulk@cs.bu.edu>
2008-04-21 15:18:41 -05:00
Peter O'Gorman
39903a5836 Use AC_CHECK_TOOL for lipo too.
* libltdl/m4/libtool.m4 (_LT_REQUIRED_DARWIN_CHECKS): Check.
* libltdl/config/ltmain.m4sh (func_extract_archives): Use.
2008-04-21 10:21:27 -05:00
Gary V. Vaughan
314d795eab Fix misleading lt_dlopenadvise documentation.
* doc/libtool.texi (lt_dlopenadvise): The last parameter is of
type lt_dladvise, not lt_dladvise*.
(my_dlopenext): Correct the example too.
* NEWS: Updated.
Reported by Gary Kumfert <kumfert@llnl.gov>
2008-04-20 17:35:46 -04:00
Ralf Wildenhues
c8487807a6 Fix testsuite cleanup warnings on AIX with NFS.
* tests/testsuite.at [ aix ]: Set file mode creation so that
'others' have no permissions.  Shared libraries are kept in
memory on AIX after use if they are world-readable, which means
on NFS mounts cleanup of test group directories will fail later.
* THANKS: Update.
Report and analysis by Michael Haubenwallner.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-04-19 18:36:26 +02:00
Ralf Wildenhues
dd09ff4ec8 Fix nonportable use of expr.
* libltdl/config/ltmain.m4sh (func_mode_link) <Transforming
deplibs into only shared deplibs>: Fix expr portability issues,
noted on FreeBSD.  While at it, simplify and avoid forking.
Report by Bob Friesenhahn.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-04-19 18:27:41 +02:00
Ralf Wildenhues
da1e14c91c Exploit shell arithmetic expansion and ${#var}.
* libltdl/m4/libtool.m4 (_LT_CHECK_SHELL_FEATURES): Also check
for arithmetic expansion, and ${#var}.
(_LT_PROG_XSI_SHELLFNS): Define func_arith and func_len
accordingly, falling back on 'expr'.  Note that the argument to
func_len may not start with a hyphen.  In the pre-Posix
fallback, take care not to rely on the exit status of the
variable assignment (not portable), but set the length to
$max_cmd_len instead.
* libltdl/config/ltmain.m4sh (func_mode_link): Use func_arith
and func_len throughout for integer arithmetic, fixing
quadratical amount of counting for reloadable object and
piecewise archive linking.  Change all comparisons with
max_cmd_len to test for smaller, non-equal length.
* THANKS: Update.
Suggested by Roland Mainz.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-04-19 18:24:48 +02:00
Ralf Wildenhues
3b98dabaa4 Avoid redundant rm in compile mode, fix locking.
* libltdl/config/ltmain.m4sh (func_mode_compile): Avoid
redundant removal of old output files before compilation.
Do not remove $obj until we have successfully grabbed the
lockfile (in case the compiler doesn't grok `-c -o'), because
it might be identical to $output_obj.
At the end of the function, before we remove the lockfile,
update $removelist so that if the trap hits after the lockfile
has been removed, we do not accidentally remove $output_obj that
does not belong to us.
(func_write_libtool_object): Use $MV instead of mv.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-04-19 00:01:12 +02:00
Andreas Schwab
1006ccc48c Properly emulate AC_ENABLE_SHARED([no]) and others.
* libltdl/m4/ltoptions.m4 (AC_ENABLE_SHARED): Check optional
argument.
(AC_ENABLE_STATIC): Likewise.
(AC_ENABLE_FAST_INSTALL): Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-04-18 23:45:43 +02:00
Eric Blake
4f1c4fc7d4 Make ChangeLog merges easier.
* .gitattributes: New file.
* HACKING: Mention how it helps.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-04-16 14:52:35 -06:00
Ralf Wildenhues
85953e3b87 Add .gitignore files.
* .gitignore, doc/.gitignore, libltdl/.gitignore,
libltdl/config/.gitignore, libltdl/m4/.gitignore,
tests/.gitignore, tests/cdemo/.gitignore,
tests/demo/.gitignore, tests/depdemo/.gitignore,
tests/f77demo/.gitignore, tests/fcdemo/.gitignore,
tests/mdemo/.gitignore, tests/mdemo2/.gitignore,
tests/pdemo/.gitignore, tests/tagdemo/.gitignore:
New files.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-04-16 21:31:03 +02:00
Peter O'Gorman
3528106688 Allow bootstrap from git repository.
* Makefile.am: Pass srcdir as an argument to mkstamp and expect only 2 fields in mkstamps output.
* clcommit.m4sh: Ditto.
* configure.ac: Ditto.
* libltdl/config/mkstamp: return a revision and date based on the number of lines which look like dates in all the ChangeLog* files in the directory we got as arg 1.
2008-04-15 15:33:06 -05:00