diff -ruNp libtool-2.2.10/ChangeLog libtool-2.4/ChangeLog --- libtool-2.2.10/ChangeLog 2010-06-09 20:04:52.000000000 +0700 +++ libtool-2.4/ChangeLog 2010-09-22 21:43:26.000000000 +0700 @@ -1,5 +1,1675 @@ +2010-09-22 Gary V. Vaughan + + Release 2.4. + * libltdl/Makefile.inc (LTDL_VERSION_INFO): We've added the + static libprefix interface, so new version-info is C+1:0:R+1. + * configure.ac, libltdl/configure.ac (AC_INIT): Bump version + numbers. + * NEWS: Update version number. + + manual: web-manual index.html clashes with @node Index. + * doc/libtool.texi (Index): Renamed to `Combined Index'. + + tests: ISO C++ forbids declaration of 'v1' with no type. + * tests/lt_dlexit.at (lt_dlexit unloading libs): Added an + explicit int type to declaration of 'v1' to prevent compilation + failure with C++. + +2010-09-22 Peter Rosin + + tests: reloadable objects do not work on MSVC, SKIP test. + * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) + [cygwin, mingw, pw32, cegcc] : Indicate that + reloadable objects do not work. + * tests/duplicate_conv.at: Skip last test if reloadable + objects do not work. + * doc/libtool.texi (libtool script contents) : + Document how to indicate that reloadable objects do not work. + +2010-09-21 Peter Rosin + + msvc: eliminate spaces in the library search path. + * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [mingw, cygwin] + : The LIB path variable telling + where MSVC looks for libraries is likely to contain directory + names with spaces. Convert those directory names to the short + 8.3 DOS form (i.e. without spaces) when storing them in + sys_lib_search_path_spec, as that is a space separated variable. + +2010-09-21 Ralf Wildenhues + + Revert to per-language libpath computation on AIX. + * libltdl/m4/libtool.m4 (_LT_SYS_MODULE_PATH_AIX): Accept + tagname argument. Use global cache variable lt_cv_aix_libpath + to override per-language tag variables for the libpath value. + Fix the sed script to remove trailing space. + (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG): Pass tag argument to + _LT_SYS_MODULE_PATH_AIX. + Tracked down and reported by Rainer Tammer. + +2010-09-21 Gary V. Vaughan + + maint: edit-readme-alpha shouldn't try to re-edit during dist. + * libltdl/config/edit-readme-alpha: If README is non-writable + assume that it is being run from distcheck, and skip the edit + with a warning (to help diagnose cases where the heuristic is + not correct). However, if README has already been edited to + the alpha text, quietly skip without an error message. + +2010-09-20 Eric Blake + + maint: drop autobuild requirement + * HACKING: Update. + + build: ship autobuild.m4, to reduce bootstrap requirement + * libltdl/m4/.gitignore: Drop autobuild.m4. + * libltdl/m4/autobuild.m4: New file, copied from autobuild. + * configure.ac (AB_INIT): Unconditionally call it. + +2010-09-20 Peter Rosin + Ralf Wildenhues + + libltdl: Make sure preloaded symbols are declared extern "C". + * libltdl/ltdl.h (LTDL_SET_PRELOADED_SYMBOLS): Move the + declaration of lt__PROGRAM__LTX_preloaded_symbols to global + scope and make sure it has "C" linkage. Makes exceptions.at + succeed on MSVC. + +2010-09-20 Peter Rosin + + tests: __declspec (dll{ex,im}port) in tests/exceptions.at + * tests/exceptions.at (common.h, module.h, lib.h) [w32]: Use + __declspec (dllimport) and __declspec (dllexport) instead of + the less portable __attribute__ ((dllimport)) and + __attribute__ ((dllexport)). Makes the test compile on MSVC. + +2010-09-19 Peter Rosin + + tests: Import items from liba1 for MSVC. + * tests/lt_dlexit.at (b1.c) [MSVC]: Import function f1 and + variable v1 from liba1 when using them from modb1. Makes the + test pass on MSVC. + +2010-09-18 Ralf Wildenhues + + tests: avoid distcheck failure with --disable-ltdl-install. + * tests/ltdl-libdir.at (libdir of installed modules): Skip if + $LIBLTDL does not exist. + +2010-09-18 Gary V. Vaughan + + maint: use sed instead of maintaining 2 README files. + * README.alpha: Deleted. It was mostly identical to README. + * libltdl/config/edit-readme-alpha: New script to edit the + contents of README in the dist tree prior to tarring up. + * Makefile.am (dist-hook): Run it before rolling alpha release + tarball. + + maint: improve README's `Obtaining the Latest Sources'. + * README (Obtaining the Latest Sources): Add instructions for + obtaining stable, alpha and nightly snapshot tarballs. + * README.alpha (Obtaining the Latest Sources): Adjust to match. + + maint: reformat README `The Test Suites' for consistency. + * README (The Test Suites): Reformatted for consistency. + * README.alpha (The Test Suites): Adjust to match. + + maint: improve `Reporting Bugs' in README and README.alpha. + * README (Reporting Bugs): Rewritten to a more complete and + concise guide to providing a good bug report. + * README.alpha (Reporting Bugs): Adjust to match. + + maint: consolidate Introductions of README and README.alpha. + * README (Introduction): Rewritten to a more logical order for + first time users, incorporating some additional text that was + previously only in README.alpha. + * README.alpha (Introduction): Adjust to match. + + maint: copy the Version Numbering section into README.alpha. + * README.alpha (Version Numbering): No less useful for users + of alpha releases. Copied from README. + +2010-09-17 Peter Rosin + + tests: actually detect missing 'test' in 'if "$foo" = ...'. + * tests/sh.test: Remove extra backslash in regex. + + Copy over DLL_EXPORT handling from C to C++ for non-GCC on w32. + * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [mingw, cygwin, os2] + [pw32, cegcc]: Copy over the DLL_EXPORT handling from C to C++. + +2010-09-17 Ralf Wildenhues + + LTO: consistently accept -fwhopr* and -flto* for GCC. + * libltdl/config/ltmain.m4sh (func_mode_link): Accept -fwhopr*. + * libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS): Also match + -flto*. + +2010-09-17 Charles Wilson + + Fix order of PATH manipulation in cwrapper and shwrapper + * libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src:main): Call + lt_update_exe_path before lt_update_lib_path, to ensure that the + temporary rpath values (which include the OBJDIRs of uninstalled + libtool libraries) precede installation and final -rpath directories. + (func_emit_wrapper): Prepend $dllsearchpath to PATH before prepending + $temp_rpath to $shlibpath_var; similar rationale as above. + Reported by Jon Turney + +2010-09-17 Charles Wilson + + Document libtool variable to_host_file_cmd. + * doc/libtool.texi (libtool script contents:to_host_file_cmd): + Document variable. + (libtool script contents:to_tool_file_cmd): Prefer `build platform' + to `build system'; Ditto `host platform'. + +2010-09-16 Charles Wilson + + Fix sh.test failure introduced in 72064249 + * libltdl/config/ltmain.m4sh (func_mode_link): Avoid poor + syntax. + +2010-09-16 Ralf Wildenhues + + tests: avoid localization failure due to unstable compiler messages. + * tests/testsuite.at (LT_AT_NORMALIZE_COMPILER_OUTPUT): + Attempt to normalize temporary file names in error messages. + Fixes 'localized compiler messages' test failure on Darwin when + creating fat (multi-ABI) libraries. + +2010-09-13 Peter Rosin + + Prefer $NM @file when the toolchain isn't native to $build. + * libltdl/config/ltmain.m4sh (func_mode_link): Avoid calculating + the command line length and take the @file branch *if* the file + names needs to be converted for the toolchain and the @file + branch works. Fixes problems in stresstest.at when doing a cross + from Cygwin to MinGW using MinGW native tools (a.k.a. a "faked" + cross), and for the specific case of MSVC on Cygwin it makes the + test pass. + +2010-09-15 Gary V. Vaughan + + maint: improve README instructions for fetching latest version. + * README, README-alpha (Obtaining the Latest Sources): New + section, describing use of savannah repositories and bootstrap. + * README.alpha (Reporting Bugs): Remove git instructions in + favour of a reference to the new `Obtaining the Latest Sources' + section. + +2010-09-14 Eric Blake + + maint: ship .xz, not .lzma + * configure.ac (AM_INIT_AUTOMAKE): Prefer better file format. + * Makefile.maint (git-release, git-dist, prev-tarball) + (new-tarball, diffs): Use correct extension. + * HACKING: Update instructions. + * .gitignore: Ignore .xz files. + +2010-09-13 Ralf Wildenhues + + doc: avoid long lines in input and output, indexing fixes. + * doc/libtool.texi (Linking libraries) + (Module loaders for libltdl): Manually line-wrap examples, to + avoid long lines. + (Libltdl interface, User defined module data) + (Module loaders for libltdl): Wrap long @deftypefun input lines + using trailing '@'. Use @deftypefun rather than @deftp where + appropriate, and add spaces in @deftypefun lines to fix the + index entries generated from these lines. + (Cheap tricks): Use @smallexample rather than @example, to avoid + long lines. + + docs: @file and @option markup fixes. + * doc/libtool.texi (Creating object files, Linking libraries) + (Linking executables, Link mode, Finish mode, Autoconf macros) + (Using Automake, Inter-library dependencies, Dlpreopening) + (Linking with dlopened modules, Finding the dlname) + (Libltdl interface, Test descriptions, Multiple dependencies): + Add @option where needed, replace @samp with @file as + appropriate. + +2010-09-12 Peter Rosin + + * .gitignore: Ignore *.obj files for MSVC (and w32 in general). + + Adjust to moved auxiliary files and add compile. + * HACKING (Maintenance Notes): Adjust to moved files. Add the + compile script. + * Makefile.maint (fetch): Also fetch the compile script. + +2010-09-12 Ralf Wildenhues + + tests: avoid empty AT_DATA contents, for zsh. + * tests/libtoolize.at (libtoolize macro serial update) + (libtoolize config files serial update, LIBTOOLIZE_OPTIONS): + Do not create empty files with AT_DATA, the latter is documented + to require a final newline. Fixes testsuite failures with zsh + 4.3.10. + +2010-09-12 Charles Wilson + + When assigning $linklib value, honor [-all]-static[-libtool-libs] + + * libltdl/config/ltmain.m4sh (func_mode_link): When prefer_static_libs + and static library exists, ensure old_library name is used as $linklib. + Fixes failure on mingw when both static and shared libraries are + present. + +2010-09-12 Ralf Wildenhues + + tests: work around zsh use of $options variable. + * tests/getopt-m4sh.at: Rename $options to $opts, the former is + special for zsh 4.3.10. + + Fix AC_NO_EXECUTABLES test failure on IRIX 6.5. + * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) [irix]: Cache result + of link check for -Wl,-exported_symbol. + * tests/no-executables.at (AC_NO_EXECUTABLES): Set + lt_cv_irix_exported_symbol, to avoid link check. + +2010-09-12 Jürgen Reuter (tiny change) + Ralf Wildenhues + + Initial support for the NAG Fortran compiler on GNU/Linux. + * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [linux] : + New set of entries, for NAG Fortran 5.1 and 5.2. + * NEWS: Update. + +2010-09-12 Ralf Wildenhues + + Fix getopt.m4sh to require Autoconf 2.62 or newer. + * libltdl/config/getopt.m4sh (m4_version_prereq): Require 2.62, + not 2.61. + +2010-09-11 Charles Wilson + + Correct typo: $sharedlib_from_linklib_cmd missing '_cmd' + + * libltdl/config/ltmain.m4sh (func_generate_dlsyms): Fix obvious + typo, $sharedlib_from_linklib_cmd missing '_cmd'. + +2010-09-10 Peter Rosin + + Convert file name to toolchain format when invoking $NM. + * libltdl/config/ltmain.m4sh (func_generate_dlsyms) + (func_win32_libid, func_cygming_gnu_implib_p) + (func_cygming_ms_implib_p): When using the name lister to find + symbols in files, convert the file names to a format appropriate + for the tool. Fixes testsuite issues in mdemo-static-make.test + and mdemo-make.test when doing a cross from Cygwin/Wine to MinGW + using MinGW native tools (a.k.a. a "faked" cross). + +2010-09-09 Peter Rosin + + 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. + +2010-09-08 Peter Rosin + + Mention adjustment of naming of MSVC import libraries in NEWS. + * NEWS: Mention the change in import library naming on MSVC. + +2010-09-07 Peter Rosin + + Adjust naming of MSVC import libraries. + * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [mingw, cygwin] + [pw32, cegcc] : Adjust naming of the + import library from foo-.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] : Explicitely name the import + library to match the above. + + Fixup texi typo in previous. + * doc/libtool.texi (libtool script content) : + Add missing 'code' command. + + Convert POSIX file names to toolchain format for MSVC + * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG) + [cygwin, mingw, pw32, cegcc] : Make + sure the -outputresource: file name for the manifest tool is + in w32 format. + : 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@. + +2010-09-06 Peter Rosin + + 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. + + 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. + + 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. + + 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. + +2010-09-02 Ralf Wildenhues + + tests: avoid spurious test failure due to library mode on HP-UX. + * tests/help.at (debug tracing): Use $lt_INSTALL not cp for + install mode, the latter will not overwrite an existing library + with mode 555. + +2010-09-01 Charles Wilson + + Path conversion documentation + * doc/libtool.texi (Platform quirks): Add new subsections + 'Cross compiling' and 'File name conversion'. + +2010-09-01 Ralf Wildenhues + + tests: avoid spurious pic_flag test failure on HP-UX 10.20. + * tests/pic_flag.at (override pic_flag at configure time): + Match HP-UX 10.20 cc warning about unknown options, to skip + the test. + + tests: fix localization test for GCC on HP-UX 11.00. + * tests/localization.at (localized compiler messages): Be sure + to switch the locale only for the actual compiler commands, so + we don't pick up warnings from helper tools such as diff which + may not have the locale installed. + + Avoid leaking make flags into testsuite results. + * tests/defs.m4sh: Unset MFLAGS, MAKEFLAGS, MAKELEVEL, __MKLVL__ + and MAKE_JOBS_FIFO. + * tests/testsuite.at: Likewise. + Fixes warnings in test logs when the user uses 'make -jN check' + and inner $MAKE invocations can't connect to the job server. + Fixes spurious failures of configure-iface.at and of + demo-noinst-link tests with BSD and Tru64 make if the user uses + 'make -k', as the exit status of the latter is not reliable. + +2010-09-01 Gary V. Vaughan + + 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. + + Remove clcommit.m4sh. + * clcommit.m4sh: Removed. This script was written to help keep + ChangeLog and commit messages in sync when committing to CVS, + and is an anachronism now that Libtool uses git. + * Makefile.maint (commit): Target removed. + * bootstrap: Don't generate commit. + * HACKING (Release Procedure): Adjusted. + +2010-08-31 Peter Rosin + + archive-in-archive.at passes with Microsoft lib. + * tests/archive-in-archive.at: Tighten test to check that the desired + object files are indeed part of the archive. Microsoft lib still + passes, so remove the expected failure for that case. + + 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. + + 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. + +2010-08-31 Gary V. Vaughan + + 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. + +2010-08-31 Peter Rosin + + Extract the archive name from the .la file and use $AR (not ar). + * Makefile.am: Pass AR through to the testsuite. + * tests/archive-in-archive.at: Bump copyright year. Extract archive + name from the .la file instead of hardcoding the name, and allow + different archivers. Also clarify that the tested functionality is + currently broken. + +2010-08-30 Ralf Wildenhues + + tests: skip -Wall -Werror with Tru64 cc in cwrapper test. + * tests/cwrapper.at (cwrapper for uninstalled executables): + Use a link test rather than a compile test to flesh out unknown + compiler flags starting with -W; Tru64/OSF1 cc will happily + accept `-Wall -Werror' as indication to pass flags on to + subprocesses. + + tests: avoid getopt-m4sh failures when autom4te is not available. + * tests/getopt-m4sh.at (_LT_AT_GETOPT_M4SH_SETUP): + Check $M4SH --version, skip on failure. + + tests: mark 'syntax of .la files' as XFAIL, expose failure. + * tests/lalib-syntax.at (syntax of .la files): Assert that the + string returned by lt_dlerror after a failure is non-NULL, so + the failure shows up on systems other than Solaris. Mark test + as expected to fail. + Suggested by Bob Friesenhahn. + +2010-08-30 Eric Blake + + Simplify recent configure quoting portability workaround. + * configure.ac: Simplify setting of timestamp_string. + +2010-08-30 Charles Wilson + + 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. + +2010-08-29 Peter Rosin + + Fix typo when renaming path conversion functions. + * tests/testsuite.at: Ensure to_host_file_cmd is passed as a + variable setting on the configure line for (new testsuite) tests. + +2010-08-29 Ralf Wildenhues + + 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] : + Add $pic_flag for GCC. + (_LT_LANG_CXX_CONFIG) [linux] : + Likewise. + (_LT_SYS_HIDDEN_LIBDEPS): Ignore files matching *.lto.o. + * NEWS: Update. + + 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. + + 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. + + Work around yet another shell quoting portability issue. + * configure.ac: Avoid nonportable quoted alternate variable + value in unquoted here document, so Solaris 10 sh and Tru64 + ksh do not print spurious extra quotes. + + Silence order-only configure test for AIX make. + * configure.ac: Also drop standard output, for AIX 5.1 make. + +2010-08-28 Charles Wilson + + Minor sysroot fixups. + * libltdl/m4/libtool.m4 (_LT_WITH_SYSROOT): Fix typo. + * tests/sysroot.at: Search also for crt0.o to accommodate cygwin. + +2010-08-28 Charles Wilson + + [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. + +2010-08-28 Ralf Wildenhues + + 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. + + Add $pic_flag to archive_cmds and archive_expsym_cmds. + * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) + + [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) + [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. + + 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. + +2010-08-28 Dave Korn + + 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. + +2010-08-28 Ralf Wildenhues + + Fix quoting in non-XSI func_xform, for IRIX sh. + * libltdl/config/ltmain.m4sh (func_xform): Remove spurious extra + M4 quotes. + + 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. + + 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. + +2010-08-22 Ralf Wildenhues + + 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 Charles Wilson + + fix --mode=finish + * libltdl/config/ltmain.m4sh (func_mode_finish): Invert then/else + blocks of the "if $opt_dry_run" conditional. + +2010-08-15 Paolo Bonzini + + 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-12 Paolo Bonzini + + 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. + + reorganize parsing of --mode=finish arguments + * libltdl/config/ltmain.m4sh (func_mode_finish): Split arguments for + directories and *.la files. + + fix sysroot handling for deplibs of preopened libtool libs + * libltdl/config/ltmain.m4sh: Pass $dependency_libs of preopened libtool + through func_resolve_sysroot. + + fix sysroot tests to pass on Fedora 13 + * tests/sysroot.at: Link $prefix/include into the sysroot as well, as + required by newer GCC. + +2010-07-29 Paolo Bonzini + + initial version of the NEWS entry + * NEWS: Document sysroot support. + + add sysroot test + * Makefile.am (TESTSUITE_AT): Add tests/sysroot.at. + * tests/sysroot.at: New. + + 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. + + 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. + + 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. + +2010-07-28 Paolo Bonzini + + 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. + + add --with-sysroot + * libltdl/m4/libtool.m4 (_LT_HOST_NONCANONICAL, _LT_WITH_SYSROOT): New. + (LT_SETUP): Require _LT_WITH_SYSROOT. + + handle sysroot flags + * libltdl/config/ltmain.m4sh (func_mode_link): Recognize --sysroot + option. + +2010-08-27 Ralf Wildenhues + + * NEWS: Only bootstrapping needs new Automake and Autoconf. + + check-interactive and check-noninteractive for both testsuites. + * Makefile.am (COMMON_TESTS, TESTS): Split into ... + (NONINTERACTIVE_TESTS, INTERACTIVE_TESTS): ... these new + variables. + (check-interactive-new): Rename from check-interactive. + (check-noninteractive-new): Rename from check-noninteractive. + (check-interactive-old, check-noninteractive-old): New targets. + (check-interactive, check-noninteractive): Depend on the + respective targets for the old and the new test suites. + * doc/libtool.texi (Test descriptions): Simplify description + about check-interactive and check-noninteractive. Add index + entries. + + Adjust docs for renaming and for parallel-tests. + * README: Update example TESTS setting. + * README.alpha: Likewise. + * doc/libtool.texi (Test descriptions): Update for test renaming, + adjust descriptions accordingly. + + Update VERBOSE handling for parallel-tests driver. + * tests/defs.m4sh: Default to verbose output, drop now-unneeded + handling of 'VERBOSE=no'. + * README: Update example usage. + * README.alpha: Likewise. + * doc/libtool.texi (Test descriptions, When tests fail): Remove + unneeded VERBOSE recommendations. Point to per-test log files + and test-suite.log summary file. + + Enable parallel-tests test driver for the old testsuite. + * configure.ac: New configure test to find out whether `make' + supports order-only prerequisites; set @ORDER@ accordingly. + (AM_INIT_AUTOMAKE): Enable parallel-tests option. + * tests/defs.m4sh (prefix): Derive install prefix for tests + from the test name, to avoid clashes. + * Makefile.am (CXX_TESTS, F77_TESTS, FC_TESTS, COMMON_TESTS): + Reformat. Adjust for renamed tests. Add dependencies between + the respective log files of the tests, to ensure proper ordering. + Use order-only dependencies if possible, between test groups that + use the same directory. + (clean-local-legacy): Remove `_inst-*' directories as well. + Prompted by suggestion from Bob Friesenhahn. + + New alias scripts for old tests run more than once. + * tests/cdemo-shared-exec.test, tests/cdemo-shared-make.test, + tests/cdemo-static-exec.test, tests/cdemo-static-make.test, + tests/cdemo-undef-exec.test, tests/cdemo-undef-make.test, + tests/demo-nofast-exec.test, tests/demo-nofast-inst.test, + tests/demo-nofast-make.test, tests/demo-nofast-unst.test, + tests/demo-nopic-exec.test, tests/demo-nopic-make.test, + tests/demo-pic-exec.test, tests/demo-pic-make.test, + tests/demo-shared-exec.test, tests/demo-shared-inst.test, + tests/demo-shared-make.test, tests/demo-shared-unst.test, + tests/demo-static-exec.test, tests/demo-static-inst.test, + tests/demo-static-make.test, tests/demo-static-unst.test, + tests/depdemo-nofast-exec.test, tests/depdemo-nofast-inst.test, + tests/depdemo-nofast-make.test, tests/depdemo-nofast-unst.test, + tests/depdemo-shared-exec.test, tests/depdemo-shared-inst.test, + tests/depdemo-shared-make.test, tests/depdemo-shared-unst.test, + tests/depdemo-static-exec.test, tests/depdemo-static-inst.test, + tests/depdemo-static-make.test, tests/depdemo-static-unst.test, + tests/f77demo-shared-exec.test, tests/f77demo-shared-make.test, + tests/f77demo-static-exec.test, tests/f77demo-static-make.test, + tests/fcdemo-shared-exec.test, tests/fcdemo-shared-make.test, + tests/fcdemo-static-exec.test, tests/fcdemo-static-make.test, + tests/mdemo-shared-exec.test, tests/mdemo-shared-inst.test, + tests/mdemo-shared-make.test, tests/mdemo-shared-unst.test, + tests/mdemo-static-exec.test, tests/mdemo-static-inst.test, + tests/mdemo-static-make.test, tests/mdemo-static-unst.test, + tests/tagdemo-shared-exec.test, tests/tagdemo-shared-make.test, + tests/tagdemo-static-exec.test, tests/tagdemo-static-make.test, + tests/tagdemo-undef-exec.test, tests/tagdemo-undef-make.test: + New files. + + Require Automake 1.11.1 for Libtool, enable color-tests. + * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1. Enable + color-tests. + (LTDL_SUBDIR_LIBOBJS): Remove now-obsolete conditional and + feature test for Autoconf 2.59 and Automake 1.9.x workaround. + * Makefile.am: Simplify accordingly. + * bootstrap: Remove obsolete WORKING_LIBOBJ_SUPPORT workarounds + for Autoconf 2.59 and Automake 1.9.6. + +2010-08-23 Charles Wilson + + Fix syntax for cygwin-cross + libltdl/m4/argz.m4: Add quotes around variable, which + may contain the multiword value 'guessing no'. + +2010-08-22 Ralf Wildenhues + + 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. + + Fix getopt tests to skip with Autoconf < 2.61. + * tests/getopt-m4sh.at (_LT_AT_GETOPT_M4SH_SETUP): Skip the test + if 'autom4te --language=m4sh' exits 63 because version 2.61 is + required. Allows the testsuite to complete successfully with + Autoconf 2.59 and Automake 1.9.6. + + Tidy and fix clean and distclean rules for old testsuite. + * Makefile.am (clean-local-legacy): Use $(CONF_SUBDIRS) instead + of hard-coding the list of test directories. Use + $(AM_MAKEFLAGS). + (fake-distclean-legacy): New phony rule, to create fake Makefile + files if needed so that the automake-generated + distclean-recursive rule can work properly. + (distclean_recursive): New helper variable. + (distclean-recursive): Depend on fake-distclean-legacy. + +2010-08-22 Paolo Bonzini + + Fix sed_make_literal_regex. + * libltdl/config/general.m4sh (sed_make_literal_regex): Fix + definition. + +2010-08-15 Paolo Bonzini + + 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_cygming_dll_for_implib_fallback_core): Use it. Suggested + by Ralf Wildenhues. + +2010-08-21 Rainer Tammer (tiny change) + + Avoid issues with AIX resident shared libraries in old testsuite. + * tests/defs.m4sh [aix]: Remove file mode permission for others, + so shared libraries are not kept in memory after execution. + Fixes failures of repeated mdemo-inst.test with on AIX 5.3. + +2010-08-21 Ralf Wildenhues + + Skip part of versioning test on AIX. + * tests/versioning.at (versioning): The AIX linker always + records the unversioned library name, even with runtimelinking, + so skip the execution test for the incompatibly upgraded + library. + Report by Rainer Tammer. + + Remove dead code from versioning test. + * tests/versioning.at (versioning): No need to build unused + prog3. + +2010-08-20 Ralf Wildenhues + + Don't hide the table of contents in the manual. + * doc/libtool.texi: Move the table of contents to the beginning. + Prompted by patch from Bruno Haible against Automake. + + Remove superfluous dependency in Makefile.am. + * Makefile.am (tests/demo-conf.test): Remove dependency on + libtool, this test is a primary source and not generated. + + Bump copyright years in manual. + * doc/libtool.texi: Bump copyright years. + +2010-08-13 Peter Rosin + + 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. + +2010-08-10 Gary V. Vaughan (tiny change) + + Make testsuite compatible with Autoconf 2.62 again. + * tests/getopt-m4sh.at (AT_CHECK): Autotest 2.62 chokes on unquoted + '#' in AT_CHECK, so replace all uses with '@%:@' quadrigraph. + Suggested by Eric Blake + Reported by Ralf Wildenhues + +2010-08-09 Ralf Wildenhues + + 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. + + 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. + +2010-08-07 Ralf Wildenhues + + 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. + + Fix compilation of program sources on AIX. + * tests/lt_dlopenext.at (lt_dlopenext error messages): Do not + use $LIBTOOL when compiling plain object, AIX by default does + not enable static archives. + * tests/ltdl-libdir.at (libdir of installed modules): Likewise. + Report by Rainer Tammer. + + Do not call toplevel configure in non-VPATH build. + * tests/deplibs-mingw.at (deplibs without file command): Use + LT_AT_CONFIGURE for consistency, update comment about why it + might fail. + * tests/pic_flag.at (override pic_flag at configure time): Skip + test if we are building in-tree. + Report by Rainer Tammer. + + Allow running pic_flag test with different shell. + * tests/testsuite.at (LT_AT_CONFIGURE): Accept optional second + argument specifying the configure script to run. + * tests/pic_flag.at (override pic_flag at configure time): + Use LT_AT_CONFIGURE. + + 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. + +2010-08-06 Ralf Wildenhues + + 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. + + Fix ltdl-libdir test for C++ compilers. + * tests/ltdl-libdir.at (libdir of installed modules): Declare + module function as extern "C". + +2010-08-04 Ralf Wildenhues + + 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. + + Avoid syntax error due to shift of nonexistent parameter. + * libltdl/config/ltmain.m4sh : Only shift + if there is a positional parameter to shift. Fixes `libtool + --help' when dash is used. + Report by Rainer Tammer. + + Fix testsuite errors due to shell quoted parameter expansion issue. + * tests/getopt-m4sh.at (_LT_AT_GETOPT_M4SH_SETUP): Insert space + between double-quoted and unquoted shell parameter, as bash + 4.0.28 doesn't add one in its output if the expansion of the + second one starts with a space. + (short option splitting, enhanced shell short option splitting) + (long option splitting, XSI long option splitting): Add space in + expected output. + Fixes testsuite failures on AIX, FreeBSD, etc. + Report by Rainer Tammer. + +2010-08-03 Ralf Wildenhues + + 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. + +2010-08-02 Ralf Wildenhues + + Fix pic_flag test unportabilities. + * tests/pic_flag.at (override pic_flag at configure time): Skip + test if the compiler produces a warning containing `fpic'. + Do not use nonportable `grep -e', for Solaris. + Report by Charles Wilson. + +2010-08-01 Paolo Bonzini + + Fix bug in postdeps computation + * libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS): Actually + concatenate $prev and $p. + +2010-07-26 Charles Wilson + + Don't always skip XSI tests + * tests/getopt-m4sh.at: Use new signature as implemented by + de8a0992b21b76a13c302cf48588ad5f6042595c, when determining + whether to test Extended-shell functions. + +2010-07-18 Peter Rosin + + * tests/stresstest.at: Link with main.lo when liba is shared + and linking main with -no-install. + +2010-07-18 Peter Rosin + + * tests/stresstest.at [MSVC]: dllimport all imported + variables. + +2010-07-17 Peter Rosin + + dllimport the variable for MSVC in link-order.at + * tests/link-order.at [MSVC]: Makes the test pass by dllimporting + imported variables when working with shared libraries. + +2010-07-08 Peter Rosin + Ralf Wildenhues + + 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 Gary V. Vaughan + + 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. + +2010-07-08 Peter Rosin + + Optimize assignment of output_la. + * libltdl/config/ltmain.m4sh (func_mode_link): Save two fork/exec + instances. + Report by Ralf Wildenhues. + +2010-07-08 Gary V. Vaughan + + Fix a cut-n-pasto in "2010-07-07 Charles Wilson" patch. + * libltdl/config/ltmain.m4sh (func_mode_link): Remove spurious + variable dereference. + +2010-07-07 Gary V. Vaughan + + 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. + +2010-07-07 Charles Wilson + + [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-05 Peter Rosin + + * tests/export.at [MSVC]: dllimport all imported variables. + +2010-07-01 Ralf Wildenhues + Peter Rosin + + Support for response files with $NM. + * libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS) + : 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-04 Ralf Wildenhues + + Fix ccache test for MSVC. + * tests/static.at (ccache -all-static): Ignore compiler stderr. + Reported by Peter Rosin. + +2010-07-03 Charles Wilson + + Avoid false failures caused by filesystem interaction + * tests/dlloader-api.at (dlloader API): Use uglified names for + pseudo-modules. + +2010-07-03 Peter Rosin + + Fix typo in "Add func_append_quoted and do..." + * libltdl/config/ltmain.m4sh (func_mode_compile): Use + func_append_quoted instead of func_append. + +2010-07-02 Peter Rosin + + Don't trigger file name expansion when embedding manifests. + * libltdl/m4/libtool.m4 (_LT_LINKER_SHLIBS) + [ cygwin, mingw, cegcc ] : 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 |. + +2010-07-01 Peter Rosin + + Fix regression caused by "Add func_append_quoted and do..." + * libltdl/config/ltmain.m4sh (func_mode_link): Remove leftover + "_libs" trash. + +2010-06-28 Peter Rosin + + 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) : New tag variable. + [ cygwin, mingw, cegcc ] : 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-06-24 Peter Rosin + + 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 Gary V. Vaughan + + Skip `enhanced shell option appending' test when not available. + * tests/getopt-m4sh.at [enhanced shell option appending]: + _LT_AT_XSI_FUNC_EXTRACT will not be able to find the enhanced + libtool func_append function if the replacement wasn't substituted + by configure, since the decorator comments will be different - in + that case simply skip the test. + +2010-06-30 Gary V. Vaughan + + 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. + +2010-06-29 Gary V. Vaughan + + Correct func_split_short_opt comment cut-n-pasto. + * libtool/config/getopt.m4sh (func_split_short_opt): Fix + the function comment. + + 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. + +2010-06-28 Gary V. Vaughan + + 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. + + 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. + +2010-06-27 Gary V. Vaughan + + Add missing case branch terminators. + * libltdl/config/ltmain.m4sh: Fixed everal case branches with + missing ';;' terminators. + + 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 + + Amend a missed opt_mode rename instance in ltmain.m4sh. + * libltdl/config/ltmain.m4sh : Rename to opt_mode. + + 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. + + 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. + * libltdl/config/getopt.m4sh (m4_version_prereq): This file + requires m4sugar.m4 from Autoconf-2.61 or newer. + +2010-06-24 Charles Wilson + + [cygwin] Refactor C++ exception handling for Win32 correctness + * tests/exception.at (common.h): New file, refactored from + (module.h): Move declaration of modexc to libcommon. + Include common.h. Use explicit import/export markings for + symbols when building on win32 or cygwin. + (common.cpp): New file. + (module.cpp): Ensure correct symbols markings when including + module.h. + (lib.h): Use explicit import/export markings for symbols + when building on win32 or cygwin. + (lib.cpp): Ensure correct symbol markings when including lib.h. + (main.cpp): Include common.h. + (commands): Ensure correct symbol markings when compiling + main.cpp, and lib.cpp, and module.cpp. Add command to compile + common.cpp, and to link libcommon.la. Add libcommon.la when + linking module.la and main. Add command to install libcommon.la. + +2010-06-21 Gary V. Vaughan + + 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-20 Ralf Wildenhues + + 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. + + Add comment for exception handling module unloading issue. + * tests/exceptions.at (C++ exception handling): Add comment + for last patch. + + Fix flags test failure when ld is used as linker. + * tests/flags.at (passing CC flags through libtool): When $LD + is used for linking libraries, ensure flags passed with `-Wc,' + are not passed through to $LD, but flags passed with `-Wl,' use + $wl when linking programs. Fixed testsuite failure on HP-UX + 10.20. + +2010-06-19 Charles Wilson + + [cygwin] Fix segfault in C++ exception handling test + * tests/exceptions.at (main.cpp:exceptions_in_module): + Move dlclose outside catch block; otherwise __cxa_end_catch + (part of the cygwin g++ ABI) accesses pointers to data inside + unloaded DLL. This is a platform ABI-specific bug, but is + likely common to many platforms' g++ and/or other C++ + compilers. + +2010-06-19 Ralf Wildenhues + + Fix srcdir computation for manual runs of old tests. + * tests/defs.m4sh: Strip trailing `/tests' from srcdir, to allow + `$srcdir/tests/FOO.test' to be run from the top build directory. + + Clean up @var handling in the manual. + * doc/libtool.texi: Throughout the manual, replace @var with + @samp or @code as appropriate, ensure the argument of remaining + @var uses are lower-case. + + Let the bootstrap script fail upon errors. + * bootstrap: Enable errexit. + + Fix execute mode test for OSF/1 5.1. + * tests/execute-mode.at (execute mode): Do not use grep -F + with an empty pattern. + * THANKS: Update. + Report by Jay K. + + Use config.cache variable for PIC flag, to allow override. + * libltdl/m4/libtool.m4 (_LT_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. + * 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. + +2010-06-16 Ralf Wildenhues + + 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. + + 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@. + +2010-06-15 Peter Rosin + + 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. + +2010-06-15 Philip Allison (tiny change) + + 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. + +2010-06-15 Ralf Wildenhues + + 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. + +2010-06-14 Ralf Wildenhues + + Enable colored Autotest testsuite output if available. + * tests/testsuite.at: Move AT_INIT call down to late in the + file, all prior code can go beforehand. + Call AT_COLOR_TESTS if defined. + +2010-06-14 Peter O'Gorman + + Pass resident test with --disable-shared too. + * tests/resident.at: use LTDL_SET_PRELOADED_SYMBOLS. + +2010-06-13 Peter O'Gorman + + Test with --disable-shared at release time too. + * HACKING: Note it. + + Avoid failure for --disable-shared. + * tests/lt_dladvise.at: Hack. + + Use LTDL_SET_PRELOADED_SYMBOLS to avoid failure. + * tests/exceptions.at: Use it. + +2010-06-13 Ralf Wildenhues + + 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. + +2010-06-12 Peter Rosin + Ralf Wildenhues + + 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. + +2010-06-11 Peter O'Gorman + + Skip bindir install test if we're not building shared. + * tests/bindir.at: Skip install test if necessary. + * THANKS: Update. + Report by Michael E Faenza. + +2010-06-11 Gary V. Vaughan + + Use getopt.m4sh to generate libtoolize option parser. + * libtoolize.m4sh: Replace hand written shell code with a + call to M4SH_GETOPTS. Move some premature initialization + from the preamble to the main part of the script. Exit with + an error on spurious additional non-option arguments. + (envopts): Integrate LIBTOOLIZE_OPTIONS pre-parsing into the + main option parsing loop. + (opt_copy): Use in place of and in the reverse sense of the + old opt_link variable. + +2010-06-10 Peter O'Gorman + + 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 Ralf Wildenhues + + Ensure libltdl is up to date for check-local. + * Makefile.am (LTDL_BOOTSTRAP_DEPS): New variable. + (all-local): Use it to simplify dependencies. + (testsuite_deps_uninstalled): Add $(LTDL_BOOTSTRAP_DEPS). + Report by Peter Rosin. + +2010-06-10 Gary V. Vaughan + + 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. + + Fix a typu in HACKING. + * HACKING (Release Procedure): s/Makeflie/Makefile/. + +2010-06-09 Ralf Wildenhues + + Factorize testing gcj installation in the testsuite. + * tests/testsuite.at (LT_AT_TAG): For the GCJ tag, actually + try to compile a .java file when deciding whether to skip. + (LT_AT_EXEC_TAG): New macro, to also ensure runnability. + * tests/convenience.at (Java convenience archives): Use + LT_AT_EXEC_TAG, simplify accordingly. + * tests/flags.at (passing lt_tag flags through libtool): Use + m4_defn for tag so LT_AT_TAG works. + * tests/infer-tag.at (GCJ inferred tag): Simplify. + * THANKS: Update. + Report by Warren Dodge. + +2010-06-09 Peter O'Gorman + + Skip demo-nopic tests if SELinux policy will cause failure. + * tests/demo-nopic.test: Check SELinux policy and skip if + necessary. + 2010-06-09 Gary V. Vaughan + Set SCM version number to 2.2.11a. + * configure.ac, libltdl/configure.ac (AC_INIT): Bump version + number to 2.2.11a. + * NEWS: Updated. + + GNU Libtool 2.2.10 was released. + Prepare for next release. * configure.ac, libltdl/configure.ac (AC_INIT): Bump version number to 2.2.10. diff -ruNp libtool-2.2.10/Makefile.am libtool-2.4/Makefile.am --- libtool-2.2.10/Makefile.am 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/Makefile.am 2010-09-21 14:07:22.000000000 +0700 @@ -70,7 +70,6 @@ bin_SCRIPTS = libtoolize libtool libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status rm -f libtoolize.tmp libtoolize $(timestamp); \ - input="libtoolize.m4sh"; \ $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \ -e 's,@aclocal_DATA\@,$(aclocalfiles),g' \ -e "s,@pkgltdl_files\@,$(ltdldatafiles),g" \ @@ -126,8 +125,9 @@ edit = sed \ -e 's,@MACRO_VERSION\@,$(VERSION),g' \ -e 's,@PACKAGE\@,$(PACKAGE),g' \ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \ - -e 's,@PACKAGE_NAME\@,$(PACKAGE),g' \ - -e 's,@PACKAGE_STRING\@,$(PACKAGE) $(VERSION),g' \ + -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \ + -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ + -e 's,@PACKAGE_STRING\@,$(PACKAGE_NAME) $(VERSION),g' \ -e 's,@PACKAGE_TARNAME\@,$(PACKAGE),g' \ -e 's,@PACKAGE_VERSION\@,$(VERSION),g' \ -e 's,@SED\@,$(SED),g' \ @@ -136,8 +136,7 @@ edit = sed \ -e 's,@datadir\@,$(datadir),g' \ -e 's,@pkgdatadir\@,$(pkgdatadir),g' \ -e 's,@host_triplet\@,$(host_triplet),g' \ - -e 's,@prefix\@,$(prefix),g' \ - -e "s,@configure_input\@,Generated from $$input.,g" + -e 's,@prefix\@,$(prefix),g' sh_files = $(auxdir)/general.m4sh $(auxdir)/getopt.m4sh EXTRA_DIST += bootstrap $(srcdir)/libtoolize.in $(auxdir)/ltmain.m4sh \ @@ -175,7 +174,6 @@ $(srcdir)/$(m4dir)/ltversion.m4: $(m4dir cd $(srcdir); \ rm -f $(m4dir)/ltversion.tmp; \ serial=`echo "$$correctver" | sed 's,^1[.],,g'`; \ - input="ltversion.in"; \ echo $(edit) -e "s,@MACRO_REVISION\@,$$correctver,g" \ -e "s,@MACRO_SERIAL\@,$$serial,g" \ $(srcdir)/$(m4dir)/ltversion.in \> $(srcdir)/$(m4dir)/ltversion.m4; \ @@ -215,7 +213,6 @@ $(srcdir)/$(auxdir)/ltmain.sh: $(sh_file \> $(auxdir)/ltmain.in; \ $(M4SH) -B $(auxdir) $(auxdir)/ltmain.m4sh \ > $(auxdir)/ltmain.in; \ - input="ltmain.m4sh"; \ echo $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \ -e "s,@package_revision\@,$$correctver," \ $(srcdir)/$(auxdir)/ltmain.in "> $$target"; \ @@ -256,11 +253,13 @@ $(srcdir)/libltdl/Makefile.am: $(srcdir) ## Unfortunately, all this bogeyness means that we have to manually ## keep the generated files in libltdl up to date. -all-local: $(srcdir)/libltdl/aclocal.m4 \ +LTDL_BOOTSTRAP_DEPS = $(srcdir)/libltdl/aclocal.m4 \ $(srcdir)/libltdl/stamp-mk \ $(srcdir)/libltdl/configure \ $(srcdir)/libltdl/config-h.in +all-local: $(LTDL_BOOTSTRAP_DEPS) + EXTRA_DIST += $(srcdir)/libltdl/stamp-mk $(m4dir)/lt~obsolete.m4 $(srcdir)/libltdl/Makefile.in: $(srcdir)/libltdl/Makefile.am \ @@ -304,15 +303,6 @@ $(srcdir)/libltdl/config-h.in: $(sub_con include libltdl/Makefile.inc -if ! LTDL_SUBDIR_LIBOBJS -## workaround for Autoconf 2.59, Automake 1.9.6: -## we include these files twice, because of missing LIBOBJDIR support. -EXTRA_DIST += \ - argz.c libltdl/argz.c \ - lt__dirent.c libltdl/lt__dirent.c \ - lt__strl.c libltdl/lt__strl.c -endif - ## -------------- ## ## Documentation. ## @@ -416,6 +406,10 @@ install-data-local: libltdl/Makefile.in ## Distribution. ## ## ------------- ## +edit_readme_alpha = $(auxdir)/edit-readme-alpha + +EXTRA_DIST += $(edit_readme_alpha) + uninstall-hook: @$(NORMAL_UNINSTALL) @list='$(ltdldatafiles) $(auxfiles)'; for f in $$list; do \ @@ -429,11 +423,10 @@ uninstall-hook: done dist-hook: -## Ship README.alpha only in alpha release, but renamed to README - @if test -f $(srcdir)/README.alpha; then \ +## Edit the README file for alpha releases. case $(VERSION) in \ - *[a-z]) cp -p $(srcdir)/README.alpha $(distdir)/README ;; \ - esac; else :; fi + *[a-z]) $(SHELL) $(srcdir)/$(edit_readme_alpha) $(distdir)/README ;; \ + esac ## Ensure aclocal has not wrongly picked up old macro definitions. for macro in LT_INIT AC_PROG_LIBTOOL AM_PROG_LIBTOOL; do \ if grep $$macro $(srcdir)/aclocal.m4 $(srcdir)/libltdl/aclocal.m4; then \ @@ -450,6 +443,7 @@ dist-hook: # The testsuite files are evaluated in the order given here. TESTSUITE = tests/testsuite TESTSUITE_AT = tests/testsuite.at \ + tests/getopt-m4sh.at \ tests/libtoolize.at \ tests/help.at \ tests/duplicate_members.at \ @@ -468,12 +462,14 @@ TESTSUITE_AT = tests/testsuite.at \ tests/search-path.at \ tests/indirect_deps.at \ tests/archive-in-archive.at \ + tests/exeext.at \ tests/execute-mode.at \ tests/bindir.at \ tests/cwrapper.at \ tests/deplib-in-subdir.at \ tests/infer-tag.at \ tests/localization.at \ + tests/nocase.at \ tests/install.at \ tests/versioning.at \ tests/destdir.at \ @@ -484,6 +480,7 @@ TESTSUITE_AT = tests/testsuite.at \ tests/lt_dlopen.at \ tests/lt_dlopen_a.at \ tests/lt_dlopenext.at \ + tests/ltdl-libdir.at \ tests/ltdl-api.at \ tests/dlloader-api.at \ tests/loadlibrary.at \ @@ -504,8 +501,10 @@ TESTSUITE_AT = tests/testsuite.at \ tests/configure-iface.at \ tests/stresstest.at \ tests/cmdline_wrap.at \ + tests/pic_flag.at \ tests/darwin.at \ - tests/deplibs-mingw.at + tests/deplibs-mingw.at \ + tests/sysroot.at EXTRA_DIST += $(srcdir)/$(TESTSUITE) $(TESTSUITE_AT) $(srcdir)/tests/package.m4 @@ -513,13 +512,17 @@ EXTRA_DIST += $(srcdir)/$(TESTSUITE) TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \ CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \ LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \ - STRIP="$(STRIP)" lt_INSTALL="$(INSTALL)" \ + AR="$(AR)" \ + M4SH="$(M4SH)" SED="$(SED)" STRIP="$(STRIP)" lt_INSTALL="$(INSTALL)" \ + MANIFEST_TOOL="$(MANIFEST_TOOL)" \ OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \ SHELL="$(SHELL)" CONFIG_SHELL="$(SHELL)" \ CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CXXCPP="$(CXXCPP)" \ F77="$(F77)" FFLAGS="$(FFLAGS)" \ FC="$(FC)" FCFLAGS="$(FCFLAGS)" \ - GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)" + GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)" \ + lt_cv_to_host_file_cmd="$(to_host_file_cmd)" \ + lt_cv_to_tool_file_cmd="$(to_tool_file_cmd)" BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \ LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \ @@ -540,7 +543,7 @@ $(srcdir)/$(TESTSUITE): $(srcdir)/tests/ $(AUTOTEST) `echo $(TESTSUITE_AT) | sed 's,tests/,,g'` -o testsuite.tmp && \ mv -f testsuite.tmp testsuite -$(srcdir)/tests/package.m4: $(srcdir)/configure.ac +$(srcdir)/tests/package.m4: $(srcdir)/configure.ac Makefile.am { \ echo '# Signature of the current package.'; \ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ @@ -548,6 +551,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/co echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ + echo 'm4_define([AT_PACKAGE_URL], [@PACKAGE_URL@])'; \ } | $(edit) > $(srcdir)/tests/package.m4 tests/atconfig: $(top_builddir)/config.status @@ -558,7 +562,8 @@ DISTCLEANFILES += tests/atconfig CD_TESTDIR = abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; cd tests testsuite_deps = tests/atconfig $(srcdir)/$(TESTSUITE) -testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la $(bin_SCRIPTS) +testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la \ + $(bin_SCRIPTS) $(LTDL_BOOTSTRAP_DEPS) # Hook the test suite into the check rule check-local: $(testsuite_deps_uninstalled) @@ -573,8 +578,13 @@ installcheck-local: $(testsuite_deps) $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) \ AUTOTEST_PATH="$(exec_prefix)/bin" +check-noninteractive-old: + $(MAKE) $(AM_MAKEFLAGS) check-TESTS TESTS='$(NONINTERACTIVE_TESTS)' +check-interactive-old: + $(MAKE) $(AM_MAKEFLAGS) check-TESTS TESTS='$(INTERACTIVE_TESTS)' + # Run only noninteractive parts of the new testsuite. -check-noninteractive: $(testsuite_deps_uninstalled) +check-noninteractive-new: $(testsuite_deps_uninstalled) $(CD_TESTDIR); \ CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \ $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \ @@ -582,13 +592,16 @@ check-noninteractive: $(testsuite_deps_u $(TESTSUITEFLAGS) # Run only interactive parts of the new testsuite. -check-interactive: $(testsuite_deps_uninstalled) +check-interactive-new: $(testsuite_deps_uninstalled) $(CD_TESTDIR); \ CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \ $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \ -k interactive -k recursive INNER_TESTSUITEFLAGS=",interactive" \ $(TESTSUITEFLAGS) +check-interactive: check-interactive-old check-interactive-new +check-noninteractive: check-noninteractive-old check-noninteractive-new + # We need to remove any file droppings left behind by testsuite clean-local: clean-local-legacy -$(CD_TESTDIR); \ @@ -606,83 +619,277 @@ clean-local: clean-local-legacy # complete this section should be removed. CXX_TESTS = \ - tests/tagdemo-static.test tests/tagdemo-make.test \ - tests/tagdemo-exec.test tests/tagdemo-conf.test \ - tests/tagdemo-make.test tests/tagdemo-exec.test \ - tests/tagdemo-shared.test tests/tagdemo-make.test \ - tests/tagdemo-exec.test tests/tagdemo-undef.test \ - tests/tagdemo-make.test tests/tagdemo-exec.test + tests/tagdemo-static.test \ + tests/tagdemo-static-make.test \ + tests/tagdemo-static-exec.test \ + tests/tagdemo-conf.test \ + tests/tagdemo-make.test \ + tests/tagdemo-exec.test \ + tests/tagdemo-shared.test \ + tests/tagdemo-shared-make.test \ + tests/tagdemo-shared-exec.test \ + tests/tagdemo-undef.test \ + tests/tagdemo-undef-make.test \ + tests/tagdemo-undef-exec.test + +tests/tagdemo-undef-exec.log: tests/tagdemo-undef-make.log +tests/tagdemo-undef-make.log: tests/tagdemo-undef.log +tests/tagdemo-undef.log: tests/tagdemo-shared-exec.log +tests/tagdemo-shared-exec.log: tests/tagdemo-shared-make.log +tests/tagdemo-shared-make.log: tests/tagdemo-shared.log +tests/tagdemo-shared.log: tests/tagdemo-exec.log +tests/tagdemo-exec.log: tests/tagdemo-make.log +tests/tagdemo-make.log: tests/tagdemo-conf.log +tests/tagdemo-conf.log: tests/tagdemo-static-exec.log +tests/tagdemo-static-exec.log: tests/tagdemo-static-make.log +tests/tagdemo-static-make.log: tests/tagdemo-static.log F77_TESTS = \ - tests/f77demo-static.test tests/f77demo-make.test \ - tests/f77demo-exec.test tests/f77demo-conf.test \ - tests/f77demo-make.test tests/f77demo-exec.test \ - tests/f77demo-shared.test tests/f77demo-make.test \ - tests/f77demo-exec.test + tests/f77demo-static.test \ + tests/f77demo-static-make.test \ + tests/f77demo-static-exec.test \ + tests/f77demo-conf.test \ + tests/f77demo-make.test \ + tests/f77demo-exec.test \ + tests/f77demo-shared.test \ + tests/f77demo-shared-make.test \ + tests/f77demo-shared-exec.test + +tests/f77demo-shared-exec.log: tests/f77demo-shared-make.log +tests/f77demo-shared-make.log: tests/f77demo-shared.log +tests/f77demo-shared.log: tests/f77demo-exec.log +tests/f77demo-exec.log: tests/f77demo-make.log +tests/f77demo-make.log: tests/f77demo-conf.log +tests/f77demo-conf.log: tests/f77demo-static-exec.log +tests/f77demo-static-exec.log: tests/f77demo-static-make.log +tests/f77demo-static-make.log: tests/f77demo-static.log FC_TESTS = \ - tests/fcdemo-static.test tests/fcdemo-make.test \ - tests/fcdemo-exec.test tests/fcdemo-conf.test \ - tests/fcdemo-make.test tests/fcdemo-exec.test \ - tests/fcdemo-shared.test tests/fcdemo-make.test \ - tests/fcdemo-exec.test + tests/fcdemo-static.test \ + tests/fcdemo-static-make.test \ + tests/fcdemo-static-exec.test \ + tests/fcdemo-conf.test \ + tests/fcdemo-make.test \ + tests/fcdemo-exec.test \ + tests/fcdemo-shared.test \ + tests/fcdemo-shared-make.test \ + tests/fcdemo-shared-exec.test + +tests/fcdemo-shared-exec.log: tests/fcdemo-shared-make.log +tests/fcdemo-shared-make.log: tests/fcdemo-shared.log +tests/fcdemo-shared.log: tests/fcdemo-exec.log +tests/fcdemo-exec.log: tests/fcdemo-make.log +tests/fcdemo-make.log: tests/fcdemo-conf.log +tests/fcdemo-conf.log: tests/fcdemo-static-exec.log +tests/fcdemo-static-exec.log: tests/fcdemo-static-make.log +tests/fcdemo-static-make.log: tests/fcdemo-static.log COMMON_TESTS = \ - tests/link.test tests/link-2.test tests/nomode.test \ - tests/objectlist.test tests/quote.test tests/sh.test \ - tests/suffix.test tests/tagtrace.test \ - tests/cdemo-static.test tests/cdemo-make.test tests/cdemo-exec.test \ - tests/demo-static.test tests/demo-make.test tests/demo-exec.test \ - tests/demo-inst.test tests/demo-unst.test \ - tests/depdemo-static.test tests/depdemo-make.test \ - tests/depdemo-exec.test tests/depdemo-inst.test \ - tests/depdemo-unst.test \ - tests/mdemo-static.test tests/mdemo-make.test tests/mdemo-exec.test \ - tests/mdemo-inst.test tests/mdemo-unst.test \ - tests/cdemo-conf.test tests/cdemo-make.test tests/cdemo-exec.test \ - tests/demo-conf.test tests/demo-make.test tests/demo-exec.test \ - tests/demo-inst.test tests/demo-unst.test tests/demo-deplibs.test \ - tests/depdemo-conf.test tests/depdemo-make.test \ - tests/depdemo-exec.test tests/depdemo-inst.test \ + tests/link.test \ + tests/link-2.test \ + tests/nomode.test \ + tests/objectlist.test \ + tests/quote.test \ + tests/sh.test \ + tests/suffix.test \ + tests/tagtrace.test \ + tests/cdemo-static.test \ + tests/cdemo-static-make.test \ + tests/cdemo-static-exec.test \ + tests/demo-static.test \ + tests/demo-static-make.test \ + tests/demo-static-exec.test \ + tests/demo-static-inst.test \ + tests/demo-static-unst.test \ + tests/depdemo-static.test \ + tests/depdemo-static-make.test \ + tests/depdemo-static-exec.test \ + tests/depdemo-static-inst.test \ + tests/depdemo-static-unst.test \ + tests/mdemo-static.test \ + tests/mdemo-static-make.test \ + tests/mdemo-static-exec.test \ + tests/mdemo-static-inst.test \ + tests/mdemo-static-unst.test \ + tests/cdemo-conf.test \ + tests/cdemo-make.test \ + tests/cdemo-exec.test \ + tests/demo-conf.test \ + tests/demo-make.test \ + tests/demo-exec.test \ + tests/demo-inst.test \ + tests/demo-unst.test \ + tests/demo-deplibs.test \ + tests/depdemo-conf.test \ + tests/depdemo-make.test \ + tests/depdemo-exec.test \ + tests/depdemo-inst.test \ tests/depdemo-unst.test \ - tests/mdemo-conf.test tests/mdemo-make.test tests/mdemo-exec.test \ - tests/mdemo-inst.test tests/mdemo-unst.test tests/mdemo-dryrun.test \ - tests/mdemo2-conf.test tests/mdemo2-make.test tests/mdemo2-exec.test \ - tests/pdemo-conf.test tests/pdemo-make.test tests/pdemo-exec.test \ + tests/mdemo-conf.test \ + tests/mdemo-make.test \ + tests/mdemo-exec.test \ + tests/mdemo-inst.test \ + tests/mdemo-unst.test \ + tests/mdemo-dryrun.test \ + tests/mdemo2-conf.test \ + tests/mdemo2-make.test \ + tests/mdemo2-exec.test \ + tests/pdemo-conf.test \ + tests/pdemo-make.test \ + tests/pdemo-exec.test \ tests/pdemo-inst.test \ - tests/demo-nofast.test tests/demo-make.test tests/demo-exec.test \ - tests/demo-inst.test tests/demo-unst.test \ - tests/depdemo-nofast.test tests/depdemo-make.test \ - tests/depdemo-exec.test tests/depdemo-inst.test \ - tests/depdemo-unst.test \ - tests/demo-pic.test tests/demo-make.test tests/demo-exec.test \ - tests/demo-nopic.test tests/demo-make.test tests/demo-exec.test \ - tests/cdemo-shared.test tests/cdemo-make.test tests/cdemo-exec.test \ - tests/demo-shared.test tests/demo-make.test tests/demo-exec.test \ - tests/demo-inst.test tests/demo-hardcode.test tests/demo-relink.test \ - tests/demo-noinst-link.test tests/demo-unst.test \ - tests/depdemo-shared.test tests/depdemo-make.test \ - tests/depdemo-exec.test tests/depdemo-inst.test \ - tests/depdemo-relink.test tests/depdemo-unst.test \ - tests/mdemo-shared.test tests/mdemo-make.test tests/mdemo-exec.test \ - tests/mdemo-inst.test tests/mdemo-unst.test \ - tests/cdemo-undef.test tests/cdemo-make.test tests/cdemo-exec.test + tests/demo-nofast.test \ + tests/demo-nofast-make.test \ + tests/demo-nofast-exec.test \ + tests/demo-nofast-inst.test \ + tests/demo-nofast-unst.test \ + tests/depdemo-nofast.test \ + tests/depdemo-nofast-make.test \ + tests/depdemo-nofast-exec.test \ + tests/depdemo-nofast-inst.test \ + tests/depdemo-nofast-unst.test \ + tests/demo-pic.test \ + tests/demo-pic-make.test \ + tests/demo-pic-exec.test \ + tests/demo-nopic.test \ + tests/demo-nopic-make.test \ + tests/demo-nopic-exec.test \ + tests/cdemo-shared.test \ + tests/cdemo-shared-make.test \ + tests/cdemo-shared-exec.test \ + tests/mdemo-shared.test \ + tests/mdemo-shared-make.test \ + tests/mdemo-shared-exec.test \ + tests/mdemo-shared-inst.test \ + tests/mdemo-shared-unst.test \ + tests/cdemo-undef.test \ + tests/cdemo-undef-make.test \ + tests/cdemo-undef-exec.test + +# Actually, only demo-relink and depdemo-relink require interaction, +# but they depend on the other tests being run beforehand. +INTERACTIVE_TESTS = \ + tests/demo-shared.test \ + tests/demo-shared-make.test \ + tests/demo-shared-exec.test \ + tests/demo-shared-inst.test \ + tests/demo-hardcode.test \ + tests/demo-relink.test \ + tests/demo-noinst-link.test \ + tests/demo-shared-unst.test \ + tests/depdemo-shared.test \ + tests/depdemo-shared-make.test \ + tests/depdemo-shared-exec.test \ + tests/depdemo-shared-inst.test \ + tests/depdemo-relink.test \ + tests/depdemo-shared-unst.test + +tests/cdemo-undef-exec.log: tests/cdemo-undef-make.log +tests/cdemo-undef-make.log: tests/cdemo-undef.log +tests/cdemo-undef.log: @ORDER@ tests/cdemo-shared-exec.log +tests/cdemo-shared-exec.log: tests/cdemo-shared-make.log +tests/cdemo-shared-make.log: tests/cdemo-shared.log +tests/cdemo-shared.log: @ORDER@ tests/cdemo-exec.log +tests/cdemo-exec.log: tests/cdemo-make.log +tests/cdemo-make.log: tests/cdemo-conf.log +tests/cdemo-conf.log: @ORDER@ tests/cdemo-static-exec.log +tests/cdemo-static-exec.log: tests/cdemo-static-make.log +tests/cdemo-static-make.log: tests/cdemo-static.log + +tests/demo-shared-unst.log: tests/demo-noinst-link.log +tests/demo-noinst-link.log: tests/demo-relink.log +tests/demo-relink.log: tests/demo-hardcode.log +tests/demo-hardcode.log: tests/demo-shared-inst.log +tests/demo-shared-inst.log: tests/demo-shared-exec.log +tests/demo-shared-exec.log: tests/demo-shared-make.log +tests/demo-shared-make.log: tests/demo-shared.log +tests/demo-shared.log: @ORDER@ tests/demo-nopic-exec.log +tests/demo-nopic-exec.log: tests/demo-nopic-make.log +tests/demo-nopic-make.log: tests/demo-nopic.log +tests/demo-nopic.log: @ORDER@ tests/demo-pic-exec.log +tests/demo-pic-exec.log: tests/demo-pic-make.log +tests/demo-pic-make.log: tests/demo-pic.log +tests/demo-pic.log: @ORDER@ tests/demo-nofast-unst.log +tests/demo-nofast-unst.log: tests/demo-nofast-inst.log +tests/demo-nofast-inst.log: tests/demo-nofast-exec.log +tests/demo-nofast-exec.log: tests/demo-nofast-make.log +tests/demo-nofast-make.log: tests/demo-nofast.log +tests/demo-nofast.log: @ORDER@ tests/demo-deplibs.log +tests/demo-deplibs.log: tests/demo-unst.log +tests/demo-unst.log: tests/demo-inst.log +tests/demo-inst.log: tests/demo-exec.log +tests/demo-exec.log: tests/demo-make.log +tests/demo-make.log: tests/demo-conf.log +tests/demo-conf.log: @ORDER@ tests/demo-static-unst.log +tests/demo-static-unst.log: tests/demo-static-inst.log +tests/demo-static-inst.log: tests/demo-static-exec.log +tests/demo-static-exec.log: tests/demo-static-make.log +tests/demo-static-make.log: tests/demo-static.log + +tests/depdemo-shared-unst.log: tests/depdemo-relink.log +tests/depdemo-relink.log: tests/depdemo-shared-inst.log +tests/depdemo-shared-inst.log: tests/depdemo-shared-exec.log +tests/depdemo-shared-exec.log: tests/depdemo-shared-make.log +tests/depdemo-shared-make.log: tests/depdemo-shared.log +tests/depdemo-shared.log: @ORDER@ tests/depdemo-nofast-unst.log +tests/depdemo-nofast-unst.log: tests/depdemo-nofast-inst.log +tests/depdemo-nofast-inst.log: tests/depdemo-nofast-exec.log +tests/depdemo-nofast-exec.log: tests/depdemo-nofast-make.log +tests/depdemo-nofast-make.log: tests/depdemo-nofast.log +tests/depdemo-nofast.log: @ORDER@ tests/depdemo-unst.log +tests/depdemo-unst.log: tests/depdemo-inst.log +tests/depdemo-inst.log: tests/depdemo-exec.log +tests/depdemo-exec.log: tests/depdemo-make.log +tests/depdemo-make.log: tests/depdemo-conf.log +tests/depdemo-conf.log: @ORDER@ tests/depdemo-static-unst.log +tests/depdemo-static-unst.log: tests/depdemo-static-inst.log +tests/depdemo-static-inst.log: tests/depdemo-static-exec.log +tests/depdemo-static-exec.log: tests/depdemo-static-make.log +tests/depdemo-static-make.log: tests/depdemo-static.log + +tests/mdemo-shared-unst.log: tests/mdemo-shared-inst.log +tests/mdemo-shared-inst.log: tests/mdemo-shared-exec.log +tests/mdemo-shared-exec.log: tests/mdemo-shared-make.log +tests/mdemo-shared-make.log: tests/mdemo-shared.log +tests/mdemo-shared.log: @ORDER@ tests/mdemo-dryrun.log \ + tests/mdemo2-exec.log + +tests/mdemo-dryrun.log: tests/mdemo-unst.log +tests/mdemo-unst.log: tests/mdemo-inst.log +tests/mdemo-inst.log: tests/mdemo-exec.log +tests/mdemo-exec.log: tests/mdemo-make.log +tests/mdemo-make.log: tests/mdemo-conf.log +tests/mdemo-conf.log: @ORDER@ tests/mdemo-static-unst.log +tests/mdemo-static-unst.log: tests/mdemo-static-inst.log +tests/mdemo-static-inst.log: tests/mdemo-static-exec.log +tests/mdemo-static-exec.log: tests/mdemo-static-make.log +tests/mdemo-static-make.log: tests/mdemo-static.log + +tests/mdemo2-exec.log: tests/mdemo2-make.log +tests/mdemo2-make.log: tests/mdemo2-conf.log \ + tests/mdemo-dryrun.log + +tests/pdemo-inst.log: tests/pdemo-exec.log +tests/pdemo-exec.log: tests/pdemo-make.log +tests/pdemo-make.log: tests/pdemo-conf.log + -TESTS = $(COMMON_TESTS) +NONINTERACTIVE_TESTS = $(COMMON_TESTS) if HAVE_CXX -TESTS += $(CXX_TESTS) +NONINTERACTIVE_TESTS += $(CXX_TESTS) endif if HAVE_F77 -TESTS += $(F77_TESTS) +# f77demo-static-exec.test might be interactive on MSYS. +INTERACTIVE_TESTS += $(F77_TESTS) endif if HAVE_FC -TESTS += $(FC_TESTS) +NONINTERACTIVE_TESTS += $(FC_TESTS) endif - -tests/demo-conf.test: libtool +TESTS = $(NONINTERACTIVE_TESTS) $(INTERACTIVE_TESTS) EXTRA_DIST += $(srcdir)/tests/defs.in tests/defs.m4sh \ - $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) $(FC_TESTS) + $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) $(FC_TESTS) \ + $(INTERACTIVE_TESTS) DIST_SUBDIRS += $(CONF_SUBDIRS) # The defs script shouldn't be recreated whenever the Makefile is @@ -690,7 +897,6 @@ DIST_SUBDIRS += $(CONF_SUBDIRS) check-recursive: tests/defs tests/defs: $(srcdir)/tests/defs.in rm -f tests/defs.tmp tests/defs; \ - input="defs.m4sh"; \ $(edit) $(srcdir)/tests/defs.in > tests/defs.tmp; \ mv -f tests/defs.tmp tests/defs @@ -703,12 +909,26 @@ $(srcdir)/tests/defs.in: $(auxdir)/gener # We need to remove any files that the above tests created. clean-local-legacy: - -cd tests; \ - for dir in cdemo demo depdemo f77demo fcdemo mdemo mdemo2 pdemo tagdemo; \ - do \ - test -f $$dir/Makefile && ( cd $$dir && $(MAKE) distclean; ); \ + -for dir in $(CONF_SUBDIRS); do \ + if test -f $$dir/Makefile; then \ + (cd $$dir && $(MAKE) $(AM_MAKEFLAGS) distclean); \ + else :; fi; \ + done + rm -rf _inst _inst-* + +# For distclean, we may have to fake Makefiles in the test directories +# so that descending in DIST_SUBDIRS works. +# Hide the additional dependency from automake so it still outputs the rule. +distclean_recursive = distclean-recursive +$(distclean_recursive): fake-distclean-legacy +.PHONY: fake-distclean-legacy +fake-distclean-legacy: + -for dir in $(CONF_SUBDIRS); do \ + if test ! -f $$dir/Makefile; then \ + $(mkinstalldirs) $$dir; \ + echo 'distclean: ; rm -f Makefile' > $$dir/Makefile; \ + else :; fi; \ done - rm -rf _inst $(TESTS): tests/defs DISTCLEANFILES += tests/defs diff -ruNp libtool-2.2.10/Makefile.in libtool-2.4/Makefile.in --- libtool-2.2.10/Makefile.in 2010-06-09 20:05:47.000000000 +0700 +++ libtool-2.4/Makefile.in 2010-09-22 21:44:18.000000000 +0700 @@ -55,18 +55,15 @@ DIST_COMMON = README $(am__configure_dep @INSTALL_LTDL_TRUE@am__append_1 = libltdl/ltdl.h @INSTALL_LTDL_TRUE@am__append_2 = libltdl/libltdl.la @CONVENIENCE_LTDL_TRUE@am__append_3 = libltdl/libltdlc.la -@LTDL_SUBDIR_LIBOBJS_FALSE@am__append_4 = \ -@LTDL_SUBDIR_LIBOBJS_FALSE@ argz.c libltdl/argz.c \ -@LTDL_SUBDIR_LIBOBJS_FALSE@ lt__dirent.c libltdl/lt__dirent.c \ -@LTDL_SUBDIR_LIBOBJS_FALSE@ lt__strl.c libltdl/lt__strl.c - -@HAVE_CXX_TRUE@am__append_5 = $(CXX_TESTS) -@HAVE_F77_TRUE@am__append_6 = $(F77_TESTS) -@HAVE_FC_TRUE@am__append_7 = $(FC_TESTS) +@HAVE_CXX_TRUE@am__append_4 = $(CXX_TESTS) +# f77demo-static-exec.test might be interactive on MSYS. +@HAVE_F77_TRUE@am__append_5 = $(F77_TESTS) +@HAVE_FC_TRUE@am__append_6 = $(FC_TESTS) subdir = . SUBDIRS = ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libltdl/m4/argz.m4 \ + $(top_srcdir)/libltdl/m4/autobuild.m4 \ $(top_srcdir)/libltdl/m4/libtool.m4 \ $(top_srcdir)/libltdl/m4/ltdl.m4 \ $(top_srcdir)/libltdl/m4/ltoptions.m4 \ @@ -227,11 +224,72 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-re distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck + check check-html recheck recheck-html distdir dist dist-all \ + distcheck ETAGS = etags CTAGS = ctags +# If stdout is a non-dumb tty, use colors. If test -t is not supported, +# then this fails; a conservative approach. Of course do not redirect +# stdout here, just stderr. am__tty_colors = \ -red=; grn=; lgn=; blu=; std= +red=; grn=; lgn=; blu=; std=; \ +test "X$(AM_COLOR_TESTS)" != Xno \ +&& test "X$$TERM" != Xdumb \ +&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \ +&& { \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + std=''; \ +} +# Restructured Text title and section. +am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//' +am__rst_section = sed 'p;s/./=/g;p;g' +# Put stdin (possibly several lines separated by ". ") in a box. +am__text_box = $(AWK) '{ \ + n = split($$0, lines, "\\. "); max = 0; \ + for (i = 1; i <= n; ++i) \ + if (max < length(lines[i])) \ + max = length(lines[i]); \ + for (i = 0; i < max; ++i) line = line "="; \ + print line; \ + for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\ + print line; \ +}' +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL). This contradicts POSIX. Work around the problem +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log, and passes +# TESTS_ENVIRONMENT. Save and restore TERM around use of +# TESTS_ENVIRONMENT, in case that unsets it. +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +srcdir=$(srcdir); export srcdir; \ +rm -f $@-t; \ +trap 'st=$$?; rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st' \ + 1 2 13 15; \ +am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \ +test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM; \ +$(TESTS_ENVIRONMENT) +RECHECK_LOGS = $(TEST_LOGS) +TEST_SUITE_LOG = test-suite.log +TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html) +TEST_EXTENSIONS = @EXEEXT@ .test +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -264,7 +322,7 @@ am__relativize = \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.lzma +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print @@ -336,11 +394,13 @@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ M4SH = @M4SH@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +ORDER = @ORDER@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ @@ -363,6 +423,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -413,6 +474,8 @@ srcdir = @srcdir@ sys_symbol_underscore = @sys_symbol_underscore@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +to_host_file_cmd = @to_host_file_cmd@ +to_tool_file_cmd = @to_tool_file_cmd@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @@ -438,11 +501,12 @@ EXTRA_DIST = libtoolize.m4sh bootstrap $ libltdl/lt__dirent.c libltdl/lt__strl.c libltdl/COPYING.LIB \ libltdl/configure.ac libltdl/Makefile.am libltdl/aclocal.m4 \ libltdl/Makefile.in libltdl/configure libltdl/config-h.in \ - libltdl/README libltdl/argz_.h libltdl/argz.c $(am__append_4) \ - $(srcdir)/doc/notes.txt $(srcdir)/$(TESTSUITE) $(TESTSUITE_AT) \ + libltdl/README libltdl/argz_.h libltdl/argz.c \ + $(srcdir)/doc/notes.txt $(edit_readme_alpha) \ + $(srcdir)/$(TESTSUITE) $(TESTSUITE_AT) \ $(srcdir)/tests/package.m4 $(srcdir)/tests/defs.in \ tests/defs.m4sh $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) \ - $(FC_TESTS) + $(FC_TESTS) $(INTERACTIVE_TESTS) BUILT_SOURCES = libtool libtoolize libltdl/$(ARGZ_H) CLEANFILES = libtool libtoolize libtoolize.tmp $(auxdir)/ltmain.tmp \ $(m4dir)/ltversion.tmp libltdl/libltdl.la libltdl/libltdlc.la \ @@ -484,8 +548,9 @@ edit = sed \ -e 's,@MACRO_VERSION\@,$(VERSION),g' \ -e 's,@PACKAGE\@,$(PACKAGE),g' \ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \ - -e 's,@PACKAGE_NAME\@,$(PACKAGE),g' \ - -e 's,@PACKAGE_STRING\@,$(PACKAGE) $(VERSION),g' \ + -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \ + -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ + -e 's,@PACKAGE_STRING\@,$(PACKAGE_NAME) $(VERSION),g' \ -e 's,@PACKAGE_TARNAME\@,$(PACKAGE),g' \ -e 's,@PACKAGE_VERSION\@,$(VERSION),g' \ -e 's,@SED\@,$(SED),g' \ @@ -494,10 +559,14 @@ edit = sed \ -e 's,@datadir\@,$(datadir),g' \ -e 's,@pkgdatadir\@,$(pkgdatadir),g' \ -e 's,@host_triplet\@,$(host_triplet),g' \ - -e 's,@prefix\@,$(prefix),g' \ - -e "s,@configure_input\@,Generated from $$input.,g" + -e 's,@prefix\@,$(prefix),g' sh_files = $(auxdir)/general.m4sh $(auxdir)/getopt.m4sh +LTDL_BOOTSTRAP_DEPS = $(srcdir)/libltdl/aclocal.m4 \ + $(srcdir)/libltdl/stamp-mk \ + $(srcdir)/libltdl/configure \ + $(srcdir)/libltdl/config-h.in + sub_aclocal_m4_deps = \ $(srcdir)/libltdl/configure.ac \ $(m4dir)/libtool.m4 \ @@ -509,7 +578,7 @@ sub_aclocal_m4_deps = \ $(m4dir)/lt~obsolete.m4 sub_configure_deps = $(sub_aclocal_m4_deps) $(srcdir)/libltdl/aclocal.m4 -LTDL_VERSION_INFO = -version-info 9:2:2 +LTDL_VERSION_INFO = -version-info 10:0:3 @INSTALL_LTDL_TRUE@ltdlincludedir = $(includedir)/libltdl @INSTALL_LTDL_TRUE@ltdlinclude_HEADERS = libltdl/libltdl/lt_system.h \ @INSTALL_LTDL_TRUE@ libltdl/libltdl/lt_error.h \ @@ -598,10 +667,12 @@ ltdldatafiles = libltdl/COPYING.LIB \ libltdl/lt__strl.c \ $(libltdl_libltdl_la_SOURCES) +edit_readme_alpha = $(auxdir)/edit-readme-alpha # The testsuite files are evaluated in the order given here. TESTSUITE = tests/testsuite TESTSUITE_AT = tests/testsuite.at \ + tests/getopt-m4sh.at \ tests/libtoolize.at \ tests/help.at \ tests/duplicate_members.at \ @@ -620,12 +691,14 @@ TESTSUITE_AT = tests/testsuite.at \ tests/search-path.at \ tests/indirect_deps.at \ tests/archive-in-archive.at \ + tests/exeext.at \ tests/execute-mode.at \ tests/bindir.at \ tests/cwrapper.at \ tests/deplib-in-subdir.at \ tests/infer-tag.at \ tests/localization.at \ + tests/nocase.at \ tests/install.at \ tests/versioning.at \ tests/destdir.at \ @@ -636,6 +709,7 @@ TESTSUITE_AT = tests/testsuite.at \ tests/lt_dlopen.at \ tests/lt_dlopen_a.at \ tests/lt_dlopenext.at \ + tests/ltdl-libdir.at \ tests/ltdl-api.at \ tests/dlloader-api.at \ tests/loadlibrary.at \ @@ -656,21 +730,27 @@ TESTSUITE_AT = tests/testsuite.at \ tests/configure-iface.at \ tests/stresstest.at \ tests/cmdline_wrap.at \ + tests/pic_flag.at \ tests/darwin.at \ - tests/deplibs-mingw.at + tests/deplibs-mingw.at \ + tests/sysroot.at # Be sure to reexport important environment variables: TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \ CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \ LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \ - STRIP="$(STRIP)" lt_INSTALL="$(INSTALL)" \ + AR="$(AR)" \ + M4SH="$(M4SH)" SED="$(SED)" STRIP="$(STRIP)" lt_INSTALL="$(INSTALL)" \ + MANIFEST_TOOL="$(MANIFEST_TOOL)" \ OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \ SHELL="$(SHELL)" CONFIG_SHELL="$(SHELL)" \ CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CXXCPP="$(CXXCPP)" \ F77="$(F77)" FFLAGS="$(FFLAGS)" \ FC="$(FC)" FCFLAGS="$(FCFLAGS)" \ - GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)" + GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)" \ + lt_cv_to_host_file_cmd="$(to_host_file_cmd)" \ + lt_cv_to_tool_file_cmd="$(to_tool_file_cmd)" BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \ LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \ @@ -686,82 +766,155 @@ INSTALLCHECK_ENVIRONMENT = \ CD_TESTDIR = abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; cd tests testsuite_deps = tests/atconfig $(srcdir)/$(TESTSUITE) -testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la $(bin_SCRIPTS) +testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la \ + $(bin_SCRIPTS) $(LTDL_BOOTSTRAP_DEPS) + # !WARNING! Don't add any new tests here, we are migrating to an # Autotest driven framework, please add new test cases # using the new framework above. When the migration is # complete this section should be removed. CXX_TESTS = \ - tests/tagdemo-static.test tests/tagdemo-make.test \ - tests/tagdemo-exec.test tests/tagdemo-conf.test \ - tests/tagdemo-make.test tests/tagdemo-exec.test \ - tests/tagdemo-shared.test tests/tagdemo-make.test \ - tests/tagdemo-exec.test tests/tagdemo-undef.test \ - tests/tagdemo-make.test tests/tagdemo-exec.test + tests/tagdemo-static.test \ + tests/tagdemo-static-make.test \ + tests/tagdemo-static-exec.test \ + tests/tagdemo-conf.test \ + tests/tagdemo-make.test \ + tests/tagdemo-exec.test \ + tests/tagdemo-shared.test \ + tests/tagdemo-shared-make.test \ + tests/tagdemo-shared-exec.test \ + tests/tagdemo-undef.test \ + tests/tagdemo-undef-make.test \ + tests/tagdemo-undef-exec.test F77_TESTS = \ - tests/f77demo-static.test tests/f77demo-make.test \ - tests/f77demo-exec.test tests/f77demo-conf.test \ - tests/f77demo-make.test tests/f77demo-exec.test \ - tests/f77demo-shared.test tests/f77demo-make.test \ - tests/f77demo-exec.test + tests/f77demo-static.test \ + tests/f77demo-static-make.test \ + tests/f77demo-static-exec.test \ + tests/f77demo-conf.test \ + tests/f77demo-make.test \ + tests/f77demo-exec.test \ + tests/f77demo-shared.test \ + tests/f77demo-shared-make.test \ + tests/f77demo-shared-exec.test FC_TESTS = \ - tests/fcdemo-static.test tests/fcdemo-make.test \ - tests/fcdemo-exec.test tests/fcdemo-conf.test \ - tests/fcdemo-make.test tests/fcdemo-exec.test \ - tests/fcdemo-shared.test tests/fcdemo-make.test \ - tests/fcdemo-exec.test + tests/fcdemo-static.test \ + tests/fcdemo-static-make.test \ + tests/fcdemo-static-exec.test \ + tests/fcdemo-conf.test \ + tests/fcdemo-make.test \ + tests/fcdemo-exec.test \ + tests/fcdemo-shared.test \ + tests/fcdemo-shared-make.test \ + tests/fcdemo-shared-exec.test COMMON_TESTS = \ - tests/link.test tests/link-2.test tests/nomode.test \ - tests/objectlist.test tests/quote.test tests/sh.test \ - tests/suffix.test tests/tagtrace.test \ - tests/cdemo-static.test tests/cdemo-make.test tests/cdemo-exec.test \ - tests/demo-static.test tests/demo-make.test tests/demo-exec.test \ - tests/demo-inst.test tests/demo-unst.test \ - tests/depdemo-static.test tests/depdemo-make.test \ - tests/depdemo-exec.test tests/depdemo-inst.test \ + tests/link.test \ + tests/link-2.test \ + tests/nomode.test \ + tests/objectlist.test \ + tests/quote.test \ + tests/sh.test \ + tests/suffix.test \ + tests/tagtrace.test \ + tests/cdemo-static.test \ + tests/cdemo-static-make.test \ + tests/cdemo-static-exec.test \ + tests/demo-static.test \ + tests/demo-static-make.test \ + tests/demo-static-exec.test \ + tests/demo-static-inst.test \ + tests/demo-static-unst.test \ + tests/depdemo-static.test \ + tests/depdemo-static-make.test \ + tests/depdemo-static-exec.test \ + tests/depdemo-static-inst.test \ + tests/depdemo-static-unst.test \ + tests/mdemo-static.test \ + tests/mdemo-static-make.test \ + tests/mdemo-static-exec.test \ + tests/mdemo-static-inst.test \ + tests/mdemo-static-unst.test \ + tests/cdemo-conf.test \ + tests/cdemo-make.test \ + tests/cdemo-exec.test \ + tests/demo-conf.test \ + tests/demo-make.test \ + tests/demo-exec.test \ + tests/demo-inst.test \ + tests/demo-unst.test \ + tests/demo-deplibs.test \ + tests/depdemo-conf.test \ + tests/depdemo-make.test \ + tests/depdemo-exec.test \ + tests/depdemo-inst.test \ tests/depdemo-unst.test \ - tests/mdemo-static.test tests/mdemo-make.test tests/mdemo-exec.test \ - tests/mdemo-inst.test tests/mdemo-unst.test \ - tests/cdemo-conf.test tests/cdemo-make.test tests/cdemo-exec.test \ - tests/demo-conf.test tests/demo-make.test tests/demo-exec.test \ - tests/demo-inst.test tests/demo-unst.test tests/demo-deplibs.test \ - tests/depdemo-conf.test tests/depdemo-make.test \ - tests/depdemo-exec.test tests/depdemo-inst.test \ - tests/depdemo-unst.test \ - tests/mdemo-conf.test tests/mdemo-make.test tests/mdemo-exec.test \ - tests/mdemo-inst.test tests/mdemo-unst.test tests/mdemo-dryrun.test \ - tests/mdemo2-conf.test tests/mdemo2-make.test tests/mdemo2-exec.test \ - tests/pdemo-conf.test tests/pdemo-make.test tests/pdemo-exec.test \ + tests/mdemo-conf.test \ + tests/mdemo-make.test \ + tests/mdemo-exec.test \ + tests/mdemo-inst.test \ + tests/mdemo-unst.test \ + tests/mdemo-dryrun.test \ + tests/mdemo2-conf.test \ + tests/mdemo2-make.test \ + tests/mdemo2-exec.test \ + tests/pdemo-conf.test \ + tests/pdemo-make.test \ + tests/pdemo-exec.test \ tests/pdemo-inst.test \ - tests/demo-nofast.test tests/demo-make.test tests/demo-exec.test \ - tests/demo-inst.test tests/demo-unst.test \ - tests/depdemo-nofast.test tests/depdemo-make.test \ - tests/depdemo-exec.test tests/depdemo-inst.test \ - tests/depdemo-unst.test \ - tests/demo-pic.test tests/demo-make.test tests/demo-exec.test \ - tests/demo-nopic.test tests/demo-make.test tests/demo-exec.test \ - tests/cdemo-shared.test tests/cdemo-make.test tests/cdemo-exec.test \ - tests/demo-shared.test tests/demo-make.test tests/demo-exec.test \ - tests/demo-inst.test tests/demo-hardcode.test tests/demo-relink.test \ - tests/demo-noinst-link.test tests/demo-unst.test \ - tests/depdemo-shared.test tests/depdemo-make.test \ - tests/depdemo-exec.test tests/depdemo-inst.test \ - tests/depdemo-relink.test tests/depdemo-unst.test \ - tests/mdemo-shared.test tests/mdemo-make.test tests/mdemo-exec.test \ - tests/mdemo-inst.test tests/mdemo-unst.test \ - tests/cdemo-undef.test tests/cdemo-make.test tests/cdemo-exec.test - -TESTS = $(COMMON_TESTS) $(am__append_5) $(am__append_6) \ - $(am__append_7) + tests/demo-nofast.test \ + tests/demo-nofast-make.test \ + tests/demo-nofast-exec.test \ + tests/demo-nofast-inst.test \ + tests/demo-nofast-unst.test \ + tests/depdemo-nofast.test \ + tests/depdemo-nofast-make.test \ + tests/depdemo-nofast-exec.test \ + tests/depdemo-nofast-inst.test \ + tests/depdemo-nofast-unst.test \ + tests/demo-pic.test \ + tests/demo-pic-make.test \ + tests/demo-pic-exec.test \ + tests/demo-nopic.test \ + tests/demo-nopic-make.test \ + tests/demo-nopic-exec.test \ + tests/cdemo-shared.test \ + tests/cdemo-shared-make.test \ + tests/cdemo-shared-exec.test \ + tests/mdemo-shared.test \ + tests/mdemo-shared-make.test \ + tests/mdemo-shared-exec.test \ + tests/mdemo-shared-inst.test \ + tests/mdemo-shared-unst.test \ + tests/cdemo-undef.test \ + tests/cdemo-undef-make.test \ + tests/cdemo-undef-exec.test + + +# Actually, only demo-relink and depdemo-relink require interaction, +# but they depend on the other tests being run beforehand. +INTERACTIVE_TESTS = tests/demo-shared.test tests/demo-shared-make.test \ + tests/demo-shared-exec.test tests/demo-shared-inst.test \ + tests/demo-hardcode.test tests/demo-relink.test \ + tests/demo-noinst-link.test tests/demo-shared-unst.test \ + tests/depdemo-shared.test tests/depdemo-shared-make.test \ + tests/depdemo-shared-exec.test tests/depdemo-shared-inst.test \ + tests/depdemo-relink.test tests/depdemo-shared-unst.test \ + $(am__append_5) +NONINTERACTIVE_TESTS = $(COMMON_TESTS) $(am__append_4) $(am__append_6) +TESTS = $(NONINTERACTIVE_TESTS) $(INTERACTIVE_TESTS) + +# For distclean, we may have to fake Makefiles in the test directories +# so that descending in DIST_SUBDIRS works. +# Hide the additional dependency from automake so it still outputs the rule. +distclean_recursive = distclean-recursive all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -.SUFFIXES: .c .dvi .lo .o .obj .ps +.SUFFIXES: .c .dvi .html .lo .log .o .obj .ps .test .test$(EXEEXT) am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/libltdl/Makefile.inc $(am__configure_deps) @@ -1512,97 +1665,162 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi +# To be appended to the command running the test. Handle the stdout +# and stderr redirection, and catch the exit status. +am__check_post = \ +>$@-t 2>&1; \ +estatus=$$?; \ +if test -n '$(DISABLE_HARD_ERRORS)' \ + && test $$estatus -eq 99; then \ + estatus=1; \ +fi; \ +TERM=$$__SAVED_TERM; export TERM; \ +$(am__tty_colors); \ +xfailed=PASS; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + xfailed=XFAIL;; \ +esac; \ +case $$estatus:$$xfailed in \ + 0:XFAIL) col=$$red; res=XPASS;; \ + 0:*) col=$$grn; res=PASS ;; \ + 77:*) col=$$blu; res=SKIP ;; \ + 99:*) col=$$red; res=FAIL ;; \ + *:XFAIL) col=$$lgn; res=XFAIL;; \ + *:*) col=$$red; res=FAIL ;; \ +esac; \ +echo "$${col}$$res$${std}: $$f"; \ +echo "$$res: $$f (exit: $$estatus)" | \ + $(am__rst_section) >$@; \ +cat $@-t >>$@; \ +rm -f $@-t + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__sh_e_setup); \ + list='$(TEST_LOGS)'; \ + results=`for f in $$list; do \ + read line < $$f && echo "$$line" || echo FAIL; \ + done`; \ + all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[ ]*//'`; \ + fail=`echo "$$results" | grep -c '^FAIL'`; \ + pass=`echo "$$results" | grep -c '^PASS'`; \ + skip=`echo "$$results" | grep -c '^SKIP'`; \ + xfail=`echo "$$results" | grep -c '^XFAIL'`; \ + xpass=`echo "$$results" | grep -c '^XPASS'`; \ + failures=`expr $$fail + $$xpass`; \ + all=`expr $$all - $$skip`; \ + if test "$$all" -eq 1; then tests=test; All=; \ + else tests=tests; All="All "; fi; \ + case fail=$$fail:xpass=$$xpass:xfail=$$xfail in \ + fail=0:xpass=0:xfail=0) \ + msg="$$All$$all $$tests passed. "; \ + exit=true;; \ + fail=0:xpass=0:xfail=*) \ + msg="$$All$$all $$tests behaved as expected"; \ + if test "$$xfail" -eq 1; then xfailures=failure; \ + else xfailures=failures; fi; \ + msg="$$msg ($$xfail expected $$xfailures). "; \ + exit=true;; \ + fail=*:xpass=0:xfail=*) \ + msg="$$fail of $$all $$tests failed. "; \ + exit=false;; \ + fail=*:xpass=*:xfail=*) \ + msg="$$failures of $$all $$tests did not behave as expected"; \ + if test "$$xpass" -eq 1; then xpasses=pass; \ + else xpasses=passes; fi; \ + msg="$$msg ($$xpass unexpected $$xpasses). "; \ + exit=false;; \ + *) \ + echo >&2 "incorrect case"; exit 4;; \ + esac; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + msg="$$msg($$skip test was not run). "; \ + else \ + msg="$$msg($$skip tests were not run). "; \ + fi; \ + fi; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + echo "$$msg"; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for f in $$list; do \ + read line < $$f; \ + case $$line in \ + PASS:*|XFAIL:*);; \ + *) echo; cat $$f;; \ + esac; \ + done; \ + } >$(TEST_SUITE_LOG).tmp; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if test "$$failures" -ne 0; then \ + msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG). "; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + msg="$${msg}Please report to $(PACKAGE_BUGREPORT). "; \ + fi; \ + fi; \ + test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \ + $(am__tty_colors); \ + if $$exit; then \ + echo $(ECHO_N) "$$grn$(ECHO_C)"; \ + else \ + echo $(ECHO_N) "$$red$(ECHO_C)"; \ + fi; \ + echo "$$msg" | $(am__text_box); \ + echo $(ECHO_N) "$$std$(ECHO_C)"; \ + $$exit + +# Run all the tests. +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @list='$(TEST_LOGS)'; \ + list=`for f in $$list; do \ + test .log = $$f || echo $$f; \ + done | tr '\012\015' ' '`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list" + +.log.html: + @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py'; \ + for r2h in $$list; do \ + if ($$r2h --version) >/dev/null 2>&1; then \ + R2H=$$r2h; \ + fi; \ + done; \ + if test -z "$$R2H"; then \ + echo >&2 "cannot find rst2html, cannot create $@"; \ + exit 2; \ + fi; \ + $$R2H $< >$@.tmp + @mv $@.tmp $@ + +# Be sure to run check first, and then to convert the result. +# Beware of concurrent executions. Run "check" not "check-TESTS", as +# check-SCRIPTS and other dependencies are rebuilt by the former only. +# And expect check to fail. +check-html: + @if $(MAKE) $(AM_MAKEFLAGS) check; then \ + rv=0; else rv=$$?; \ + fi; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4; \ + exit $$rv +recheck recheck-html: + @target=`echo $@ | sed 's,^re,,'`; \ + list='$(TEST_LOGS)'; \ + list=`for f in $$list; do \ + test -f $$f || continue; \ + if read line < $$f; then \ + case $$line in FAIL*|XPASS*) echo $$f;; esac; \ + else echo $$f; fi; \ + done | tr '\012\015' ' '`; \ + $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"' +.test.log: + @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post) distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ @@ -1694,10 +1912,10 @@ dist-gzip: distdir dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) + dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) - dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) @@ -1717,7 +1935,7 @@ dist-zip: distdir dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then @@ -1825,6 +2043,10 @@ mostlyclean-generic: -test -z "$(LIBOBJS)" || rm -f $(LIBOBJS) -test -z "$(LTLIBOBJS)" || rm -f $(LTLIBOBJS) -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP) + -test -z "$(TEST_SUITE_HTML)" || rm -f $(TEST_SUITE_HTML) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) @@ -2004,12 +2226,12 @@ uninstall-am: uninstall-binSCRIPTS unins uninstall-man: uninstall-man1 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ - check-am ctags-recursive install install-am install-strip \ - tags-recursive uninstall-am + check-am check-html ctags-recursive install install-am \ + install-strip recheck recheck-html tags-recursive uninstall-am .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am all-local am--refresh check check-TESTS check-am \ - check-local clean clean-aminfo clean-generic \ + check-html check-local clean clean-aminfo clean-generic \ clean-libLTLIBRARIES clean-libtool clean-local \ clean-noinstLTLIBRARIES ctags ctags-recursive dist dist-all \ dist-bzip2 dist-gzip dist-hook dist-info dist-lzma dist-shar \ @@ -2028,18 +2250,17 @@ uninstall-man: uninstall-man1 maintainer-clean-aminfo maintainer-clean-generic \ maintainer-clean-vti mostlyclean mostlyclean-aminfo \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - mostlyclean-vti pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binSCRIPTS uninstall-dvi-am \ - uninstall-hook uninstall-html-am uninstall-includeHEADERS \ - uninstall-info-am uninstall-libLTLIBRARIES \ - uninstall-ltdlincludeHEADERS uninstall-man uninstall-man1 \ - uninstall-pdf-am uninstall-ps-am + mostlyclean-vti pdf pdf-am ps ps-am recheck recheck-html tags \ + tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \ + uninstall-dvi-am uninstall-hook uninstall-html-am \ + uninstall-includeHEADERS uninstall-info-am \ + uninstall-libLTLIBRARIES uninstall-ltdlincludeHEADERS \ + uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status rm -f libtoolize.tmp libtoolize $(timestamp); \ - input="libtoolize.m4sh"; \ $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \ -e 's,@aclocal_DATA\@,$(aclocalfiles),g' \ -e "s,@pkgltdl_files\@,$(ltdldatafiles),g" \ @@ -2091,7 +2312,6 @@ $(srcdir)/$(m4dir)/ltversion.m4: $(m4dir cd $(srcdir); \ rm -f $(m4dir)/ltversion.tmp; \ serial=`echo "$$correctver" | sed 's,^1[.],,g'`; \ - input="ltversion.in"; \ echo $(edit) -e "s,@MACRO_REVISION\@,$$correctver,g" \ -e "s,@MACRO_SERIAL\@,$$serial,g" \ $(srcdir)/$(m4dir)/ltversion.in \> $(srcdir)/$(m4dir)/ltversion.m4; \ @@ -2119,7 +2339,6 @@ $(srcdir)/$(auxdir)/ltmain.sh: $(sh_file \> $(auxdir)/ltmain.in; \ $(M4SH) -B $(auxdir) $(auxdir)/ltmain.m4sh \ > $(auxdir)/ltmain.in; \ - input="ltmain.m4sh"; \ echo $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \ -e "s,@package_revision\@,$$correctver," \ $(srcdir)/$(auxdir)/ltmain.in "> $$target"; \ @@ -2157,10 +2376,7 @@ $(srcdir)/libltdl/Makefile.am: $(srcdir) -e '1s,^\(.. Makefile.\)inc.*,\1am -- Process this file with automake to produce Makefile.in,' > $$out; chmod a-w $(srcdir)/libltdl/Makefile.am -all-local: $(srcdir)/libltdl/aclocal.m4 \ - $(srcdir)/libltdl/stamp-mk \ - $(srcdir)/libltdl/configure \ - $(srcdir)/libltdl/config-h.in +all-local: $(LTDL_BOOTSTRAP_DEPS) $(srcdir)/libltdl/Makefile.in: $(srcdir)/libltdl/Makefile.am \ $(srcdir)/libltdl/aclocal.m4 @@ -2239,10 +2455,9 @@ uninstall-hook: done dist-hook: - @if test -f $(srcdir)/README.alpha; then \ case $(VERSION) in \ - *[a-z]) cp -p $(srcdir)/README.alpha $(distdir)/README ;; \ - esac; else :; fi + *[a-z]) $(SHELL) $(srcdir)/$(edit_readme_alpha) $(distdir)/README ;; \ + esac for macro in LT_INIT AC_PROG_LIBTOOL AM_PROG_LIBTOOL; do \ if grep $$macro $(srcdir)/aclocal.m4 $(srcdir)/libltdl/aclocal.m4; then \ echo "Bogus $$macro macro contents in an aclocal.m4 file." >&2; \ @@ -2257,7 +2472,7 @@ $(srcdir)/$(TESTSUITE): $(srcdir)/tests/ $(AUTOTEST) `echo $(TESTSUITE_AT) | sed 's,tests/,,g'` -o testsuite.tmp && \ mv -f testsuite.tmp testsuite -$(srcdir)/tests/package.m4: $(srcdir)/configure.ac +$(srcdir)/tests/package.m4: $(srcdir)/configure.ac Makefile.am { \ echo '# Signature of the current package.'; \ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ @@ -2265,6 +2480,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/co echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ + echo 'm4_define([AT_PACKAGE_URL], [@PACKAGE_URL@])'; \ } | $(edit) > $(srcdir)/tests/package.m4 tests/atconfig: $(top_builddir)/config.status @@ -2283,8 +2499,13 @@ installcheck-local: $(testsuite_deps) $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) \ AUTOTEST_PATH="$(exec_prefix)/bin" +check-noninteractive-old: + $(MAKE) $(AM_MAKEFLAGS) check-TESTS TESTS='$(NONINTERACTIVE_TESTS)' +check-interactive-old: + $(MAKE) $(AM_MAKEFLAGS) check-TESTS TESTS='$(INTERACTIVE_TESTS)' + # Run only noninteractive parts of the new testsuite. -check-noninteractive: $(testsuite_deps_uninstalled) +check-noninteractive-new: $(testsuite_deps_uninstalled) $(CD_TESTDIR); \ CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \ $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \ @@ -2292,27 +2513,146 @@ check-noninteractive: $(testsuite_deps_u $(TESTSUITEFLAGS) # Run only interactive parts of the new testsuite. -check-interactive: $(testsuite_deps_uninstalled) +check-interactive-new: $(testsuite_deps_uninstalled) $(CD_TESTDIR); \ CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \ $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \ -k interactive -k recursive INNER_TESTSUITEFLAGS=",interactive" \ $(TESTSUITEFLAGS) +check-interactive: check-interactive-old check-interactive-new +check-noninteractive: check-noninteractive-old check-noninteractive-new + # We need to remove any file droppings left behind by testsuite clean-local: clean-local-legacy -$(CD_TESTDIR); \ test -f $$abs_srcdir/$(TESTSUITE) && \ $(SHELL) $$abs_srcdir/$(TESTSUITE) --clean -tests/demo-conf.test: libtool +tests/tagdemo-undef-exec.log: tests/tagdemo-undef-make.log +tests/tagdemo-undef-make.log: tests/tagdemo-undef.log +tests/tagdemo-undef.log: tests/tagdemo-shared-exec.log +tests/tagdemo-shared-exec.log: tests/tagdemo-shared-make.log +tests/tagdemo-shared-make.log: tests/tagdemo-shared.log +tests/tagdemo-shared.log: tests/tagdemo-exec.log +tests/tagdemo-exec.log: tests/tagdemo-make.log +tests/tagdemo-make.log: tests/tagdemo-conf.log +tests/tagdemo-conf.log: tests/tagdemo-static-exec.log +tests/tagdemo-static-exec.log: tests/tagdemo-static-make.log +tests/tagdemo-static-make.log: tests/tagdemo-static.log + +tests/f77demo-shared-exec.log: tests/f77demo-shared-make.log +tests/f77demo-shared-make.log: tests/f77demo-shared.log +tests/f77demo-shared.log: tests/f77demo-exec.log +tests/f77demo-exec.log: tests/f77demo-make.log +tests/f77demo-make.log: tests/f77demo-conf.log +tests/f77demo-conf.log: tests/f77demo-static-exec.log +tests/f77demo-static-exec.log: tests/f77demo-static-make.log +tests/f77demo-static-make.log: tests/f77demo-static.log + +tests/fcdemo-shared-exec.log: tests/fcdemo-shared-make.log +tests/fcdemo-shared-make.log: tests/fcdemo-shared.log +tests/fcdemo-shared.log: tests/fcdemo-exec.log +tests/fcdemo-exec.log: tests/fcdemo-make.log +tests/fcdemo-make.log: tests/fcdemo-conf.log +tests/fcdemo-conf.log: tests/fcdemo-static-exec.log +tests/fcdemo-static-exec.log: tests/fcdemo-static-make.log +tests/fcdemo-static-make.log: tests/fcdemo-static.log + +tests/cdemo-undef-exec.log: tests/cdemo-undef-make.log +tests/cdemo-undef-make.log: tests/cdemo-undef.log +tests/cdemo-undef.log: @ORDER@ tests/cdemo-shared-exec.log +tests/cdemo-shared-exec.log: tests/cdemo-shared-make.log +tests/cdemo-shared-make.log: tests/cdemo-shared.log +tests/cdemo-shared.log: @ORDER@ tests/cdemo-exec.log +tests/cdemo-exec.log: tests/cdemo-make.log +tests/cdemo-make.log: tests/cdemo-conf.log +tests/cdemo-conf.log: @ORDER@ tests/cdemo-static-exec.log +tests/cdemo-static-exec.log: tests/cdemo-static-make.log +tests/cdemo-static-make.log: tests/cdemo-static.log + +tests/demo-shared-unst.log: tests/demo-noinst-link.log +tests/demo-noinst-link.log: tests/demo-relink.log +tests/demo-relink.log: tests/demo-hardcode.log +tests/demo-hardcode.log: tests/demo-shared-inst.log +tests/demo-shared-inst.log: tests/demo-shared-exec.log +tests/demo-shared-exec.log: tests/demo-shared-make.log +tests/demo-shared-make.log: tests/demo-shared.log +tests/demo-shared.log: @ORDER@ tests/demo-nopic-exec.log +tests/demo-nopic-exec.log: tests/demo-nopic-make.log +tests/demo-nopic-make.log: tests/demo-nopic.log +tests/demo-nopic.log: @ORDER@ tests/demo-pic-exec.log +tests/demo-pic-exec.log: tests/demo-pic-make.log +tests/demo-pic-make.log: tests/demo-pic.log +tests/demo-pic.log: @ORDER@ tests/demo-nofast-unst.log +tests/demo-nofast-unst.log: tests/demo-nofast-inst.log +tests/demo-nofast-inst.log: tests/demo-nofast-exec.log +tests/demo-nofast-exec.log: tests/demo-nofast-make.log +tests/demo-nofast-make.log: tests/demo-nofast.log +tests/demo-nofast.log: @ORDER@ tests/demo-deplibs.log +tests/demo-deplibs.log: tests/demo-unst.log +tests/demo-unst.log: tests/demo-inst.log +tests/demo-inst.log: tests/demo-exec.log +tests/demo-exec.log: tests/demo-make.log +tests/demo-make.log: tests/demo-conf.log +tests/demo-conf.log: @ORDER@ tests/demo-static-unst.log +tests/demo-static-unst.log: tests/demo-static-inst.log +tests/demo-static-inst.log: tests/demo-static-exec.log +tests/demo-static-exec.log: tests/demo-static-make.log +tests/demo-static-make.log: tests/demo-static.log + +tests/depdemo-shared-unst.log: tests/depdemo-relink.log +tests/depdemo-relink.log: tests/depdemo-shared-inst.log +tests/depdemo-shared-inst.log: tests/depdemo-shared-exec.log +tests/depdemo-shared-exec.log: tests/depdemo-shared-make.log +tests/depdemo-shared-make.log: tests/depdemo-shared.log +tests/depdemo-shared.log: @ORDER@ tests/depdemo-nofast-unst.log +tests/depdemo-nofast-unst.log: tests/depdemo-nofast-inst.log +tests/depdemo-nofast-inst.log: tests/depdemo-nofast-exec.log +tests/depdemo-nofast-exec.log: tests/depdemo-nofast-make.log +tests/depdemo-nofast-make.log: tests/depdemo-nofast.log +tests/depdemo-nofast.log: @ORDER@ tests/depdemo-unst.log +tests/depdemo-unst.log: tests/depdemo-inst.log +tests/depdemo-inst.log: tests/depdemo-exec.log +tests/depdemo-exec.log: tests/depdemo-make.log +tests/depdemo-make.log: tests/depdemo-conf.log +tests/depdemo-conf.log: @ORDER@ tests/depdemo-static-unst.log +tests/depdemo-static-unst.log: tests/depdemo-static-inst.log +tests/depdemo-static-inst.log: tests/depdemo-static-exec.log +tests/depdemo-static-exec.log: tests/depdemo-static-make.log +tests/depdemo-static-make.log: tests/depdemo-static.log + +tests/mdemo-shared-unst.log: tests/mdemo-shared-inst.log +tests/mdemo-shared-inst.log: tests/mdemo-shared-exec.log +tests/mdemo-shared-exec.log: tests/mdemo-shared-make.log +tests/mdemo-shared-make.log: tests/mdemo-shared.log +tests/mdemo-shared.log: @ORDER@ tests/mdemo-dryrun.log \ + tests/mdemo2-exec.log + +tests/mdemo-dryrun.log: tests/mdemo-unst.log +tests/mdemo-unst.log: tests/mdemo-inst.log +tests/mdemo-inst.log: tests/mdemo-exec.log +tests/mdemo-exec.log: tests/mdemo-make.log +tests/mdemo-make.log: tests/mdemo-conf.log +tests/mdemo-conf.log: @ORDER@ tests/mdemo-static-unst.log +tests/mdemo-static-unst.log: tests/mdemo-static-inst.log +tests/mdemo-static-inst.log: tests/mdemo-static-exec.log +tests/mdemo-static-exec.log: tests/mdemo-static-make.log +tests/mdemo-static-make.log: tests/mdemo-static.log + +tests/mdemo2-exec.log: tests/mdemo2-make.log +tests/mdemo2-make.log: tests/mdemo2-conf.log \ + tests/mdemo-dryrun.log + +tests/pdemo-inst.log: tests/pdemo-exec.log +tests/pdemo-exec.log: tests/pdemo-make.log +tests/pdemo-make.log: tests/pdemo-conf.log # The defs script shouldn't be recreated whenever the Makefile is # regenerated since the source tree can be read-only. check-recursive: tests/defs tests/defs: $(srcdir)/tests/defs.in rm -f tests/defs.tmp tests/defs; \ - input="defs.m4sh"; \ $(edit) $(srcdir)/tests/defs.in > tests/defs.tmp; \ mv -f tests/defs.tmp tests/defs @@ -2325,12 +2665,21 @@ $(srcdir)/tests/defs.in: $(auxdir)/gener # We need to remove any files that the above tests created. clean-local-legacy: - -cd tests; \ - for dir in cdemo demo depdemo f77demo fcdemo mdemo mdemo2 pdemo tagdemo; \ - do \ - test -f $$dir/Makefile && ( cd $$dir && $(MAKE) distclean; ); \ + -for dir in $(CONF_SUBDIRS); do \ + if test -f $$dir/Makefile; then \ + (cd $$dir && $(MAKE) $(AM_MAKEFLAGS) distclean); \ + else :; fi; \ + done + rm -rf _inst _inst-* +$(distclean_recursive): fake-distclean-legacy +.PHONY: fake-distclean-legacy +fake-distclean-legacy: + -for dir in $(CONF_SUBDIRS); do \ + if test ! -f $$dir/Makefile; then \ + $(mkinstalldirs) $$dir; \ + echo 'distclean: ; rm -f Makefile' > $$dir/Makefile; \ + else :; fi; \ done - rm -rf _inst $(TESTS): tests/defs diff -ruNp libtool-2.2.10/NEWS libtool-2.4/NEWS --- libtool-2.2.10/NEWS 2010-06-09 21:02:19.000000000 +0700 +++ libtool-2.4/NEWS 2010-09-22 21:43:26.000000000 +0700 @@ -1,5 +1,51 @@ NEWS - list of user-visible changes between releases of GNU Libtool +New in 2.4 2010-09-22: git version 2.2.11a, Libtool team: + +* New features: + + - Sysroot support. This allows you to build cross-compiled packages + with the same prefix that will be used on the destination machine, + and still find dependent libraries under the compiler's "sysroot". + Without sysroot support, paths internal to the build system may leak + into the product of the build. + + Sysroot support is disabled unless the --with-sysroot configure + option is passed to configure, because .la files generated with + sysroot support will _not_ be usable in general with older Libtools. + + - On non-cygwin Windows systems, we now lookup potential library + file names without regard to file name case. + - The old testsuite now uses the `parallel-tests' Automake test driver + now for more concurrency and better test logging. For this, tests are + run in verbose mode by default now. + +* Important incompatible changes: + + - Autoconf 2.62 and Automake 1.11.1 or newer are now required for + bootstrapping Libtool. For using Libtool in your own projects, + Autoconf 2.59 and Automake 1.9.6 should still work. + - The fix_srcfile_path variable has been replaced by a more thorough + mechanism triggered by the to_tool_file_cmd variable. + +* Changes in supported systems or compilers: + + - Initial support for the Microsoft C/C++ Compiler, with help from + the compile script in unreleased Automake 1.12. Override the manifest + tool used to embed the manifest resource through the environment + variable MANIFEST_TOOL. Please note that the import library naming + has changed (from foo-2.lib to foo.dll.lib) from when the code lived + in its own git branch. + - Initial support for the NAG Fortran compiler on GNU/Linux. + +* Bug fixes: + + - The `check-interactive' and `check-noninteractive' convenience make + targets now also work for the old testsuite. + - Warnings from Autoconf v2.67-36-g1e604ec about incomplete programs + passed to AC_*_IFELSE tests have been fixed. + - On IRIX, the test for -Wl,-exported_symbol now also works with gfortran. + New in 2.2.10 2010-06-10: git version 2.2.9a, Libtool team: * New features: @@ -42,6 +88,9 @@ New in 2.2.7b 2010-05-20: git version 2. options that begin with '--lt-*' from the argument list before launching (uninstalled) programs. Any '--lt-*' option on the command line not recognized by the wrapper will result in an error. + - The type of the symbol lists variables (lt_*_LTX_preloaded_symbols) has + been fixed in the manual and in a couple of tests to match the actual + implementation. * Changes in supported systems or compilers: @@ -53,6 +102,7 @@ New in 2.2.7b 2010-05-20: git version 2. - With binutils 2.19.50+, shared libraries can be built on AIX. - Initial support for the Cuda Compiler Driver on GNU/Linux. - Support for Haiku (i586-pc-haiku). + - Initial support for GCC link-time optimization (LTO) flags. * Bug fixes: diff -ruNp libtool-2.2.10/README libtool-2.4/README --- libtool-2.2.10/README 2010-06-09 18:50:21.000000000 +0700 +++ libtool-2.4/README 2010-09-19 10:54:21.000000000 +0700 @@ -8,32 +8,70 @@ This is GNU Libtool, a generic library s the complexity of using shared libraries behind a consistent, portable interface. -To use Libtool, add the new generic library building commands to your -Makefile, Makefile.in, or Makefile.am. See the documentation for -details. - Libtool's home page is: - http://www.gnu.org/software/libtool/libtool.html + http://www.gnu.org/software/libtool/libtool.html See the file NEWS for a description of recent changes to Libtool. -See the file INSTALL for generic instructions on how to build and install -Libtool. Please see the file doc/notes.txt for some platform-specific -information. Please note that you need GNU make to build Libtool. +Please note that you can build GNU Libtool from this directory using a +vendor Make program as long as this is an official release tarball; +otherwise you will need GNU Make for sane VPATH support. See the file +INSTALL for complete generic instructions on how to build and install +Libtool. Also, see the file doc/notes.txt for some platform- specific +information. + +See the info node (libtool)Tested Platforms. (or the file doc/PLATFORMS) +for a list of platforms that Libtool already supports. + +Please try it on all the platforms you have access to: + + * If it builds and passes the test suite (`gmake check'), please send + a short note to the libtool mailing list with a + subject line including the string `[PLATFORM]', and containing the + details from the end of `./libtool --help' in the body. + * Otherwise, see `Reporting Bugs' below for how to help us fix any + problems you discover. -See the info node (libtool)Tested Platforms. (or the file -doc/PLATFORMS) for a list of platforms that Libtool supports. +To use Libtool, add the new generic library building commands to your +Makefile, Makefile.in, or Makefile.am. See the documentation for +details. 2. Reporting Bugs ================= -If you have any suggestions or bug reports, or you wish to port Libtool -to a new platform, please send electronic mail to the libtool mailing -list or bug reports to . Be sure -to send us your information from the end of the help message given by -`./libtool --help'. +If this distribution doesn't work for you, before you report the +problem, at least try upgrading to the latest released version first, +and see whether the issue persists. If you feel able, you can also +check whether the issue has been fixed in the development sources for +the next release (see `Obtaining the Latest Sources' below). + +Once you've determined that your bug is still not fixed in the latest +version, please send a full report to , including: + + 1. the information from the end of the help message given by + `./libtool --help', and the verbose output of any failed tests + (see `The Test Suites' immediately below); + 2. complete instructions for how to reproduce your bug, along with + the results you were expecting, and how they differ from what you + actually see; + 3. a workaround or full fix for the bug, if you have it; + 4. a copy of `tests/testsuite.log' if you are experiencing failures + in the Autotest testsuite. + 5. new test cases for the testsuite that demonstrate the bug are + especially welcome, and will help to ensure that future releases + don't reintroduce the problem - if you're not able to write a + complete testsuite case, a simple standalone shell script is + usually good enough to help us write a test for you. + +If you have any other suggestions, or if you wish to port Libtool to a +new platform, please send email to the mailing list . + +Please note that if you send us an non-trivial code for inclusion in a +future release, we may ask you for a copyright assignment (for brief +details see the `Copyright Assignment' section on our `Contributing' +webpage ). 3. The Test Suites @@ -43,15 +81,15 @@ Libtool comes with two integrated sets o is sane. You can run both test suites like this, assuming that `gmake' refers to GNU make: - gmake -k check + gmake -k check If you want to run the old testsuite only, do it like this: - gmake check TESTSUITEFLAGS=-V + gmake check TESTSUITEFLAGS=-V If you want to run the new testsuite only, do it like this: - gmake check-local + gmake check-local The tests of the old test suite run in groups in the various demo subdirectories, so if one of the tests early in a group FAILs, the rest @@ -64,9 +102,8 @@ To run a test group of the old test suit you have fixed a bug, but don't want to rerun the entire suite), you can do it like this: - gmake check TESTS="tests/cdemo-static.test tests/cdemo-make.test \ - tests/cdemo-exec.test" \ - TESTSUITEFLAGS=-V + gmake check TESTSUITEFLAGS=-V TESTS="tests/cdemo-static.test \ + tests/cdemo-static-make.test tests/cdemo-static-exec.test" Providing that you have a FAIL from the most recent group from a particular demo directory (like the cdemo-static.test group above), you @@ -76,48 +113,145 @@ If you wish to report a test group failu to send the verbose output of the FAILing group, along with the information from the end of `$(top_builddir)/libtool --help' to the bug report mailing list, with a subject line that -includes the string `[TEST FAILURE]'. From a Bourne compatible shell, -you can generate verbose test output like this: - - VERBOSE=yes gmake check \ - TESTS="tests/cdemo-static.test tests/cdemo-make.test tests/cdemo-exec.test" \ - TESTSUITEFLAGS=-V | tee cdemo-static-group.log - -In order to enable debug shell tracing, use VERBOSE=debug instead of -VERBOSE=yes. +includes the string `[TEST FAILURE]'. The file test-suite.log contains +the verbose output from all failed tests. +In order to enable debug shell tracing, you can set VERBOSE=debug when +running the old test suite. -In the long run, Libtool will move to using only the new, -Autotest-driven testsuite. Its usage is documented in +In the long run, Libtool will move to using only the new, Autotest- +driven testsuite. Its usage is documented in: - info Autoconf 'testsuite Invocation' + info Autoconf 'testsuite Invocation' -but simple help may also be obtained through +but simple help may also be obtained through: - gmake check-local TESTSUITEFLAGS='--help' + gmake check-local TESTSUITEFLAGS='--help' For verbose output, add the flag `-v', for running only a subset of the independent tests, merely specify them by number or by keyword, both of which are displayed with the `--list' flag. For example, the `libtool' keyword is used for the tests that exercise only this script. So it is possible to test an installed script, possibly from a different Libtool -release, with - gmake check-local TESTSUITEFLAGS="-k libtool LIBTOOL=/path/to/libtool" +release, with: + + gmake check-local \ + TESTSUITEFLAGS="-k libtool LIBTOOL=/path/to/libtool" Some tests, like the one exercising max_cmd_len limits, make use of this to invoke the testsuite recursively on a subset of tests. For these tests, the variable INNER_TESTSUITEFLAGS may be used. It will be -expanded right after the `-k libtool', without separating whitespace, -so that further limiting of the recursive set of tests is possible. -For example, to run only the template tests within the max_cmd_len, use - gmake check-local TESTSUITEFLAGS="-v -x -k max_cmd_len \ +expanded right after the `-k libtool', without separating whitespace, so +that further limiting of the recursive set of tests is possible. For +example, to run only the template tests within the max_cmd_len, use: + + gmake check-local TESTSUITEFLAGS="-v -x -k max_cmd_len \ INNER_TESTSUITEFLAGS=',template -v -x'" If you wish to report test failures to the libtool list, you need to send the file `tests/testsuite.log' to the bug report mailing list, . -4. Version Numbering + +4. Obtaining the Latest Sources +=============================== + +* With the exception of ancient releases, all official GNU Libtool + releases have a detached GPG signature file. With this you can verify + that the corresponding file (i.e. without the `.sig' suffix) is the + same file that was released by the owner of it's GPG key ID. First, + be sure to download both the .sig file and the corresponding release, + then run a command like this: + + gpg --verify libtool-x.y.z.tar.gz.sig + + If that command fails because you don't have the required public key, + then run this command to import it: + + gpg --keyserver keys.gnupg.net --recv-keys 2983D606 + + and then rerun the `gpg --verify' command. + +* Official stable releases of GNU Libtool, along with these detached + signature files are available from: + + ftp://ftp.gnu.org/gnu/libtool + + To reduce load on the main server, please use one of the mirrors + listed at: + + http://www.gnu.org/order/ftp.html + +* Alpha quality pre-releases of GNU Libtool, also with detached + signature files are available from: + + ftp://alpha.gnu.org/gnu/libtool + + and some of the mirrors listed at: + + http://www.gnu.org/order/ftp.html + +* Nightly snapshots of the unreleased development trunk of GNU Libtool + are available from: + + http://pogma.com/libtool + + These files do not have signatures, but will allow you to easily + determine whether the most recent development code still exhibits any + bugs you have discovered, without requiring you to install a complete + build environment and the extra tools needed to bootstrap a version + control checkout. + +* The master libtool repository is stored in git. + + If you are a member of the savannah group for GNU Libtool, a writable + copy of the libtool repository can be obtained by: + + git clone @git.sv.gnu.org:/srv/git/libtool.git + + If you are behind a firewall that blocks the git protocol, you may + find it useful to use + + git config --global url.http://git.sv.gnu.org/r/.insteadof \ + git://git.sv.gnu.org/ + + to force git to transparently rewrite all savannah git references to + use http. + + If you are not a member of the savannah group for GNU Libtool, you can + still fetch a read-only copy with either: + + git clone git://git.sv.gnu.org/libtool.git + + or using the CVS pserver protocol: + + cvs -d:pserver:anonymous@pserver.git.sv.gnu.org:/srv/git/libtool.git \ + co -d libtool HEAD + +* Before you can build from git, you need to bootstrap. This requires: + - Autoconf 2.62 or later + - Automake 1.11.1 or later + - Help2man 1.29 or later + - Xz 4.999.8beta or later (from ) + - Texinfo 4.8 or later + - Any prerequisites of the above (such as m4, perl, tex) + + Note that these bootstrapping dependencies are much stricter than + those required to use a destributed release for your own packages. + After installation, GNU Libtool is designed to work either standalone, + or optionally with: + - Autoconf 2.59 or later + - Automake 1.9.6 or later + +* The `bootstrap' script sets up the source directory for you to hack, + though it may take quite some time to run. If you don't intend to + re-run the test suite, you can speed up the `bootstrap' step by an + order of magnitude if you call it like this instead: + + reconfdirs='. libltdl' ./bootstrap + + +5. Version Numbering ==================== People have complained that they find the version numbering scheme under @@ -172,9 +306,8 @@ things: For more details about version numbers, see: http://www.gnu.org/software/libtool/contribute.html - --- - Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software +-- + Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 diff -ruNp libtool-2.2.10/THANKS libtool-2.4/THANKS --- libtool-2.2.10/THANKS 2010-06-08 13:33:40.000000000 +0700 +++ libtool-2.4/THANKS 2010-09-01 12:09:12.000000000 +0700 @@ -106,9 +106,11 @@ Jakub Bogusz qboosh@pld-linux.org Jacob Meuser jakemsr@jakemsr.com James Su james.su@gmail.com + Jay Krell jay.krell@cornell.edu Jeff Squyres jsquyres@lam-mpi.org Jeremy C. Reed reed@reedmedia.net Jim Meyering jim@meyering.net + Joakim Tjernlund joakim.tjernlund@transmode.se Joel N. Weber II devnull@gnu.org Joerg Sonnenberger joerg@netbsd.org John Bowler jbowler@acm.org @@ -130,6 +132,7 @@ Marcel Loose loose@astron.nl Mark Kettenis kettenis@phys.uva.nl Matthijs Kooijman matthijs@stdin.nl + Micheal E. Faenza mfaenza@mitre.org Michael Haubenwallner michael.haubenwallner@salomon.at Mike Gorchak mike@malva.ua Mike Frysinger vapier@gentoo.org @@ -144,6 +147,7 @@ Peter Fritzsche peter.fritzsche@gmx.de Peter Jeremy peterjeremy@optushome.com.au Peter Kjellerstedt peter.kjellerstedt@axis.com + Philip Allison philip.allison@smoothwall.net Rainer Emrich r.emrich@de.tecosim.com Rainer Orth ro@TechFak.Uni-Bielefeld.DE Rainer Tammer tammer@tammer.net @@ -173,6 +177,7 @@ Tom Tromey tromey@cygnus.com Tor Lillqvist tml@iki.fi Ulrich Drepper drepper@ipd.info.uni-karlsruhe.de + Warren Dodge warren.l.dodge@Tektronix.com Vadim Zeitlin vz-libtool@zeitlins.org Vincent Lefevre vincent@vinc17.org Vincent Torri vtorri@univ-evry.fr diff -ruNp libtool-2.2.10/TODO libtool-2.4/TODO --- libtool-2.2.10/TODO 2010-06-09 17:13:40.000000000 +0700 +++ libtool-2.4/TODO 2010-09-01 13:02:45.000000000 +0700 @@ -257,6 +257,55 @@ GNU Libtool a .def file so it appears that we might need to detect and handle mutual dependencies specially on win32 =(O| +* QoI for file name and path conversion functions. Currently, these are + implemented as MxN different functions; this has quadratic complexity. If + possible, it would be preferred to implement then as M+N functions. However: + http://lists.gnu.org/archive/html/libtool-patches/2010-08/msg00224.html + The main issue is you don't know what the "native" (e.g. "central") + path-type is; e.g. "from-X (to what?)" and "(from what?) to-Y". Right + now there are only four "platforms" involved: *nix, mingw, msys, and + cygwin. That's actually the break-even point, given the vagaries and + optimizations involved in these particular four platforms. + + We have exactly five basic file name conversion functions (not counting + the wrappers that handle paths). For a non-quadratic M+N (from-X|to-Y) + solution, we'd need, I think, the same number of conversion functions: brute + force suggests nine (four to_*, four from_*, plus the noop), but then many + of the from_* and to_* would actually BE noop. + + I'm assuming here that the "central" path-type is implicitly some sort of + unixish -- maybe cyg, maybe msys, maybe unix -- path-type. The issue is + that each of the five conversion functions use a different TOOL to perform + the conversion, with different syntax. So, trying to combine, e.g. + msys_to_mingw + cygwin_to_mingw + unix_to_mingw + into an all-encompassing "central_unixish_to_mingw" would require additional + m4 magic to basically replace the guts depending on whether $build was msys, + cygwin, or unix. Worse, you can't really do a set of + {msys|cygwin|unix}_to_central_unixish that isn't simply a no-op -- because + (A) they already are all unixish, and (B) what tool would you use? How would + the later to_mingw function "know" how to covert this new representation to + mingw. So, {msys|cygwin|unix}_to_central_unixish would simply be a no-op + and central_unixish_to_mingw would still do all the work (with its guts + customized based on $build). + + For more reasonable cross environments (e.g. linux->some_embedded) I think + you could probably work out a general M+N scheme, since most embedded $hosts + aren't as strange as the win32 variants -- even VxWorks and INTEGRITY have + basic, unix-like file systems (although INTEGRITY does have multiple roots). + Aggressive use of the m4 function_replace machinery WOULD be appropriate for + /these/ conversion functions. OTOH...(a) you can't run the $host apps on + $build anyway, in these embedded situations. At best you'd use $TARGETSHELL + and "run" them via a remote connection, and (b) they don't use the C + wrapper! + + So...I don't think it makes much difference *right now* in the amount of + code required, or the number of functions implemented. At some point in the + future we might want to generalize to an M+N scheme. For the existing win32 + $hosts, all of the funtionality would be on "one side" of the 2-step + conversion; the "other side" would be noop. But we won't worry about the + implicit quadratic complexity of the existing scheme for now. 3. Wish List ============ diff -ruNp libtool-2.2.10/aclocal.m4 libtool-2.4/aclocal.m4 --- libtool-2.2.10/aclocal.m4 2010-06-09 20:05:44.000000000 +0700 +++ libtool-2.4/aclocal.m4 2010-09-22 21:44:15.000000000 +0700 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -985,6 +985,7 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([libltdl/m4/argz.m4]) +m4_include([libltdl/m4/autobuild.m4]) m4_include([libltdl/m4/libtool.m4]) m4_include([libltdl/m4/ltdl.m4]) m4_include([libltdl/m4/ltoptions.m4]) diff -ruNp libtool-2.2.10/bootstrap libtool-2.4/bootstrap --- libtool-2.2.10/bootstrap 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/bootstrap 2010-09-21 14:07:22.000000000 +0700 @@ -1,7 +1,8 @@ #! /bin/sh # bootstrap -- Helps bootstrapping libtool, when checked out from repository. # -# Copyright (C) 2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc, +# Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 Free Software +# Foundation, Inc, # Mritten by Gary V. Vaughan, 2003 # # This file is part of GNU Libtool. @@ -23,6 +24,9 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #### +# Exit upon failure. +set -e + # It is okay for the bootstrap process to require unreleased autoconf # or automake, as long as any released libtool will work with at least # the newest stable versions of each. Generally, newer versions offer @@ -42,7 +46,6 @@ export SHELL : ${SED=sed} : ${LN_S='ln -s'} : ${MAKEINFO=makeinfo} -: ${WORKING_LIBOBJ_SUPPORT=false} case $1 in --help|-h*) @@ -50,8 +53,6 @@ case $1 in `echo $0 | sed 's,^.*/,,g'`: This script is designed to bootstrap a fresh repository checkout of Libtool. Useful environment variable settings: reconfdirs='. libltdl' Do not bootstrap the old test suite. - WORKING_LIBOBJ_SUPPORT=: Declare that you have fixed LIBOBJDIR support - in autoconf (> 2.59) and automake (> 1.9.6). EOF exit ;; @@ -93,19 +94,8 @@ find . -depth \( -name autom4te.cache -o # Delete stale files from previous libtool versions. rm -f acinclude.m4 libltdl/config.h -# Workaround for missing LIBOBJDIR support in Autoconf 2.59, Automake 1.9.6: -# Have symlinks of the libobj files in top source dir. -# Set WORKING_LIBOBJ_SUPPORT=: when calling bootstrap if you have fixed tools. -case `($AUTOCONF --version) 2>/dev/null` in - *\ 2.59[c-z]* | *\ 2.[6-9][0-9]* | *\ [3-9].[0-9]*) - case `($AUTOMAKE --version) 2>/dev/null` in - *\ 1.9[a-z]* | *\ 1.1[0-9]* | *\ 1.[2-9][0-9]* | *\ [2-9].[0-9]*) - WORKING_LIBOBJ_SUPPORT=: ;; - esac ;; -esac for file in argz.c lt__dirent.c lt__strl.c; do rm -f $file - $WORKING_LIBOBJ_SUPPORT || $LN_S libltdl/$file $file done if test -z "$reconfdirs"; then @@ -116,9 +106,18 @@ fi set dummy `$SED -n ' /AC_INIT/{ s/[][,()]/ /g + s/ GNU / / p }' configure.ac` shift +PACKAGE=`echo "$2" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` +PACKAGE_NAME=$2 +PACKAGE_URL= +if grep 'AC_INIT.*GNU' configure.ac >/dev/null; then + PACKAGE_NAME="GNU $PACKAGE_NAME" + PACKAGE_URL="http://www.gnu.org/software/$PACKAGE/" +fi +VERSION=$3 # Whip up a dirty Makefile: makes='Makefile.am libltdl/Makefile.inc' @@ -135,15 +134,12 @@ rm -f $auxdir/ltmain.sh $m4dir/ltversion $MAKE ./$auxdir/ltmain.sh ./$m4dir/ltversion.m4 \ ./libtoolize.in ./tests/defs.in ./tests/package.m4 \ ./tests/testsuite ./libltdl/Makefile.am ./doc/notes.txt \ - srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" \ - PACKAGE_BUGREPORT="bug-$2@gnu.org" M4SH="$AUTOM4TE --language=m4sh" \ + srcdir=. top_srcdir=. PACKAGE="$PACKAGE" VERSION="$VERSION" \ + PACKAGE_NAME="$PACKAGE_NAME" PACKAGE_URL="$PACKAGE_URL" \ + PACKAGE_BUGREPORT="bug-$PACKAGE@gnu.org" M4SH="$AUTOM4TE --language=m4sh" \ AUTOTEST="$AUTOM4TE --language=autotest" SED="$SED" MAKEINFO="$MAKEINFO" \ GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S" -test -f clcommit.m4sh && $MAKE -f Makefile.maint ./commit \ - srcdir=. top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="$AUTOM4TE -l m4sh" \ - SED="$SED" GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S" - rm -f Makefile # Make a dummy libtoolize script for autoreconf: @@ -190,14 +186,4 @@ for macro in LT_INIT AC_PROG_LIBTOOL AM_ else :; fi done -# Commit script caveat: -cat <. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -327,7 +327,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -367,19 +367,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -547,7 +547,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -564,12 +564,12 @@ MFLAGS= MAKEFLAGS= # Identity of this package. -PACKAGE_NAME='libtool' +PACKAGE_NAME='GNU Libtool' PACKAGE_TARNAME='libtool' -PACKAGE_VERSION='2.2.10' -PACKAGE_STRING='libtool 2.2.10' +PACKAGE_VERSION='2.4' +PACKAGE_STRING='GNU Libtool 2.4' PACKAGE_BUGREPORT='bug-libtool@gnu.org' -PACKAGE_URL='' +PACKAGE_URL='http://www.gnu.org/software/libtool/' ac_unique_file="libtoolize.in" ac_config_libobj_dir=libltdl @@ -613,6 +613,7 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS HELP2MAN +ORDER HAVE_RC_FALSE HAVE_RC_TRUE HAVE_GCJ_FALSE @@ -623,6 +624,8 @@ HAVE_F77_FALSE HAVE_F77_TRUE HAVE_CXX_FALSE HAVE_CXX_TRUE +to_tool_file_cmd +to_host_file_cmd RC GCJFLAGS GCJ @@ -659,7 +662,9 @@ OTOOL LIPO NMEDIT DSYMUTIL +MANIFEST_TOOL RANLIB +ac_ct_AR AR LN_S NM @@ -670,14 +675,6 @@ FGREP EGREP GREP SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build LIBTOOL OBJDUMP DLLTOOL @@ -703,10 +700,16 @@ DIST_MAKEFILE_LIST CONF_SUBDIRS pkgdatadir aclocaldir -LTDL_SUBDIR_LIBOBJS_FALSE -LTDL_SUBDIR_LIBOBJS_TRUE CONFIG_STATUS_DEPENDENCIES M4SH +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build am__untar am__tar AMTAR @@ -783,7 +786,9 @@ enable_static with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock +with_gnu_ld ' ac_precious_vars='build_alias host_alias @@ -794,14 +799,22 @@ LDFLAGS LIBS CPPFLAGS CPP +CPPFLAGS CXX CXXFLAGS +LDFLAGS +LIBS +CPPFLAGS CCC CXXCPP F77 FFLAGS +LDFLAGS +LIBS FC -FCFLAGS' +FCFLAGS +LDFLAGS +LIBS' # Initialize some variables set by options. @@ -864,8 +877,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -910,7 +924,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -936,7 +950,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1140,7 +1154,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1156,7 +1170,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1186,8 +1200,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1195,7 +1209,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1213,13 +1227,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1242,7 +1256,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1256,8 +1270,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1272,9 +1286,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1313,11 +1327,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1343,7 +1357,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libtool 2.2.10 to adapt to many kinds of systems. +\`configure' configures GNU Libtool 2.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1357,7 +1371,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1413,7 +1427,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libtool 2.2.10:";; + short | recursive ) echo "Configuration of GNU Libtool 2.4:";; esac cat <<\_ACEOF @@ -1437,6 +1451,8 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command @@ -1459,6 +1475,8 @@ Use these variables to override the choi it to find libraries and programs with nonstandard names/locations. Report bugs to . +GNU Libtool home page: . +General help using GNU software: . _ACEOF ac_status=$? fi @@ -1521,10 +1539,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libtool configure 2.2.10 -generated by GNU Autoconf 2.65 +GNU Libtool configure 2.4 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1594,7 +1612,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1665,7 +1683,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1737,7 +1755,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1796,15 +1814,18 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_func -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1813,8 +1834,12 @@ $4 int main () { -#ifndef $2 - (void) $2; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif #endif ; @@ -1844,7 +1869,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -1948,7 +1973,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : @@ -2181,8 +2206,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libtool $as_me 2.2.10, which was -generated by GNU Autoconf 2.65. Invocation command line was +It was created by GNU Libtool $as_me 2.4, which was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2292,11 +2317,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2330,11 +2353,9 @@ $as_echo "$as_me: WARNING: cache variabl ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2347,11 +2368,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2365,11 +2384,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2424,7 +2441,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2439,7 +2461,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2515,7 +2541,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2528,6 +2554,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLA ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_config_headers="$ac_config_headers config.h:config-h.in" @@ -2540,16 +2567,22 @@ ac_config_headers="$ac_config_headers co ac_aux_dir= for ac_dir in libltdl/config "$srcdir"/libltdl/config; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in libltdl/config \"$srcdir\"/libltdl/config" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in libltdl/config \"$srcdir\"/libltdl/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2587,13 +2620,13 @@ AUTOTEST='$(AUTOM4TE) --language=autotes # http://www.gnu.org/software/libtool/contribute.html # First we break the version number up into its constituent parts. -lt_major=`echo "2.2.10" | sed 's,\..*$,,g'` -lt_minor=`echo "2.2.10" | sed 's,^[0-9]*\.\([0-9]*\).*$,\1,'` -lt_micro=`echo "2.2.10" | sed 's,^[0-9]*\.[0-9]*\(\.[0-9]*\).*$,\1,'` -lt_alpha=`echo "2.2.10" | sed 's,^[0-9.]*,,'` +lt_major=`echo "2.4" | sed 's,\..*$,,g'` +lt_minor=`echo "2.4" | sed 's,^[0-9]*\.\([0-9]*\).*$,\1,'` +lt_micro=`echo "2.4" | sed 's,^[0-9]*\.[0-9]*\(\.[0-9]*\).*$,\1,'` +lt_alpha=`echo "2.4" | sed 's,^[0-9.]*,,'` -test "$lt_minor" = "2.2.10" && lt_minor=0 -test "$lt_micro" = "2.2.10" && lt_micro="" +test "$lt_minor" = "2.4" && lt_minor=0 +test "$lt_micro" = "2.4" && lt_micro="" # Then we try to work out what the release before this one would have been # numbered. The only time we come unstuck is when this is the first release @@ -2610,9 +2643,9 @@ case $lt_alpha in esac ;; [cegikmoqsuwy]) - LASTRELEASE=`echo "2.2.10" | tr 'c-y' 'b-w'` ;; + LASTRELEASE=`echo "2.4" | tr 'c-y' 'b-w'` ;; [dfhjlnprtvxz]) - LASTRELEASE=`echo "2.2.10" | tr 'd-z' 'b-x'` ;; + LASTRELEASE=`echo "2.4" | tr 'd-z' 'b-x'` ;; *) # No lt_alpha component case $lt_micro in .0) @@ -2639,8 +2672,9 @@ case $lt_alpha in TIMESTAMP= ;; esac +timestamp_string="${TIMESTAMP:+ (Build:$TIMESTAMP)}" sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Configuring libtool${TIMESTAMP:+" (Build:$TIMESTAMP)"} 2.2.10 ## +## Configuring libtool$timestamp_string 2.4 ## _ASBOX echo @@ -2757,11 +2791,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2783,7 +2817,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2793,7 +2827,7 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -3031,7 +3065,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3039,7 +3073,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -3073,7 +3107,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`" am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -3089,7 +3123,7 @@ fi # Define the identity of the package. PACKAGE='libtool' - VERSION='2.2.10' + VERSION='2.4' cat >>confdefs.h <<_ACEOF @@ -3130,25 +3164,127 @@ am__tar='${AMTAR} chof - "$$tardir"'; am -M4SH='$(AUTOM4TE) --language=m4sh' +## ------------------------- ## +## Autobuild initialisation. ## +## ------------------------- ## + +# You can set autobuild_mode at configure time to specify a "unique" +# string for this build. +: ${autobuild_mode=default} +AB_VERSION="2.4 ($TIMESTAMP)" +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -CONFIG_STATUS_DEPENDENCIES='$(top_srcdir)/ChangeLog' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether subdir libobjs are useable" >&5 -$as_echo_n "checking whether subdir libobjs are useable... " >&6; } -test -f $srcdir/argz.c || sublibobjs_supported=yes - if test x"${sublibobjs_supported-no}" != xno; then - LTDL_SUBDIR_LIBOBJS_TRUE= - LTDL_SUBDIR_LIBOBJS_FALSE='#' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build else - LTDL_SUBDIR_LIBOBJS_TRUE='#' - LTDL_SUBDIR_LIBOBJS_FALSE= + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + + + + + if test -z "$AB_PACKAGE"; then + AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE} + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild project... $AB_PACKAGE" >&5 +$as_echo "$as_me: autobuild project... $AB_PACKAGE" >&6;} + + if test -z "$AB_VERSION"; then + AB_VERSION=${PACKAGE_VERSION:-$VERSION} + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild revision... $AB_VERSION" >&5 +$as_echo "$as_me: autobuild revision... $AB_VERSION" >&6;} + + hostname=`hostname` + if test "$hostname"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild hostname... $hostname" >&5 +$as_echo "$as_me: autobuild hostname... $hostname" >&6;} + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild mode... $autobuild_mode" >&5 +$as_echo "$as_me: autobuild mode... $autobuild_mode" >&6;} + + date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ` + if test "$?" != 0; then + date=`date` + fi + if test "$date"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild timestamp... $date" >&5 +$as_echo "$as_me: autobuild timestamp... $date" >&6;} + fi + + + +M4SH='$(AUTOM4TE) --language=m4sh' + + +CONFIG_STATUS_DEPENDENCIES='$(top_srcdir)/ChangeLog' -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${sublibobjs_supported-no}" >&5 -$as_echo "${sublibobjs_supported-no}" >&6; } ## ------------------------------- ## @@ -3489,8 +3625,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3604,9 +3740,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3648,8 +3783,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3706,9 +3841,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3759,8 +3894,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -4178,7 +4313,7 @@ $as_echo_n "checking whether cc understa fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4337,7 +4472,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4353,11 +4488,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -4396,7 +4531,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4412,18 +4547,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4444,8 +4579,8 @@ esac -macro_version='2.2.10' -macro_revision='1.3175' +macro_version='2.4' +macro_revision='1.3293' @@ -4461,77 +4596,6 @@ macro_revision='1.3175' ltmain="$ac_aux_dir/ltmain.sh" -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' @@ -4556,7 +4620,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -4658,7 +4722,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -4734,7 +4798,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4800,7 +4864,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4867,7 +4931,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -4983,7 +5047,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -5372,8 +5436,8 @@ $as_echo_n "checking whether the shell u # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -5422,6 +5486,80 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if test "${lt_cv_to_host_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : @@ -5438,6 +5576,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -5744,27 +5887,191 @@ sysv4 | sysv4.3*) siemens) lt_cv_deplibs_check_method=pass_all ;; - pc) - lt_cv_deplibs_check_method=pass_all + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +$as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + + + + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -5774,8 +6081,10 @@ test -z "$deplibs_check_method" && depli if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : @@ -5791,7 +6100,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5811,11 +6120,15 @@ $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : @@ -5831,7 +6144,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5850,6 +6163,10 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -5861,18 +6178,74 @@ ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if test "${lt_cv_ar_at_file+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + @@ -6212,8 +6585,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -6249,6 +6622,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -6290,6 +6664,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -6301,7 +6687,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -6327,8 +6713,8 @@ static const void *lt_preloaded_setup() _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -6338,8 +6724,8 @@ _LT_EOF test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -6376,6 +6762,24 @@ else $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + + @@ -6391,8 +6795,38 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } @@ -6591,6 +7025,123 @@ esac need_locks="$enable_libtool_lock" +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test "${lt_cv_path_mainfest_tool+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + case $host_os in rhapsody* | darwin*) @@ -7328,8 +7879,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -8166,8 +8716,6 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -8332,6 +8880,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -8451,13 +9005,17 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -8518,6 +9076,11 @@ fi + + + + + # # Check to make sure the static flag actually works. # @@ -8868,7 +9431,8 @@ _LT_EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -8916,7 +9480,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -8986,8 +9550,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -9005,8 +9569,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -9052,8 +9616,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -9183,7 +9747,13 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9196,22 +9766,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -9223,7 +9800,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9236,22 +9819,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -9296,20 +9886,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -9374,7 +10007,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -9382,7 +10015,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -9398,7 +10031,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -9422,10 +10055,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -9504,23 +10137,36 @@ fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -9605,7 +10251,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' @@ -9624,9 +10270,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -10202,8 +10848,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -10236,13 +10883,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -11178,10 +11883,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11284,10 +11989,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11967,10 +12672,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -12170,8 +12875,7 @@ for ac_func in argz_add argz_append argz do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -12221,7 +12925,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_argz_works" >&5 $as_echo "$lt_cv_sys_argz_works" >&6; } - if test $lt_cv_sys_argz_works = yes; then : + if test "$lt_cv_sys_argz_works" = yes; then : $as_echo "#define HAVE_WORKING_ARGZ 1" >>confdefs.h @@ -12305,8 +13009,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -12320,8 +13023,7 @@ for ac_func in closedir opendir readdir do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -12340,8 +13042,7 @@ for ac_func in strlcat strlcpy do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -12363,8 +13064,16 @@ cat >>confdefs.h <<_ACEOF _ACEOF +name= +eval "lt_libprefix=\"$libname_spec\"" + +cat >>confdefs.h <<_ACEOF +#define LT_LIBPREFIX "$lt_libprefix" +_ACEOF + + name=ltdl -LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` +eval "LTDLOPEN=\"$libname_spec\"" @@ -12754,6 +13463,16 @@ fi + + +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf + if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then @@ -12795,7 +13514,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -12811,11 +13530,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -12854,7 +13573,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -12870,18 +13589,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -12976,6 +13695,7 @@ $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX @@ -12993,6 +13713,7 @@ $RM -r conftest* fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do @@ -13103,7 +13824,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -13132,8 +13853,8 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -13275,7 +13996,13 @@ $as_echo_n "checking whether the $compil allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -13288,22 +14015,29 @@ main () _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -13316,7 +14050,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -13329,22 +14069,29 @@ main () _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -13387,29 +14134,75 @@ if test -z "$aix_libpath"; then aix_libp ;; cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; darwin* | rhapsody*) @@ -13515,7 +14308,7 @@ if test -z "$aix_libpath"; then aix_libp ;; *) if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -13586,10 +14379,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -13630,9 +14423,9 @@ if test -z "$aix_libpath"; then aix_libp *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes @@ -13910,7 +14703,7 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac @@ -13997,9 +14790,9 @@ if test -z "$aix_libpath"; then aix_libp if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -14134,6 +14927,13 @@ private: }; _LT_EOF + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -14147,7 +14947,7 @@ if { { eval echo "\"\$as_me\":${as_linen pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -14156,13 +14956,22 @@ if { { eval echo "\"\$as_me\":${as_linen test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} in + -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. @@ -14182,8 +14991,10 @@ if { { eval echo "\"\$as_me\":${as_linen postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -14219,6 +15030,7 @@ else fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in @@ -14319,8 +15131,6 @@ fi lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -14424,6 +15234,11 @@ $as_echo_n "checking for $compiler optio ;; esac ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; dgux*) case $cc_basename in ec++*) @@ -14641,10 +15456,17 @@ case $host_os in lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_prog_compiler_pic_CXX" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. @@ -14702,6 +15524,8 @@ fi + + # # Check to make sure the static flag actually works. # @@ -14879,6 +15703,7 @@ fi $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. @@ -14893,15 +15718,20 @@ $as_echo_n "checking whether the $compil ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" - ;; + ;; cygwin* | mingw* | cegcc*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; + case $cc_basename in + cl*) ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; + ;; esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } @@ -15164,8 +15994,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -15197,13 +16028,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -15757,6 +16646,7 @@ fi fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -15779,7 +16669,7 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -15823,7 +16713,7 @@ fi fi if test -z "$F77"; then ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -16076,7 +16966,9 @@ $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} + CFLAGS=$FFLAGS compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do @@ -16137,8 +17029,6 @@ $as_echo "$enable_static" >&6; } lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' @@ -16303,6 +17193,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic_F77='--shared' lt_prog_compiler_static_F77='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_F77='-Wl,-Wl,,' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -16422,10 +17318,17 @@ case $host_os in lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_F77" >&5 -$as_echo "$lt_prog_compiler_pic_F77" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic_F77+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 +$as_echo "$lt_cv_prog_compiler_pic_F77" >&6; } +lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77 # # Check to make sure the PIC flag actually works. @@ -16483,6 +17386,8 @@ fi + + # # Check to make sure the static flag actually works. # @@ -16824,7 +17729,8 @@ _LT_EOF allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_F77='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -16872,7 +17778,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -16942,8 +17848,8 @@ _LT_EOF archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -16961,8 +17867,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi @@ -17008,8 +17914,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi @@ -17139,29 +18045,42 @@ _LT_EOF allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__F77+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -17173,29 +18092,42 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__F77+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -17240,20 +18172,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + file_list_spec_F77='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, F77)='true' + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_F77='chmod 644 $oldlib' + postlink_cmds_F77='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_F77=yes + ;; + esac ;; darwin* | rhapsody*) @@ -17318,7 +18293,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no @@ -17326,7 +18301,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -17342,7 +18317,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -17366,10 +18341,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -17409,22 +18384,37 @@ if test -z "$aix_libpath"; then aix_libp irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat > conftest.$ac_ext <<_ACEOF -int foo(void) {} + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat > conftest.$ac_ext <<_ACEOF + + subroutine foo + end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -17509,7 +18499,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' @@ -17528,9 +18518,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag_F77=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -17940,8 +18930,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -17973,13 +18964,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -18528,6 +19577,7 @@ fi GCC=$lt_save_GCC CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes ac_ext=c @@ -18542,7 +19592,7 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -18586,7 +19636,7 @@ fi fi if test -z "$FC"; then ac_ct_FC=$FC - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -18835,7 +19885,9 @@ $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} + CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu @@ -18910,6 +19962,13 @@ cat > conftest.$ac_ext <<_LT_EOF end _LT_EOF + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -18923,7 +19982,7 @@ if { { eval echo "\"\$as_me\":${as_linen pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -18932,13 +19991,22 @@ if { { eval echo "\"\$as_me\":${as_linen test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} in + -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. @@ -18958,8 +20026,10 @@ if { { eval echo "\"\$as_me\":${as_linen postdeps_FC="${postdeps_FC} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -18995,6 +20065,7 @@ else fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken @@ -19023,8 +20094,6 @@ fi lt_prog_compiler_pic_FC= lt_prog_compiler_static_FC= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_FC='-Wl,' @@ -19189,6 +20258,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic_FC='--shared' lt_prog_compiler_static_FC='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_FC='-Wl,-Wl,,' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -19308,10 +20383,17 @@ case $host_os in lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_FC" >&5 -$as_echo "$lt_prog_compiler_pic_FC" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic_FC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_FC=$lt_prog_compiler_pic_FC +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_FC" >&5 +$as_echo "$lt_cv_prog_compiler_pic_FC" >&6; } +lt_prog_compiler_pic_FC=$lt_cv_prog_compiler_pic_FC # # Check to make sure the PIC flag actually works. @@ -19369,6 +20451,8 @@ fi + + # # Check to make sure the static flag actually works. # @@ -19710,7 +20794,8 @@ _LT_EOF allow_undefined_flag_FC=unsupported always_export_symbols_FC=no enable_shared_with_static_runtimes_FC=yes - export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_FC='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -19758,7 +20843,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -19828,8 +20913,8 @@ _LT_EOF archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -19847,8 +20932,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_FC=no fi @@ -19894,8 +20979,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_FC=no fi @@ -20025,29 +21110,42 @@ _LT_EOF allow_undefined_flag_FC='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__FC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__FC +fi hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -20059,29 +21157,42 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__FC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__FC +fi hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -20126,20 +21237,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec_FC=' ' - allow_undefined_flag_FC=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_FC='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_FC='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_FC=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec_FC=' ' + allow_undefined_flag_FC=unsupported + always_export_symbols_FC=yes + file_list_spec_FC='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_FC='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_FC='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, FC)='true' + enable_shared_with_static_runtimes_FC=yes + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_FC='chmod 644 $oldlib' + postlink_cmds_FC='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec_FC=' ' + allow_undefined_flag_FC=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds_FC='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_FC=yes + ;; + esac ;; darwin* | rhapsody*) @@ -20204,7 +21358,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds_FC='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_FC='-R$libdir' hardcode_direct_FC=yes hardcode_shlibpath_var_FC=no @@ -20212,7 +21366,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -20228,7 +21382,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_FC='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -20252,10 +21406,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_FC='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -20295,22 +21449,37 @@ if test -z "$aix_libpath"; then aix_libp irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat > conftest.$ac_ext <<_ACEOF -int foo(void) {} + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat > conftest.$ac_ext <<_ACEOF + + subroutine foo + end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -20395,7 +21564,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_FC='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_FC=' -expect_unresolved \*' @@ -20414,9 +21583,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag_FC=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds_FC='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -20826,8 +21995,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -20859,13 +22029,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -21413,7 +22641,8 @@ fi fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes ac_ext=c @@ -21564,10 +22793,12 @@ $RM -r conftest* # Allow CC to be a program name with arguments. -lt_save_CC="$CC" +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS compiler=$CC compiler_GCJ=$CC LD_GCJ="$LD" @@ -21657,8 +22888,6 @@ fi lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' @@ -21823,6 +23052,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic_GCJ='--shared' lt_prog_compiler_static_GCJ='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_GCJ='-Wl,-Wl,,' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -21942,10 +23177,17 @@ case $host_os in lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_GCJ" >&5 -$as_echo "$lt_prog_compiler_pic_GCJ" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic_GCJ+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_GCJ=$lt_prog_compiler_pic_GCJ +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_GCJ" >&5 +$as_echo "$lt_cv_prog_compiler_pic_GCJ" >&6; } +lt_prog_compiler_pic_GCJ=$lt_cv_prog_compiler_pic_GCJ # # Check to make sure the PIC flag actually works. @@ -22003,6 +23245,8 @@ fi + + # # Check to make sure the static flag actually works. # @@ -22344,7 +23588,8 @@ _LT_EOF allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes - export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_GCJ='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -22392,7 +23637,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -22462,8 +23707,8 @@ _LT_EOF archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -22481,8 +23726,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi @@ -22528,8 +23773,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi @@ -22659,7 +23904,13 @@ _LT_EOF allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__GCJ+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -22672,22 +23923,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__GCJ=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__GCJ"; then + lt_cv_aix_libpath__GCJ=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__GCJ"; then + lt_cv_aix_libpath__GCJ="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__GCJ +fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -22699,7 +23957,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__GCJ+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -22712,22 +23976,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__GCJ=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__GCJ"; then + lt_cv_aix_libpath__GCJ=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__GCJ"; then + lt_cv_aix_libpath__GCJ="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__GCJ +fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -22772,20 +24043,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec_GCJ=' ' - allow_undefined_flag_GCJ=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_GCJ='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + file_list_spec_GCJ='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_GCJ='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, GCJ)='true' + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_GCJ='chmod 644 $oldlib' + postlink_cmds_GCJ='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_GCJ=yes + ;; + esac ;; darwin* | rhapsody*) @@ -22850,7 +24164,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no @@ -22858,7 +24172,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds_GCJ='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_GCJ='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -22874,7 +24188,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_GCJ='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -22898,10 +24212,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_GCJ='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_GCJ='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -22941,23 +24255,36 @@ if test -z "$aix_libpath"; then aix_libp irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -23042,7 +24369,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' @@ -23061,9 +24388,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag_GCJ=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds_GCJ='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_GCJ='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -23409,7 +24736,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu GCC=$lt_save_GCC -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. @@ -23552,9 +24880,11 @@ $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} +CFLAGS= compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do @@ -23583,9 +24913,12 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS con ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +# Ensure the correct file name (and path) conversion function +# is available to the test suite. ## --------------------------- ## ## Work out which tests to run ## @@ -23631,6 +24964,40 @@ else fi +## Whether `make' supports order-only prerequisites. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports order-only prerequisites" >&5 +$as_echo_n "checking whether ${MAKE-make} supports order-only prerequisites... " >&6; } +if test "${lt_cv_make_order_only+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + mkdir conftest.dir + cd conftest.dir + touch b + touch a +cat >confmk << 'END' +a: b | c +a b c: + touch $@ +END + touch c + if ${MAKE-make} -s -q -f confmk >/dev/null 2>&1; then + lt_cv_make_order_only=yes + else + lt_cv_make_order_only=no + fi + cd .. + rm -rf conftest.dir + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_make_order_only" >&5 +$as_echo "$lt_cv_make_order_only" >&6; } +if test $lt_cv_make_order_only = yes; then + ORDER='|' +else + ORDER='' +fi + + ## ------------- ## ## Documentation ## ## ------------- ## @@ -23726,6 +25093,7 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -23748,49 +25116,45 @@ else am__EXEEXT_FALSE= fi -if test -z "${LTDL_SUBDIR_LIBOBJS_TRUE}" && test -z "${LTDL_SUBDIR_LIBOBJS_FALSE}"; then - as_fn_error "conditional \"LTDL_SUBDIR_LIBOBJS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then - as_fn_error "conditional \"INSTALL_LTDL\" was never defined. + as_fn_error $? "conditional \"INSTALL_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then - as_fn_error "conditional \"CONVENIENCE_LTDL\" was never defined. + as_fn_error $? "conditional \"CONVENIENCE_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi LT_CONFIG_H=config.h if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CXX_TRUE}" && test -z "${HAVE_CXX_FALSE}"; then - as_fn_error "conditional \"HAVE_CXX\" was never defined. + as_fn_error $? "conditional \"HAVE_CXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_F77_TRUE}" && test -z "${HAVE_F77_FALSE}"; then - as_fn_error "conditional \"HAVE_F77\" was never defined. + as_fn_error $? "conditional \"HAVE_F77\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_FC_TRUE}" && test -z "${HAVE_FC_FALSE}"; then - as_fn_error "conditional \"HAVE_FC\" was never defined. + as_fn_error $? "conditional \"HAVE_FC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GCJ_TRUE}" && test -z "${HAVE_GCJ_FALSE}"; then - as_fn_error "conditional \"HAVE_GCJ\" was never defined. + as_fn_error $? "conditional \"HAVE_GCJ\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_RC_TRUE}" && test -z "${HAVE_RC_FALSE}"; then - as_fn_error "conditional \"HAVE_RC\" was never defined. + as_fn_error $? "conditional \"HAVE_RC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -23940,19 +25304,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -24148,7 +25512,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -24201,8 +25565,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libtool $as_me 2.2.10, which was -generated by GNU Autoconf 2.65. Invocation command line was +This file was extended by GNU Libtool $as_me 2.4, which was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -24261,17 +25625,19 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." +Report bugs to . +GNU Libtool home page: . +General help using GNU software: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libtool config.status 2.2.10 -configured by $0, generated by GNU Autoconf 2.65, +GNU Libtool config.status 2.4 +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -24289,11 +25655,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -24315,6 +25686,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -24327,7 +25699,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -24336,7 +25708,7 @@ Try \`$0 --help' for more information."; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -24422,12 +25794,18 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' @@ -24442,14 +25820,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' @@ -24482,12 +25863,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' @@ -24554,16 +25935,16 @@ lt_prog_compiler_no_builtin_flag_F77='`$ lt_prog_compiler_no_builtin_flag_FC='`$ECHO "$lt_prog_compiler_no_builtin_flag_FC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_GCJ='`$ECHO "$lt_prog_compiler_no_builtin_flag_GCJ" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_RC='`$ECHO "$lt_prog_compiler_no_builtin_flag_RC" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_FC='`$ECHO "$lt_prog_compiler_wl_FC" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_GCJ='`$ECHO "$lt_prog_compiler_wl_GCJ" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_RC='`$ECHO "$lt_prog_compiler_wl_RC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_F77='`$ECHO "$lt_prog_compiler_pic_F77" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_FC='`$ECHO "$lt_prog_compiler_pic_FC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_GCJ='`$ECHO "$lt_prog_compiler_pic_GCJ" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_RC='`$ECHO "$lt_prog_compiler_pic_RC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_FC='`$ECHO "$lt_prog_compiler_wl_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_GCJ='`$ECHO "$lt_prog_compiler_wl_GCJ" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_RC='`$ECHO "$lt_prog_compiler_wl_RC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_F77='`$ECHO "$lt_prog_compiler_static_F77" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_FC='`$ECHO "$lt_prog_compiler_static_FC" | $SED "$delay_single_quote_subst"`' @@ -24694,11 +26075,6 @@ link_all_deplibs_F77='`$ECHO "$link_all_ link_all_deplibs_FC='`$ECHO "$link_all_deplibs_FC" | $SED "$delay_single_quote_subst"`' link_all_deplibs_GCJ='`$ECHO "$link_all_deplibs_GCJ" | $SED "$delay_single_quote_subst"`' link_all_deplibs_RC='`$ECHO "$link_all_deplibs_RC" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "$fix_srcfile_path_CXX" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path_F77='`$ECHO "$fix_srcfile_path_F77" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path_FC='`$ECHO "$fix_srcfile_path_FC" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path_GCJ='`$ECHO "$fix_srcfile_path_GCJ" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path_RC='`$ECHO "$fix_srcfile_path_RC" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_F77='`$ECHO "$always_export_symbols_F77" | $SED "$delay_single_quote_subst"`' always_export_symbols_FC='`$ECHO "$always_export_symbols_FC" | $SED "$delay_single_quote_subst"`' @@ -24724,6 +26100,11 @@ prelink_cmds_F77='`$ECHO "$prelink_cmds_ prelink_cmds_FC='`$ECHO "$prelink_cmds_FC" | $SED "$delay_single_quote_subst"`' prelink_cmds_GCJ='`$ECHO "$prelink_cmds_GCJ" | $SED "$delay_single_quote_subst"`' prelink_cmds_RC='`$ECHO "$prelink_cmds_RC" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_F77='`$ECHO "$postlink_cmds_F77" | $SED "$delay_single_quote_subst"`' +postlink_cmds_FC='`$ECHO "$postlink_cmds_FC" | $SED "$delay_single_quote_subst"`' +postlink_cmds_GCJ='`$ECHO "$postlink_cmds_GCJ" | $SED "$delay_single_quote_subst"`' +postlink_cmds_RC='`$ECHO "$postlink_cmds_RC" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_F77='`$ECHO "$file_list_spec_F77" | $SED "$delay_single_quote_subst"`' file_list_spec_FC='`$ECHO "$file_list_spec_FC" | $SED "$delay_single_quote_subst"`' @@ -24795,8 +26176,12 @@ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -24806,12 +26191,14 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -24827,7 +26214,6 @@ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -24865,16 +26251,16 @@ lt_prog_compiler_no_builtin_flag_F77 \ lt_prog_compiler_no_builtin_flag_FC \ lt_prog_compiler_no_builtin_flag_GCJ \ lt_prog_compiler_no_builtin_flag_RC \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_wl_F77 \ -lt_prog_compiler_wl_FC \ -lt_prog_compiler_wl_GCJ \ -lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_pic_FC \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_pic_RC \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_wl_F77 \ +lt_prog_compiler_wl_FC \ +lt_prog_compiler_wl_GCJ \ +lt_prog_compiler_wl_RC \ lt_prog_compiler_static_CXX \ lt_prog_compiler_static_F77 \ lt_prog_compiler_static_FC \ @@ -24930,11 +26316,6 @@ hardcode_libdir_separator_F77 \ hardcode_libdir_separator_FC \ hardcode_libdir_separator_GCJ \ hardcode_libdir_separator_RC \ -fix_srcfile_path_CXX \ -fix_srcfile_path_F77 \ -fix_srcfile_path_FC \ -fix_srcfile_path_GCJ \ -fix_srcfile_path_RC \ exclude_expsyms_CXX \ exclude_expsyms_F77 \ exclude_expsyms_FC \ @@ -25004,6 +26385,7 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ @@ -25058,7 +26440,12 @@ prelink_cmds_CXX \ prelink_cmds_F77 \ prelink_cmds_FC \ prelink_cmds_GCJ \ -prelink_cmds_RC; do +prelink_cmds_RC \ +postlink_cmds_CXX \ +postlink_cmds_F77 \ +postlink_cmds_FC \ +postlink_cmds_GCJ \ +postlink_cmds_RC; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" @@ -25113,7 +26500,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -25151,7 +26538,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -25168,7 +26555,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -25182,18 +26569,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -25282,20 +26669,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -25323,7 +26718,7 @@ for ac_last_try in false false :; do if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -25408,7 +26803,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -25421,7 +26816,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -25449,7 +26844,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -25476,7 +26871,7 @@ $as_echo "$as_me: creating $ac_file" >&6 case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -25613,22 +27008,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -25639,19 +27034,19 @@ which seems to be undefined. Please mak $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -25699,7 +27094,7 @@ $as_echo "$as_me: executing $ac_file com "tests/atconfig":C) cat >tests/atconfig <> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -26497,12 +27880,12 @@ with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX @@ -26589,9 +27972,6 @@ inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_CXX - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX @@ -26607,6 +27987,9 @@ include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX @@ -26654,12 +28037,12 @@ with_gcc=$GCC_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 @@ -26746,9 +28129,6 @@ inherit_rpath=$inherit_rpath_F77 # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_F77 - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_F77 @@ -26764,6 +28144,9 @@ include_expsyms=$lt_include_expsyms_F77 # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_F77 +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_F77 + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_F77 @@ -26811,12 +28194,12 @@ with_gcc=$GCC_FC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_FC -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_FC - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_FC +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_FC + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_FC @@ -26903,9 +28286,6 @@ inherit_rpath=$inherit_rpath_FC # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_FC -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_FC - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_FC @@ -26921,6 +28301,9 @@ include_expsyms=$lt_include_expsyms_FC # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_FC +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_FC + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_FC @@ -26968,12 +28351,12 @@ with_gcc=$GCC_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_GCJ - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ @@ -27060,9 +28443,6 @@ inherit_rpath=$inherit_rpath_GCJ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_GCJ - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ @@ -27078,6 +28458,9 @@ include_expsyms=$lt_include_expsyms_GCJ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_GCJ +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_GCJ + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_GCJ @@ -27125,12 +28508,12 @@ with_gcc=$GCC_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_RC - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC @@ -27217,9 +28600,6 @@ inherit_rpath=$inherit_rpath_RC # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_RC - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_RC @@ -27235,6 +28615,9 @@ include_expsyms=$lt_include_expsyms_RC # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_RC +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_RC + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_RC @@ -27269,7 +28652,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -27290,7 +28673,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -ruNp libtool-2.2.10/configure.ac libtool-2.4/configure.ac --- libtool-2.2.10/configure.ac 2010-06-09 20:00:04.000000000 +0700 +++ libtool-2.4/configure.ac 2010-09-22 21:43:26.000000000 +0700 @@ -1,6 +1,7 @@ # Process this file with autoconf to create configure. -*- autoconf -*- -# Copyright (C) 2001, 2004, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2004, 2005, 2008, 2010 Free Software Foundation, +# Inc. # Written by Gary V. Vaughan, 2001 # # This file is part of GNU Libtool. @@ -30,7 +31,9 @@ dnl Oldest automake required for bootstr ## ------------------------ ## ## Autoconf initialisation. ## ## ------------------------ ## -AC_INIT([libtool], [2.2.10], [bug-libtool@gnu.org]) +AC_INIT([GNU Libtool], [2.4], [bug-libtool@gnu.org]) +m4_ifndef([AC_PACKAGE_URL], + [AC_SUBST([PACKAGE_URL], [http://www.gnu.org/software/libtool/])]) AC_CONFIG_HEADERS([config.h:config-h.in]) AC_CONFIG_SRCDIR([libtoolize.in]) LT_CONFIG_LTDL_DIR([libltdl], [nonrecursive]) @@ -110,7 +113,8 @@ case $lt_alpha in TIMESTAMP= ;; esac -AS_BOX([Configuring AC_PACKAGE_TARNAME${TIMESTAMP:+" (Build:$TIMESTAMP)"} AC_PACKAGE_VERSION]) +timestamp_string="${TIMESTAMP:+ (Build:$TIMESTAMP)}" +AS_BOX([Configuring AC_PACKAGE_TARNAME$timestamp_string AC_PACKAGE_VERSION]) echo AC_SUBST([TIMESTAMP]) AC_SUBST([package_revision]) @@ -122,7 +126,20 @@ AC_SUBST([package_revision]) dnl These are bootstrap requirements! Once built, libtool may work with dnl much older releases of autoconf and automake. See release notes. -AM_INIT_AUTOMAKE([1.10.1 gnu subdir-objects dist-lzma]) +dnl 1.11 is needed for color-tests, 1.11.1 fixes a security issue. +AM_INIT_AUTOMAKE([1.11.1 gnu subdir-objects dist-xz color-tests parallel-tests]) + + +## ------------------------- ## +## Autobuild initialisation. ## +## ------------------------- ## + +# You can set autobuild_mode at configure time to specify a "unique" +# string for this build. +: ${autobuild_mode=default} +AB_VERSION="AC_PACKAGE_VERSION ($TIMESTAMP)" +AB_INIT([$autobuild_mode]) + dnl We use m4sh to generate libtool's portable shell scripts AC_SUBST([M4SH], ['$(AUTOM4TE) --language=m4sh']) @@ -130,13 +147,6 @@ AC_SUBST([M4SH], ['$(AUTOM4TE) --languag dnl Make sure config.status is regenerated when the version timestamp changes AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/ChangeLog']) -dnl when installed libtool is used with automake-1.9.x or autoconf-2.59, -dnl subdir libobjs don't work without a little extra help -AC_MSG_CHECKING([whether subdir libobjs are useable]) -test -f $srcdir/argz.c || sublibobjs_supported=yes -AM_CONDITIONAL([LTDL_SUBDIR_LIBOBJS], test x"${sublibobjs_supported-no}" != xno) -AC_MSG_RESULT([${sublibobjs_supported-no}]) - ## ------------------------------- ## ## Libtool specific configuration. ## @@ -189,6 +199,10 @@ LT_LANG(Fortran) LT_LANG(Java) LT_LANG(Windows Resource) +# Ensure the correct file name (and path) conversion function +# is available to the test suite. +AC_SUBST([to_host_file_cmd])dnl +AC_SUBST([to_tool_file_cmd])dnl ## --------------------------- ## ## Work out which tests to run ## @@ -199,6 +213,34 @@ AM_CONDITIONAL(HAVE_FC,[test -n "[$]_LT_ AM_CONDITIONAL(HAVE_GCJ, [test -n "[$]_LT_TAGVAR(compiler, GCJ)"]) AM_CONDITIONAL(HAVE_RC, [test -n "[$]_LT_TAGVAR(compiler, RC)"]) +## Whether `make' supports order-only prerequisites. +AC_CACHE_CHECK([whether ${MAKE-make} supports order-only prerequisites], + [lt_cv_make_order_only], + [mkdir conftest.dir + cd conftest.dir + touch b + touch a +cat >confmk << 'END' +a: b | c +a b c: + touch $[]@ +END + touch c + if ${MAKE-make} -s -q -f confmk >/dev/null 2>&1; then + lt_cv_make_order_only=yes + else + lt_cv_make_order_only=no + fi + cd .. + rm -rf conftest.dir +]) +if test $lt_cv_make_order_only = yes; then + ORDER='|' +else + ORDER='' +fi +AC_SUBST([ORDER]) + ## ------------- ## ## Documentation ## ## ------------- ## diff -ruNp libtool-2.2.10/doc/libtool.1 libtool-2.4/doc/libtool.1 --- libtool-2.2.10/doc/libtool.1 2010-06-09 20:08:53.000000000 +0700 +++ libtool-2.4/doc/libtool.1 2010-09-22 21:45:44.000000000 +0700 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2. -.TH LIBTOOL "1" "June 2010" "libtool 2.2.10" "User Commands" +.TH LIBTOOL "1" "September 2010" "libtool 2.4" "User Commands" .SH NAME -libtool \- manual page for libtool 2.2.10 +libtool \- manual page for libtool 2.4 .SH SYNOPSIS .B libtool [\fIOPTION\fR]... [\fIMODE-ARG\fR]... @@ -94,6 +94,9 @@ remove libraries from an installed direc MODE\-ARGS vary depending on the MODE. When passed as first option, `\-\-mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. .PP +GNU libtool home page: . +General help using GNU software: . +.PP Description of compile mode: .PP Compile a source file into a libtool library object. @@ -314,7 +317,7 @@ When reporting a bug, please describe a include the following information: .TP host\-triplet: -x86_64\-apple\-darwin10.3.0 +x86_64\-apple\-darwin10.4.0 .TP shell: /bin/sh @@ -329,13 +332,13 @@ linker: /usr/libexec/gcc/i686\-apple\-darwin10/4.2.1/ld (gnu? no) .TP libtool: -(GNU libtool) 2.2.10 +(GNU libtool) 2.4 .TP automake: automake (GNU automake) 1.11.1 .TP autoconf: -autoconf (GNU Autoconf) 2.65 +autoconf (GNU Autoconf) 2.67 .SH AUTHOR Written by Gordon Matzigkeit , 1996 .SH "REPORTING BUGS" diff -ruNp libtool-2.2.10/doc/libtool.info libtool-2.4/doc/libtool.info --- libtool-2.2.10/doc/libtool.info 2010-06-09 20:09:39.000000000 +0700 +++ libtool-2.4/doc/libtool.info 2010-09-22 21:45:44.000000000 +0700 @@ -13,9 +13,9 @@ START-INFO-DIR-ENTRY * libtoolize: (libtool)Invoking libtoolize. Adding libtool support. END-INFO-DIR-ENTRY - This file documents GNU Libtool 2.2.10 + This file documents GNU Libtool 2.4 - Copyright (C) 1996-2009 Free Software Foundation, Inc. + Copyright (C) 1996-2010 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -26,106 +26,114 @@ Free Documentation License".  Indirect: -libtool.info-1: 1004 -libtool.info-2: 272647 +libtool.info-1: 1001 +libtool.info-2: 298519  Tag Table: (Indirect) -Node: Top1004 -Node: Introduction7496 -Node: Motivation9323 -Node: Issues10643 -Node: Other implementations12121 -Node: Postmortem12664 -Node: Libtool paradigm14284 -Node: Using libtool15229 -Node: Creating object files17332 -Node: Linking libraries21071 -Ref: Linking libraries-Footnote-124899 -Node: Linking executables25040 -Ref: Linking executables-Footnote-130291 -Ref: Linking executables-Footnote-230584 -Node: Wrapper executables30664 -Node: Debugging executables32887 -Node: Installing libraries35710 -Ref: Installing libraries-Footnote-138872 -Node: Installing executables38943 -Node: Static libraries39779 -Node: Invoking libtool43056 -Node: Compile mode48349 -Node: Link mode51310 -Node: Execute mode60475 -Node: Install mode61255 -Node: Finish mode63612 -Node: Uninstall mode64047 -Node: Clean mode64488 -Node: Integrating libtool64947 -Node: Autoconf macros65704 -Node: Makefile rules69551 -Node: Using Automake70654 -Ref: Using Automake-Footnote-172235 -Node: Configuring72631 -Node: LT_INIT73883 -Ref: LT_INIT-Footnote-187982 -Node: Configure notes88235 -Node: Distributing91410 -Node: Invoking libtoolize92327 -Node: Autoconf and LTLIBOBJS98515 -Node: Static-only libraries99259 -Ref: Static-only libraries-Footnote-1100586 -Node: Other languages100695 -Node: C++ libraries101403 -Node: Tags102841 -Node: Versioning104233 -Node: Interfaces105601 -Node: Libtool versioning106234 -Node: Updating version info108447 -Node: Release numbers111475 -Node: Library tips113331 -Node: C header files116137 -Ref: C header files-Footnote-1119811 -Node: Inter-library dependencies120020 -Node: Dlopened modules122684 -Node: Building modules124591 -Node: Dlpreopening125792 -Node: Linking with dlopened modules131350 -Node: Finding the dlname136279 -Ref: Finding the dlname-Footnote-1137597 -Node: Dlopen issues137650 -Node: Using libltdl138705 -Node: Libltdl interface140545 -Ref: Libltdl interface-Footnote-1154202 -Node: Modules for libltdl154496 -Node: Thread Safety in libltdl157022 -Node: User defined module data158035 -Node: Module loaders for libltdl165527 -Ref: Module loaders for libltdl-Footnote-1174770 -Node: Distributing libltdl174876 -Ref: Distributing libltdl-Footnote-1188658 -Ref: Distributing libltdl-Footnote-2188954 -Node: Trace interface189104 -Node: FAQ189940 -Node: Stripped link flags190278 -Node: Troubleshooting191724 -Node: Libtool test suite192247 -Node: Test descriptions193025 -Node: When tests fail204243 -Node: Reporting bugs205435 -Node: Maintaining207053 -Node: New ports207796 -Node: Information sources208489 -Node: Porting inter-library dependencies210957 -Node: Tested platforms213681 -Node: Platform quirks222111 -Node: References223091 -Node: Compilers223941 -Ref: Compilers-Footnote-1225517 -Node: Reloadable objects225833 -Node: Multiple dependencies226192 -Node: Archivers227089 -Node: libtool script contents227655 -Node: Cheap tricks245614 -Node: GNU Free Documentation License247481 -Node: Index272647 +Node: Top1001 +Node: Introduction7635 +Node: Motivation9462 +Node: Issues10782 +Node: Other implementations12260 +Node: Postmortem12803 +Node: Libtool paradigm14423 +Node: Using libtool15368 +Node: Creating object files17471 +Node: Linking libraries21204 +Ref: Linking libraries-Footnote-125031 +Node: Linking executables25172 +Ref: Linking executables-Footnote-130423 +Ref: Linking executables-Footnote-230716 +Node: Wrapper executables30796 +Node: Debugging executables33019 +Node: Installing libraries35842 +Ref: Installing libraries-Footnote-139004 +Node: Installing executables39075 +Node: Static libraries39911 +Node: Invoking libtool43188 +Node: Compile mode48481 +Node: Link mode51442 +Node: Execute mode60609 +Node: Install mode61389 +Node: Finish mode63762 +Node: Uninstall mode64624 +Node: Clean mode65065 +Node: Integrating libtool65524 +Node: Autoconf macros66281 +Node: Makefile rules70128 +Node: Using Automake71231 +Ref: Using Automake-Footnote-172812 +Node: Configuring73212 +Node: LT_INIT74464 +Ref: LT_INIT-Footnote-188714 +Node: Configure notes88967 +Node: Distributing92142 +Node: Invoking libtoolize93059 +Node: Autoconf and LTLIBOBJS99247 +Node: Static-only libraries99991 +Ref: Static-only libraries-Footnote-1101318 +Node: Other languages101427 +Node: C++ libraries102135 +Node: Tags103573 +Node: Versioning104965 +Node: Interfaces106333 +Node: Libtool versioning106966 +Node: Updating version info109179 +Node: Release numbers112207 +Node: Library tips114063 +Node: C header files116869 +Ref: C header files-Footnote-1120543 +Node: Inter-library dependencies120752 +Node: Dlopened modules123416 +Node: Building modules125320 +Node: Dlpreopening126521 +Node: Linking with dlopened modules132178 +Node: Finding the dlname137107 +Ref: Finding the dlname-Footnote-1138425 +Node: Dlopen issues138478 +Node: Using libltdl139533 +Node: Libltdl interface141373 +Ref: Libltdl interface-Footnote-1155034 +Node: Modules for libltdl155328 +Node: Thread Safety in libltdl157854 +Node: User defined module data158867 +Node: Module loaders for libltdl166360 +Ref: Module loaders for libltdl-Footnote-1175631 +Node: Distributing libltdl175737 +Ref: Distributing libltdl-Footnote-1189548 +Ref: Distributing libltdl-Footnote-2189844 +Node: Trace interface189994 +Node: FAQ190830 +Node: Stripped link flags191168 +Node: Troubleshooting192614 +Node: Libtool test suite193137 +Node: Test descriptions193915 +Node: When tests fail206329 +Node: Reporting bugs207333 +Node: Maintaining208951 +Node: New ports209694 +Node: Information sources210387 +Node: Porting inter-library dependencies212855 +Node: Tested platforms215581 +Node: Platform quirks224011 +Node: References225136 +Node: Compilers225986 +Ref: Compilers-Footnote-1227562 +Node: Reloadable objects227878 +Node: Multiple dependencies228237 +Node: Archivers229134 +Node: Cross compiling229724 +Node: File name conversion235737 +Node: File Name Conversion Failure238578 +Node: Native MinGW File Name Conversion239826 +Node: Cygwin/Windows File Name Conversion241389 +Node: Unix/Windows File Name Conversion242762 +Node: LT_CYGPATH243531 +Node: Cygwin to MinGW Cross246776 +Node: libtool script contents251080 +Node: Cheap tricks271473 +Node: GNU Free Documentation License273344 +Node: Combined Index298519  End Tag Table diff -ruNp libtool-2.2.10/doc/libtool.info-1 libtool-2.4/doc/libtool.info-1 --- libtool-2.2.10/doc/libtool.info-1 2010-06-09 20:09:39.000000000 +0700 +++ libtool-2.4/doc/libtool.info-1 2010-09-22 21:45:44.000000000 +0700 @@ -13,9 +13,9 @@ START-INFO-DIR-ENTRY * libtoolize: (libtool)Invoking libtoolize. Adding libtool support. END-INFO-DIR-ENTRY - This file documents GNU Libtool 2.2.10 + This file documents GNU Libtool 2.4 - Copyright (C) 1996-2009 Free Software Foundation, Inc. + Copyright (C) 1996-2010 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -32,7 +32,7 @@ Shared library support for GNU This file documents GNU Libtool, a script that allows package developers to provide generic shared library support. This edition documents -version 2.2.10. +version 2.4. *Note Reporting bugs::, for information on how to report problems with GNU Libtool. @@ -55,7 +55,7 @@ with GNU Libtool. * Troubleshooting:: When libtool doesn't work as advertised. * Maintaining:: Information used by the libtool maintainer. * GNU Free Documentation License:: License for this manual. -* Index:: Full index. +* Combined Index:: Full index. --- The Detailed Node Listing --- @@ -176,6 +176,8 @@ Platform quirks * Reloadable objects:: Binding object files together. * Multiple dependencies:: Removing duplicate dependent libraries. * Archivers:: Programs that create static archives. +* Cross compiling:: Issues that arise when cross compiling. +* File name conversion:: Converting file names between platforms.  File: libtool.info, Node: Introduction, Next: Libtool paradigm, Prev: Top, Up: Top @@ -463,7 +465,7 @@ library. On `a23', only static librarie objects look like this: # foo.lo - a libtool object file - # Generated by ltmain.sh (GNU libtool) 2.2.10 + # Generated by ltmain.sh (GNU libtool) 2.4 # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -492,7 +494,7 @@ to build them, Libtool has compiled a PI note of it in the libtool object: # foo.lo - a libtool object file - # Generated by ltmain.sh (GNU libtool) 2.2.10 + # Generated by ltmain.sh (GNU libtool) 2.4 # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -544,8 +546,8 @@ same ones you would use to produce an ex with your compiler (*note Link mode::): a23$ libtool --mode=link gcc -g -O -o libhello.la foo.o hello.o - *** Warning: Linking the shared library libhello.la against the non-libtool - *** objects foo.o hello.o is not portable! + *** Warning: Linking the shared library libhello.la against the + *** non-libtool objects foo.o hello.o is not portable! ar cru .libs/libhello.a ranlib .libs/libhello.a creating libhello.la @@ -1457,7 +1459,7 @@ output file (with the `-o' flag) from se Pass a linker-specific flag directly to the linker. `-XCClinker FLAG' - Pass a link-specific flag to the compiler driver (CC) during + Pass a link-specific flag to the compiler driver (`CC') during linking. If the OUTPUT-FILE ends in `.la', then a libtool library is created, @@ -1513,12 +1515,13 @@ as an installation command beginning wit `-inst-prefix-dir INST-PREFIX-DIR' When installing into a temporary staging area, rather than the - final PREFIX, this argument is used to reflect the temporary path, - in much the same way `automake' uses DESTDIR. For instance, if - PREFIX is `/usr/local', but INST-PREFIX-DIR is `/tmp', then the - object will be installed under `/tmp/usr/local/'. If the - installed object is a libtool library, then the internal fields of - that library will reflect only PREFIX, not INST-PREFIX-DIR: + final `prefix', this argument is used to reflect the temporary + path, in much the same way `automake' uses `DESTDIR'. For + instance, if `prefix' is `/usr/local', but INST-PREFIX-DIR is + `/tmp', then the object will be installed under `/tmp/usr/local/'. + If the installed object is a libtool library, then the internal + fields of that library will reflect only `prefix', not + INST-PREFIX-DIR: # Directory that this library needs to be installed in: libdir='/usr/local/lib' @@ -1530,7 +1533,7 @@ as an installation command beginning wit `inst-prefix' is also used to insure that if the installed object must be relinked upon installation, that it is relinked against - the libraries in INST-PREFIX-DIR/PREFIX, not PREFIX. + the libraries in INST-PREFIX-DIR/`prefix', not `prefix'. In truth, this option is not really intended for use when calling libtool directly; it is automatically used when `libtool @@ -1560,12 +1563,18 @@ File: libtool.info, Node: Finish mode, 4.5 Finish mode =============== -"Finish" mode helps system administrators install libtool libraries so -that they can be located and linked into user programs. - - Each MODE-ARG is interpreted as the name of a library directory. -Running this command may require superuser privileges, so the -`--dry-run' option may be useful. +"Finish" mode has two functions. One is to help system administrators +install libtool libraries so that they can be located and linked into +user programs. To invoke this functionality, pass the name of a library +directory as MODE-ARG. Running this command may require superuser +privileges, and the `--dry-run' option may be useful. + + The second is to facilitate transferring libtool libraries to a +native compilation environment after they were built in a +cross-compilation environment. Cross-compilation environments may rely +on recent libtool features, and running libtool in finish mode will +make it easier to work with older versions of libtool. This task is +performed whenever the MODE-ARG is a `.la' file.  File: libtool.info, Node: Uninstall mode, Next: Clean mode, Prev: Finish mode, Up: Invoking libtool @@ -1779,10 +1788,10 @@ more information. ---------- Footnotes ---------- (1) Since GNU Automake 1.5, the flags `-dlopen' or `-dlpreopen' -(*note Link mode::) can be employed with the PROGRAM_LDADD variable. +(*note Link mode::) can be employed with the `program_LDADD' variable. Unfortunately, older releases didn't accept these flags, so if you are stuck with an ancient Automake, we recommend quoting the flag itself, -and setting PROGRAM_DEPENDENCIES too: +and setting `program_DEPENDENCIES' too: program_LDADD = "-dlopen" libfoo.la program_DEPENDENCIES = libfoo.la @@ -1834,7 +1843,7 @@ a number of macros defined by Libtool: print an error message to the standard error output and exit with failure (exit status is 63). For example: - LT_PREREQ([2.2.10]) + LT_PREREQ([2.4]) -- Macro: LT_INIT (OPTIONS) -- Macro: AC_PROG_LIBTOOL @@ -1875,8 +1884,8 @@ a number of macros defined by Libtool: The package name `default' matches any packages that have not set their name in the `PACKAGE' environment variable. - This macro also sets the shell variable LIBTOOL_DEPS, that you can - use to automatically update the libtool script if it becomes + This macro also sets the shell variable `LIBTOOL_DEPS', that you + can use to automatically update the libtool script if it becomes out-of-date. In order to do that, add to your `configure.ac': LT_INIT @@ -2049,7 +2058,7 @@ variables: -- Variable: LD The system linker to use (if the generated `libtool' requires one). If this is not set, `LT_INIT' will try to find out what is the - linker used by CC. + linker used by `CC'. -- Variable: LDFLAGS The flags to be used by `libtool' when it links a program. If @@ -2086,6 +2095,10 @@ variables: Program to use rather than checking for `as'. Only used on Cygwin/MS-Windows at the moment. + -- Variable: MANIFEST_TOOL + Program to use rather than checking for `mt', the Manifest Tool. + Only used on Cygwin/MS-Windows at the moment. + With 1.3 era libtool, if you wanted to know any details of what libtool had discovered about your architecture and environment, you had to run the script with `--config' and grep through the results. This @@ -3030,7 +3043,7 @@ interpreted language. In fact, dlopen c language interpreters to provide an efficient way to extend the language. - As of version 2.2.10, libtool provides support for dlopened modules. + As of version 2.4, libtool provides support for dlopened modules. However, you should indicate that your package is willing to use such support, by using the `LT_INIT' option `dlopen' in `configure.ac'. If this option is not given, libtool will assume no dlopening mechanism is @@ -3123,8 +3136,8 @@ using the `-dlopen' or `-dlpreopen' flag generic pointer to the appropriate object, such as `&fprintf'. -- Variable: const lt_dlsymlist lt_preloaded_symbols[] - An array of LT_DLSYMLIST structures, representing all the preloaded - symbols linked into the program proper. For each module + An array of `lt_dlsymlist' structures, representing all the + preloaded symbols linked into the program proper. For each module `-dlpreopen'ed by the Libtool linked program there is an element with the NAME of the module and an ADDRESS of `0', followed by all symbols exported from this file. For the executable itself the @@ -3135,11 +3148,14 @@ using the `-dlopen' or `-dlpreopen' flag `lt_preloaded_symbols' is `#define'd to a suitably unique name in `ltdl.h'. + This variable may not be declared `const' on some systems due to + relocation issues. + Some compilers may allow identifiers that are not valid in ANSI C, such as dollar signs. Libtool only recognizes valid ANSI C symbols (an initial ASCII letter or underscore, followed by zero or more ASCII letters, digits, and underscores), so non-ANSI symbols will not appear -in LT_PRELOADED_SYMBOLS. +in `lt_preloaded_symbols'. -- Function: int lt_dlpreload (const lt_dlsymlist *PRELOADED) Register the list of preloaded modules PRELOADED. If PRELOADED is @@ -3503,10 +3519,10 @@ libltdl provides the following functions `lt_dladdsearchdir' and `lt_dlinsertsearchdir'. 2. libltdl's search path: This search path is the value of the - environment variable LTDL_LIBRARY_PATH. + environment variable `LTDL_LIBRARY_PATH'. 3. system library search path: The system dependent library - search path (e.g. on Linux it is LD_LIBRARY_PATH). + search path (e.g. on Linux it is `LD_LIBRARY_PATH'). Each search path must be a list of absolute directories separated by `LT_PATHSEP_CHAR', for example, `"/usr/lib/mypkg:/lib/foo"'. @@ -3894,8 +3910,8 @@ iterate over libltdl's list of loaded mo returned when FUNC has been successfully called for all matching modules. - -- Function: lt_dlhandle lt_dlhandle_iterate (lt_dlinterface_id IFACE, - lt_dlhandle PLACE) + -- Function: lt_dlhandle lt_dlhandle_iterate + (lt_dlinterface_id IFACE, lt_dlhandle PLACE) Iterate over the module handles loaded by IFACE, returning the first matching handle in the list if PLACE is `NULL', and the next one on subsequent calls. If PLACE is the last element in the list @@ -4076,7 +4092,8 @@ The following types are defined in `ltdl dlloader.dlloader_data = (lt_user_data)myloader_function; /* Add my loader as the default module loader. */ - if (lt_dlloader_add (lt_dlloader_next (NULL), &dlloader, "myloader") != 0) + if (lt_dlloader_add (lt_dlloader_next (NULL), &dlloader, + "myloader") != 0) return ERROR; return OK; @@ -4412,30 +4429,32 @@ exercise for the reader. installed to the same directory if you use this option. Whatever method you use, `LTDL_INIT' will define the shell variable -LIBLTDL to the link flag that you should use to link with `libltdl', -the shell variable LTDLDEPS to the files that can be used as a -dependency in `Makefile' rules, and the shell variable LTDLINCL to the -preprocessor flag that you should use to compile programs that include -`ltdl.h'. So, when you want to link a program with libltdl, be it a -convenience, installed or installable library, just use `$(LTDLINCL)' -for preprocessing and compilation, and `$(LIBLTDL)' for linking. +`LIBLTDL' to the link flag that you should use to link with `libltdl', +the shell variable `LTDLDEPS' to the files that can be used as a +dependency in `Makefile' rules, and the shell variable `LTDLINCL' to +the preprocessor flag that you should use to compile programs that +include `ltdl.h'. So, when you want to link a program with libltdl, be +it a convenience, installed or installable library, just use +`$(LTDLINCL)' for preprocessing and compilation, and `$(LIBLTDL)' for +linking. * If your package is built using an installed version of `libltdl', - LIBLTDL will be set to the compiler flags needed to link against - the installed library, LTDLDEPS will be empty, and LTDLINCL will - be set to the compiler flags needed to find the `libltdl' header - files. + `LIBLTDL' will be set to the compiler flags needed to link against + the installed library, `LTDLDEPS' will be empty, and `LTDLINCL' + will be set to the compiler flags needed to find the `libltdl' + header files. - * If your package is built using the convenience libltdl, LIBLTDL - and LTDLDEPS will be the pathname for the convenience version of + * If your package is built using the convenience libltdl, `LIBLTDL' + and `LTDLDEPS' will be the pathname for the convenience version of libltdl (starting with `${top_builddir}/' or - `${top_build_prefix}') and LTDLINCL will be `-I' followed by the + `${top_build_prefix}') and `LTDLINCL' will be `-I' followed by the directory that contains `ltdl.h' (starting with `${top_srcdir}/'). * If an installable version of the included `libltdl' is being built, its pathname starting with `${top_builddir}/' or - `${top_build_prefix}', will be stored in LIBLTDL and LTDLDEPS, and - LTDLINCL will be set just like in the case of convenience library. + `${top_build_prefix}', will be stored in `LIBLTDL' and `LTDLDEPS', + and `LTDLINCL' will be set just like in the case of convenience + library. You should probably also use the `dlopen' option to `LT_INIT' in your `configure.ac', otherwise libtool will assume no dlopening @@ -4607,11 +4626,17 @@ Here is a list of the current programs i they test for: `cdemo-conf.test' -`cdemo-exec.test' `cdemo-make.test' +`cdemo-exec.test' `cdemo-static.test' +`cdemo-static-make.test' +`cdemo-static-exec.test' `cdemo-shared.test' +`cdemo-shared-make.test' +`cdemo-shared-exec.test' `cdemo-undef.test' +`cdemo-undef-make.test' +`cdemo-undef-exec.test' These programs check to see that the `tests/cdemo' subdirectory of the libtool distribution can be configured and built correctly. @@ -4620,8 +4645,8 @@ they test for: libraries to be created, in a way that their components can be later linked into programs or other libraries, even shared ones. - The tests `cdemo-make.test' and `cdemo-exec.test' are executed - three times, under three different libtool configurations: + The tests matching `cdemo-*make.test' and `cdemo-*exec.test' are + executed three times, under three different libtool configurations: `cdemo-conf.test' configures `cdemo/libtool' to build both static and shared libraries (the default for platforms that support both), `cdemo-static.test' builds only static libraries @@ -4632,22 +4657,38 @@ they test for: libraries with undefined symbols on systems that allow this. `demo-conf.test' +`demo-make.test' `demo-exec.test' `demo-inst.test' -`demo-make.test' `demo-unst.test' `demo-static.test' +`demo-static-make.test' +`demo-static-exec.test' +`demo-static-inst.test' +`demo-static-unst.test' `demo-shared.test' +`demo-shared-make.test' +`demo-shared-exec.test' +`demo-shared-inst.test' +`demo-shared-unst.test' `demo-nofast.test' +`demo-nofast-make.test' +`demo-nofast-exec.test' +`demo-nofast-inst.test' +`demo-nofast-unst.test' `demo-pic.test' +`demo-pic-make.test' +`demo-pic-exec.test' `demo-nopic.test' +`demo-nopic-make.test' +`demo-nopic-exec.test' These programs check to see that the `tests/demo' subdirectory of the libtool distribution can be configured, built, installed, and uninstalled correctly. The `tests/demo' subdirectory contains a demonstration of a trivial - package that uses libtool. The tests `demo-make.test', - `demo-exec.test', `demo-inst.test' and `demo-unst.test' are + package that uses libtool. The tests matching `demo-*make.test', + `demo-*exec.test', `demo-*inst.test' and `demo-*unst.test' are executed four times, under four different libtool configurations: `demo-conf.test' configures `demo/libtool' to build both static and shared libraries, `demo-static.test' builds only static @@ -4674,9 +4715,9 @@ they test for: `demo-relink.test' `depdemo-relink.test' - These tests check whether variable SHLIBPATH_OVERRIDES_RUNPATH is - properly set. If the test fails and VERBOSE is set, it will - indicate what the variable should have been set to. + These tests check whether variable `shlibpath_overrides_runpath' is + properly set. If the test fails, it will indicate what the + variable should have been set to. `demo-noinst-link.test' Checks whether libtool will not try to link with a previously @@ -4684,13 +4725,25 @@ they test for: just-built one. `depdemo-conf.test' +`depdemo-make.test' `depdemo-exec.test' `depdemo-inst.test' -`depdemo-make.test' `depdemo-unst.test' `depdemo-static.test' +`depdemo-static-make.test' +`depdemo-static-exec.test' +`depdemo-static-inst.test' +`depdemo-static-unst.test' `depdemo-shared.test' +`depdemo-shared-make.test' +`depdemo-shared-exec.test' +`depdemo-shared-inst.test' +`depdemo-shared-unst.test' `depdemo-nofast.test' +`depdemo-nofast-make.test' +`depdemo-nofast-exec.test' +`depdemo-nofast-inst.test' +`depdemo-nofast-unst.test' These programs check to see that the `tests/depdemo' subdirectory of the libtool distribution can be configured, built, installed, and uninstalled correctly. @@ -4699,8 +4752,8 @@ they test for: inter-library dependencies with libtool. The test programs link some interdependent libraries. - The tests `depdemo-make.test', `depdemo-exec.test', - `depdemo-inst.test' and `depdemo-unst.test' are executed four + The tests matching `depdemo-*make.test', `depdemo-*exec.test', + `depdemo-*inst.test' and `depdemo-*unst.test' are executed four times, under four different libtool configurations: `depdemo-conf.test' configures `depdemo/libtool' to build both static and shared libraries, `depdemo-static.test' builds only @@ -4710,12 +4763,20 @@ they test for: fast-install mode (`--enable-fast-install=no'). `mdemo-conf.test' +`mdemo-make.test' `mdemo-exec.test' `mdemo-inst.test' -`mdemo-make.test' `mdemo-unst.test' `mdemo-static.test' +`mdemo-static-make.test' +`mdemo-static-exec.test' +`mdemo-static-inst.test' +`mdemo-static-unst.test' `mdemo-shared.test' +`mdemo-shared-make.test' +`mdemo-shared-exec.test' +`mdemo-shared-inst.test' +`mdemo-shared-unst.test' These programs check to see that the `tests/mdemo' subdirectory of the libtool distribution can be configured, built, installed, and uninstalled correctly. @@ -4726,13 +4787,13 @@ they test for: dlopen wrapper for various platforms (Linux, Solaris, HP/UX etc.) including support for dlpreopened modules (*note Dlpreopening::). - The tests `mdemo-make.test', `mdemo-exec.test', `mdemo-inst.test' - and `mdemo-unst.test' are executed three times, under three - different libtool configurations: `mdemo-conf.test' configures - `mdemo/libtool' to build both static and shared libraries, - `mdemo-static.test' builds only static libraries - (`--disable-shared'), and `mdemo-shared.test' builds only shared - libraries (`--disable-static'). + The tests matching `mdemo-*make.test', `mdemo-*exec.test', + `mdemo-*inst.test' and `mdemo-*unst.test' are executed three + times, under three different libtool configurations: + `mdemo-conf.test' configures `mdemo/libtool' to build both static + and shared libraries, `mdemo-static.test' builds only static + libraries (`--disable-shared'), and `mdemo-shared.test' builds + only shared libraries (`--disable-static'). `mdemo-dryrun.test' This test checks whether libtool's `--dry-run' mode works properly. @@ -4763,14 +4824,14 @@ they test for: Check that a nonexistent objectlist file is properly detected. `pdemo-conf.test' +`pdemo-make.test' `pdemo-exec.test' `pdemo-inst.test' -`pdemo-make.test' These programs check to see that the `tests/pdemo' subdirectory of the libtool distribution can be configured, built, and executed correctly. - The `pdemo-conf.test' lowers the MAX_CMD_LEN variable in the + The `pdemo-conf.test' lowers the `max_cmd_len' variable in the generated libtool script to test the measures to evade command line length limitations. @@ -4789,11 +4850,17 @@ they test for: the suffix is invalid. `tagdemo-conf.test' -`tagdemo-exec.test' `tagdemo-make.test' +`tagdemo-exec.test' `tagdemo-static.test' +`tagdemo-static-make.test' +`tagdemo-static-exec.test' `tagdemo-shared.test' +`tagdemo-shared-make.test' +`tagdemo-shared-exec.test' `tagdemo-undef.test' +`tagdemo-undef-make.test' +`tagdemo-undef-exec.test' These programs check to see that the `tests/tagdemo' subdirectory of the libtool distribution can be configured, built, and executed correctly. @@ -4804,10 +4871,14 @@ they test for: linked to a C++ program. `f77demo-conf.test' -`f77demo-exec.test' `f77demo-make.test' +`f77demo-exec.test' `f77demo-static.test' +`f77demo-static-make.test' +`f77demo-static-exec.test' `f77demo-shared.test' +`f77demo-shared-make.test' +`f77demo-shared-exec.test' These programs check to see that the `tests/f77demo' subdirectory of the libtool distribution can be configured, built, and executed correctly. @@ -4818,10 +4889,14 @@ they test for: C program to use the latter library. `fcdemo-conf.test' -`fcdemo-exec.test' `fcdemo-make.test' +`fcdemo-exec.test' `fcdemo-static.test' +`fcdemo-static-make.test' +`fcdemo-static-exec.test' `fcdemo-shared.test' +`fcdemo-shared-make.test' +`fcdemo-shared-exec.test' These programs check to see that the `tests/fcdemo' subdirectory of the libtool distribution can be configured, built, and executed correctly. @@ -4875,21 +4950,11 @@ test groups: recursive test groups themselves should never require user interaction, while the test groups they invoke may do so. - For example, in order to avoid any interactive test groups, you could -use this: - - make check-local \ - TESTSUITEFLAGS='-k !interactive INNER_TESTSUITEFLAGS=",!interactive"' - -while to run only those test groups, you would use this: - - make check-local \ - TESTSUITEFLAGS='-k interactive -k recursive INNER_TESTSUITEFLAGS=,interactive' - -but the convenience targets `check-interactive' and -`check-noninteractive' avoid needing to remember these complex -commands, in addition to also disabling interactive tests in the old -test suite. + There is a convenience target `check-noninteractive' that runs all +tests from both test suites that do not cause user interaction on +Windows. Conversely, the target `check-interactive' runs the +complement of tests and might require closing popup windows about DLL +load errors on Windows.  File: libtool.info, Node: When tests fail, Prev: Test descriptions, Up: Libtool test suite @@ -4897,9 +4962,10 @@ File: libtool.info, Node: When tests fa 14.1.2 When tests fail ---------------------- -Each of the tests in the old test suite are designed to produce no -output when they are run via `make check'. The exit status of each -program tells the `Makefile' whether or not the test succeeded. +When the tests in the old test suite are run via `make check', output +is caught in per-test `tests/TEST-NAME.log' files and summarized in the +`test-suite.log' file. The exit status of each program tells the +`Makefile' whether or not the test succeeded. If a test fails, it means that there is either a programming error in libtool, or in the test program itself. @@ -4908,16 +4974,11 @@ libtool, or in the test program itself. would a normal program. When the test is invoked in this way, it produces output that may be useful in determining what the problem is. - Another way to have the test programs produce output is to set the -VERBOSE environment variable to `yes' before running them. For -example, `env VERBOSE=yes make check' runs all the tests, and has each -of them display debugging information. - The new, Autotest-based test suite produces as output a file `tests/testsuite.log' which contains information about failed tests. You can pass options to the test suite through the `make' variable -TESTSUITEFLAGS (*note The Autoconf Manual: (autoconf)testsuite +`TESTSUITEFLAGS' (*note The Autoconf Manual: (autoconf)testsuite Invocation.).  @@ -5069,7 +5130,7 @@ somewhere and also sets the variable `$d looks in the library link path for libraries that have the right libname. Then it runs `$file_magic_cmd' on the library and checks for a match against the extended regular expression REGEX. When - FILE_MAGIC_TEST_FILE is set by `libtool.m4', it is used as an + `file_magic_test_file' is set by `libtool.m4', it is used as an argument to `$file_magic_cmd' in order to verify whether the regular expression matches its output, and warn the user otherwise. @@ -5311,6 +5372,8 @@ write your own. * Reloadable objects:: Binding object files together. * Multiple dependencies:: Removing duplicate dependent libraries. * Archivers:: Programs that create static archives. +* Cross compiling:: Issues that arise when cross compiling. +* File name conversion:: Converting file names between platforms.  File: libtool.info, Node: References, Next: Compilers, Up: Platform quirks @@ -5423,7 +5486,7 @@ the link line by default. Libtool provi where it is necessary.  -File: libtool.info, Node: Archivers, Prev: Multiple dependencies, Up: Platform quirks +File: libtool.info, Node: Archivers, Next: Cross compiling, Prev: Multiple dependencies, Up: Platform quirks 15.3.5 Archivers ---------------- @@ -5438,6 +5501,416 @@ with the `ranlib libNAME.a' command. So `ar ts' command, instead.  +File: libtool.info, Node: Cross compiling, Next: File name conversion, Prev: Archivers, Up: Platform quirks + +15.3.6 Cross compiling +---------------------- + +Most build systems support the ability to compile libraries and +applications on one platform for use on a different platform, provided +a compiler capable of generating the appropriate output is available. +In such cross compiling scenarios, the platform on which the libraries +or applications are compiled is called the "build platform", while the +platform on which the libraries or applications are intended to be used +or executed is called the "host platform". *note The GNU Build System: +(automake)GNU Build System, of which libtool is a part, supports cross +compiling via arguments passed to the configure script: `--build=...' +and `--host=...'. However, when the build platform and host platform +are very different, libtool is required to make certain accommodations +to support these scenarios. + + In most cases, because the build platform and host platform differ, +the cross-compiled libraries and executables can't be executed or +tested on the build platform where they were compiled. The testsuites +of most build systems will often skip any tests that involve executing +such foreign executables when cross-compiling. However, if the build +platform and host platform are sufficiently similar, it is often +possible to run cross-compiled applications. Libtool's own testsuite +often attempts to execute cross-compiled tests, but will mark any +failures as _skipped_ since the failure might simply be due to the +differences between the two platforms. + + In addition to cases where the host platform and build platform are +extremely similar (e.g. `i586-pc-linux-gnu' and `i686-pc-linux-gnu'), +there is another case in which cross-compiled host applications may be +executed on the build platform. This is possible when the build +platform supports an emulation or API-enhanced environment for the host +platform. One example of this situation would be if the build platform +were MinGW, and the host platform were Cygwin (or vice versa). Both of +these platforms can actually operate within a single Windows instance, +so Cygwin applications can be launched from a MinGW context, and vice +versa--provided certain care is taken. Another example would be if the +build platform were GNU/Linux on an x86 32bit processor, and the host +platform were MinGW. In this situation, the Wine +(http://www.winehq.org/) environment can be used to launch Windows +applications from the GNU/Linux operating system; again, provided +certain care is taken. + + One particular issue occurs when a Windows platform such as MinGW, +Cygwin, or MSYS is the host or build platform, while the other platform +is a Unix-style system. In these cases, there are often conflicts +between the format of the file names and paths expected within host +platform libraries and executables, and those employed on the build +platform. + + This situation is best described using a concrete example: suppose +the build platform is GNU/Linux with canonical triplet +`i686-pc-linux-gnu'. Suppose further that the host platform is MinGW +with canonical triplet `i586-pc-mingw32'. On the GNU/Linux platform +there is a cross compiler following the usual naming conventions of +such compilers, where the compiler name is prefixed by the host +canonical triplet (or suitable alias). (For more information +concerning canonical triplets and platform aliases, see *note +Specifying Target Triplets: (autoconf)Specifying Target Triplets. and +*note Canonicalizing: (autoconf)Canonicalizing.) In this case, the C +compiler is named `i586-pc-mingw32-gcc'. + + As described in *note Wrapper executables::, for the MinGW host +platform libtool uses a wrapper executable to set various environment +variables before launching the actual program executable. Like the +program executable, the wrapper executable is cross-compiled for the +host platform (that is, for MinGW). As described above, ordinarily a +host platform executable cannot be executed on the build platform, but +in this case the Wine environment could be used to launch the MinGW +application from GNU/Linux. However, the wrapper executable, as a host +platform (MinGW) application, must set the `PATH' variable so that the +true application's dependent libraries can be located--but the contents +of the `PATH' variable must be structured for MinGW. Libtool must use +the Wine file name mapping facilities to determined the correct value +so that the wrapper executable can set the `PATH' variable to point to +the correct location. + + For example, suppose we are compiling an application in `/var/tmp' on +GNU/Linux, using separate source code and build directories: + + `/var/tmp/foo-1.2.3/app/' (application source code) + `/var/tmp/foo-1.2.3/lib/' (library source code) + `/var/tmp/BUILD/app/' (application build objects here) + `/var/tmp/BUILD/lib/' (library build objects here) + + Since the library will be built in `/var/tmp/BUILD/lib', the wrapper +executable (which will be in `/var/tmp/BUILD/app') must add that +directory to `PATH' (actually, it must add the directory named OBJDIR +under `/var/tmp/BUILD/lib', but we'll ignore that detail for now). +However, Windows does not have a concept of Unix-style file or +directory names such as `/var/tmp/BUILD/lib'. Therefore, Wine provides +a mapping from Windows file names such as `C:\Program Files' to specific +Unix-style file names. Wine also provides a utility that can be used +to map Unix-style file names to Windows file names. + + In this case, the wrapper executable should actually add the value + + Z:\var\tmp\BUILD\lib + +to the `PATH'. libtool contains support for path conversions of this +type, for a certain limited set of build and host platform +combinations. In this case, libtool will invoke Wine's `winepath' +utility to ensure that the correct `PATH' value is used. For more +information, see *note File name conversion::. + + +File: libtool.info, Node: File name conversion, Prev: Cross compiling, Up: Platform quirks + +15.3.7 File name conversion +--------------------------- + +In certain situations, libtool must convert file names and paths between +formats appropriate to different platforms. Usually this occurs when +cross-compiling, and affects only the ability to launch host platform +executables on the build platform using an emulation or API-enhancement +environment such as Wine. Failure to convert paths (*note File Name +Conversion Failure::) will cause a warning to be issued, but rarely +causes the build to fail--and should have no affect on the compiled +products, once installed properly on the host platform. For more +information, *note Cross compiling::. + + However, file name conversion may also occur in another scenario: +when using a Unix emulation system on Windows (such as Cygwin or MSYS), +combined with a native Windows compiler such as MinGW or MSVC. Only a +limited set of such scenarios are currently supported; in other cases +file name conversion is skipped. The lack of file name conversion +usually means that uninstalled executables can't be launched, but only +rarely causes the build to fail (*note File Name Conversion Failure::). + + libtool supports file name conversion in the following scenarios: + +build platform host platform Notes +--------------------------------------------------------------------------- +MinGW (MSYS) MinGW (Windows) *note Native MinGW File Name + Conversion:: +Cygwin MinGW (Windows) *note Cygwin/Windows File Name + Conversion:: +Unix + Wine MinGW (Windows) Requires Wine. *note Unix/Windows + File Name Conversion:: +MinGW (MSYS) Cygwin Requires `LT_CYGPATH'. *note + LT_CYGPATH::. Provided for testing + purposes only. +Unix + Wine Cygwin Requires both Wine and + `LT_CYGPATH', but does not yet work + with Cygwin 1.7.7 and Wine-1.2. + See *note Unix/Windows File Name + Conversion:: and *note LT_CYGPATH::. + +* Menu: + +* File Name Conversion Failure:: What happens when file name conversion fails +* Native MinGW File Name Conversion:: MSYS file name conversion idiosyncrasies +* Cygwin/Windows File Name Conversion:: Using `cygpath' to convert Cygwin file names +* Unix/Windows File Name Conversion:: Using Wine to convert Unix paths +* LT_CYGPATH:: Invoking `cygpath' from other environments +* Cygwin to MinGW Cross:: Other notes concerning MinGW cross + + +File: libtool.info, Node: File Name Conversion Failure, Next: Native MinGW File Name Conversion, Up: File name conversion + +15.3.7.1 File Name Conversion Failure +..................................... + +In most cases, file name conversion is not needed or attempted. +However, when libtool detects that a specific combination of build and +host platform does require file name conversion, it is possible that +the conversion may fail. In these cases, you may see a warning such as +the following: + + Could not determine the host file name corresponding to + `... a file name ...' + Continuing, but uninstalled executables may not work. + +or + + Could not determine the host path corresponding to + `... a path ...' + Continuing, but uninstalled executables may not work. + +This should not cause the build to fail. At worst, it means that the +wrapper executable will specify file names or paths appropriate for the +build platform. Since those are not appropriate for the host platform, +the uninstalled executables would not operate correctly, even when the +wrapper executable is launched via the appropriate emulation or +API-enhancement (e.g. Wine). Simply install the executables on the +host platform, and execute them there. + + +File: libtool.info, Node: Native MinGW File Name Conversion, Next: Cygwin/Windows File Name Conversion, Prev: File Name Conversion Failure, Up: File name conversion + +15.3.7.2 Native MinGW File Name Conversion +.......................................... + +MSYS is a Unix emulation environment for Windows, and is specifically +designed such that in normal usage it _pretends_ to be MinGW or native +Windows, but understands Unix-style file names and paths, and supports +standard Unix tools and shells. Thus, "native" MinGW builds are +actually an odd sort of cross-compile, from an MSYS Unix emulation +environment "pretending" to be MinGW, to actual native Windows. + + When an MSYS shell launches a native Windows executable (as opposed +to other _MSYS_ executables), it uses a system of heuristics to detect +any command-line arguments that contain file names or paths. It +automatically converts these file names from the MSYS (Unix-like) +format, to the corresponding Windows file name, before launching the +executable. However, this auto-conversion facility is only available +when using the MSYS runtime library. The wrapper executable itself is +a MinGW application (that is, it does not use the MSYS runtime +library). The wrapper executable must set `PATH' to, and call +`_spawnv' with, values that have already been converted from MSYS +format to Windows. Thus, when libtool writes the source code for the +wrapper executable, it must manually convert MSYS paths to Windows +format, so that the Windows values can be hard-coded into the wrapper +executable. + + +File: libtool.info, Node: Cygwin/Windows File Name Conversion, Next: Unix/Windows File Name Conversion, Prev: Native MinGW File Name Conversion, Up: File name conversion + +15.3.7.3 Cygwin/Windows File Name Conversion +............................................ + +Cygwin provides a Unix emulation environment for Windows. As part of +that emulation, it provides a file system mapping that presents the +Windows file system in a Unix-compatible manner. Cygwin also provides +a utility `cygpath' that can be used to convert file names and paths +between the two representations. In a correctly configured Cygwin +installation, `cygpath' is always present, and is in the `PATH'. + + Libtool uses `cygpath' to convert from Cygwin (Unix-style) file names +and paths to Windows format when the build platform is Cygwin and the +host platform is MinGW. + + When the host platform is Cygwin, but the build platform is MSYS or +some Unix system, libtool also uses `cygpath' to convert from Windows +to Cygwin format (after first converting from the build platform format +to Windows format; see *note Native MinGW File Name Conversion:: and +*note Unix/Windows File Name Conversion::). Because the build platform +is not Cygwin, `cygpath' is not (and should not be) in the `PATH'. +Therefore, in this configuration the environment variable `LT_CYGPATH' +is required. *Note LT_CYGPATH::. + + +File: libtool.info, Node: Unix/Windows File Name Conversion, Next: LT_CYGPATH, Prev: Cygwin/Windows File Name Conversion, Up: File name conversion + +15.3.7.4 Unix/Windows File Name Conversion +.......................................... + +Wine (http://www.winehq.org/) provides an interpretation environment for +some Unix platforms in which Windows applications can be executed. It +provides a mapping between the Unix file system and a virtual Windows +file system used by the Windows programs. For the file name conversion +to work, Wine must be installed and properly configured on the build +platform, and the `winepath' application must be in the build +platform's `PATH'. In addition, on 32bit GNU/Linux it is usually +helpful if the binfmt extension is enabled. + + +File: libtool.info, Node: LT_CYGPATH, Next: Cygwin to MinGW Cross, Prev: Unix/Windows File Name Conversion, Up: File name conversion + +15.3.7.5 LT_CYGPATH +................... + +For some cross-compile configurations (where the host platform is +Cygwin), the `cygpath' program is used to convert file names from the +build platform notation to the Cygwin form (technically, this +conversion is from Windows notation to Cygwin notation; the conversion +from the build platform format to Windows notation is performed via +other means). However, because the `cygpath' program is not (and +should not be) in the `PATH' on the build platform, `LT_CYGPATH' must +specify the full build platform file name (that is, the full Unix or +MSYS file name) of the `cygpath' program. + + The reason `cygpath' should not be in the build platform `PATH' is +twofold: first, `cygpath' is usually installed in the same directory as +many other Cygwin executables, such as `sed', `cp', etc. If the build +platform environment had this directory in its `PATH', then these +Cygwin versions of common Unix utilities might be used in preference to +the ones provided by the build platform itself, with deleterious +effects. Second, especially when Cygwin-1.7 or later is used, multiple +Cygwin installations can coexist within the same Windows instance. +Each installation will have separate "mount tables" specified in +`CYGROOT-N/etc/fstab'. These "mount tables" control how that instance +of Cygwin will map Windows file names and paths to Cygwin form. Each +installation's `cygpath' utility automatically deduces the appropriate +`/etc/fstab' file. Since each `CYGROOT-N/etc/fstab' mount table may +specify different mappings, it matters which `cygpath' is used. + + Note that `cygpath' is a Cygwin application; to execute this tool +from Unix requires a working and properly configured Wine installation, +as well as enabling the GNU/Linux `binfmt' extension. Furthermore, the +Cygwin `setup.exe' tool should have been used, via Wine, to properly +install Cygwin into the Wine file system (and registry). + + Unfortunately, Wine support for Cygwin is intermittent. Recent +releases of Cygwin (1.7 and above) appear to require more Windows API +support than Wine provides (as of Wine version 1.2); most Cygwin +applications fail to execute. This includes `cygpath' itself. Hence, +it is best _not_ to use the LT_CYGPATH machinery in libtool when +performing Unix to Cygwin cross-compiles. Similarly, it is best _not_ +to enable the GNU/Linux binfmt support in this configuration, because +while Wine will fail to execute the compiled Cygwin applications, it +will still exit with status zero. This tends to confuse build systems +and test suites (including libtool's own testsuite, resulting in +spurious reported failures). Wine support for the older Cygwin-1.5 +series appears satisfactory, but the Cygwin team no longer supports +Cygwin-1.5. It is hoped that Wine will eventually be improved such that +Cygwin-1.7 will again operate correctly under Wine. Until then, +libtool will report warnings as described in *note File Name Conversion +Failure:: in these scenarios. + + However, `LT_CYGPATH' is also used for the MSYS to Cygwin cross +compile scenario, and operates as expected. + + +File: libtool.info, Node: Cygwin to MinGW Cross, Prev: LT_CYGPATH, Up: File name conversion + +15.3.7.6 Cygwin to MinGW Cross +.............................. + +There are actually three different scenarios that could all +legitimately be called a "Cygwin to MinGW" cross compile. The current +(and standard) definition is when there is a compiler that produces +native Windows libraries and applications, but which itself is a Cygwin +application, just as would be expected in any other cross compile setup. + + However, historically there were two other definitions, which we +will refer to as the _fake_ one, and the _lying_ one. + + In the _fake_ Cygwin to MinGW cross compile case, you actually use a +native MinGW compiler, but you do so from within a Cygwin environment: + + export PATH="/c/MinGW/bin:${PATH}" + configure --build=i686-pc-cygwin \ + --host=mingw32 \ + NM=/c/MinGW/bin/nm.exe + + In this way, the build system "knows" that you are cross compiling, +and the file name conversion logic will be used. However, because the +tools (`mingw32-gcc', `nm', `ar') used are actually native Windows +applications, they will not understand any Cygwin (that is, Unix-like) +absolute file names passed as command line arguments (and, unlike MSYS, +Cygwin does not automatically convert such arguments). However, so +long as only relative file names are used in the build system, and +non-Windows-supported Unix idioms such as symlinks and mount points are +avoided, this scenario should work. + + If you must use absolute file names, you will have to force Libtool +to convert file names for the toolchain in this case, by doing the +following before you run configure: + + export lt_cv_to_tool_file_cmd=func_convert_file_cygwin_to_w32 + + In the _lying_ Cygwin to MinGW cross compile case, you lie to the +build system: + + export PATH="/c/MinGW/bin:${PATH}" + configure --build=i686-pc-mingw32 \ + --host=i686-pc-mingw32 \ + --disable-dependency-tracking + +and claim that the build platform is MinGW, even though you are actually +running under _Cygwin_ and not MinGW. In this case, libtool does _not_ +know that you are performing a cross compile, and thinks instead that +you are performing a native MinGW build. However, as described in +(*note Native MinGW File Name Conversion::), that scenario triggers an +"MSYS to Windows" file name conversion. This, of course, is the wrong +conversion since we are actually running under Cygwin. Also, the +toolchain is expecting Windows file names (not Cygwin) but unless told +so Libtool will feed Cygwin file names to the toolchain in this case. +To force the correct file name conversions in this situation, you +should do the following _before_ running configure: + + export lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + export lt_cv_to_tool_file_cmd=func_convert_file_cygwin_to_w32 + + Note that this relies on internal implementation details of libtool, +and is subject to change. Also, `--disable-dependency-tracking' is +required, because otherwise the MinGW GCC will generate dependency +files that contain Windows file names. This, in turn, will confuse the +Cygwin `make' program, which does not accept Windows file names: + + Makefile:1: *** target pattern contains no `%'. Stop. + + There have also always been a number of other details required for +the _lying_ case to operate correctly, such as the use of so-called +"identity mounts": + + # CYGWIN-ROOT/etc/fstab + D:/foo /foo some_fs binary 0 0 + D:/bar /bar some_fs binary 0 0 + E:/grill /grill some_fs binary 0 0 + + In this way, top-level directories of each drive are available using +identical names within Cygwin. + + Note that you also need to ensure that the standard Unix directories +(like `/bin', `/lib', `/usr', `/etc') appear in the root of a drive. +This means that you must install Cygwin itself into the `C:/' root +directory (or `D:/', or `E:/', etc)--instead of the recommended +installation into `C:/cygwin/'. In addition, all file names used in +the build system must be relative, symlinks should not be used within +the source or build directory trees, and all `-M*' options to `gcc' +except `-MMD' must be avoided. + + This is quite a fragile setup, but it has been in historical use, +and so is documented here. + + File: libtool.info, Node: libtool script contents, Next: Cheap tricks, Prev: Platform quirks, Up: Maintaining 15.4 `libtool' script contents @@ -5521,8 +5994,8 @@ they are used within `ltmain.sh' (*note -- Variable: always_export_symbols Whether libtool should automatically generate a list of exported - symbols using EXPORT_SYMBOLS_CMDS before linking an archive. Set - to `yes' or `no'. Default is `no'. + symbols using `export_symbols_cmds' before linking an archive. + Set to `yes' or `no'. Default is `no'. -- Variable: archive_cmds -- Variable: archive_expsym_cmds @@ -5530,6 +6003,9 @@ they are used within `ltmain.sh' (*note Commands used to create shared libraries, shared libraries with `-export-symbols' and static libraries, respectively. + -- Variable: archiver_list_spec + Specify filename containing input files for `AR'. + -- Variable: old_archive_from_new_cmds If the shared library depends on a static library, `old_archive_from_new_cmds' contains the commands used to create @@ -5541,11 +6017,11 @@ they are used within `ltmain.sh' (*note order to correctly link with a shared library, `old_archive_from_expsyms_cmds' contains the commands needed to create that static library. When these commands are executed, the - variable SONAME contains the name of the shared library in - question, and the $OBJDIR/$NEWLIB contains the path of the static - library these commands should build. After executing these - commands, libtool will proceed to link against $OBJDIR/$NEWLIB - instead of SONAME. + variable `soname' contains the name of the shared library in + question, and the `$objdir/$newlib' contains the path of the + static library these commands should build. After executing these + commands, libtool will proceed to link against `$objdir/$newlib' + instead of `soname'. -- Variable: lock_old_archive_extraction Set to `yes' if the extraction of a static library requires locking @@ -5595,13 +6071,13 @@ they are used within `ltmain.sh' (*note reference symbols that are defined in the program. -- Variable: export_symbols_cmds - Commands to extract exported symbols from LIBOBJS to the file - EXPORT_SYMBOLS. + Commands to extract exported symbols from `libobjs' to the file + `export_symbols'. -- Variable: extract_expsyms_cmds Commands to extract the exported symbols list from a shared library. These commands are executed if there is no file - $OBJDIR/$SONAME-DEF, and should write the names of the exported + `$objdir/$soname-def', and should write the names of the exported symbols to that file, for the use of `old_archive_from_expsyms_cmds'. @@ -5610,12 +6086,12 @@ they are used within `ltmain.sh' (*note developer. The assumption is that installers will seldom run programs in the build tree, and the developer will seldom install. This is only meaningful on platforms where - SHLIBPATH_OVERRIDES_RUNPATH is not `yes', so FAST_INSTALL will be - set to `needless' in this case. If FAST_INSTALL set to `yes', - libtool will create programs that search for installed libraries, - and, if a program is run in the build tree, a new copy will be - linked on-demand to use the yet-to-be-installed libraries. If set - to `no', libtool will create programs that use the + `shlibpath_overrides_runpath' is not `yes', so `fast_install' will + be set to `needless' in this case. If `fast_install' set to + `yes', libtool will create programs that search for installed + libraries, and, if a program is run in the build tree, a new copy + will be linked on-demand to use the yet-to-be-installed libraries. + If set to `no', libtool will create programs that use the yet-to-be-installed libraries, and will link a new copy of the program at install time. The default value is `yes' or `needless', depending on platform and configuration flags, and it @@ -5623,22 +6099,28 @@ they are used within `ltmain.sh' (*note `--disable-fast-install'. On some systems, the linker always hardcodes paths to dependent - libraries into the output. In this case, FAST_INSTALL is never + libraries into the output. In this case, `fast_install' is never set to `yes', and relinking at install time is triggered. This - also means that DESTDIR installation does not work as expected. + also means that `DESTDIR' installation does not work as expected. + + -- Variable: file_magic_glob + How to find potential files when `deplibs_check_method' is + `file_magic'. `file_magic_glob' is a `sed' expression, and the + `sed' instance is fed potential file names that are transformed by + the `file_magic_glob' expression. Useful when the shell does not + support the shell option `nocaseglob', making `want_nocaseglob' + inappropriate. Normally disabled (i.e. `file_magic_glob' is + empty). -- Variable: finish_cmds Commands to tell the dynamic linker how to find shared libraries in a specific directory. -- Variable: finish_eval - Same as FINISH_CMDS, except the commands are not displayed. - - -- Variable: fix_srcfile_path - Expression to fix the shell variable `$srcfile' for the compiler. + Same as `finish_cmds', except the commands are not displayed. -- Variable: global_symbol_pipe - A pipeline that takes the output of NM, and produces a listing of + A pipeline that takes the output of `NM', and produces a listing of raw symbols followed by their C names. For example: $ eval "$NM progname | $global_symbol_pipe" @@ -5652,7 +6134,7 @@ they are used within `ltmain.sh' (*note code) but its meaning is system dependent. -- Variable: global_symbol_to_cdecl - A pipeline that translates the output of GLOBAL_SYMBOL_PIPE into + A pipeline that translates the output of `global_symbol_pipe' into proper C declarations. Since some platforms, such as HP/UX, have linkers that differentiate code from data, data symbols are declared as data, and code symbols are declared as functions. @@ -5665,13 +6147,13 @@ they are used within `ltmain.sh' (*note -- Variable: hardcode_direct Set to `yes' or `no', depending on whether the linker hardcodes directories if a library is directly specified on the command line - (such as `DIR/libNAME.a') when HARDCODE_LIBDIR_FLAG_SPEC is + (such as `DIR/libNAME.a') when `hardcode_libdir_flag_spec' is specified. -- Variable: hardcode_direct_absolute Some architectures hardcode "absolute" library directories that - can not be overridden by SHLIBPATH_VAR when HARDCODE_DIRECT is - `yes'. In that case set HARDCODE_DIRECT_ABSOLUTE to `yes', or + can not be overridden by `shlibpath_var' when `hardcode_direct' is + `yes'. In that case set `hardcode_direct_absolute' to `yes', or otherwise `no'. -- Variable: hardcode_into_libs @@ -5681,27 +6163,27 @@ they are used within `ltmain.sh' (*note to `yes' or `no'. -- Variable: hardcode_libdir_flag_spec - Flag to hardcode a LIBDIR variable into a binary, so that the - dynamic linker searches LIBDIR for shared libraries at runtime. + Flag to hardcode a `libdir' variable into a binary, so that the + dynamic linker searches `libdir' for shared libraries at runtime. If it is empty, libtool will try to use some other hardcoding mechanism. -- Variable: hardcode_libdir_separator - If the compiler only accepts a single HARDCODE_LIBDIR_FLAG, then + If the compiler only accepts a single `hardcode_libdir_flag', then this variable contains the string that should separate multiple arguments to that flag. -- Variable: hardcode_minus_L Set to `yes' or `no', depending on whether the linker hardcodes directories specified by `-L' flags into the resulting executable - when HARDCODE_LIBDIR_FLAG_SPEC is specified. + when `hardcode_libdir_flag_spec' is specified. -- Variable: hardcode_shlibpath_var Set to `yes' or `no', depending on whether the linker hardcodes directories by writing the contents of `$shlibpath_var' into the - resulting executable when HARDCODE_LIBDIR_FLAG_SPEC is specified. - Set to `unsupported' if directories specified by `$shlibpath_var' - are searched at run time, but not at link time. + resulting executable when `hardcode_libdir_flag_spec' is + specified. Set to `unsupported' if directories specified by + `$shlibpath_var' are searched at run time, but not at link time. -- Variable: host -- Variable: host_alias @@ -5711,7 +6193,7 @@ they are used within `ltmain.sh' (*note -- Variable: include_expsyms List of symbols that must always be exported when using - EXPORT_SYMBOLS. + `export_symbols'. -- Variable: inherit_rpath Whether the linker adds runtime paths of dependency libraries to @@ -5775,6 +6257,9 @@ they are used within `ltmain.sh' (*note Whether files must be locked to prevent conflicts when compiling simultaneously. Set to `yes' or `no'. + -- Variable: nm_file_list_spec + Specify filename containing input files for `NM'. + -- Variable: no_builtin_flag Compiler flag to disable builtin functions that conflict with declaring external global symbols as `char'. @@ -5803,9 +6288,19 @@ they are used within `ltmain.sh' (*note Commands run after uninstalling a shared or static library, respectively. + -- Variable: postlink_cmds + Commands necessary for finishing linking programs. `postlink_cmds' + are executed immediately after the program is linked. Any + occurrence of the string `@OUTPUT@' in `postlink_cmds' is replaced + by the name of the created executable (i.e. not the wrapper, if a + wrapper is generated) prior to execution. Similarly, + `@TOOL_OUTPUT@' is replaced by the toolchain format of `@OUTPUT@'. + Normally disabled (i.e. `postlink_cmds' empty). + -- Variable: reload_cmds -- Variable: reload_flag - Commands to create a reloadable object. + Commands to create a reloadable object. Set `reload_cmds' to + `false' on systems that cannot create reloadable objects. -- Variable: runpath_var The environment variable that tells the linker which directories to @@ -5844,7 +6339,7 @@ they are used within `ltmain.sh' (*note Expression to get the compile-time system library search path. This variable is used by libtool when it has to test whether a certain library is shared or static. The directories listed in - SHLIBPATH_VAR are automatically appended to this list, every time + `shlibpath_var' are automatically appended to this list, every time libtool runs (i.e., not at configuration time), because some linkers use this variable to extend the library search path. Linker switches such as `-L' also augment the search path. @@ -5853,11 +6348,36 @@ they are used within `ltmain.sh' (*note Linker flag (passed through the C compiler) used to generate thread-safe libraries. + -- Variable: to_host_file_cmd + If the toolchain is not native to the build platform (e.g. if you + are using MSYS to drive the scripting, but are using the MinGW + native Windows compiler) this variable describes how to convert + file names from the format used by the build platform to the + format used by host platform. Normally set to + `func_convert_file_noop', libtool will autodetect most cases in + which other values should be used. On rare occasions, it may be + necessary to override the autodetected value (*note Cygwin to + MinGW Cross::). + + -- Variable: to_tool_file_cmd + If the toolchain is not native to the build platform (e.g. if you + are using some Unix to drive the scripting together with a Windows + toolchain running in Wine) this variable describes how to convert + file names from the format used by the build platform to the + format used by the toolchain. Normally set to + `func_convert_file_noop'. + -- Variable: version_type The library version numbering type. One of `libtool', `freebsd-aout', `freebsd-elf', `irix', `linux', `osf', `sunos', `windows', or `none'. + -- Variable: want_nocaseglob + Find potential files using the shell option `nocaseglob', when + `deplibs_check_method' is `file_magic'. Normally set to `no'. Set + to `yes' to enable the `nocaseglob' shell option when looking for + potential file names in a case-insensitive manner. + -- Variable: whole_archive_flag_spec Compiler flag to generate shared objects from convenience archives. @@ -5888,14 +6408,14 @@ easier: than having to trust second-hand observation. * Rather than reconfiguring libtool every time I make a change to - `ltmain.in', I keep a permanent `libtool' script in my PATH, which - sources `ltmain.in' directly. + `ltmain.in', I keep a permanent `libtool' script in my `PATH', + which sources `ltmain.in' directly. The following steps describe how to create such a script, where `/home/src/libtool' is the directory containing the libtool source tree, `/home/src/libtool/libtool' is a libtool script that has been configured for your platform, and `~/bin' is a directory in your - PATH: + `PATH': trick$ cd ~/bin trick$ sed 's%^\(macro_version=\).*$%\1@VERSION@%; @@ -5906,7 +6426,7 @@ easier: trick$ libtool --version ltmain.sh (GNU @PACKAGE@@TIMESTAMP@) @VERSION@ - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. trick$ @@ -5917,7 +6437,7 @@ or `/home/src/libtool/ltmain.in' directl without having to rerun `configure'.  -File: libtool.info, Node: GNU Free Documentation License, Next: Index, Prev: Maintaining, Up: Top +File: libtool.info, Node: GNU Free Documentation License, Next: Combined Index, Prev: Maintaining, Up: Top Appendix A GNU Free Documentation License ***************************************** Binary files libtool-2.2.10/doc/libtool.info-2 and libtool-2.4/doc/libtool.info-2 differ diff -ruNp libtool-2.2.10/doc/libtool.texi libtool-2.4/doc/libtool.texi --- libtool-2.2.10/doc/libtool.texi 2010-06-07 17:22:12.000000000 +0700 +++ libtool-2.4/doc/libtool.texi 2010-09-22 21:38:34.000000000 +0700 @@ -26,7 +26,7 @@ @ifnottex This file documents GNU Libtool @value{VERSION} -Copyright (C) 1996-2009 Free Software Foundation, Inc. +Copyright (C) 1996-2010 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 @@ -53,7 +53,7 @@ identical to this one except for the rem @page @vskip 0pt plus 1filll -Copyright @copyright{} 2009 Free Software Foundation, Inc. +Copyright @copyright{} 2010 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 @@ -70,6 +70,8 @@ the section entitled "GNU Free Documenta @syncodeindex tp cp @synindex pg cp +@contents + @ifnottex @node Top, Introduction, (dir), (dir) @comment node-name, next, previous, up @@ -99,7 +101,7 @@ GNU Libtool. * Troubleshooting:: When libtool doesn't work as advertised. * Maintaining:: Information used by the libtool maintainer. * GNU Free Documentation License:: License for this manual. -* Index:: Full index. +* Combined Index:: Full index. @detailmenu --- The Detailed Node Listing --- @@ -221,6 +223,8 @@ Platform quirks * Reloadable objects:: Binding object files together. * Multiple dependencies:: Removing duplicate dependent libraries. * Archivers:: Programs that create static archives. +* Cross compiling:: Issues that arise when cross compiling. +* File name conversion:: Converting file names between platforms. @end detailmenu @end menu @@ -506,11 +510,11 @@ to the compiler to tell it to generate P position-dependent code. @cindex library object file -@cindex @samp{.lo} files +@cindex @file{.lo} files @cindex object files, library Since this is a library implementation detail, libtool hides the complexity of PIC compiler flags and uses separate library object files -(the PIC one lives in the @samp{@value{objdir}} subdirectory and the +(the PIC one lives in the @file{@value{objdir}} subdirectory and the static one lives in the current directory). On systems without shared libraries, the PIC library object files are not created, whereas on systems where all code is PIC, such as AIX, the static ones are not @@ -529,7 +533,7 @@ a23$ @end example Note that libtool silently creates an additional control file on each -@samp{compile} invocation. The @samp{.lo} file is the libtool object, +@samp{compile} invocation. The @file{.lo} file is the libtool object, which Libtool uses to determine what object file may be built into a shared library. On @samp{a23}, only static libraries are supported so the library objects look like this: @@ -560,7 +564,7 @@ gcc -g -O -c foo.c -o foo.o >/dev/null 2 burger$ @end example -Note that Libtool automatically created @samp{@value{objdir}} directory +Note that Libtool automatically created @file{@value{objdir}} directory upon its first execution, where PIC library object files will be stored. Since @samp{burger} supports shared libraries, and requires PIC @@ -581,7 +585,7 @@ pic_object='@value{objdir}/foo.o' non_pic_object='foo.o' @end example -@cindex -no-suppress, libtool compile mode option +@cindex @option{-no-suppress}, libtool compile mode option Notice that the second run of GCC has its output discarded. This is done so that compiler warnings aren't annoyingly duplicated. If you need to see both sets of warnings (you might have conditional code @@ -624,16 +628,16 @@ shared libraries, libtool simply acts as @command{ar} (and possibly @code{ranlib}) commands. @cindex libtool libraries -@cindex @samp{.la} files -Again, the libtool control file name (@samp{.la} suffix) differs from -the standard library name (@samp{.a} suffix). The arguments to +@cindex @file{.la} files +Again, the libtool control file name (@file{.la} suffix) differs from +the standard library name (@file{.a} suffix). The arguments to libtool are the same ones you would use to produce an executable named @file{libhello.la} with your compiler (@pxref{Link mode}): @example a23$ @kbd{libtool --mode=link gcc -g -O -o libhello.la foo.o hello.o} -*** Warning: Linking the shared library libhello.la against the non-libtool -*** objects foo.o hello.o is not portable! +*** Warning: Linking the shared library libhello.la against the +*** non-libtool objects foo.o hello.o is not portable! ar cru .libs/libhello.a ranlib .libs/libhello.a creating libhello.la @@ -642,7 +646,7 @@ a23$ @end example Aha! Libtool caught a common error@dots{} trying to build a library -from standard objects instead of special @samp{.lo} object files. This +from standard objects instead of special @file{.lo} object files. This doesn't matter so much for static libraries, but on shared library systems, it is of great importance. (Note that you may replace @file{libhello.la} with @file{libhello.a} in which case libtool won't @@ -696,7 +700,7 @@ make it easier to clean up the build dir other programs fail horribly if you accidentally forget to use libtool when you should. -Again, you may want to have a look at the @samp{.la} file in order +Again, you may want to have a look at the @file{.la} file in order to see what Libtool stores in it. In particular, you will see that Libtool uses this file to remember the destination directory for the library (the argument to @option{-rpath}) as well as the dependency @@ -738,7 +742,7 @@ burger$ Libtool's way is almost the same@footnote{However, you should avoid using @option{-L} or @option{-l} flags to link against an uninstalled libtool -library. Just specify the relative path to the @samp{.la} file, such as +library. Just specify the relative path to the @file{.la} file, such as @file{../intl/libintl.la}. This is a design decision to eliminate any ambiguity when linking against uninstalled shared libraries.} (@pxref{Link mode}): @@ -1477,7 +1481,7 @@ Allow symbols from @var{output-file} to @item -export-symbols @var{symfile} Tells the linker to export only the symbols listed in @var{symfile}. -The symbol file should end in @samp{.sym} and must contain the name of one +The symbol file should end in @file{.sym} and must contain the name of one symbol per line. This option has no effect on some platforms. By default all symbols are exported. @@ -1541,9 +1545,9 @@ If @var{output-file} is a library, it wi the run-time path of the program. On platforms that don't support hardcoding library paths into executables and only search PATH for shared libraries, such as when @var{output-file} is a Windows (or -other PE platform) DLL, the @samp{.la} control file will be installed in +other PE platform) DLL, the @file{.la} control file will be installed in @var{libdir}, but see @option{-bindir} above for the eventual destination -of the @samp{.dll} or other library file itself. +of the @file{.dll} or other library file itself. @item -R @var{libdir} If @var{output-file} is a program, add @var{libdir} to its run-time @@ -1609,21 +1613,21 @@ passes through commas unchanged. Pass a linker-specific flag directly to the linker. @item -XCClinker @var{flag} -Pass a link-specific flag to the compiler driver (@var{CC}) during linking. +Pass a link-specific flag to the compiler driver (@code{CC}) during linking. @end table -If the @var{output-file} ends in @samp{.la}, then a libtool library is -created, which must be built only from library objects (@samp{.lo} files). +If the @var{output-file} ends in @file{.la}, then a libtool library is +created, which must be built only from library objects (@file{.lo} files). The @option{-rpath} option is required. In the current implementation, libtool libraries may not depend on other uninstalled libtool libraries (@pxref{Inter-library dependencies}). -If the @var{output-file} ends in @samp{.a}, then a standard library is +If the @var{output-file} ends in @file{.a}, then a standard library is created using @code{ar} and possibly @code{ranlib}. @cindex partial linking @cindex linking, partial -If @var{output-file} ends in @samp{.o} or @samp{.lo}, then a reloadable object +If @var{output-file} ends in @file{.o} or @file{.lo}, then a reloadable object file is created from the input files (generally using @samp{ld -r}). This method is often called @dfn{partial linking}. @@ -1668,13 +1672,13 @@ The following components of @var{mode-ar @table @option @item -inst-prefix-dir @var{inst-prefix-dir} When installing into a temporary staging area, rather than the -final @var{prefix}, this argument is used to reflect the +final @code{prefix}, this argument is used to reflect the temporary path, in much the same way @command{automake} uses -@var{DESTDIR}. For instance, if @var{prefix} is @file{/usr/local}, +@env{DESTDIR}. For instance, if @code{prefix} is @file{/usr/local}, but @var{inst-prefix-dir} is @file{/tmp}, then the object will be installed under @file{/tmp/usr/local/}. If the installed object is a libtool library, then the internal fields of that library -will reflect only @var{prefix}, not @var{inst-prefix-dir}: +will reflect only @code{prefix}, not @var{inst-prefix-dir}: @example # Directory that this library needs to be installed in: @@ -1690,8 +1694,8 @@ libdir='/tmp/usr/local/lib' @code{inst-prefix} is also used to insure that if the installed object must be relinked upon installation, that it is relinked -against the libraries in @var{inst-prefix-dir}/@var{prefix}, -not @var{prefix}. +against the libraries in @var{inst-prefix-dir}/@code{prefix}, +not @code{prefix}. In truth, this option is not really intended for use when calling libtool directly; it is automatically used when @code{libtool --mode=install} @@ -1721,12 +1725,18 @@ commands are also completed. @cindex finish mode @cindex mode, finish -@dfn{Finish} mode helps system administrators install libtool libraries -so that they can be located and linked into user programs. - -Each @var{mode-arg} is interpreted as the name of a library directory. -Running this command may require superuser privileges, so the -@option{--dry-run} option may be useful. +@dfn{Finish} mode has two functions. One is to help system administrators +install libtool libraries so that they can be located and linked into +user programs. To invoke this functionality, pass the name of a library +directory as @var{mode-arg}. Running this command may require superuser +privileges, and the @option{--dry-run} option may be useful. + +The second is to facilitate transferring libtool libraries to a native +compilation environment after they were built in a cross-compilation +environment. Cross-compilation environments may rely on recent libtool +features, and running libtool in finish mode will make it easier to +work with older versions of libtool. This task is performed whenever +the @var{mode-arg} is a @file{.la} file. @node Uninstall mode @section Uninstall mode @@ -1865,7 +1875,7 @@ default library search path. Define the preprocessor symbol @samp{LT_MODULE_EXT} to the extension used for runtime loadable modules. If you use libltdl to open modules, then you can simply use the libtool library extension, -@samp{.la}. +@file{.la}. @end defmac @defmac LT_SYS_MODULE_PATH @@ -1923,10 +1933,10 @@ First, to link a program against a libto @c Since GNU Automake 1.5, the flags @option{-dlopen} or @option{-dlpreopen} (@pxref{Link mode}) can be employed with the -@var{program_LDADD} variable. Unfortunately, older releases didn't +@samp{program_LDADD} variable. Unfortunately, older releases didn't accept these flags, so if you are stuck with an ancient Automake, we recommend quoting the flag itself, and setting -@var{program_DEPENDENCIES} too: +@samp{program_DEPENDENCIES} too: @example program_LDADD = "-dlopen" libfoo.la @@ -1949,7 +1959,7 @@ hell_static_LDFLAGS = -static @end example You may use the @samp{program_LDFLAGS} variable to stuff in any flags -you want to pass to libtool while linking @samp{program} (such as +you want to pass to libtool while linking @file{program} (such as @option{-static} to avoid linking uninstalled shared libtool libraries). Building a libtool library is almost as trivial@dots{} note the use of @@ -2007,7 +2017,7 @@ adds many new tests to the @code{configu libtool script will understand the characteristics of the host. It's the most important of a number of macros defined by Libtool: -@defmac LT_PREREQ (@var{VERSION}) +@defmac LT_PREREQ (@var{version}) Ensure that a recent enough version of Libtool is being used. If the version of Libtool used for @code{LT_INIT} is earlier than @var{version}, print an error message to the standard @@ -2018,7 +2028,7 @@ LT_PREREQ([@value{VERSION}]) @end example @end defmac -@defmac LT_INIT (@var{OPTIONS}) +@defmac LT_INIT (@var{options}) @defmacx AC_PROG_LIBTOOL @defmacx AM_PROG_LIBTOOL Add support for the @option{--enable-shared} and @option{--disable-shared} @@ -2065,8 +2075,8 @@ behaves similarly, but it uses @option{- The package name @samp{default} matches any packages that have not set their name in the @code{PACKAGE} environment variable. -This macro also sets the shell variable @var{LIBTOOL_DEPS}, that you can -use to automatically update the libtool script if it becomes +This macro also sets the shell variable @code{LIBTOOL_DEPS}, that you +can use to automatically update the libtool script if it becomes out-of-date. In order to do that, add to your @file{configure.ac}: @example @@ -2156,7 +2166,7 @@ specifying @option{--with-pic} to @comma @end defmac -@defmac LT_LANG (@var{LANGUAGE}) +@defmac LT_LANG (@var{language}) Enable @command{libtool} support for the language given if it has not yet already been enabled. Languages accepted are ``C++'', ``Fortran 77'', ``Java'' and ``Windows Resource''. @@ -2260,7 +2270,7 @@ runs tests, not the produced @code{libto @defvar LD The system linker to use (if the generated @code{libtool} requires one). If this is not set, @code{LT_INIT} will try to find out what is -the linker used by @var{CC}. +the linker used by @code{CC}. @end defvar @defvar LDFLAGS @@ -2306,6 +2316,11 @@ Program to use rather than checking for Cygwin/MS-Windows at the moment. @end defvar +@defvar MANIFEST_TOOL +Program to use rather than checking for @command{mt}, the Manifest Tool. +Only used on Cygwin/MS-Windows at the moment. +@end defvar + With 1.3 era libtool, if you wanted to know any details of what libtool had discovered about your architecture and environment, you had to run the script with @option{--config} and grep through the @@ -2456,8 +2471,8 @@ overwrite existing files. @item --help Display a help message and exit. -@item --ltdl [@var{TARGET-DIRECTORY-NAME}] -Install libltdl in the @var{TARGET-DIRECTORY-NAME} subdirectory of +@item --ltdl [@var{target-directory-name}] +Install libltdl in the @var{target-directory-name} subdirectory of your package. Normally, the directory is extracted from the argument to @code{LT_CONFIG_LTDL_DIR} in @file{configure.ac}, though you can also specify a subdirectory name here if you are not using Autoconf @@ -3249,7 +3264,7 @@ library systems and simple dynamic libra Some platforms, such as AIX, do not even allow you this flexibility. In order to build a shared library, it must be entirely self-contained (that is, have references only to symbols that are found -in the @samp{.lo} files or the specified @samp{-l} libraries), and you +in the @file{.lo} files or the specified @samp{-l} libraries), and you need to specify the @option{-no-undefined} flag. By default, libtool builds only static libraries on these kinds of platforms. @@ -3396,7 +3411,7 @@ generic pointer to the appropriate objec @end deftp @deftypevar {const lt_dlsymlist } lt_preloaded_symbols[] -An array of @var{lt_dlsymlist} structures, representing all the preloaded +An array of @code{lt_dlsymlist} structures, representing all the preloaded symbols linked into the program proper. For each module @option{-dlpreopen}ed by the Libtool linked program there is an element with the @var{name} of the module and an @var{address} @@ -3408,13 +3423,16 @@ The last element of all has a @var{name} To facilitate inclusion of symbol lists into libraries, @code{lt_preloaded_symbols} is @samp{#define}d to a suitably unique name in @file{ltdl.h}. + +This variable may not be declared @code{const} on some systems due to +relocation issues. @end deftypevar Some compilers may allow identifiers that are not valid in ANSI C, such as dollar signs. Libtool only recognizes valid ANSI C symbols (an initial ASCII letter or underscore, followed by zero or more ASCII letters, digits, and underscores), so non-ANSI symbols will not appear -in @var{lt_preloaded_symbols}. +in @code{lt_preloaded_symbols}. @deftypefun int lt_dlpreload (const lt_dlsymlist *@var{preloaded}) Register the list of preloaded modules @var{preloaded}. @@ -3462,7 +3480,7 @@ module opened in this way, call @var{fun @noindent To open all of the modules preloaded into @file{libhell.la} -(presumably from within the @samp{libhell.a} initialisation code): +(presumably from within the @file{libhell.a} initialisation code): @example #define preloaded_symbols lt_libhell_LTX_preloaded_symbols @@ -3591,7 +3609,7 @@ intrinsics_la_LIBADD = ../libloader/l cd ../libloader && $(MAKE) $(AM_MAKEFLAGS) libinterface.la @end example -@cindex -weak option +@cindex @option{-weak} option For a more complex example, see the sources of @file{libltdl} in the Libtool distribution, which is built with the help of the @option{-weak} option. @@ -3607,7 +3625,7 @@ Unfortunately, because of the variation your package needs to determine the correct file to dlopen. The most straightforward and flexible implementation is to determine the -name at runtime, by finding the installed @samp{.la} file, and searching +name at runtime, by finding the installed @file{.la} file, and searching it for the following lines: @example @@ -3840,11 +3858,11 @@ functions @code{lt_dlsetsearchpath}, @co @item libltdl's search path: This search path is the value of the environment variable -@var{LTDL_LIBRARY_PATH}. +@env{LTDL_LIBRARY_PATH}. @item system library search path: The system dependent library search path -(e.g.@: on Linux it is @var{LD_LIBRARY_PATH}). +(e.g.@: on Linux it is @env{LD_LIBRARY_PATH}). @end enumerate Each search path must be a list of absolute directories separated by @@ -3862,8 +3880,8 @@ If the file with the file name @var{file libltdl tries to append the following extensions: @enumerate 1 -@item the libtool archive extension @samp{.la} -@item the extension used for native dynamically loadable modules on the host platform, e.g., @samp{.so}, @samp{.sl}, etc. +@item the libtool archive extension @file{.la} +@item the extension used for native dynamically loadable modules on the host platform, e.g., @file{.so}, @file{.sl}, etc. @end enumerate This lookup strategy was designed to allow programs that don't @@ -4021,7 +4039,7 @@ Replace the current user-defined library by @code{LT_PATHSEP_CHAR}. Return 0 on success. @end deftypefun -@deftypefun {const char *}lt_dlgetsearchpath (void) +@deftypefun {const char *} lt_dlgetsearchpath (void) Return the current user-defined library search path. @end deftypefun @@ -4157,7 +4175,10 @@ Some of the internal information about e maintained by libltdl is available to the user, in the form of this structure: -@deftypefn {Type} {struct} lt_dlinfo @{ @w{char *@var{filename};} @w{char *@var{name};} @w{int @var{ref_count};} @w{int @var{is_resident};} @w{int @var{is_symglobal};} @w{int @var{is_symlocal};}@} +@deftypefn {Type} {struct} lt_dlinfo @{ @w{char *@var{filename};} @ + @w{char *@var{name};} @w{int @var{ref_count};} @ + @w{int @var{is_resident};} @w{int @var{is_symglobal};} @ + @w{int @var{is_symlocal};}@} @code{lt_dlinfo} is used to store information about a module. The @var{filename} attribute is a null-terminated character string of the real module file name. If the module is a libtool module then @@ -4187,7 +4208,8 @@ The opaque type used to hold the module registered libltdl client. @end deftp -@deftp {Type} int lt_dlhandle_interface (@w{lt_dlhandle @var{handle},} @w{const char *@var{id_string}}) +@deftypefn {Type} int lt_dlhandle_interface (@w{lt_dlhandle @var{handle},} @ + @w{const char *@var{id_string}}) Functions of this type are called to check that a handle conforms to a library's expected module interface when iterating over the global handle list. You should be careful to write a callback function of @@ -4220,9 +4242,10 @@ my_interface_cb (lt_dlhandle handle, con return 0; @} @end example -@end deftp +@end deftypefn -@deftypefun lt_dlinterface_id lt_dlinterface_register (@w{const char *@var{id_string}}, @w{lt_dlhandle_interface *@var{iface}}) +@deftypefun lt_dlinterface_id lt_dlinterface_register @ + (@w{const char *@var{id_string}}, @w{lt_dlhandle_interface *@var{iface}}) Use this function to register your interface validator with libltdl, and in return obtain a unique key to store and retrieve per-module data. You supply an @var{id_string} and @var{iface} so that the resulting @@ -4235,7 +4258,9 @@ all modules will be matched. Release the data associated with @var{iface}. @end deftypefun -@deftypefun int lt_dlhandle_map (@w{lt_dlinterface_id @var{iface}}, @w{int (*@var{func}) (lt_dlhandle @var{handle}, void * @var{data})}, @w{void * @var{data}}) +@deftypefun int lt_dlhandle_map (@w{lt_dlinterface_id @var{iface}}, @ + @w{int (*@var{func}) (lt_dlhandle @var{handle}, void * @var{data})}, @ + @w{void * @var{data}}) For each module that matches @var{iface}, call the function @var{func}. When writing the @var{func} callback function, the argument @var{handle} is the handle of a loaded module, and @@ -4246,7 +4271,8 @@ return that non-zero value. Otherwise 0 @var{func} has been successfully called for all matching modules. @end deftypefun -@deftypefun lt_dlhandle lt_dlhandle_iterate (@w{lt_dlinterface_id @var{iface}}, @w{lt_dlhandle @var{place}}) +@deftypefun lt_dlhandle lt_dlhandle_iterate (@w{lt_dlinterface_id @ + @var{iface}}, @w{lt_dlhandle @var{place}}) Iterate over the module handles loaded by @var{iface}, returning the first matching handle in the list if @var{place} is @code{NULL}, and the next one on subsequent calls. If @var{place} is the last element @@ -4437,7 +4463,8 @@ register_myloader (void) dlloader.dlloader_data = (lt_user_data)myloader_function; /* Add my loader as the default module loader. */ - if (lt_dlloader_add (lt_dlloader_next (NULL), &dlloader, "myloader") != 0) + if (lt_dlloader_add (lt_dlloader_next (NULL), &dlloader, + "myloader") != 0) return ERROR; return OK; @@ -4457,7 +4484,8 @@ during the initialisation phase. libltdl provides the following functions for writing your own module loaders: -@deftypefun int lt_dlloader_add (@w{lt_dlloader *@var{place},} @w{lt_user_dlloader *@var{dlloader},} @w{const char *@var{loader_name}}) +@deftypefun int lt_dlloader_add (@w{lt_dlloader *@var{place},} @ + @w{lt_user_dlloader *@var{dlloader},} @w{const char *@var{loader_name}}) Add a new module loader to the list of all loaders, either as the last loader (if @var{place} is @code{NULL}), else immediately before the loader passed as @var{place}. @var{loader_name} will be returned by @@ -4486,7 +4514,7 @@ if (lt_dlloader_remove ("myloader") != 0 @end example @end deftypefun -@deftypefun {lt_dlloader *}lt_dlloader_next (@w{lt_dlloader *@var{place}}) +@deftypefun {lt_dlloader *} lt_dlloader_next (@w{lt_dlloader *@var{place}}) Iterate over the module loaders, returning the first loader if @var{place} is @code{NULL}, and the next one on subsequent calls. The handle is for use with @code{lt_dlloader_add}. @@ -4498,7 +4526,7 @@ if (lt_dlloader_add (lt_dlloader_next (N @end example @end deftypefun -@deftypefun {lt_dlloader *}lt_dlloader_find (@w{const char *@var{loader_name}}) +@deftypefun {lt_dlloader *} lt_dlloader_find (@w{const char *@var{loader_name}}) Return the first loader with a matching @var{loader_name} identifier, or else @code{NULL}, if the identifier is not found. @@ -4515,15 +4543,15 @@ if (lt_dlloader_add (lt_dlloader_find (" @end example @end deftypefun -@deftypefun {const char *}lt_dlloader_name (@w{lt_dlloader *@var{place}}) -Return the identifying name of @var{PLACE}, as obtained from +@deftypefun {const char *} lt_dlloader_name (@w{lt_dlloader *@var{place}}) +Return the identifying name of @var{place}, as obtained from @code{lt_dlloader_next} or @code{lt_dlloader_find}. If this function fails, it will return @code{NULL} and set an error for retrieval with @code{lt_dlerror}. @end deftypefun -@deftypefun {lt_user_data *}lt_dlloader_data (@w{lt_dlloader *@var{place}}) -Return the address of the @code{dlloader_data} of @var{PLACE}, as +@deftypefun {lt_user_data *} lt_dlloader_data (@w{lt_dlloader *@var{place}}) +Return the address of the @code{dlloader_data} of @var{place}, as obtained from @code{lt_dlloader_next} or @code{lt_dlloader_find}. If this function fails, it will return @code{NULL} and set an error for retrieval with @code{lt_dlerror}. @@ -4595,8 +4623,8 @@ or against both a local convenience libr is bad. Ensuring that only one copy of the libltdl sources are linked into any program is left as an exercise for the reader. -@defmac LT_CONFIG_LTDL_DIR (@var{DIRECTORY}) -Declare @var{DIRECTORY} to be the location of the @code{libltdl} +@defmac LT_CONFIG_LTDL_DIR (@var{directory}) +Declare @var{directory} to be the location of the @code{libltdl} source files, for @command{libtoolize --ltdl} to place them. @xref{Invoking libtoolize}, for more details. Provided that you add an appropriate @code{LT_CONFIG_LTDL_DIR} call in your @@ -4604,7 +4632,7 @@ add an appropriate @code{LT_CONFIG_LTDL_ appropriate @code{libltdl} files will be installed automatically. @end defmac -@defmac LTDL_INIT (@var{OPTIONS}) +@defmac LTDL_INIT (@var{options}) @defmacx LT_WITH_LTDL @defmacx AC_WITH_LTDL @code{AC_WITH_LTDL} and @code{LT_WITH_LTDL} are deprecated names for @@ -4615,14 +4643,14 @@ This macro adds the following options to script: @table @option -@item --with-ltdl-include @var{INSTALLED-LTDL-HEADER-DIR} +@item --with-ltdl-include @var{installed-ltdl-header-dir} The @code{LTDL_INIT} macro will look in the standard header file locations to find the installed @code{libltdl} headers. If @code{LTDL_INIT} can't find them by itself, the person who builds your package can use this option to tell @command{configure} where the installed @code{libltdl} headers are. -@item --with-ltdl-lib @var{INSTALLED-LTDL-LIBRARY-DIR} +@item --with-ltdl-lib @var{installed-ltdl-library-dir} Similarly, the person building your package can use this option to help @command{configure} find the installed @file{libltdl.la}. @@ -4674,7 +4702,7 @@ if test "x$with_included_ltdl" != "xyes" fi @end example -@var{OPTIONS} may include no more than one of the following build +@var{options} may include no more than one of the following build modes depending on how you want your project to build @code{libltdl}: @samp{nonrecursive}, @samp{recursive}, or @samp{subproject}. In order for @command{libtoolize} to detect this option correctly, if you @@ -4828,10 +4856,10 @@ installed to the same directory if you u @end defmac Whatever method you use, @samp{LTDL_INIT} will define the shell variable -@var{LIBLTDL} to the link flag that you should use to link with -@code{libltdl}, the shell variable @var{LTDLDEPS} to the files that +@code{LIBLTDL} to the link flag that you should use to link with +@code{libltdl}, the shell variable @code{LTDLDEPS} to the files that can be used as a dependency in @file{Makefile} rules, and the shell -variable @var{LTDLINCL} to the preprocessor flag that you should use to +variable @code{LTDLINCL} to the preprocessor flag that you should use to compile programs that include @file{ltdl.h}. So, when you want to link a program with libltdl, be it a convenience, installed or installable library, just use @samp{$(LTDLINCL)} for preprocessing and compilation, @@ -4840,24 +4868,24 @@ and @samp{$(LIBLTDL)} for linking. @itemize @bullet @item If your package is built using an installed version of @code{libltdl}, -@var{LIBLTDL} will be set to the compiler flags needed to link against -the installed library, @var{LTDLDEPS} will be empty, and @var{LTDLINCL} +@code{LIBLTDL} will be set to the compiler flags needed to link against +the installed library, @code{LTDLDEPS} will be empty, and @code{LTDLINCL} will be set to the compiler flags needed to find the @code{libltdl} header files. @item -If your package is built using the convenience libltdl, @var{LIBLTDL} -and @var{LTDLDEPS} will be the pathname for the convenience version of +If your package is built using the convenience libltdl, @code{LIBLTDL} +and @code{LTDLDEPS} will be the pathname for the convenience version of libltdl (starting with @samp{$@{top_builddir@}/} or -@samp{$@{top_build_prefix@}}) and @var{LTDLINCL} will be @option{-I} +@samp{$@{top_build_prefix@}}) and @code{LTDLINCL} will be @option{-I} followed by the directory that contains @file{ltdl.h} (starting with @samp{$@{top_srcdir@}/}). @item If an installable version of the included @code{libltdl} is being built, its pathname starting with @samp{$@{top_builddir@}/} or -@samp{$@{top_build_prefix@}}, will be stored in @var{LIBLTDL} and -@var{LTDLDEPS}, and @var{LTDLINCL} will be set just like in the case of +@samp{$@{top_build_prefix@}}, will be stored in @code{LIBLTDL} and +@code{LTDLDEPS}, and @code{LTDLINCL} will be set just like in the case of convenience library. @end itemize @@ -5025,17 +5053,29 @@ they test for: @table @file @item cdemo-conf.test -@itemx cdemo-exec.test @itemx cdemo-make.test +@itemx cdemo-exec.test @itemx cdemo-static.test +@itemx cdemo-static-make.test +@itemx cdemo-static-exec.test @itemx cdemo-shared.test +@itemx cdemo-shared-make.test +@itemx cdemo-shared-exec.test @itemx cdemo-undef.test +@itemx cdemo-undef-make.test +@itemx cdemo-undef-exec.test @pindex cdemo-conf.test -@pindex cdemo-exec.test @pindex cdemo-make.test +@pindex cdemo-exec.test @pindex cdemo-static.test +@pindex cdemo-static-make.test +@pindex cdemo-static-exec.test @pindex cdemo-shared.test +@pindex cdemo-shared-make.test +@pindex cdemo-shared-exec.test @pindex cdemo-undef.test +@pindex cdemo-undef-make.test +@pindex cdemo-undef-exec.test These programs check to see that the @file{tests/cdemo} subdirectory of the libtool distribution can be configured and built correctly. @@ -5044,8 +5084,8 @@ convenience libraries, a mechanism that libraries to be created, in a way that their components can be later linked into programs or other libraries, even shared ones. -The tests @file{cdemo-make.test} and @file{cdemo-exec.test} are executed -three times, under three different libtool configurations: +The tests matching @file{cdemo-*make.test} and @file{cdemo-*exec.test} +are executed three times, under three different libtool configurations: @file{cdemo-conf.test} configures @file{cdemo/libtool} to build both static and shared libraries (the default for platforms that support both), @file{cdemo-static.test} builds only static libraries @@ -5056,33 +5096,65 @@ The test @file{cdemo-undef.test} tests t libraries with undefined symbols on systems that allow this. @item demo-conf.test +@itemx demo-make.test @itemx demo-exec.test @itemx demo-inst.test -@itemx demo-make.test @itemx demo-unst.test @itemx demo-static.test +@itemx demo-static-make.test +@itemx demo-static-exec.test +@itemx demo-static-inst.test +@itemx demo-static-unst.test @itemx demo-shared.test +@itemx demo-shared-make.test +@itemx demo-shared-exec.test +@itemx demo-shared-inst.test +@itemx demo-shared-unst.test @itemx demo-nofast.test +@itemx demo-nofast-make.test +@itemx demo-nofast-exec.test +@itemx demo-nofast-inst.test +@itemx demo-nofast-unst.test @itemx demo-pic.test +@itemx demo-pic-make.test +@itemx demo-pic-exec.test @itemx demo-nopic.test +@itemx demo-nopic-make.test +@itemx demo-nopic-exec.test @pindex demo-conf.test +@pindex demo-make.test @pindex demo-exec.test @pindex demo-inst.test -@pindex demo-make.test @pindex demo-unst.test @pindex demo-static.test +@pindex demo-static-make.test +@pindex demo-static-exec.test +@pindex demo-static-inst.test +@pindex demo-static-unst.test @pindex demo-shared.test +@pindex demo-shared-make.test +@pindex demo-shared-exec.test +@pindex demo-shared-inst.test +@pindex demo-shared-unst.test @pindex demo-nofast.test +@pindex demo-nofast-make.test +@pindex demo-nofast-exec.test +@pindex demo-nofast-inst.test +@pindex demo-nofast-unst.test @pindex demo-pic.test +@pindex demo-pic-make.test +@pindex demo-pic-exec.test @pindex demo-nopic.test +@pindex demo-nopic-make.test +@pindex demo-nopic-exec.test These programs check to see that the @file{tests/demo} subdirectory of the libtool distribution can be configured, built, installed, and uninstalled correctly. The @file{tests/demo} subdirectory contains a demonstration of a trivial -package that uses libtool. The tests @file{demo-make.test}, -@file{demo-exec.test}, @file{demo-inst.test} and -@file{demo-unst.test} are executed four times, under four different +package that uses libtool. The tests matching @file{demo-*make.test}, +@file{demo-*exec.test}, @file{demo-*inst.test} and +@file{demo-*unst.test} are executed four times, under four different libtool configurations: @file{demo-conf.test} configures @file{demo/libtool} to build both static and shared libraries, @file{demo-static.test} builds only static libraries @@ -5113,9 +5185,9 @@ correspond to libtool's own notion of ho @itemx depdemo-relink.test @pindex demo-relink.test @pindex depdemo-relink.test -These tests check whether variable @var{shlibpath_overrides_runpath} is -properly set. If the test fails and @var{VERBOSE} is set, it will -indicate what the variable should have been set to. +These tests check whether variable @code{shlibpath_overrides_runpath} is +properly set. If the test fails, it will indicate what the variable should +have been set to. @item demo-noinst-link.test @pindex demo-noinst-link.test @@ -5123,21 +5195,45 @@ Checks whether libtool will not try to l version of a library when it should be linking with a just-built one. @item depdemo-conf.test +@itemx depdemo-make.test @itemx depdemo-exec.test @itemx depdemo-inst.test -@itemx depdemo-make.test @itemx depdemo-unst.test @itemx depdemo-static.test +@itemx depdemo-static-make.test +@itemx depdemo-static-exec.test +@itemx depdemo-static-inst.test +@itemx depdemo-static-unst.test @itemx depdemo-shared.test +@itemx depdemo-shared-make.test +@itemx depdemo-shared-exec.test +@itemx depdemo-shared-inst.test +@itemx depdemo-shared-unst.test @itemx depdemo-nofast.test +@itemx depdemo-nofast-make.test +@itemx depdemo-nofast-exec.test +@itemx depdemo-nofast-inst.test +@itemx depdemo-nofast-unst.test @pindex depdemo-conf.test +@pindex depdemo-make.test @pindex depdemo-exec.test @pindex depdemo-inst.test -@pindex depdemo-make.test @pindex depdemo-unst.test @pindex depdemo-static.test +@pindex depdemo-static-make.test +@pindex depdemo-static-exec.test +@pindex depdemo-static-inst.test +@pindex depdemo-static-unst.test @pindex depdemo-shared.test +@pindex depdemo-shared-make.test +@pindex depdemo-shared-exec.test +@pindex depdemo-shared-inst.test +@pindex depdemo-shared-unst.test @pindex depdemo-nofast.test +@pindex depdemo-nofast-make.test +@pindex depdemo-nofast-exec.test +@pindex depdemo-nofast-inst.test +@pindex depdemo-nofast-unst.test These programs check to see that the @file{tests/depdemo} subdirectory of the libtool distribution can be configured, built, installed, and uninstalled correctly. @@ -5146,8 +5242,8 @@ The @file{tests/depdemo} subdirectory co inter-library dependencies with libtool. The test programs link some interdependent libraries. -The tests @file{depdemo-make.test}, @file{depdemo-exec.test}, -@file{depdemo-inst.test} and @file{depdemo-unst.test} are executed +The tests matching @file{depdemo-*make.test}, @file{depdemo-*exec.test}, +@file{depdemo-*inst.test} and @file{depdemo-*unst.test} are executed four times, under four different libtool configurations: @file{depdemo-conf.test} configures @file{depdemo/libtool} to build both static and shared libraries, @file{depdemo-static.test} builds only static @@ -5157,19 +5253,35 @@ only shared libraries (@option{--disable disable the fast-install mode (@option{--enable-fast-install=no}). @item mdemo-conf.test +@itemx mdemo-make.test @itemx mdemo-exec.test @itemx mdemo-inst.test -@itemx mdemo-make.test @itemx mdemo-unst.test @itemx mdemo-static.test +@itemx mdemo-static-make.test +@itemx mdemo-static-exec.test +@itemx mdemo-static-inst.test +@itemx mdemo-static-unst.test @itemx mdemo-shared.test +@itemx mdemo-shared-make.test +@itemx mdemo-shared-exec.test +@itemx mdemo-shared-inst.test +@itemx mdemo-shared-unst.test @pindex mdemo-conf.test +@pindex mdemo-make.test @pindex mdemo-exec.test @pindex mdemo-inst.test -@pindex mdemo-make.test @pindex mdemo-unst.test @pindex mdemo-static.test +@pindex mdemo-static-make.test +@pindex mdemo-static-exec.test +@pindex mdemo-static-inst.test +@pindex mdemo-static-unst.test @pindex mdemo-shared.test +@pindex mdemo-shared-make.test +@pindex mdemo-shared-exec.test +@pindex mdemo-shared-inst.test +@pindex mdemo-shared-unst.test These programs check to see that the @file{tests/mdemo} subdirectory of the libtool distribution can be configured, built, installed, and uninstalled correctly. @@ -5180,8 +5292,8 @@ package that uses libtool and the system dlopen wrapper for various platforms (Linux, Solaris, HP/UX etc.) including support for dlpreopened modules (@pxref{Dlpreopening}). -The tests @file{mdemo-make.test}, @file{mdemo-exec.test}, -@file{mdemo-inst.test} and @file{mdemo-unst.test} are executed +The tests matching @file{mdemo-*make.test}, @file{mdemo-*exec.test}, +@file{mdemo-*inst.test} and @file{mdemo-*unst.test} are executed three times, under three different libtool configurations: @file{mdemo-conf.test} configures @file{mdemo/libtool} to build both static and shared libraries, @file{mdemo-static.test} builds only static @@ -5213,7 +5325,7 @@ library works properly. @item link-2.test @pindex link-2.test -This test makes sure that files ending in @samp{.lo} are never linked +This test makes sure that files ending in @file{.lo} are never linked directly into a program file. @item nomode.test @@ -5225,18 +5337,18 @@ Check whether we can actually get help f Check that a nonexistent objectlist file is properly detected. @item pdemo-conf.test +@itemx pdemo-make.test @itemx pdemo-exec.test @itemx pdemo-inst.test -@itemx pdemo-make.test @pindex pdemo-conf.test +@pindex pdemo-make.test @pindex pdemo-exec.test @pindex pdemo-inst.test -@pindex pdemo-make.test These programs check to see that the @file{tests/pdemo} subdirectory of the libtool distribution can be configured, built, and executed correctly. -The @file{pdemo-conf.test} lowers the @var{max_cmd_len} variable in the +The @file{pdemo-conf.test} lowers the @code{max_cmd_len} variable in the generated libtool script to test the measures to evade command line length limitations. @@ -5252,22 +5364,34 @@ shell scripts. @item suffix.test @pindex suffix.test When other programming languages are used with libtool (@pxref{Other -languages}), the source files may end in suffixes other than @samp{.c}. +languages}), the source files may end in suffixes other than @file{.c}. This test validates that libtool can handle suffixes for all the file types that it supports, and that it fails when the suffix is invalid. @item tagdemo-conf.test -@itemx tagdemo-exec.test @itemx tagdemo-make.test +@itemx tagdemo-exec.test @itemx tagdemo-static.test +@itemx tagdemo-static-make.test +@itemx tagdemo-static-exec.test @itemx tagdemo-shared.test +@itemx tagdemo-shared-make.test +@itemx tagdemo-shared-exec.test @itemx tagdemo-undef.test +@itemx tagdemo-undef-make.test +@itemx tagdemo-undef-exec.test @pindex tagdemo-conf.test -@pindex tagdemo-exec.test @pindex tagdemo-make.test +@pindex tagdemo-exec.test @pindex tagdemo-static.test +@pindex tagdemo-static-make.test +@pindex tagdemo-static-exec.test @pindex tagdemo-shared.test +@pindex tagdemo-shared-make.test +@pindex tagdemo-shared-exec.test @pindex tagdemo-undef.test +@pindex tagdemo-undef-make.test +@pindex tagdemo-undef-exec.test These programs check to see that the @file{tests/tagdemo} subdirectory of the libtool distribution can be configured, built, and executed correctly. @@ -5278,15 +5402,23 @@ It generates a library from C++ sources, program. @item f77demo-conf.test -@itemx f77demo-exec.test @itemx f77demo-make.test +@itemx f77demo-exec.test @itemx f77demo-static.test +@itemx f77demo-static-make.test +@itemx f77demo-static-exec.test @itemx f77demo-shared.test +@itemx f77demo-shared-make.test +@itemx f77demo-shared-exec.test @pindex f77demo-conf.test -@pindex f77demo-exec.test @pindex f77demo-make.test +@pindex f77demo-exec.test @pindex f77demo-static.test +@pindex f77demo-static-make.test +@pindex f77demo-static-exec.test @pindex f77demo-shared.test +@pindex f77demo-shared-make.test +@pindex f77demo-shared-exec.test These programs check to see that the @file{tests/f77demo} subdirectory of the libtool distribution can be configured, built, and executed correctly. @@ -5297,15 +5429,23 @@ sources, and a Fortran 77 program to use program to use the latter library. @item fcdemo-conf.test -@itemx fcdemo-exec.test @itemx fcdemo-make.test +@itemx fcdemo-exec.test @itemx fcdemo-static.test +@itemx fcdemo-static-make.test +@itemx fcdemo-static-exec.test @itemx fcdemo-shared.test +@itemx fcdemo-shared-make.test +@itemx fcdemo-shared-exec.test @pindex fcdemo-conf.test -@pindex fcdemo-exec.test @pindex fcdemo-make.test +@pindex fcdemo-exec.test @pindex fcdemo-static.test +@pindex fcdemo-static-make.test +@pindex fcdemo-static-exec.test @pindex fcdemo-shared.test +@pindex fcdemo-shared-make.test +@pindex fcdemo-shared-exec.test These programs check to see that the @file{tests/fcdemo} subdirectory of the libtool distribution can be configured, built, and executed correctly. @@ -5361,27 +5501,13 @@ recursive test groups themselves should while the test groups they invoke may do so. @end table -For example, in order to avoid any interactive test groups, you could -use this: - -@smallexample -make check-local \ - TESTSUITEFLAGS='-k !interactive INNER_TESTSUITEFLAGS=",!interactive"' -@end smallexample - -@noindent -while to run only those test groups, you would use this: - -@smallexample -make check-local \ - TESTSUITEFLAGS='-k interactive -k recursive INNER_TESTSUITEFLAGS=,interactive' -@end smallexample - -@noindent -but the convenience targets @samp{check-interactive} and -@samp{check-noninteractive} avoid needing to remember these complex -commands, in addition to also disabling interactive tests in the old -test suite. +@cindex @samp{check-interactive} +@cindex @samp{check-noninteractive} +There is a convenience target @samp{check-noninteractive} that runs +all tests from both test suites that do not cause user interaction on +Windows. Conversely, the target @samp{check-interactive} runs the +complement of tests and might require closing popup windows about DLL +load errors on Windows. @node When tests fail @@ -5389,8 +5515,9 @@ test suite. @cindex failed tests @cindex tests, failed -Each of the tests in the old test suite are designed to produce no -output when they are run via @kbd{make check}. The exit status of each +When the tests in the old test suite are run via @command{make check}, +output is caught in per-test @file{tests/@var{test-name}.log} files +and summarized in the @file{test-suite.log} file. The exit status of each program tells the @file{Makefile} whether or not the test succeeded. If a test fails, it means that there is either a programming error in @@ -5400,17 +5527,12 @@ To investigate a particular test, you ma a normal program. When the test is invoked in this way, it produces output that may be useful in determining what the problem is. -Another way to have the test programs produce output is to set the -@var{VERBOSE} environment variable to @samp{yes} before running them. -For example, @kbd{env VERBOSE=yes make check} runs all the tests, and -has each of them display debugging information. - The new, Autotest-based test suite produces as output a file @file{tests/testsuite.log} which contains information about failed tests. You can pass options to the test suite through the @command{make} -variable @var{TESTSUITEFLAGS} (@pxref{testsuite Invocation, , +variable @env{TESTSUITEFLAGS} (@pxref{testsuite Invocation, , The Autoconf Manual, autoconf, The Autoconf Manual}). @@ -5559,7 +5681,7 @@ writes libtool makes sure @samp{$deplibs looks in the library link path for libraries that have the right libname. Then it runs @samp{$file_magic_cmd} on the library and checks for a match against the extended regular expression @var{regex}. When -@var{file_magic_test_file} is set by @file{libtool.m4}, it is used as an +@code{file_magic_test_file} is set by @file{libtool.m4}, it is used as an argument to @samp{$file_magic_cmd} in order to verify whether the regular expression matches its output, and warn the user otherwise. @@ -5640,6 +5762,8 @@ write your own. * Reloadable objects:: Binding object files together. * Multiple dependencies:: Removing duplicate dependent libraries. * Archivers:: Programs that create static archives. +* Cross compiling:: Issues that arise when cross compiling. +* File name conversion:: Converting file names between platforms. @end menu @node References @@ -5757,7 +5881,7 @@ in cases where it is necessary. On all known systems, building a static library can be accomplished by running @kbd{ar cru lib@var{name}.a @var{obj1}.o @var{obj2}.o @dots{}}, -where the @samp{.a} file is the output library, and each @samp{.o} file is an +where the @file{.a} file is the output library, and each @file{.o} file is an object file. On all known systems, if there is a program named @command{ranlib}, then it @@ -5765,6 +5889,434 @@ must be used to ``bless'' the created li with the @kbd{ranlib lib@var{name}.a} command. Some systems, like Irix, use the @code{ar ts} command, instead. +@node Cross compiling +@subsection Cross compiling +@cindex cross compile + +Most build systems support the ability to compile libraries and applications +on one platform for use on a different platform, provided a compiler capable +of generating the appropriate output is available. In such cross compiling +scenarios, the platform on which the libraries or applications are compiled +is called the @dfn{build platform}, while the platform on which the libraries +or applications are intended to be used or executed is called the +@dfn{host platform}. +@ref{GNU Build System,, The GNU Build System, automake, The Automake Manual}, +of which libtool is a part, supports cross compiling via arguments passed to +the configure script: @option{--build=...} and @option{--host=...}. However, +when the build platform and host platform are very different, libtool is +required to make certain accommodations to support these scenarios. + +In most cases, because the build platform and host platform differ, the +cross-compiled libraries and executables can't be executed or tested on the +build platform where they were compiled. The testsuites of most build systems +will often skip any tests that involve executing such foreign executables when +cross-compiling. However, if the build platform and host platform are +sufficiently similar, it is often possible to run cross-compiled applications. +Libtool's own testsuite often attempts to execute cross-compiled tests, but +will mark any failures as @emph{skipped} since the failure might simply be due +to the differences between the two platforms. + +In addition to cases where the host platform and build platform are extremely +similar (e.g. @samp{i586-pc-linux-gnu} and @samp{i686-pc-linux-gnu}), there is +another case in which cross-compiled host applications may be executed on the +build platform. This is possible when the build platform supports an emulation +or API-enhanced environment for the host platform. One example of this +situation would be if the build platform were MinGW, and the host platform were +Cygwin (or vice versa). Both of these platforms can actually operate within a +single Windows instance, so Cygwin applications can be launched from a MinGW +context, and vice versa---provided certain care is taken. Another example +would be if the build platform were GNU/Linux on an x86 32bit processor, and +the host platform were MinGW. In this situation, the +@uref{http://www.winehq.org/, Wine} environment can be used to launch Windows +applications from the GNU/Linux operating system; again, provided certain care +is taken. + +One particular issue occurs when a Windows platform such as MinGW, Cygwin, or +MSYS is the host or build platform, while the other platform is a Unix-style +system. In these cases, there are often conflicts between the format of the +file names and paths expected within host platform libraries and executables, +and those employed on the build platform. + +This situation is best described using a concrete example: suppose the build +platform is GNU/Linux with canonical triplet @samp{i686-pc-linux-gnu}. Suppose +further that the host platform is MinGW with canonical triplet +@samp{i586-pc-mingw32}. On the GNU/Linux platform there is a cross compiler +following the usual naming conventions of such compilers, where the compiler +name is prefixed by the host canonical triplet (or suitable alias). (For more +information concerning canonical triplets and platform aliases, see +@ref{Specifying Target Triplets,, Specifying Target Triplets, autoconf, +The Autoconf Manual} and @ref{Canonicalizing,, Canonicalizing, autoconf, +The Autoconf Manual}) In this case, the C compiler is named +@samp{i586-pc-mingw32-gcc}. + +As described in @ref{Wrapper executables}, for the MinGW host platform libtool +uses a wrapper executable to set various environment variables before launching +the actual program executable. Like the program executable, the wrapper +executable is cross-compiled for the host platform (that is, for MinGW). As +described above, ordinarily a host platform executable cannot be executed on +the build platform, but in this case the Wine environment could be used to +launch the MinGW application from GNU/Linux. However, the wrapper executable, +as a host platform (MinGW) application, must set the @env{PATH} variable so +that the true application's dependent libraries can be located---but the +contents of the @env{PATH} variable must be structured for MinGW. Libtool +must use the Wine file name mapping facilities to determined the correct value +so that the wrapper executable can set the @env{PATH} variable to point to the +correct location. + +For example, suppose we are compiling an application in @file{/var/tmp} on +GNU/Linux, using separate source code and build directories: + +@example +@multitable @columnfractions 0.5 0.5 +@item @file{/var/tmp/foo-1.2.3/app/} @tab (application source code) +@item @file{/var/tmp/foo-1.2.3/lib/} @tab (library source code) +@item @file{/var/tmp/BUILD/app/} @tab (application build objects here) +@item @file{/var/tmp/BUILD/lib/} @tab (library build objects here) +@end multitable +@end example + +Since the library will be built in @file{/var/tmp/BUILD/lib}, the wrapper +executable (which will be in @file{/var/tmp/BUILD/app}) must add that +directory to @env{PATH} (actually, it must add the directory named +@var{objdir} under @file{/var/tmp/BUILD/lib}, but we'll ignore that detail +for now). However, Windows does not have a concept of Unix-style file or +directory names such as @file{/var/tmp/BUILD/lib}. Therefore, Wine provides +a mapping from Windows file names such as @file{C:\Program Files} to specific +Unix-style file names. Wine also provides a utility that can be used to map +Unix-style file names to Windows file names. + +In this case, the wrapper executable should actually add the value + +@example +Z:\var\tmp\BUILD\lib +@end example + +@noindent +to the @env{PATH}. libtool contains support for path conversions of this +type, for a certain limited set of build and host platform combinations. In +this case, libtool will invoke Wine's @command{winepath} utility to ensure that +the correct @env{PATH} value is used. For more information, see +@pxref{File name conversion}. + +@node File name conversion +@subsection File name conversion +@cindex file name conversion +@cindex path conversion + +In certain situations, libtool must convert file names and paths between +formats appropriate to different platforms. Usually this occurs when +cross-compiling, and affects only the ability to launch host platform +executables on the build platform using an emulation or API-enhancement +environment such as Wine. Failure to convert paths +(@pxref{File Name Conversion Failure}) will cause a warning to be issued, but +rarely causes the build to fail---and should have no affect on the compiled +products, once installed properly on the host platform. For more information, +@pxref{Cross compiling}. + +However, file name conversion may also occur in another scenario: when using a +Unix emulation system on Windows (such as Cygwin or MSYS), combined with a +native Windows compiler such as MinGW or MSVC. Only a limited set of such +scenarios are currently supported; in other cases file name conversion is +skipped. The lack of file name conversion usually means that uninstalled +executables can't be launched, but only rarely causes the build to fail +(@pxref{File Name Conversion Failure}). + +libtool supports file name conversion in the following scenarios: + +@multitable @columnfractions .25 .25 .5 +@headitem build platform @tab host platform @tab Notes +@item MinGW (MSYS) @tab MinGW (Windows) +@tab @pxref{Native MinGW File Name Conversion} + +@item Cygwin @tab MinGW (Windows) +@tab @pxref{Cygwin/Windows File Name Conversion} + +@item Unix + Wine @tab MinGW (Windows) +@tab Requires Wine. @pxref{Unix/Windows File Name Conversion} + +@item MinGW (MSYS) @tab Cygwin +@tab Requires @env{LT_CYGPATH}. @pxref{LT_CYGPATH}. Provided for testing +purposes only. + +@item Unix + Wine @tab Cygwin +@tab Requires both Wine and @env{LT_CYGPATH}, but does not yet work with +Cygwin 1.7.7 and Wine-1.2. +See @pxref{Unix/Windows File Name Conversion} and @pxref{LT_CYGPATH}. +@end multitable + +@menu +* File Name Conversion Failure:: What happens when file name conversion fails +* Native MinGW File Name Conversion:: MSYS file name conversion idiosyncrasies +* Cygwin/Windows File Name Conversion:: Using @command{cygpath} to convert Cygwin file names +* Unix/Windows File Name Conversion:: Using Wine to convert Unix paths +* LT_CYGPATH:: Invoking @command{cygpath} from other environments +* Cygwin to MinGW Cross:: Other notes concerning MinGW cross +@end menu + +@node File Name Conversion Failure +@subsubsection File Name Conversion Failure +@cindex File Name Conversion - Failure +@cindex Path Conversion - Failure + +In most cases, file name conversion is not needed or attempted. However, when +libtool detects that a specific combination of build and host platform does +require file name conversion, it is possible that the conversion may fail. +In these cases, you may see a warning such as the following: + +@example +Could not determine the host file name corresponding to + `... a file name ...' +Continuing, but uninstalled executables may not work. +@end example + +@noindent +or + +@example +Could not determine the host path corresponding to + `... a path ...' +Continuing, but uninstalled executables may not work. +@end example + +@noindent +This should not cause the build to fail. At worst, it means that the wrapper +executable will specify file names or paths appropriate for the build platform. +Since those are not appropriate for the host platform, the uninstalled +executables would not operate correctly, even when the wrapper executable is +launched via the appropriate emulation or API-enhancement (e.g. Wine). Simply +install the executables on the host platform, and execute them there. + +@node Native MinGW File Name Conversion +@subsubsection Native MinGW File Name Conversion +@cindex File Name Conversion - MinGW +@cindex Path Conversion - MinGW +@cindex MSYS + +MSYS is a Unix emulation environment for Windows, and is specifically designed +such that in normal usage it @emph{pretends} to be MinGW or native Windows, +but understands Unix-style file names and paths, and supports standard Unix +tools and shells. Thus, ``native'' MinGW builds are actually an odd sort of +cross-compile, from an MSYS Unix emulation environment ``pretending'' to be +MinGW, to actual native Windows. + +When an MSYS shell launches a native Windows executable (as opposed to other +@emph{MSYS} executables), it uses a system of heuristics to detect any +command-line arguments that contain file names or paths. It automatically +converts these file names from the MSYS (Unix-like) format, to the +corresponding Windows file name, before launching the executable. However, +this auto-conversion facility is only available when using the MSYS runtime +library. The wrapper executable itself is a MinGW application (that is, it +does not use the MSYS runtime library). The wrapper executable must set +@env{PATH} to, and call @code{_spawnv} with, values that have already been +converted from MSYS format to Windows. Thus, when libtool writes the source +code for the wrapper executable, it must manually convert MSYS paths to +Windows format, so that the Windows values can be hard-coded into the wrapper +executable. + +@node Cygwin/Windows File Name Conversion +@subsubsection Cygwin/Windows File Name Conversion +@cindex File Name Conversion - Cygwin to Windows +@cindex Path Conversion - Cygwin to Windows + +Cygwin provides a Unix emulation environment for Windows. As part of that +emulation, it provides a file system mapping that presents the Windows file +system in a Unix-compatible manner. Cygwin also provides a utility +@command{cygpath} that can be used to convert file names and paths between +the two representations. In a correctly configured Cygwin installation, +@command{cygpath} is always present, and is in the @env{PATH}. + +Libtool uses @command{cygpath} to convert from Cygwin (Unix-style) file names +and paths to Windows format when the build platform is Cygwin and the host +platform is MinGW. + +When the host platform is Cygwin, but the build platform is MSYS or some Unix +system, libtool also uses @command{cygpath} to convert from Windows to Cygwin +format (after first converting from the build platform format to Windows format; +see @pxref{Native MinGW File Name Conversion} and +@pxref{Unix/Windows File Name Conversion}). Because the build platform is not +Cygwin, @command{cygpath} is not (and should not be) in the @env{PATH}. +Therefore, in this configuration the environment variable @env{LT_CYGPATH} is +required. @xref{LT_CYGPATH}. + +@node Unix/Windows File Name Conversion +@subsubsection Unix/Windows File Name Conversion +@cindex File Name Conversion - Unix to Windows +@cindex Path Conversion - Unix to Windows + + +@uref{http://www.winehq.org/, Wine} provides an interpretation environment for +some Unix platforms in which Windows applications can be executed. It provides +a mapping between the Unix file system and a virtual Windows file system used +by the Windows programs. For the file name conversion to work, Wine must be +installed and properly configured on the build platform, and the +@command{winepath} application must be in the build platform's @env{PATH}. In +addition, on 32bit GNU/Linux it is usually helpful if the binfmt extension is +enabled. + +@node LT_CYGPATH +@subsubsection LT_CYGPATH +@cindex LT_CYGPATH + +For some cross-compile configurations (where the host platform is Cygwin), the +@command{cygpath} program is used to convert file names from the build platform +notation to the Cygwin form (technically, this conversion is from Windows +notation to Cygwin notation; the conversion from the build platform format +to Windows notation is performed via other means). However, because the +@command{cygpath} program is not (and should not be) in the @env{PATH} on +the build platform, @env{LT_CYGPATH} must specify the full build platform +file name (that is, the full Unix or MSYS file name) of the @command{cygpath} +program. + +The reason @command{cygpath} should not be in the build platform @env{PATH} is +twofold: first, @command{cygpath} is usually installed in the same directory as +many other Cygwin executables, such as @command{sed}, @command{cp}, etc. If +the build platform environment had this directory in its @env{PATH}, then these +Cygwin versions of common Unix utilities might be used in preference to the +ones provided by the build platform itself, with deleterious effects. Second, +especially when Cygwin-1.7 or later is used, multiple Cygwin installations can +coexist within the same Windows instance. Each installation will have separate +``mount tables'' specified in @file{@var{CYGROOT-N}/etc/fstab}. These +@dfn{mount tables} control how that instance of Cygwin will map Windows file +names and paths to Cygwin form. Each installation's @command{cygpath} utility +automatically deduces the appropriate @file{/etc/fstab} file. Since each +@file{@var{CYGROOT-N}/etc/fstab} mount table may specify different mappings, it +matters which @command{cygpath} is used. + +Note that @command{cygpath} is a Cygwin application; to execute this tool from +Unix requires a working and properly configured Wine installation, as well +as enabling the GNU/Linux @code{binfmt} extension. Furthermore, the Cygwin +@command{setup.exe} tool should have been used, via Wine, to properly install +Cygwin into the Wine file system (and registry). + +Unfortunately, Wine support for Cygwin is intermittent. Recent releases of +Cygwin (1.7 and above) appear to require more Windows API support than Wine +provides (as of Wine version 1.2); most Cygwin applications fail to execute. +This includes @command{cygpath} itself. Hence, it is best @emph{not} to use +the LT_CYGPATH machinery in libtool when performing Unix to Cygwin +cross-compiles. Similarly, it is best @emph{not} to enable the GNU/Linux binfmt +support in this configuration, because while Wine will fail to execute the +compiled Cygwin applications, it will still exit with status zero. This tends +to confuse build systems and test suites (including libtool's own testsuite, +resulting in spurious reported failures). Wine support for the older +Cygwin-1.5 series appears satisfactory, but the Cygwin team no longer supports +Cygwin-1.5. It is hoped that Wine will eventually be improved such that +Cygwin-1.7 will again operate correctly under Wine. Until then, libtool will +report warnings as described in @pxref{File Name Conversion Failure} in these +scenarios. + +However, @env{LT_CYGPATH} is also used for the MSYS to Cygwin cross compile +scenario, and operates as expected. + +@node Cygwin to MinGW Cross +@subsubsection Cygwin to MinGW Cross +@cindex Cygwin to MinGW Cross + +There are actually three different scenarios that could all legitimately be +called a ``Cygwin to MinGW'' cross compile. The current (and standard) +definition is when there is a compiler that produces native Windows libraries +and applications, but which itself is a Cygwin application, just as would be +expected in any other cross compile setup. + +However, historically there were two other definitions, which we will refer +to as the @emph{fake} one, and the @emph{lying} one. + +In the @emph{fake} Cygwin to MinGW cross compile case, you actually use a +native MinGW compiler, but you do so from within a Cygwin environment: + +@example +@kbd{export PATH="/c/MinGW/bin:$@{PATH@}"} +@kbd{configure --build=i686-pc-cygwin \ + --host=mingw32 \ + NM=/c/MinGW/bin/nm.exe} +@end example + +In this way, the build system ``knows'' that you are cross compiling, and the +file name conversion logic will be used. However, because the tools +(@command{mingw32-gcc}, @command{nm}, @command{ar}) used are actually native +Windows applications, they will not understand any Cygwin (that is, Unix-like) +absolute file names passed as command line arguments (and, unlike MSYS, Cygwin +does not automatically convert such arguments). However, so long as only +relative file names are used in the build system, and non-Windows-supported +Unix idioms such as symlinks and mount points are avoided, this scenario should +work. + +If you must use absolute file names, you will have to force Libtool to convert +file names for the toolchain in this case, by doing the following before you +run configure: + +@example +@kbd{export lt_cv_to_tool_file_cmd=func_convert_file_cygwin_to_w32} +@end example +@cindex lt_cv_to_tool_file_cmd +@cindex func_convert_file_cygwin_to_w32 + +In the @emph{lying} Cygwin to MinGW cross compile case, you lie to the +build system: + +@example +@kbd{export PATH="/c/MinGW/bin:$@{PATH@}"} +@kbd{configure --build=i686-pc-mingw32 \ + --host=i686-pc-mingw32 \ + --disable-dependency-tracking} +@end example + +@noindent +and claim that the build platform is MinGW, even though you are actually +running under @emph{Cygwin} and not MinGW. In this case, libtool does +@emph{not} know that you are performing a cross compile, and thinks instead +that you are performing a native MinGW build. However, as described in +(@pxref{Native MinGW File Name Conversion}), that scenario triggers an ``MSYS +to Windows'' file name conversion. This, of course, is the wrong conversion +since we are actually running under Cygwin. Also, the toolchain is expecting +Windows file names (not Cygwin) but unless told so Libtool will feed Cygwin +file names to the toolchain in this case. To force the correct file name +conversions in this situation, you should do the following @emph{before} +running configure: + +@example +@kbd{export lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32} +@kbd{export lt_cv_to_tool_file_cmd=func_convert_file_cygwin_to_w32} +@end example +@cindex lt_cv_to_host_file_cmd +@cindex lt_cv_to_tool_file_cmd +@cindex func_convert_file_cygwin_to_w32 + +Note that this relies on internal implementation details of libtool, and +is subject to change. Also, @code{--disable-dependency-tracking} is required, +because otherwise the MinGW GCC will generate dependency files that contain +Windows file names. This, in turn, will confuse the Cygwin @command{make} +program, which does not accept Windows file names: + +@example +Makefile:1: *** target pattern contains no `%'. Stop. +@end example + +There have also always been a number of other details required for the +@emph{lying} case to operate correctly, such as the use of so-called +@dfn{identity mounts}: + +@example +# @var{cygwin-root}/etc/fstab +D:/foo /foo some_fs binary 0 0 +D:/bar /bar some_fs binary 0 0 +E:/grill /grill some_fs binary 0 0 +@end example + +In this way, top-level directories of each drive are available using +identical names within Cygwin. + +Note that you also need to ensure that the standard Unix directories +(like @file{/bin}, @file{/lib}, @file{/usr}, @file{/etc}) appear in the root +of a drive. This means that you must install Cygwin itself into the @file{C:/} +root directory (or @file{D:/}, or @file{E:/}, etc)---instead of the +recommended installation into @file{C:/cygwin/}. In addition, all file names +used in the build system must be relative, symlinks should not be used within +the source or build directory trees, and all @option{-M*} options to +@command{gcc} except @option{-MMD} must be avoided. + +This is quite a fragile setup, but it has been in historical use, and so is +documented here. + @node libtool script contents @section @code{libtool} script contents @cindex implementation of libtool @@ -5859,7 +6411,7 @@ aren't defined in that library. @defvar always_export_symbols Whether libtool should automatically generate a list of exported symbols -using @var{export_symbols_cmds} before linking an archive. +using @code{export_symbols_cmds} before linking an archive. Set to @samp{yes} or @samp{no}. Default is @samp{no}. @end defvar @@ -5870,6 +6422,10 @@ Commands used to create shared libraries @option{-export-symbols} and static libraries, respectively. @end defvar +@defvar archiver_list_spec +Specify filename containing input files for @code{AR}. +@end defvar + @defvar old_archive_from_new_cmds If the shared library depends on a static library, @samp{old_archive_from_new_cmds} contains the commands used to create that @@ -5881,11 +6437,11 @@ not used. If a static library must be created from the export symbol list in order to correctly link with a shared library, @samp{old_archive_from_expsyms_cmds} contains the commands needed to create that static library. When these -commands are executed, the variable @var{soname} contains the name of the -shared library in question, and the @var{$objdir/$newlib} contains the +commands are executed, the variable @code{soname} contains the name of the +shared library in question, and the @samp{$objdir/$newlib} contains the path of the static library these commands should build. After executing -these commands, libtool will proceed to link against @var{$objdir/$newlib} -instead of @var{soname}. +these commands, libtool will proceed to link against @samp{$objdir/$newlib} +instead of @code{soname}. @end defvar @defvar lock_old_archive_extraction @@ -5948,13 +6504,13 @@ symbols that are defined in the program. @end defvar @defvar export_symbols_cmds -Commands to extract exported symbols from @var{libobjs} to the -file @var{export_symbols}. +Commands to extract exported symbols from @code{libobjs} to the +file @code{export_symbols}. @end defvar @defvar extract_expsyms_cmds Commands to extract the exported symbols list from a shared library. -These commands are executed if there is no file @var{$objdir/$soname-def}, +These commands are executed if there is no file @samp{$objdir/$soname-def}, and should write the names of the exported symbols to that file, for the use of @samp{old_archive_from_expsyms_cmds}. @end defvar @@ -5963,9 +6519,9 @@ the use of @samp{old_archive_from_expsym Determines whether libtool will privilege the installer or the developer. The assumption is that installers will seldom run programs in the build tree, and the developer will seldom install. This is only -meaningful on platforms where @var{shlibpath_overrides_runpath} is -not @samp{yes}, so @var{fast_install} will be set to @samp{needless} in -this case. If @var{fast_install} set to @samp{yes}, libtool will create +meaningful on platforms where @code{shlibpath_overrides_runpath} is +not @samp{yes}, so @code{fast_install} will be set to @samp{needless} in +this case. If @code{fast_install} set to @samp{yes}, libtool will create programs that search for installed libraries, and, if a program is run in the build tree, a new copy will be linked on-demand to use the yet-to-be-installed libraries. If set to @samp{no}, libtool will create @@ -5976,26 +6532,32 @@ flags, and it can be turned from @samp{y configure flag @option{--disable-fast-install}. On some systems, the linker always hardcodes paths to dependent libraries -into the output. In this case, @var{fast_install} is never set to @samp{yes}, -and relinking at install time is triggered. This also means that @var{DESTDIR} +into the output. In this case, @code{fast_install} is never set to @samp{yes}, +and relinking at install time is triggered. This also means that @env{DESTDIR} installation does not work as expected. @end defvar +@defvar file_magic_glob +How to find potential files when @code{deplibs_check_method} is +@samp{file_magic}. @code{file_magic_glob} is a @code{sed} expression, +and the @code{sed} instance is fed potential file names that are +transformed by the @code{file_magic_glob} expression. Useful when the +shell does not support the shell option @code{nocaseglob}, making +@code{want_nocaseglob} inappropriate. Normally disabled (i.e. +@code{file_magic_glob} is empty). +@end defvar + @defvar finish_cmds Commands to tell the dynamic linker how to find shared libraries in a specific directory. @end defvar @defvar finish_eval -Same as @var{finish_cmds}, except the commands are not displayed. -@end defvar - -@defvar fix_srcfile_path -Expression to fix the shell variable @samp{$srcfile} for the compiler. +Same as @code{finish_cmds}, except the commands are not displayed. @end defvar @defvar global_symbol_pipe -A pipeline that takes the output of @var{NM}, and produces a listing of +A pipeline that takes the output of @code{NM}, and produces a listing of raw symbols followed by their C names. For example: @example @@ -6012,7 +6574,7 @@ but its meaning is system dependent. @end defvar @defvar global_symbol_to_cdecl -A pipeline that translates the output of @var{global_symbol_pipe} into +A pipeline that translates the output of @code{global_symbol_pipe} into proper C declarations. Since some platforms, such as HP/UX, have linkers that differentiate code from data, data symbols are declared as data, and code symbols are declared as functions. @@ -6028,13 +6590,13 @@ or if they need to be relinked. Set to @samp{yes} or @samp{no}, depending on whether the linker hardcodes directories if a library is directly specified on the command line (such as @samp{@var{dir}/lib@var{name}.a}) when -@var{hardcode_libdir_flag_spec} is specified. +@code{hardcode_libdir_flag_spec} is specified. @end defvar @defvar hardcode_direct_absolute Some architectures hardcode "absolute" library directories that can not -be overridden by @var{shlibpath_var} when @var{hardcode_direct} is -@samp{yes}. In that case set @var{hardcode_direct_absolute} to +be overridden by @code{shlibpath_var} when @code{hardcode_direct} is +@samp{yes}. In that case set @code{hardcode_direct_absolute} to @samp{yes}, or otherwise @samp{no}. @end defvar @@ -6045,13 +6607,13 @@ need to be relinked during installation. @end defvar @defvar hardcode_libdir_flag_spec -Flag to hardcode a @var{libdir} variable into a binary, so that the -dynamic linker searches @var{libdir} for shared libraries at runtime. +Flag to hardcode a @code{libdir} variable into a binary, so that the +dynamic linker searches @code{libdir} for shared libraries at runtime. If it is empty, libtool will try to use some other hardcoding mechanism. @end defvar @defvar hardcode_libdir_separator -If the compiler only accepts a single @var{hardcode_libdir_flag}, then +If the compiler only accepts a single @code{hardcode_libdir_flag}, then this variable contains the string that should separate multiple arguments to that flag. @end defvar @@ -6059,13 +6621,13 @@ arguments to that flag. @defvar hardcode_minus_L Set to @samp{yes} or @samp{no}, depending on whether the linker hardcodes directories specified by @option{-L} flags into the resulting -executable when @var{hardcode_libdir_flag_spec} is specified. +executable when @code{hardcode_libdir_flag_spec} is specified. @end defvar @defvar hardcode_shlibpath_var Set to @samp{yes} or @samp{no}, depending on whether the linker hardcodes directories by writing the contents of @samp{$shlibpath_var} -into the resulting executable when @var{hardcode_libdir_flag_spec} is +into the resulting executable when @code{hardcode_libdir_flag_spec} is specified. Set to @samp{unsupported} if directories specified by @samp{$shlibpath_var} are searched at run time, but not at link time. @end defvar @@ -6078,7 +6640,7 @@ configured for. @end defvar @defvar include_expsyms -List of symbols that must always be exported when using @var{export_symbols}. +List of symbols that must always be exported when using @code{export_symbols}. @end defvar @defvar inherit_rpath @@ -6156,6 +6718,10 @@ Whether files must be locked to prevent simultaneously. Set to @samp{yes} or @samp{no}. @end defvar +@defvar nm_file_list_spec +Specify filename containing input files for @code{NM}. +@end defvar + @defvar no_builtin_flag Compiler flag to disable builtin functions that conflict with declaring external global symbols as @code{char}. @@ -6189,9 +6755,20 @@ Commands run after installing a shared o Commands run after uninstalling a shared or static library, respectively. @end defvar +@defvar postlink_cmds +Commands necessary for finishing linking programs. @code{postlink_cmds} +are executed immediately after the program is linked. Any occurrence of +the string @code{@@OUTPUT@@} in @code{postlink_cmds} is replaced by the +name of the created executable (i.e.@: not the wrapper, if a wrapper is +generated) prior to execution. Similarly, @code{@@TOOL_OUTPUT@@} is +replaced by the toolchain format of @code{@@OUTPUT@@}. Normally disabled +(i.e.@: @code{postlink_cmds} empty). +@end defvar + @defvar reload_cmds @defvarx reload_flag -Commands to create a reloadable object. +Commands to create a reloadable object. Set @code{reload_cmds} to +@samp{false} on systems that cannot create reloadable objects. @end defvar @defvar runpath_var @@ -6235,7 +6812,7 @@ that appear in this list are never hard- Expression to get the compile-time system library search path. This variable is used by libtool when it has to test whether a certain library is shared or static. The directories listed in -@var{shlibpath_var} are automatically appended to this list, every time +@code{shlibpath_var} are automatically appended to this list, every time libtool runs (i.e., not at configuration time), because some linkers use this variable to extend the library search path. Linker switches such as @option{-L} also augment the search path. @@ -6246,12 +6823,38 @@ Linker flag (passed through the C compil libraries. @end defvar +@defvar to_host_file_cmd +If the toolchain is not native to the build platform (e.g.@: if you are using +MSYS to drive the scripting, but are using the MinGW native Windows compiler) +this variable describes how to convert file names from the format used by the +build platform to the format used by host platform. Normally set to +@samp{func_convert_file_noop}, libtool will autodetect most cases in which +other values should be used. On rare occasions, it may be necessary to override +the autodetected value (@pxref{Cygwin to MinGW Cross}). +@end defvar + +@defvar to_tool_file_cmd +If the toolchain is not native to the build platform (e.g.@: if you are using +some Unix to drive the scripting together with a Windows toolchain running +in Wine) this variable describes how to convert file names from the format +used by the build platform to the format used by the toolchain. Normally set +to @samp{func_convert_file_noop}. +@end defvar + @defvar version_type The library version numbering type. One of @samp{libtool}, @samp{freebsd-aout}, @samp{freebsd-elf}, @samp{irix}, @samp{linux}, @samp{osf}, @samp{sunos}, @samp{windows}, or @samp{none}. @end defvar +@defvar want_nocaseglob +Find potential files using the shell option @code{nocaseglob}, when +@code{deplibs_check_method} is @samp{file_magic}. Normally set to +@samp{no}. Set to @samp{yes} to enable the @code{nocaseglob} shell +option when looking for potential file names in a case-insensitive +manner. +@end defvar + @defvar whole_archive_flag_spec Compiler flag to generate shared objects from convenience archives. @end defvar @@ -6285,15 +6888,15 @@ than having to trust second-hand observa @item Rather than reconfiguring libtool every time I make a change to @code{ltmain.in}, I keep a permanent @code{libtool} script in my -@var{PATH}, which sources @code{ltmain.in} directly. +@env{PATH}, which sources @code{ltmain.in} directly. The following steps describe how to create such a script, where @code{/home/src/libtool} is the directory containing the libtool source tree, @code{/home/src/libtool/libtool} is a libtool script that has been configured for your platform, and @code{~/bin} is a directory in your -@var{PATH}: +@env{PATH}: -@example +@smallexample trick$ cd ~/bin trick$ sed 's%^\(macro_version=\).*$%\1@@VERSION@@%; s%^\(macro_revision=\).*$%\1@@package_revision@@%; @@ -6303,11 +6906,11 @@ trick$ chmod +x libtool trick$ libtool --version ltmain.sh (GNU @@PACKAGE@@@@TIMESTAMP@@) @@VERSION@@ -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. trick$ -@end example +@end smallexample @end itemize The output of the final @samp{libtool --version} command shows that the @@ -6323,11 +6926,9 @@ order to test new changes without having @include fdl.texi @page -@node Index -@unnumbered Index +@node Combined Index +@unnumbered Combined Index @printindex cp -@c summarycontents -@contents @bye diff -ruNp libtool-2.2.10/doc/libtoolize.1 libtool-2.4/doc/libtoolize.1 --- libtool-2.2.10/doc/libtoolize.1 2010-06-09 18:45:27.000000000 +0700 +++ libtool-2.4/doc/libtoolize.1 2010-09-22 16:29:51.000000000 +0700 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2. -.TH LIBTOOLIZE "1" "June 2010" "libtoolize 2.2.9a" "User Commands" +.TH LIBTOOLIZE "1" "September 2010" "libtoolize 2.4" "User Commands" .SH NAME -libtoolize \- manual page for libtoolize 2.2.9a +libtoolize \- manual page for libtoolize 2.4 .SH SYNOPSIS .B libtoolize [\fIOPTION\fR]... @@ -73,20 +73,24 @@ When reporting a bug, please describe a include the following information: .TP host\-triplet: -x86_64\-apple\-darwin10.3.0 +x86_64\-apple\-darwin10.4.0 .TP libtoolize: -(GNU libtool 1.3173 2010\-06\-09) 2.2.9a +(GNU libtool) 2.4 .TP automake: automake (GNU automake) 1.11.1 .TP autoconf: -autoconf (GNU Autoconf) 2.65 +autoconf (GNU Autoconf) 2.67 .SH AUTHOR Written by Gary V. Vaughan , 2003 .SH "REPORTING BUGS" Report bugs to . +.br +GNU libtool home page: . +.br +General help using GNU software: . .SH COPYRIGHT Copyright \(co 2010 Free Software Foundation, Inc. .br diff -ruNp libtool-2.2.10/doc/stamp-vti libtool-2.4/doc/stamp-vti --- libtool-2.2.10/doc/stamp-vti 2010-06-09 20:08:53.000000000 +0700 +++ libtool-2.4/doc/stamp-vti 2010-09-22 21:45:44.000000000 +0700 @@ -1,4 +1,4 @@ -@set UPDATED 7 June 2010 -@set UPDATED-MONTH June 2010 -@set EDITION 2.2.10 -@set VERSION 2.2.10 +@set UPDATED 22 September 2010 +@set UPDATED-MONTH September 2010 +@set EDITION 2.4 +@set VERSION 2.4 diff -ruNp libtool-2.2.10/doc/version.texi libtool-2.4/doc/version.texi --- libtool-2.2.10/doc/version.texi 2010-06-09 20:08:53.000000000 +0700 +++ libtool-2.4/doc/version.texi 2010-09-22 16:29:46.000000000 +0700 @@ -1,4 +1,4 @@ -@set UPDATED 7 June 2010 -@set UPDATED-MONTH June 2010 -@set EDITION 2.2.10 -@set VERSION 2.2.10 +@set UPDATED 22 September 2010 +@set UPDATED-MONTH September 2010 +@set EDITION 2.4 +@set VERSION 2.4 diff -ruNp libtool-2.2.10/libltdl/Makefile.am libtool-2.4/libltdl/Makefile.am --- libtool-2.2.10/libltdl/Makefile.am 2010-05-21 04:28:03.000000000 +0700 +++ libtool-2.4/libltdl/Makefile.am 2010-09-22 21:44:11.000000000 +0700 @@ -47,7 +47,7 @@ AM_CPPFLAGS += -DLT_CONFIG_H='<$( -DLTDL -I. -I$(srcdir) -Ilibltdl \ -I$(srcdir)/libltdl -I$(srcdir)/libltdl AM_LDFLAGS += -no-undefined -LTDL_VERSION_INFO = -version-info 9:2:2 +LTDL_VERSION_INFO = -version-info 10:0:3 noinst_LTLIBRARIES += $(LT_DLLOADERS) diff -ruNp libtool-2.2.10/libltdl/Makefile.in libtool-2.4/libltdl/Makefile.in --- libtool-2.2.10/libltdl/Makefile.in 2010-06-09 20:08:53.000000000 +0700 +++ libtool-2.4/libltdl/Makefile.in 2010-09-22 21:45:44.000000000 +0700 @@ -227,6 +227,7 @@ LT_CONFIG_H = @LT_CONFIG_H@ LT_DLLOADERS = @LT_DLLOADERS@ LT_DLPREOPEN = @LT_DLPREOPEN@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -252,6 +253,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -320,7 +322,7 @@ EXTRA_DIST = lt__dirent.c lt__strl.c COP CLEANFILES = libltdl.la libltdlc.la libdlloader.la $(LIBOBJS) \ $(LTLIBOBJS) MOSTLYCLEANFILES = argz.h argz.h-t -LTDL_VERSION_INFO = -version-info 9:2:2 +LTDL_VERSION_INFO = -version-info 10:0:3 @INSTALL_LTDL_TRUE@ltdlincludedir = $(includedir)/libltdl @INSTALL_LTDL_TRUE@ltdlinclude_HEADERS = libltdl/lt_system.h \ @INSTALL_LTDL_TRUE@ libltdl/lt_error.h \ diff -ruNp libtool-2.2.10/libltdl/Makefile.inc libtool-2.4/libltdl/Makefile.inc --- libtool-2.2.10/libltdl/Makefile.inc 2010-05-21 04:22:33.000000000 +0700 +++ libtool-2.4/libltdl/Makefile.inc 2010-09-22 21:38:34.000000000 +0700 @@ -36,7 +36,7 @@ AM_CPPFLAGS += -DLT_CONFIG_H='<$( -DLTDL -I. -I$(srcdir) -Ilibltdl \ -I$(srcdir)/libltdl -I$(srcdir)/libltdl/libltdl AM_LDFLAGS += -no-undefined -LTDL_VERSION_INFO = -version-info 9:2:2 +LTDL_VERSION_INFO = -version-info 10:0:3 noinst_LTLIBRARIES += $(LT_DLLOADERS) diff -ruNp libtool-2.2.10/libltdl/aclocal.m4 libtool-2.4/libltdl/aclocal.m4 --- libtool-2.2.10/libltdl/aclocal.m4 2010-06-09 20:05:51.000000000 +0700 +++ libtool-2.4/libltdl/aclocal.m4 2010-09-22 21:44:23.000000000 +0700 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff -ruNp libtool-2.2.10/libltdl/config/compile libtool-2.4/libltdl/config/compile --- libtool-2.2.10/libltdl/config/compile 2010-06-09 20:05:47.000000000 +0700 +++ libtool-2.4/libltdl/config/compile 2010-09-22 21:46:09.000000000 +0700 @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand `-c -o'. -scriptversion=2009-10-06.20; # UTC +scriptversion=2010-09-21.14; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010 Free Software # Foundation, Inc. # Written by Tom Tromey . # @@ -29,6 +29,169 @@ scriptversion=2009-10-06.20; # UTC # bugs to or send patches to # . +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Win32 hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as `compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l*) + lib=${1#-l} + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + set x "$@" "$dir/$lib.dll.lib" + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + set x "$@" "$dir/$lib.lib" + break + fi + done + IFS=$save_IFS + + test "$found" != yes && set x "$@" "$lib.lib" + shift + ;; + -L*) + func_file_conv "${1#-L}" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 @@ -53,6 +216,9 @@ EOF echo "compile $scriptversion" exit $? ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; esac ofile= diff -ruNp libtool-2.2.10/libltdl/config/config.guess libtool-2.4/libltdl/config/config.guess --- libtool-2.2.10/libltdl/config/config.guess 2010-06-09 20:55:44.000000000 +0700 +++ libtool-2.4/libltdl/config/config.guess 2010-09-22 21:46:09.000000000 +0700 @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. -timestamp='2010-04-03' +timestamp='2010-08-21' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -552,7 +552,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -968,6 +968,9 @@ EOF sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-tilera-linux-gnu + exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; diff -ruNp libtool-2.2.10/libltdl/config/config.sub libtool-2.4/libltdl/config/config.sub --- libtool-2.2.10/libltdl/config/config.sub 2010-06-09 20:55:44.000000000 +0700 +++ libtool-2.4/libltdl/config/config.sub 2010-09-22 21:46:09.000000000 +0700 @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. -timestamp='2010-05-21' +timestamp='2010-09-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -283,6 +283,7 @@ case $basic_machine in | moxie \ | mt \ | msp430 \ + | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ @@ -378,6 +379,7 @@ case $basic_machine in | mmix-* \ | mt-* \ | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ @@ -860,6 +862,12 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; diff -ruNp libtool-2.2.10/libltdl/config/edit-readme-alpha libtool-2.4/libltdl/config/edit-readme-alpha --- libtool-2.2.10/libltdl/config/edit-readme-alpha 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/libltdl/config/edit-readme-alpha 2010-09-21 14:09:20.000000000 +0700 @@ -0,0 +1,94 @@ +#! /bin/sh + +# edit-readme-alpha - edit README file for alpha releases +# Copyright (C) 2010 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2010 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +#### + +# We used to maintain separate (but extremely similiar!) README and +# README.alpha files, and had `make dist' include the right one in a +# distribution based on the contests of `$(VERSION)'. +# +# Now, we have `make dist' call this script to tweak the first paragraph +# of README in situ, to be more suitable for an alpha quality release. + +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" |sed 's|^.*/||'` + + +# func_fatal_error ARG... +# ----------------------- +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + echo "$progname: $*" >&2 + exit $EXIT_FAILURE +} + + +for file in "$@"; do + # Assume that read-only README indicates that we are running inside + # the latter part of a `make distcheck'. + test -w $file || { + echo "$progname: not editing non-writeable \`$file' (distcheck?)" >&2 + continue + } + + # Make sure the paragraph we are matching has not been edited since + # this script was written. + matched=`sed -n -e '/^This is GNU Libtool,/,/^interface\.$/p' $file \ + |wc -l |sed 's|^ *||'` + + # Unless, of course, it was edited by this script already. + test 3 = "$matched" \ + || matched=`sed -n -e '/^This is an alpha testing release/,/behind a consistent, portable interface\.$/p' $file \ + |wc -l |sed 's|^ *||'` + + test 3 = "$matched" \ + || func_fatal_error "$file format has changed, please fix \`$0'" + + # Don't leave file droppings. + trap 'x=$?; rm $file.T; exit $x' 1 2 13 15 + + # Edit the first paragraph to be suitable for an alpha release. + sed -e '/^This is GNU Libtool,/,/^interface.$/c\ +This is an alpha testing release of GNU Libtool, a generic library\ +support script. Libtool hides the complexity of using shared libraries\ +behind a consistent, portable interface.' $file > $file.T + + # Diagnose redirection failure. + test -f $file.T || func_fatal_error "Unable to write $file.T" + + # Overwrite the original file with our edited version. + mv $file.T $file || func_fatal_error "Unable to edit $file" +done + +exit $EXIT_SUCCESS diff -ruNp libtool-2.2.10/libltdl/config/general.m4sh libtool-2.4/libltdl/config/general.m4sh --- libtool-2.2.10/libltdl/config/general.m4sh 2010-06-09 18:43:54.000000000 +0700 +++ libtool-2.4/libltdl/config/general.m4sh 2010-09-01 13:02:45.000000000 +0700 @@ -73,6 +73,27 @@ IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: @@ -87,17 +108,31 @@ basename="s,^.*/,," # those functions but instead duplicate the functionality here. func_dirname_and_basename () { - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation -# Generated shell functions inserted here. # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' @@ -280,6 +315,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. @@ -308,7 +352,7 @@ opt_warning=: # name if it has been set yet. func_echo () { - $ECHO "$progname${mode+: }$mode: $*" + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... @@ -334,14 +378,14 @@ func_echo_all () # Echo program name prefixed message to standard error. func_error () { - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : @@ -559,4 +603,21 @@ func_show_eval_locale () fi fi } + +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} ]]) diff -ruNp libtool-2.2.10/libltdl/config/getopt.m4sh libtool-2.4/libltdl/config/getopt.m4sh --- libtool-2.2.10/libltdl/config/getopt.m4sh 2010-06-09 17:38:23.000000000 +0700 +++ libtool-2.4/libltdl/config/getopt.m4sh 2010-09-16 10:09:15.000000000 +0700 @@ -44,8 +44,53 @@ m4_include([general.m4sh])m4_divert_push # All internal macros begin with `m4go_'. m4_pattern_forbid([^_?m4go_]) + +## --------------------------- ## +## 1. Backwards compatibility. ## +## --------------------------- ## + +# We prefer m4sugar.m4 from Autoconf-2.64, but have fallbacks in this +# section that work back as far as Autoconf-2.62. This file is used +# at bootstrap time to generate the shell processing loop for ltmain.sh +# and libtoolize.in, so it's okay for the requirement to be tighter +# than the configure time Autoconf prerequisite version. +m4_version_prereq([2.62]) + +# m4_chomp(STRING) +# ---------------- +# m4_chomp was not introduced until Autoconf-2.64. Currently we +# only use it indirectly via m4go_expand, below. This implementation +# is taken from Autoconf-2.65. +m4_ifndef([m4_chomp], +[m4_define([m4_chomp], +[m4_format([[%.*s]], m4_index(m4_translit([[$1]], [ +/.], [/ ])[./.], [/.]), [$1])])]) + +# m4go_expand(ARG) +# ---------------- +# M4SH_GETOPTS wants to pass unbalanced parentheses to m4_expand to +# build the branches of a shell `case' statement. That is only +# supported by the implementation of m4_expand in Autoconf-2.64 and +# newer. Since we want to be compatible back to at least +# Autoconf-2.62, reimplement our own 2.64 based m4_expand in the +# m4go_ namespace so that we can be compatible with Autoconf versions +# supporting either semantic. +m4_define([m4go_expand], +[m4_chomp(_$0([$1 +]))]) + +m4_define([_m4go_expand], [$0_([$1], [(], -=<{($1)}>=-, [}>=-])]) + +m4_define([_m4go_ignore]) + +m4_define([_m4go_expand_], +[m4_if([$4], [}>=-], + [m4_changequote([-=<{$2], [)}>=-])$3m4_changequote([, ])], + [$0([$1], [($2], -=<{($2$1)}>=-, [}>=-])_m4go_ignore$2])]) + + ## --------------------------------- ## -## 1. Low level string manipulation. ## +## 2. Low level string manipulation. ## ## --------------------------------- ## # m4go_slice(STRING, BEGIN, END) @@ -96,10 +141,10 @@ m4_define([m4go_slice], # to turn them off for the duration. # 6. Finally, we need to requote the result to account for the quotes # we probably stripped. m4_quote() doesn't handle commas well, so -# we use m4_expand() to requote without losing whitespace after any -# embedded commas. +# we use m4go_expand() to requote without losing whitespace after +# any embedded commas. m4_define([m4go_trimn], -[m4_changecom()m4_expand([m4go_slice([$1], m4_bregexp(m4_translit([$1],[ +[m4_changecom()m4go_expand([m4go_slice([$1], m4_bregexp(m4_translit([$1],[ [/,()]], [// ]), [[^/]]), m4_bregexp(m4_translit([$1], [ [/,()]], [/ /]), [/*$]))])[]m4_changecom([#])]) @@ -119,7 +164,7 @@ m4_define([m4go_unindent], ## ------------------------------ ## -## 2. Option processing compiler. ## +## 3. Option processing compiler. ## ## ------------------------------ ## # Shell fragments are piecemeal added to these macros for each @@ -136,7 +181,7 @@ m4_define([m4go_branches], []) # case br # OPTION, [|])' to insert the separator pipe symbols - which requires # that `m4go_shortargs' be undefined if the first option appended is not # prefixed by a leading `|'. -m4_define([m4go_shortnoargs], [-\?*|-h*|-v*]) +m4_define([m4go_shortnoargs], [-\?*|-h*]) # M4SH_GETOPTS(SHORT-SPEC1, LONG-MATCH1, DEF1, INIT1, @@ -288,7 +333,7 @@ m4_define([m4go_option], [^=], [], [.], [[$1]], []))], - [_$0(opt_[]m4_ifnblank([$2], + [_$0(opt_[]m4_ifval([$2], m4_translit(m4_bpatsubst([$2], [^--\(no-\)?\([^|]+\).*$], [\2]), -, _), _short), @@ -329,11 +374,11 @@ m4_define([_m4go_option], [m4_do( [m4_append([m4go_defaults], m4_bmatch([$3], - [[?!;+@^]], [m4_ifnblank([$5], [m4_n([$1="$5"])])], + [[?!;+@^]], [m4_ifval([$5], [m4_n([$1="$5"])])], [~], [m4_n([$1=:])], [m4_n([$1=false])]))], [m4_append([m4go_branches], [[]dnl ( - m4_join([|], [$4], m4_ifnblank([$2], [-$2]))) + m4_join([|], [$4], m4_ifval([$2], [-$2]))) ])], [m4_append([m4go_branches], [m4_bmatch([$3], [[!+@]], @@ -346,8 +391,8 @@ m4_n(m4_bmatch([$3], [+], [ $1_num=`expr 1 + ${$1_num-0}` eval $1_${$1_num}=\"$optarg\"], [?], [m4_bmatch([$3], - [@], [m4_expand([m4go_optional_file_arg([$1])])], - [m4_expand([m4go_optional_arg([$1])])])], + [@], [m4go_expand([m4go_optional_file_arg([$1])])], + [m4go_expand([m4go_optional_arg([$1])])])], [[!@]], [ $1="$optarg"], [;], [ $1="${$1+[$]$1 }$optarg"], @@ -356,12 +401,12 @@ m4_n(m4_bmatch([$3], [ $1=:]))[]dnl dnl only write the file_arg fragment when we didn't already write opt_file_arg: m4_bmatch([$3], [@], [m4_bmatch([$3], [?], [], - [m4_expand([m4go_file_arg([$1])]) + [m4go_expand([m4go_file_arg([$1])]) ])])m4_n(m4go_unindent([$6]))[]dnl m4_bmatch([$3], [[!+;]], [ shift ]) ;; ])], - [m4_ifnblank([$2], + [m4_ifval([$2], [m4_bmatch([$3], [[?!;+@^~]], [m4_append([m4go_shortargs], [-$2*], [|])], [m4_append([m4go_shortnoargs], [-$2*], @@ -420,26 +465,20 @@ m4_define([m4go_optional_file_arg], m4_define([m4go_printopts], [ # Option defaults: -opt_debug=false +opt_debug=: m4go_defaults # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. -{M4SH_VERBATIM([[ - # sed scripts - my_sed_single_opt='1s/^\(..\).*$/\1/;q' - my_sed_single_rest='1s/^..\(.*\)$/\1/;q' - my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' - my_sed_long_arg='1s/^--[^=]*=//' -]]) +{ # this just eases exit handling while test [$]# -gt 0; do opt="[$]1" shift case $opt in - --debug|-x) opt_debug=: + --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" - set -x + $opt_debug ;; m4go_branches -\?|-h) func_usage ;; @@ -448,27 +487,24 @@ m4go_branches # Separate optargs to long options: --*=*) - arg=`echo "$opt" | $SED "$my_sed_long_arg"` - opt=`echo "$opt" | $SED "$my_sed_long_opt"` - set dummy "$opt" "$arg" ${1+"[$]@"} + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"[$]@"} shift ;; m4_ifset([m4go_shortargs], dnl ( [ # Separate optargs to short options: ]m4go_shortargs[) - arg=`echo "$opt" |$SED "$my_sed_single_rest"` - opt=`echo "$opt" |$SED "$my_sed_single_opt"` - set dummy "$opt" "$arg" ${1+"[$]@"} + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "$func_split_short_opt_arg" ${1+"[$]@"} shift ;; ])m4_ifset([m4go_shortnoargs], dnl ( [ # Separate non-argument short options: ]m4go_shortnoargs[) - rest=`echo "$opt" |$SED "$my_sed_single_rest"` - opt=`echo "$opt" |$SED "$my_sed_single_opt"` - set dummy "$opt" "-$rest" ${1+"[$]@"} + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"[$]@"} shift ;; @@ -489,7 +525,7 @@ m4go_validation ## ------------------------- ## -## 3. Supporting Shell Code. ## +## 4. Supporting Shell Code. ## ## ------------------------- ## # The shell functions below are expanded verbatim into the shell script @@ -502,6 +538,8 @@ m4_divert_pop([KILL])M4SH_VERBATIM([[ # Echo version message to standard output and exit. func_version () { + $opt_debug + $SED -n '/(C)/!b go :more /\./!{ @@ -523,6 +561,8 @@ func_version () # Echo short help message to standard output and exit. func_usage () { + $opt_debug + $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// @@ -539,7 +579,10 @@ func_usage () # unless 'noexit' is passed as argument. func_help () { + $opt_debug + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print s/^# // s/^# *$// s*\$progname*'$progname'* @@ -552,7 +595,11 @@ func_help () s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p - }' < "$progpath" + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" ret=$? if test -z "$1"; then exit $ret @@ -564,10 +611,38 @@ func_help () # exit_cmd. func_missing_arg () { + $opt_debug + func_error "missing argument for $1." exit_cmd=exit } + +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation + exit_cmd=: ]]) diff -ruNp libtool-2.2.10/libltdl/config/ltmain.m4sh libtool-2.4/libltdl/config/ltmain.m4sh --- libtool-2.2.10/libltdl/config/ltmain.m4sh 2010-06-09 20:06:43.000000000 +0700 +++ libtool-2.4/libltdl/config/ltmain.m4sh 2010-09-22 21:45:18.000000000 +0700 @@ -1,6 +1,5 @@ m4_define([_m4_divert(SCRIPT)], 100) -m4_divert_push([SCRIPT])# @configure_input@ - +m4_divert_push([SCRIPT]) # libtool (GNU @PACKAGE@@TIMESTAMP@) @VERSION@ # Written by Gordon Matzigkeit , 1996 @@ -75,7 +74,9 @@ m4_divert_push([SCRIPT])# @configure_inp # automake: $automake_version # autoconf: $autoconf_version # -# Report bugs to . +# Report bugs to <@PACKAGE_BUGREPORT@>. +# GNU @PACKAGE@ home page: <@PACKAGE_URL@>. +# General help using GNU software: . PROGRAM=libtool PACKAGE=@PACKAGE@ @@ -131,30 +132,68 @@ m4_define([M4SH_IN_HEADER], [$1])dnl m4_include([getopt.m4sh]) M4SH_VERBATIM([[ - magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. -# $mode is unset nonopt= -execute_dlfiles= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 -opt_dry_run=false -opt_duplicate_deps=false -opt_silent=false -opt_debug=: - # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "${1}=\$${1}\${2}" +} # func_append may be replaced by extended shell implementation + +# func_append_quoted var value +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +func_append_quoted () +{ + func_quote_for_eval "${2}" + eval "${1}=\$${1}\\ \$func_quote_for_eval_result" +} # func_append_quoted may be replaced by extended shell implementation + + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "${@}"` +} # func_arith may be replaced by extended shell implementation + + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation + + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation + + # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. @@ -244,145 +283,6 @@ func_enable_tag () esac } -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. -{ - - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - - # Parse non-mode specific arguments: - while test "$#" -gt 0; do - opt="$1" - shift - - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" - func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift - ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" - shift - ;; - - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - opt_verbose=false - ;; - - --no-quiet|--no-silent) - preserve_args="$preserve_args $opt" - opt_silent=false - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=false - opt_verbose=: - ;; - - --no-verbose) preserve_args="$preserve_args $opt" - opt_verbose=false - ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here - shift - ;; - - # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --help-all) opt_help=': help-all' ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; - esac - done - - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac - - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} - # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. @@ -419,37 +319,120 @@ _LT_EOF } -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac +]]) - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" +dnl SHORT LONG DEFAULT INIT +dnl ---------------------------------------------------------------------- +M4SH_GETOPTS( + [n], [--dry-run|--dryrun], [], [], + [], [--config], [], [ + func_config], + [;], [--dlopen|-dlopen], [], [], + [], [--preserve-dup-deps], [], [], + [], [--features], [], [ + func_features], + [], [--finish], [], [ + set dummy --mode finish ${1+"[$]@"}; shift], + [], [--help], [], [], + [], [--help-all], [], [ + opt_help=': help-all'], + [!], [--mode], [], [ + case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; + esac], + [], [--no-silent|--no-quiet], [false], [ + func_append preserve_args " $opt"], + [], [--no-verbose], [false], [ + func_append preserve_args " $opt"], + [], [--silent|--quiet], [], [ + func_append preserve_args " $opt" + opt_verbose=false], + [v], [--verbose], [], [ + func_append preserve_args " $opt" + opt_silent=false], + [!], [--tag], [], [ + func_append preserve_args " $opt $optarg" + func_enable_tag "$optarg"], +[ + # save first non-option argument + if test "$[]#" -gt 0; then + nonopt="$opt" + shift fi - test -z "$mode" && func_fatal_error "error: you must specify a MODE." + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" + $opt_help || { + # Sanity checks first: + func_check_version_match + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } +]) - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} +M4SH_VERBATIM([[ +## ----------- ## +## Main. ## +## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. @@ -514,12 +497,9 @@ func_ltwrapper_executable_p () # temporary ltwrapper_script. func_ltwrapper_scriptname () { - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file @@ -565,6 +545,37 @@ func_source () } +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. @@ -577,8 +588,7 @@ func_infer_tag () if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` @@ -597,8 +607,7 @@ func_infer_tag () CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` @@ -667,6 +676,486 @@ EOF } } + +################################################## +# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # +################################################## + +# func_convert_core_file_wine_to_w32 ARG +# Helper function used by file name conversion functions when $build is *nix, +# and $host is mingw, cygwin, or some other w32 environment. Relies on a +# correctly configured wine environment available, with the winepath program +# in $build's $PATH. +# +# ARG is the $build file name to be converted to w32 format. +# Result is available in $func_convert_core_file_wine_to_w32_result, and will +# be empty on error (or when ARG is empty) +func_convert_core_file_wine_to_w32 () +{ + $opt_debug + func_convert_core_file_wine_to_w32_result="$1" + if test -n "$1"; then + # Unfortunately, winepath does not exit with a non-zero error code, so we + # are forced to check the contents of stdout. On the other hand, if the + # command is not found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both error code of + # zero AND non-empty stdout, which explains the odd construction: + func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + # func_mode_compile arg... func_mode_compile () { @@ -707,12 +1196,12 @@ func_mode_compile () ;; -pie | -fpie | -fPIE) - pie_flag="$pie_flag $arg" + func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" + func_append later " $arg" continue ;; @@ -733,15 +1222,14 @@ func_mode_compile () save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" - func_quote_for_eval "$arg" - lastarg="$lastarg $func_quote_for_eval_result" + func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" + func_append base_compile " $lastarg" continue ;; @@ -757,8 +1245,7 @@ func_mode_compile () esac # case $arg_mode # Aesthetically quote the previous argument. - func_quote_for_eval "$lastarg" - base_compile="$base_compile $func_quote_for_eval_result" + func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in @@ -889,17 +1376,16 @@ compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi - removelist="$removelist $output_obj" + func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" + func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result @@ -919,7 +1405,7 @@ compiler." if test -z "$output_obj"; then # Place PIC objects in $objdir - command="$command -o $lobj" + func_append command " -o $lobj" fi func_show_eval_locale "$command" \ @@ -966,11 +1452,11 @@ compiler." command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then - command="$command -o $obj" + func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" + func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' @@ -1015,13 +1501,13 @@ compiler." } $opt_help || { - test "$mode" = compile && func_mode_compile ${1+"$@"} + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. - case $mode in + case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. @@ -1197,7 +1683,7 @@ Otherwise, only FILE itself is deleted u ;; *) - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac @@ -1212,13 +1698,13 @@ if $opt_help; then else { func_help noexit - for mode in compile link execute install finish uninstall clean; do + for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit - for mode in compile link execute install finish uninstall clean; do + for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done @@ -1247,13 +1733,16 @@ func_mode_execute () func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do + for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" @@ -1275,7 +1764,7 @@ func_mode_execute () dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" + func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" @@ -1332,8 +1821,7 @@ func_mode_execute () ;; esac # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" + func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then @@ -1365,22 +1853,59 @@ func_mode_execute () fi } -test "$mode" = execute && func_mode_execute ${1+"$@"} +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug - libdirs="$nonopt" + libs= + libdirs= admincmds= - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. @@ -1390,7 +1915,7 @@ func_mode_finish () if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done @@ -1399,53 +1924,55 @@ func_mode_finish () # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi exit $EXIT_SUCCESS } -test "$mode" = finish && func_mode_finish ${1+"$@"} +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... @@ -1470,7 +1997,7 @@ func_mode_install () # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" + func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -1490,7 +2017,7 @@ func_mode_install () do arg2= if test -n "$dest"; then - files="$files $dest" + func_append files " $dest" dest=$arg continue fi @@ -1528,11 +2055,11 @@ func_mode_install () # Aesthetically quote the argument. func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" + func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi - install_shared_prog="$install_shared_prog $func_quote_for_eval_result" + func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ @@ -1544,7 +2071,7 @@ func_mode_install () if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" - install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" + func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi @@ -1602,10 +2129,13 @@ func_mode_install () case $file in *.$libext) # Do the static libraries later. - staticlibs="$staticlibs $file" + func_append staticlibs " $file" ;; *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" @@ -1619,19 +2149,19 @@ func_mode_install () if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; + *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; + *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" - dir="$dir$objdir" + func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. @@ -1708,7 +2238,7 @@ func_mode_install () func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) @@ -1905,7 +2435,7 @@ func_mode_install () fi } -test "$mode" = install && func_mode_install ${1+"$@"} +test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -1952,6 +2482,18 @@ extern \"C\" { #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + /* External symbol declarations for the compiler. */\ " @@ -1963,8 +2505,9 @@ extern \"C\" { # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then @@ -2013,10 +2556,52 @@ extern \"C\" { func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac done $opt_dry_run || { @@ -2054,26 +2639,9 @@ typedef struct { const char *name; void *address; } lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - echo >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - echo >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist +extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist +LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," @@ -2129,7 +2697,7 @@ static const void *lt_preloaded_setup() for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; + *) func_append symtab_cflags " $arg" ;; esac done @@ -2192,7 +2760,8 @@ func_win32_libid () # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - win32_nmres=`eval $NM -f posix -A $1 | + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ @@ -2221,6 +2790,131 @@ func_win32_libid () $ECHO "$win32_libid_type" } +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} # func_extract_an_archive dir oldlib @@ -2599,6 +3293,18 @@ func_exec_program () if test -f \"\$progdir/\$program\"; then" + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ @@ -2613,14 +3319,6 @@ func_exec_program () " fi - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. @@ -2638,166 +3336,6 @@ fi\ } -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1"; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_result=`cygpath -w "$1" | - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result= - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1"; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_pathlist_tmp1=$func_stripname_result - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - func_to_host_pathlist_result=` - ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_append func_to_host_pathlist_result ";$func_to_host_path_result" - fi - fi - fi - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result"; then - func_error "Could not determine the host path(s) corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_append func_to_host_pathlist_result ";" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because @@ -2967,14 +3505,14 @@ void lt_dump_script (FILE *f); EOF cat </dev/null` + if test "$want_nocaseglob" = yes; then + shopt -s nocaseglob + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | @@ -6403,7 +7023,7 @@ EOF if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -6428,7 +7048,7 @@ EOF ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. @@ -6444,7 +7064,7 @@ EOF if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" ;; esac @@ -6457,7 +7077,7 @@ EOF potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -6482,7 +7102,7 @@ EOF ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. @@ -6586,7 +7206,7 @@ EOF *) case " $deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -6596,10 +7216,10 @@ EOF -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" @@ -6616,10 +7236,12 @@ EOF hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else @@ -6628,18 +7250,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" + func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_apped perm_rpath " $libdir" ;; esac fi done @@ -6657,7 +7279,7 @@ EOF # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi @@ -6665,7 +7287,7 @@ EOF fi shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -6691,7 +7313,7 @@ EOF linknames= for link do - linknames="$linknames $link" + func_append linknames " $link" done # Use standard objects if they are pic @@ -6702,7 +7324,7 @@ EOF if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" + func_append delfiles " $export_symbols" fi orig_export_symbols= @@ -6733,14 +7355,46 @@ EOF $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd1 in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then func_show_eval "$cmd" 'exit $?' skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." @@ -6773,7 +7427,7 @@ EOF # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -6783,7 +7437,7 @@ EOF case " $convenience " in *" $test_deplib "*) ;; *) - tmp_deplibs="$tmp_deplibs $test_deplib" + func_append tmp_deplibs " $test_deplib" ;; esac done @@ -6803,21 +7457,21 @@ EOF test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" + func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi @@ -6879,10 +7533,13 @@ EOF echo 'INPUT (' > $output for obj in $save_libobjs do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output - delfiles="$delfiles $output" + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" @@ -6896,10 +7553,12 @@ EOF fi for obj do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." @@ -6950,7 +7609,7 @@ EOF if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi - delfiles="$delfiles $output" + func_append delfiles " $output" else output= @@ -6984,7 +7643,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7017,7 +7676,7 @@ EOF # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7058,10 +7717,10 @@ EOF # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi @@ -7077,7 +7736,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7089,7 +7748,7 @@ EOF IFS="$save_ifs" # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -7173,13 +7832,16 @@ EOF reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test @@ -7253,8 +7915,8 @@ EOF if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" ;; esac fi @@ -7274,7 +7936,7 @@ EOF *) case " $compile_deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -7284,17 +7946,17 @@ EOF -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. @@ -7302,7 +7964,7 @@ EOF # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done fi @@ -7321,18 +7983,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi case $host in @@ -7341,12 +8003,12 @@ EOF case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; + *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -7372,18 +8034,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + *) func_append finalize_perm_rpath " $libdir" ;; esac fi done @@ -7434,6 +8096,12 @@ EOF exit_status=0 func_show_eval "$link_command" 'exit_status=$?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' @@ -7456,7 +8124,7 @@ EOF # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -7464,7 +8132,7 @@ EOF # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -7479,6 +8147,13 @@ EOF $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + exit $EXIT_SUCCESS fi @@ -7512,6 +8187,12 @@ EOF func_show_eval "$link_command" 'exit $?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Now create the wrapper script. func_verbose "creating $output" @@ -7609,7 +8290,7 @@ EOF else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" + func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" @@ -7617,10 +8298,10 @@ EOF if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. @@ -7631,10 +8312,10 @@ EOF # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have @@ -7652,7 +8333,7 @@ EOF else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= @@ -7676,9 +8357,9 @@ EOF esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" ;; - *) oldobjs="$oldobjs $obj" ;; + *) func_append oldobjs " $obj" ;; esac done fi @@ -7688,6 +8369,16 @@ EOF len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." @@ -7784,9 +8475,19 @@ EOF eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; + *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" @@ -7800,9 +8501,9 @@ EOF eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; - *) newdlfiles="$newdlfiles $lib" ;; + *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" @@ -7819,7 +8520,7 @@ EOF eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done @@ -7831,7 +8532,7 @@ EOF [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlfiles="$newdlfiles $abs" + func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= @@ -7840,7 +8541,7 @@ EOF [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlprefiles="$newdlprefiles $abs" + func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi @@ -7925,7 +8626,7 @@ relink_command=\"$relink_command\"" exit $EXIT_SUCCESS } -{ test "$mode" = link || test "$mode" = relink; } && +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} @@ -7945,9 +8646,9 @@ func_mode_uninstall () for arg do case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; esac done @@ -7956,24 +8657,23 @@ func_mode_uninstall () rmdirs= - origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then - objdir="$origobjdir" + odir="$objdir" else - objdir="$dir/$origobjdir" + odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" + test "$opt_mode" = uninstall && odir="$dir" - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; esac fi @@ -7999,18 +8699,17 @@ func_mode_uninstall () # Delete the libtool libraries and symlinks. for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" + func_append rmfiles " $odir/$n" done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$mode" in + case "$opt_mode" in clean) - case " $library_names " in - # " " in the beginning catches empty $dlname + case " $library_names " in *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then @@ -8038,19 +8737,19 @@ func_mode_uninstall () # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" + func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" + func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$mode" = clean ; then + if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) @@ -8060,7 +8759,7 @@ func_mode_uninstall () noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe - rmfiles="$rmfiles $file" + func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. @@ -8069,7 +8768,7 @@ func_mode_uninstall () func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename @@ -8077,12 +8776,12 @@ func_mode_uninstall () # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" + func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" + func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi @@ -8090,7 +8789,6 @@ func_mode_uninstall () esac func_show_eval "$RM $rmfiles" 'exit_status=1' done - objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do @@ -8102,16 +8800,16 @@ func_mode_uninstall () exit $exit_status } -{ test "$mode" = uninstall || test "$mode" = clean; } && +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} -test -z "$mode" && { +test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" diff -ruNp libtool-2.2.10/libltdl/config/ltmain.sh libtool-2.4/libltdl/config/ltmain.sh --- libtool-2.2.10/libltdl/config/ltmain.sh 2010-06-09 20:08:53.000000000 +0700 +++ libtool-2.4/libltdl/config/ltmain.sh 2010-09-22 21:45:43.000000000 +0700 @@ -1,6 +1,5 @@ -# Generated from ltmain.m4sh. -# libtool (GNU libtool) 2.2.10 +# libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, @@ -70,17 +69,19 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.10 +# $progname: (GNU libtool) 2.4 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . PROGRAM=libtool PACKAGE=libtool -VERSION=2.2.10 +VERSION=2.4 TIMESTAMP="" -package_revision=1.3175 +package_revision=1.3293 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -163,6 +164,27 @@ IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: @@ -177,17 +199,31 @@ basename="s,^.*/,," # those functions but instead duplicate the functionality here. func_dirname_and_basename () { - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation -# Generated shell functions inserted here. # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' @@ -370,6 +406,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. @@ -398,7 +443,7 @@ opt_warning=: # name if it has been set yet. func_echo () { - $ECHO "$progname${mode+: }$mode: $*" + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... @@ -424,14 +469,14 @@ func_echo_all () # Echo program name prefixed message to standard error. func_error () { - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : @@ -650,11 +695,30 @@ func_show_eval_locale () fi } +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + # func_version # Echo version message to standard output and exit. func_version () { + $opt_debug + $SED -n '/(C)/!b go :more /\./!{ @@ -676,6 +740,8 @@ func_version () # Echo short help message to standard output and exit. func_usage () { + $opt_debug + $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// @@ -692,7 +758,10 @@ func_usage () # unless 'noexit' is passed as argument. func_help () { + $opt_debug + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print s/^# // s/^# *$// s*\$progname*'$progname'* @@ -705,7 +774,11 @@ func_help () s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p - }' < "$progpath" + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" ret=$? if test -z "$1"; then exit $ret @@ -717,12 +790,39 @@ func_help () # exit_cmd. func_missing_arg () { + $opt_debug + func_error "missing argument for $1." exit_cmd=exit } -exit_cmd=: +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation + +exit_cmd=: @@ -732,25 +832,64 @@ magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. -# $mode is unset nonopt= -execute_dlfiles= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 -opt_dry_run=false -opt_duplicate_deps=false -opt_silent=false -opt_debug=: - # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "${1}=\$${1}\${2}" +} # func_append may be replaced by extended shell implementation + +# func_append_quoted var value +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +func_append_quoted () +{ + func_quote_for_eval "${2}" + eval "${1}=\$${1}\\ \$func_quote_for_eval_result" +} # func_append_quoted may be replaced by extended shell implementation + + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "${@}"` +} # func_arith may be replaced by extended shell implementation + + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation + + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation + + # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. @@ -840,129 +979,204 @@ func_enable_tag () esac } -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () { + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac + + + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_verbose=: +opt_silent=false +opt_verbose=false - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - # Parse non-mode specific arguments: - while test "$#" -gt 0; do +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do opt="$1" shift - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" + --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" - opt_debug='set -x' $opt_debug ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift + --dry-run|--dryrun|-n) + opt_dry_run=: ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" shift ;; - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: - opt_verbose=false + opt_preserve_dup_deps=: ;; - - --no-quiet|--no-silent) - preserve_args="$preserve_args $opt" - opt_silent=false + --features) + opt_features=: +func_features ;; - - --verbose| -v) preserve_args="$preserve_args $opt" + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) opt_silent=false - opt_verbose=: +func_append preserve_args " $opt" ;; - - --no-verbose) preserve_args="$preserve_args $opt" + --no-verbose) opt_verbose=false +func_append preserve_args " $opt" ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here + --silent|--quiet) + opt_silent=: +func_append preserve_args " $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +func_append preserve_args " $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +func_append preserve_args " $opt $optarg" +func_enable_tag "$optarg" shift ;; + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --help-all) opt_help=': help-all' ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) @@ -970,82 +1184,44 @@ func_enable_tag () opt_duplicate_compiler_generated_deps=: ;; *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} + $opt_help || { + # Sanity checks first: + func_check_version_match -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" fi - exit $EXIT_MISMATCH - fi -} - + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi - test -z "$mode" && func_fatal_error "error: you must specify a MODE." + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} +## ----------- ## +## Main. ## +## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. @@ -1110,12 +1286,9 @@ func_ltwrapper_executable_p () # temporary ltwrapper_script. func_ltwrapper_scriptname () { - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file @@ -1161,6 +1334,37 @@ func_source () } +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. @@ -1173,8 +1377,7 @@ func_infer_tag () if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` @@ -1193,8 +1396,7 @@ func_infer_tag () CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` @@ -1226,42 +1428,522 @@ func_infer_tag () -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () { - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi + func_to_host_path_result="$1" +} +# end func_convert_path_noop - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - $opt_dry_run || { - cat >${write_libobj}T < "$lockfile" fi $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" + func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result @@ -1515,7 +2194,7 @@ compiler." if test -z "$output_obj"; then # Place PIC objects in $objdir - command="$command -o $lobj" + func_append command " -o $lobj" fi func_show_eval_locale "$command" \ @@ -1562,11 +2241,11 @@ compiler." command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then - command="$command -o $obj" + func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" + func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' @@ -1611,13 +2290,13 @@ compiler." } $opt_help || { - test "$mode" = compile && func_mode_compile ${1+"$@"} + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. - case $mode in + case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. @@ -1793,7 +2472,7 @@ Otherwise, only FILE itself is deleted u ;; *) - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac @@ -1808,13 +2487,13 @@ if $opt_help; then else { func_help noexit - for mode in compile link execute install finish uninstall clean; do + for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit - for mode in compile link execute install finish uninstall clean; do + for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done @@ -1843,13 +2522,16 @@ func_mode_execute () func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do + for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" @@ -1871,7 +2553,7 @@ func_mode_execute () dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" + func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" @@ -1928,8 +2610,7 @@ func_mode_execute () ;; esac # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" + func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then @@ -1961,22 +2642,59 @@ func_mode_execute () fi } -test "$mode" = execute && func_mode_execute ${1+"$@"} +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug - libdirs="$nonopt" + libs= + libdirs= admincmds= - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. @@ -1986,7 +2704,7 @@ func_mode_finish () if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done @@ -1995,53 +2713,55 @@ func_mode_finish () # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi exit $EXIT_SUCCESS } -test "$mode" = finish && func_mode_finish ${1+"$@"} +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... @@ -2066,7 +2786,7 @@ func_mode_install () # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" + func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -2086,7 +2806,7 @@ func_mode_install () do arg2= if test -n "$dest"; then - files="$files $dest" + func_append files " $dest" dest=$arg continue fi @@ -2124,11 +2844,11 @@ func_mode_install () # Aesthetically quote the argument. func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" + func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi - install_shared_prog="$install_shared_prog $func_quote_for_eval_result" + func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ @@ -2140,7 +2860,7 @@ func_mode_install () if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" - install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" + func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi @@ -2198,10 +2918,13 @@ func_mode_install () case $file in *.$libext) # Do the static libraries later. - staticlibs="$staticlibs $file" + func_append staticlibs " $file" ;; *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" @@ -2215,19 +2938,19 @@ func_mode_install () if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; + *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; + *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" - dir="$dir$objdir" + func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. @@ -2304,7 +3027,7 @@ func_mode_install () func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) @@ -2501,7 +3224,7 @@ func_mode_install () fi } -test "$mode" = install && func_mode_install ${1+"$@"} +test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -2548,6 +3271,18 @@ extern \"C\" { #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + /* External symbol declarations for the compiler. */\ " @@ -2559,8 +3294,9 @@ extern \"C\" { # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then @@ -2609,10 +3345,52 @@ extern \"C\" { func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac done $opt_dry_run || { @@ -2650,26 +3428,9 @@ typedef struct { const char *name; void *address; } lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - echo >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - echo >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist +extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist +LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," @@ -2725,7 +3486,7 @@ static const void *lt_preloaded_setup() for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; + *) func_append symtab_cflags " $arg" ;; esac done @@ -2788,7 +3549,8 @@ func_win32_libid () # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - win32_nmres=`eval $NM -f posix -A $1 | + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ @@ -2817,6 +3579,131 @@ func_win32_libid () $ECHO "$win32_libid_type" } +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} # func_extract_an_archive dir oldlib @@ -3195,6 +4082,18 @@ func_exec_program () if test -f \"\$progdir/\$program\"; then" + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ @@ -3209,14 +4108,6 @@ func_exec_program () " fi - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. @@ -3234,166 +4125,6 @@ fi\ } -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1"; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_result=`cygpath -w "$1" | - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result= - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1"; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_pathlist_tmp1=$func_stripname_result - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - func_to_host_pathlist_result=` - ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_append func_to_host_pathlist_result ";$func_to_host_path_result" - fi - fi - fi - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result"; then - func_error "Could not determine the host path(s) corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_append func_to_host_pathlist_result ";" - ;; - esac - ;; - esac - fi -} -# end: func_to_host_pathlist - # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because @@ -3563,14 +4294,14 @@ void lt_dump_script (FILE *f); EOF cat </dev/null` + if test "$want_nocaseglob" = yes; then + shopt -s nocaseglob + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | @@ -6999,7 +7812,7 @@ EOF if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -7024,7 +7837,7 @@ EOF ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. @@ -7040,7 +7853,7 @@ EOF if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" ;; esac @@ -7053,7 +7866,7 @@ EOF potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -7078,7 +7891,7 @@ EOF ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. @@ -7182,7 +7995,7 @@ EOF *) case " $deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -7192,10 +8005,10 @@ EOF -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" @@ -7212,10 +8025,12 @@ EOF hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else @@ -7224,18 +8039,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" + func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_apped perm_rpath " $libdir" ;; esac fi done @@ -7253,7 +8068,7 @@ EOF # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi @@ -7261,7 +8076,7 @@ EOF fi shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -7287,7 +8102,7 @@ EOF linknames= for link do - linknames="$linknames $link" + func_append linknames " $link" done # Use standard objects if they are pic @@ -7298,7 +8113,7 @@ EOF if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" + func_append delfiles " $export_symbols" fi orig_export_symbols= @@ -7329,13 +8144,45 @@ EOF $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd1 in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. @@ -7369,7 +8216,7 @@ EOF # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7379,7 +8226,7 @@ EOF case " $convenience " in *" $test_deplib "*) ;; *) - tmp_deplibs="$tmp_deplibs $test_deplib" + func_append tmp_deplibs " $test_deplib" ;; esac done @@ -7399,21 +8246,21 @@ EOF test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" + func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi @@ -7475,10 +8322,13 @@ EOF echo 'INPUT (' > $output for obj in $save_libobjs do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output - delfiles="$delfiles $output" + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" @@ -7492,10 +8342,12 @@ EOF fi for obj do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." @@ -7546,7 +8398,7 @@ EOF if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi - delfiles="$delfiles $output" + func_append delfiles " $output" else output= @@ -7580,7 +8432,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7613,7 +8465,7 @@ EOF # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7654,10 +8506,10 @@ EOF # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi @@ -7673,7 +8525,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7685,7 +8537,7 @@ EOF IFS="$save_ifs" # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -7769,13 +8621,16 @@ EOF reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test @@ -7849,8 +8704,8 @@ EOF if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" ;; esac fi @@ -7870,7 +8725,7 @@ EOF *) case " $compile_deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -7880,17 +8735,17 @@ EOF -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. @@ -7898,7 +8753,7 @@ EOF # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done fi @@ -7917,18 +8772,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi case $host in @@ -7937,12 +8792,12 @@ EOF case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; + *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -7968,18 +8823,18 @@ EOF *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + *) func_append finalize_perm_rpath " $libdir" ;; esac fi done @@ -8030,6 +8885,12 @@ EOF exit_status=0 func_show_eval "$link_command" 'exit_status=$?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' @@ -8052,7 +8913,7 @@ EOF # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -8060,7 +8921,7 @@ EOF # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -8075,6 +8936,13 @@ EOF $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + exit $EXIT_SUCCESS fi @@ -8108,6 +8976,12 @@ EOF func_show_eval "$link_command" 'exit $?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Now create the wrapper script. func_verbose "creating $output" @@ -8205,7 +9079,7 @@ EOF else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" + func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" @@ -8213,10 +9087,10 @@ EOF if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. @@ -8227,10 +9101,10 @@ EOF # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have @@ -8248,7 +9122,7 @@ EOF else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= @@ -8272,9 +9146,9 @@ EOF esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" ;; - *) oldobjs="$oldobjs $obj" ;; + *) func_append oldobjs " $obj" ;; esac done fi @@ -8284,6 +9158,16 @@ EOF len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." @@ -8380,9 +9264,19 @@ EOF eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; + *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" @@ -8396,9 +9290,9 @@ EOF eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; - *) newdlfiles="$newdlfiles $lib" ;; + *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" @@ -8415,7 +9309,7 @@ EOF eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done @@ -8427,7 +9321,7 @@ EOF [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlfiles="$newdlfiles $abs" + func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= @@ -8436,7 +9330,7 @@ EOF [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlprefiles="$newdlprefiles $abs" + func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi @@ -8521,7 +9415,7 @@ relink_command=\"$relink_command\"" exit $EXIT_SUCCESS } -{ test "$mode" = link || test "$mode" = relink; } && +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} @@ -8541,9 +9435,9 @@ func_mode_uninstall () for arg do case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; esac done @@ -8552,24 +9446,23 @@ func_mode_uninstall () rmdirs= - origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then - objdir="$origobjdir" + odir="$objdir" else - objdir="$dir/$origobjdir" + odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" + test "$opt_mode" = uninstall && odir="$dir" - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; esac fi @@ -8595,18 +9488,17 @@ func_mode_uninstall () # Delete the libtool libraries and symlinks. for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" + func_append rmfiles " $odir/$n" done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$mode" in + case "$opt_mode" in clean) - case " $library_names " in - # " " in the beginning catches empty $dlname + case " $library_names " in *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then @@ -8634,19 +9526,19 @@ func_mode_uninstall () # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" + func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" + func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$mode" = clean ; then + if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) @@ -8656,7 +9548,7 @@ func_mode_uninstall () noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe - rmfiles="$rmfiles $file" + func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. @@ -8665,7 +9557,7 @@ func_mode_uninstall () func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename @@ -8673,12 +9565,12 @@ func_mode_uninstall () # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" + func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" + func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi @@ -8686,7 +9578,6 @@ func_mode_uninstall () esac func_show_eval "$RM $rmfiles" 'exit_status=1' done - objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do @@ -8698,16 +9589,16 @@ func_mode_uninstall () exit $exit_status } -{ test "$mode" = uninstall || test "$mode" = clean; } && +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} -test -z "$mode" && { +test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" diff -ruNp libtool-2.2.10/libltdl/config/texinfo.tex libtool-2.4/libltdl/config/texinfo.tex --- libtool-2.2.10/libltdl/config/texinfo.tex 2010-06-09 20:55:44.000000000 +0700 +++ libtool-2.4/libltdl/config/texinfo.tex 2010-09-22 21:46:09.000000000 +0700 @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2010-05-22.17} +\def\texinfoversion{2010-09-06.17} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -2064,8 +2064,9 @@ end % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % -\def\xword{10} \def\xiword{11} +\def\xword{10} +\def\xwordpt{10pt} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% @@ -2332,7 +2333,7 @@ end % and 2) do not add an italic correction. \def\dosmartslant#1#2{% \ifusingtt - {\ttsl #2\let\next=\relax}% + {{\ttsl #2}\let\next=\relax}% {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% \next } @@ -2669,10 +2670,9 @@ end \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } -% Another complication: we want \\ (and @\) to output a \ character. -% FYI, plain.tex uses \\ as a temporary control sequence (why?), but -% this is not advertised and we don't care. Texinfo does not -% otherwise define @\. +% Another complication: we want \\ (and @\) to output a math (or tt) \. +% FYI, plain.tex uses \\ as a temporary control sequence (for no +% particular reason), but this is not advertised and we don't care. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} @@ -2785,7 +2785,18 @@ end \def\LaTeX{% L\kern-.36em {\setbox0=\hbox{T}% - \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% + \vbox to \ht0{\hbox{% + \ifx\textnominalsize\xwordpt + % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. + % Revert to plain's \scriptsize, which is 7pt. + \count255=\the\fam $\fam\count255 \scriptstyle A$% + \else + % For 11pt, we can use our lllsize. + \selectfonts\lllsize A% + \fi + }% + \vss + }}% \kern-.15em \TeX } @@ -4201,7 +4212,7 @@ end \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively - % preventing its expansion. This is used only for control% words, + % preventing its expansion. This is used only for control words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. @@ -4220,6 +4231,7 @@ end \commondummiesnofonts % \definedummyletter\_% + \definedummyletter\-% % % Non-English letters. \definedummyword\AA @@ -4256,6 +4268,7 @@ end \definedummyword\TeX % % Assorted special characters. + \definedummyword\arrow \definedummyword\bullet \definedummyword\comma \definedummyword\copyright @@ -4266,11 +4279,13 @@ end \definedummyword\equiv \definedummyword\error \definedummyword\euro + \definedummyword\expansion + \definedummyword\geq \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright - \definedummyword\expansion + \definedummyword\leq \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds @@ -4327,7 +4342,9 @@ end \definedummyword\b \definedummyword\i \definedummyword\r + \definedummyword\sansserif \definedummyword\sc + \definedummyword\slanted \definedummyword\t % % Commands that take arguments. @@ -4336,10 +4353,12 @@ end \definedummyword\code \definedummyword\command \definedummyword\dfn + \definedummyword\dmn \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file + \definedummyword\indicateurl \definedummyword\kbd \definedummyword\key \definedummyword\math @@ -4367,7 +4386,7 @@ end \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% - % Hopefully, all control words can become @asis. + % All control words become @asis by default; overrides below. \let\definedummyword\definedummyaccent % \commondummiesnofonts @@ -4379,8 +4398,14 @@ end % \def\ { }% \def\@{@}% - % how to handle braces? \def\_{\normalunderscore}% + \def\-{}% @- shouldn't affect sorting + % + % Unfortunately, texindex is not prepared to handle braces in the + % content at all. So for index sorting, we map @{ and @} to strings + % starting with |, since that ASCII character is between ASCII { and }. + \def\{{|a}% + \def\}{|b}% % % Non-English letters. \def\AA{AA}% @@ -4408,6 +4433,7 @@ end % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) + \def\arrow{->}% \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% @@ -4417,10 +4443,12 @@ end \def\error{error}% \def\euro{euro}% \def\expansion{==>}% + \def\geq{>=}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% + \def\leq{<=}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% @@ -6381,21 +6409,28 @@ end % Setup for the @verbatim environment % -% Real tab expansion +% Real tab expansion. \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % -\def\starttabbox{\setbox0=\hbox\bgroup} +% We typeset each line of the verbatim in an \hbox, so we can handle +% tabs. The \global is in case the verbatim line starts with an accent, +% or some other command that starts with a begin-group. Otherwise, the +% entire \verbbox would disappear at the corresponding end-group, before +% it is typeset. Meanwhile, we can't have nested verbatim commands +% (can we?), so the \global won't be overwriting itself. +\newbox\verbbox +\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup - \dimen0=\wd0 % the width so far, or since the previous tab - \divide\dimen0 by\tabw - \multiply\dimen0 by\tabw % compute previous multiple of \tabw - \advance\dimen0 by\tabw % advance to next multiple of \tabw - \wd0=\dimen0 \box0 \starttabbox + \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab + \divide\dimen\verbbox by\tabw + \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw + \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw + \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox }% } \endgroup @@ -6404,15 +6439,16 @@ end \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart - % Easiest (and conventionally used) font for verbatim - \tt - \def\par{\leavevmode\egroup\box0\endgraf}% + \tt % easiest (and conventionally used) font for verbatim + % The \leavevmode here is for blank lines. Otherwise, we would + % never \starttabox and the \egroup would end verbatim mode. + \def\par{\leavevmode\egroup\box\verbbox\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and - % make each space count - % must do in this order: + % make each space count. + % Must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } @@ -6927,17 +6963,18 @@ end % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active -% (as in normal texinfo). It is necessary to change the definition of \. - +% (as in normal texinfo). It is necessary to change the definition of \ +% to recognize macro arguments; this is the job of \mbodybackslash. +% % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. - +% % It's necessary to have hard CRs when the macro is executed. This is -% done by making ^^M (\endlinechar) catcode 12 when reading the macro +% done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. - -\def\scanctxt{% +% +\def\scanctxt{% used as subroutine \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other @@ -6950,13 +6987,13 @@ end \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } -\def\scanargctxt{% +\def\scanargctxt{% used for copying and captions, not macros. \scanctxt \catcode`\\=\other \catcode`\^^M=\other } -\def\macrobodyctxt{% +\def\macrobodyctxt{% used for @macro definitions \scanctxt \catcode`\{=\other \catcode`\}=\other @@ -6964,30 +7001,48 @@ end \usembodybackslash } -\def\macroargctxt{% +\def\macroargctxt{% used when scanning invocations \scanctxt - \catcode`\\=\other + \catcode`\\=0 } +% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" +% for the single characters \ { }. Thus, we end up with the "commands" +% that would be written @\ @{ @} in a Texinfo document. +% +% We already have @{ and @}. For @\, we define it here, and only for +% this purpose, to produce a typewriter backslash (so, the @\ that we +% define for @math can't be used with @macro calls): +% +\def\\{\normalbackslash}% +% +% We would like to do this for \, too, since that is what makeinfo does. +% But it is not possible, because Texinfo already has a command @, for a +% cedilla accent. Documents must use @comma{} instead. +% +% \anythingelse will almost certainly be an error of some kind. + % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. - +% {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} +\def\margbackslash#1{\char`\#1 } + \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% - \getargs{#1}% now \macname is the macname and \argl the arglist + \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments - \paramno=0% + \paramno=0 \else \expandafter\parsemargdef \argl;% \fi @@ -7036,28 +7091,32 @@ end % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} -\def\getmacname #1 #2\relax{\macname={#1}} +\def\getmacname#1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.blah for each blah -% in the params list, to be ##N where N is the position in that list. +% in the params list to be ##N where N is the position in that list. % That gets used by \mbodybackslash (above). - +% % We need to get `macro parameter char #' into several definitions. -% The technique used is stolen from LaTeX: let \hash be something +% The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. -\def\parsemargdef#1;{\paramno=0\def\paramlist{}% - \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} +\def\parsemargdef#1;{% + \paramno=0\def\paramlist{}% + \let\hash\relax + \let\xeatspaces\relax + \parsemargdefxxx#1,;,% +} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx - \advance\paramno by 1% + \advance\paramno by 1 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% @@ -7065,7 +7124,7 @@ end % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) - +% \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% @@ -7076,6 +7135,7 @@ end % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. +% \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive @@ -7139,7 +7199,8 @@ end % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence -% as an argument (by \parsebrace or \parsearg) +% as an argument (by \parsebrace or \parsearg). +% \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else @@ -7149,7 +7210,8 @@ end % @alias. % We need some trickery to remove the optional spaces around the equal -% sign. Just make them active and then expand them all to nothing. +% sign. Make them active and then expand them all to nothing. +% \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% @@ -7407,7 +7469,8 @@ end \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs - \message{\linenumber Undefined cross reference `#1'.}% + {\toks0 = {#1}% avoid expansion of possibly-complex value + \message{\linenumber Undefined cross reference `\the\toks0'.}}% \else \ifwarnedxrefs\else \global\warnedxrefstrue @@ -8389,8 +8452,8 @@ directory should work if nowhere else do \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} - \gdef^^ed{\'\i} - \gdef^^ee{\^\i} + \gdef^^ed{\'{\dotless{i}}} + \gdef^^ee{\^{\dotless{i}}} \gdef^^ef{\v d} % \gdef^^f0{\dh} diff -ruNp libtool-2.2.10/libltdl/config-h.in libtool-2.4/libltdl/config-h.in --- libtool-2.2.10/libltdl/config-h.in 2010-06-09 20:06:43.000000000 +0700 +++ libtool-2.4/libltdl/config-h.in 2010-09-22 21:45:18.000000000 +0700 @@ -124,6 +124,9 @@ /* The archive extension */ #undef LT_LIBEXT +/* The archive prefix */ +#undef LT_LIBPREFIX + /* Define to the extension used for runtime loadable modules, say, ".so". */ #undef LT_MODULE_EXT diff -ruNp libtool-2.2.10/libltdl/configure libtool-2.4/libltdl/configure --- libtool-2.2.10/libltdl/configure 2010-06-09 20:05:51.000000000 +0700 +++ libtool-2.4/libltdl/configure 2010-09-22 21:44:23.000000000 +0700 @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for libltdl 2.2.10. +# Generated by GNU Autoconf 2.67 for libltdl 2.4. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -327,7 +327,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -367,19 +367,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -543,7 +543,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -562,8 +562,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libltdl' PACKAGE_TARNAME='libltdl' -PACKAGE_VERSION='2.2.10' -PACKAGE_STRING='libltdl 2.2.10' +PACKAGE_VERSION='2.4' +PACKAGE_STRING='libltdl 2.4' PACKAGE_BUGREPORT='bug-libtool@gnu.org' PACKAGE_URL='' @@ -628,7 +628,9 @@ OTOOL LIPO NMEDIT DSYMUTIL +MANIFEST_TOOL RANLIB +ac_ct_AR AR LN_S NM @@ -737,6 +739,7 @@ with_pic enable_fast_install enable_dependency_tracking with_gnu_ld +with_sysroot enable_libtool_lock enable_ltdl_install ' @@ -748,7 +751,8 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP' +CPP +CPPFLAGS' # Initialize some variables set by options. @@ -811,8 +815,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -857,7 +862,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -883,7 +888,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1087,7 +1092,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1103,7 +1108,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1133,8 +1138,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1142,7 +1147,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1160,13 +1165,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1189,7 +1194,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1203,8 +1208,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1219,9 +1224,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1260,11 +1265,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1290,7 +1295,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libltdl 2.2.10 to adapt to many kinds of systems. +\`configure' configures libltdl 2.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1304,7 +1309,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1360,7 +1365,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libltdl 2.2.10:";; + short | recursive ) echo "Configuration of libltdl 2.4:";; esac cat <<\_ACEOF @@ -1383,6 +1388,8 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command @@ -1460,10 +1467,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libltdl configure 2.2.10 -generated by GNU Autoconf 2.65 +libltdl configure 2.4 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1567,7 +1574,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1610,7 +1617,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1676,7 +1683,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1735,15 +1742,18 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_func -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1752,8 +1762,12 @@ $4 int main () { -#ifndef $2 - (void) $2; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif #endif ; @@ -1783,7 +1797,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -1831,8 +1845,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libltdl $as_me 2.2.10, which was -generated by GNU Autoconf 2.65. Invocation command line was +It was created by libltdl $as_me 2.4, which was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -1942,11 +1956,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1980,11 +1992,9 @@ $as_echo "$as_me: WARNING: cache variabl ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1997,11 +2007,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2015,11 +2023,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2074,7 +2080,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2089,7 +2100,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2165,7 +2180,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2183,16 +2198,22 @@ ac_config_headers="$ac_config_headers co ac_aux_dir= for ac_dir in config "$srcdir"/config; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2323,11 +2344,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2349,7 +2370,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2359,7 +2380,7 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2597,7 +2618,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2605,7 +2626,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2639,7 +2660,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`" am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2655,7 +2676,7 @@ fi # Define the identity of the package. PACKAGE='libltdl' - VERSION='2.2.10' + VERSION='2.4' cat >>confdefs.h <<_ACEOF @@ -2714,8 +2735,8 @@ esac -macro_version='2.2.10' -macro_revision='1.3175' +macro_version='2.4' +macro_revision='1.3293' @@ -2733,7 +2754,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -2744,16 +2765,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2778,7 +2799,7 @@ else ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -2786,7 +2807,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2826,7 +2847,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -3233,8 +3254,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3348,9 +3369,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3392,8 +3412,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3450,9 +3470,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3503,8 +3523,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3908,7 +3928,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -3984,7 +4004,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4050,7 +4070,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4117,7 +4137,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -4233,7 +4253,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -4622,8 +4642,8 @@ $as_echo_n "checking whether the shell u # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -4672,6 +4692,80 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if test "${lt_cv_to_host_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : @@ -4688,6 +4782,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -5008,6 +5107,21 @@ esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -5023,9 +5137,160 @@ test -z "$deplibs_check_method" && depli + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : @@ -5041,7 +5306,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5061,11 +5326,15 @@ $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : @@ -5081,7 +5350,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5100,6 +5369,10 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -5111,16 +5384,72 @@ ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if test "${lt_cv_ar_at_file+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi @@ -5462,8 +5791,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -5499,6 +5828,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -5540,6 +5870,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -5551,7 +5893,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -5577,8 +5919,8 @@ static const void *lt_preloaded_setup() _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -5588,8 +5930,8 @@ _LT_EOF test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -5626,6 +5968,17 @@ else $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + @@ -5648,6 +6001,43 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -5796,50 +6186,167 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test "${lt_cv_path_mainfest_tool+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes fi - rm -rf conftest* - ;; -esac + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + -need_locks="$enable_libtool_lock" case $host_os in @@ -6500,7 +7007,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6516,11 +7023,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -6559,7 +7066,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6575,18 +7082,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -6715,8 +7222,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7553,8 +8059,6 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -7719,6 +8223,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -7838,13 +8348,17 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -7905,6 +8419,11 @@ fi + + + + + # # Check to make sure the static flag actually works. # @@ -8255,7 +8774,8 @@ _LT_EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -8303,7 +8823,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -8373,8 +8893,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -8392,8 +8912,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8439,8 +8959,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8570,7 +9090,13 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8583,22 +9109,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -8610,7 +9143,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8623,22 +9162,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -8683,20 +9229,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -8761,7 +9350,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -8769,7 +9358,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -8785,7 +9374,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -8809,10 +9398,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -8891,23 +9480,36 @@ fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -8992,7 +9594,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' @@ -9011,9 +9613,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -9589,8 +10191,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -9623,13 +10226,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -10565,10 +11226,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10671,10 +11332,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11353,10 +12014,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11556,8 +12217,7 @@ for ac_func in argz_add argz_append argz do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -11607,7 +12267,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_argz_works" >&5 $as_echo "$lt_cv_sys_argz_works" >&6; } - if test $lt_cv_sys_argz_works = yes; then : + if test "$lt_cv_sys_argz_works" = yes; then : $as_echo "#define HAVE_WORKING_ARGZ 1" >>confdefs.h @@ -11691,8 +12351,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -11706,8 +12365,7 @@ for ac_func in closedir opendir readdir do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -11726,8 +12384,7 @@ for ac_func in strlcat strlcpy do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -11749,8 +12406,16 @@ cat >>confdefs.h <<_ACEOF _ACEOF +name= +eval "lt_libprefix=\"$libname_spec\"" + +cat >>confdefs.h <<_ACEOF +#define LT_LIBPREFIX "$lt_libprefix" +_ACEOF + + name=ltdl -LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` +eval "LTDLOPEN=\"$libname_spec\"" @@ -11843,6 +12508,7 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -11866,19 +12532,19 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then - as_fn_error "conditional \"INSTALL_LTDL\" was never defined. + as_fn_error $? "conditional \"INSTALL_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then - as_fn_error "conditional \"CONVENIENCE_LTDL\" was never defined. + as_fn_error $? "conditional \"CONVENIENCE_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi LT_CONFIG_H=config.h @@ -12029,19 +12695,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -12237,7 +12903,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -12290,8 +12956,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libltdl $as_me 2.2.10, which was -generated by GNU Autoconf 2.65. Invocation command line was +This file was extended by libltdl $as_me 2.4, which was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -12356,11 +13022,11 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libltdl config.status 2.2.10 -configured by $0, generated by GNU Autoconf 2.65, +libltdl config.status 2.4 +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -12378,11 +13044,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -12404,6 +13075,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -12416,7 +13088,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -12425,7 +13097,7 @@ Try \`$0 --help' for more information."; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -12510,12 +13182,18 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' @@ -12530,14 +13208,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' @@ -12570,12 +13251,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' @@ -12632,8 +13313,12 @@ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -12643,12 +13328,14 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -12664,7 +13351,6 @@ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -12700,6 +13386,7 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ @@ -12748,7 +13435,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -12786,7 +13473,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -12803,7 +13490,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -12817,18 +13504,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -12917,20 +13604,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -12958,7 +13653,7 @@ for ac_last_try in false false :; do if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -13043,7 +13738,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -13056,7 +13751,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -13084,7 +13779,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -13111,7 +13806,7 @@ $as_echo "$as_me: creating $ac_file" >&6 case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -13248,22 +13943,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -13274,19 +13969,19 @@ which seems to be undefined. Please mak $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -13560,16 +14255,36 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -13599,6 +14314,12 @@ global_symbol_to_c_name_address=$lt_lt_c # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -13608,6 +14329,9 @@ MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -13722,12 +14446,12 @@ with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -13814,9 +14538,6 @@ inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -13832,6 +14553,9 @@ include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -13864,210 +14588,169 @@ ltmain="$ac_aux_dir/ltmain.sh" # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -14082,7 +14765,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -14103,7 +14786,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -ruNp libtool-2.2.10/libltdl/configure.ac libtool-2.4/libltdl/configure.ac --- libtool-2.2.10/libltdl/configure.ac 2010-06-09 20:00:19.000000000 +0700 +++ libtool-2.4/libltdl/configure.ac 2010-09-22 21:43:26.000000000 +0700 @@ -40,7 +40,7 @@ AC_PREREQ(2.59)dnl We use AS_HELP_STRING ## ------------------------ ## ## Autoconf initialisation. ## ## ------------------------ ## -AC_INIT([libltdl], [2.2.10], [bug-libtool@gnu.org]) +AC_INIT([libltdl], [2.4], [bug-libtool@gnu.org]) AC_CONFIG_HEADERS([config.h:config-h.in]) AC_CONFIG_SRCDIR([ltdl.c]) AC_CONFIG_AUX_DIR([config]) diff -ruNp libtool-2.2.10/libltdl/libltdl/lt_system.h libtool-2.4/libltdl/libltdl/lt_system.h --- libtool-2.2.10/libltdl/libltdl/lt_system.h 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/libltdl/libltdl/lt_system.h 2010-09-16 17:58:20.000000000 +0700 @@ -1,6 +1,6 @@ /* lt_system.h -- system portability abstraction layer - Copyright (C) 2004, 2007 Free Software Foundation, Inc. + Copyright (C) 2004, 2007, 2010 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2004 NOTE: The canonical source of this file is maintained with the @@ -76,6 +76,18 @@ or obtained by writing to the Free Softw # endif #endif +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + /* Canonicalise Windows and Cygwin recognition macros. To match the values set by recent Cygwin compilers, make sure that if __CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT! */ diff -ruNp libtool-2.2.10/libltdl/ltdl.c libtool-2.4/libltdl/ltdl.c --- libtool-2.2.10/libltdl/ltdl.c 2010-06-09 19:17:57.000000000 +0700 +++ libtool-2.4/libltdl/ltdl.c 2010-09-16 17:58:22.000000000 +0700 @@ -54,6 +54,10 @@ or obtained by writing to the Free Softw # define LT_LIBEXT "a" #endif +#if !defined(LT_LIBPREFIX) +# define LT_LIBPREFIX "lib" +#endif + /* This is the maximum symbol size that won't require malloc/free */ #undef LT_SYMBOL_LENGTH #define LT_SYMBOL_LENGTH 128 @@ -72,6 +76,7 @@ or obtained by writing to the Free Softw static const char objdir[] = LT_OBJDIR; static const char archive_ext[] = LT_ARCHIVE_EXT; static const char libext[] = LT_LIBEXT; +static const char libprefix[] = LT_LIBPREFIX; #if defined(LT_MODULE_EXT) static const char shlib_ext[] = LT_MODULE_EXT; #endif @@ -208,7 +213,7 @@ LT_BEGIN_C_DECLS LT_SCOPE const lt_dlvtable * get_vtable (lt_user_data data); LT_END_C_DECLS #ifdef HAVE_LIBDLLOADER -extern lt_dlsymlist preloaded_symbols[]; +extern LT_DLSYM_CONST lt_dlsymlist preloaded_symbols[]; #endif /* Initialize libltdl. */ @@ -1079,14 +1084,17 @@ parse_dotla_file(FILE *file, char **dlna /* Windows native tools do not understand the POSIX paths we store in libdir. */ -#ifndef __WINDOWS__ #undef STR_LIBDIR #define STR_LIBDIR "libdir=" else if (strncmp (line, STR_LIBDIR, sizeof (STR_LIBDIR) - 1) == 0) { errors += trim (libdir, &line[sizeof(STR_LIBDIR) - 1]); - } +#ifdef __WINDOWS__ + /* Disallow following unix-style paths on MinGW. */ + if (*libdir && (**libdir == '/' || **libdir == '\\')) + **libdir = '\0'; #endif + } #undef STR_DL_DEPLIBS #define STR_DL_DEPLIBS "dependency_libs=" @@ -1269,8 +1277,8 @@ try_dlopen (lt_dlhandle *phandle, const if (vtable) { - /* name + "." + libext + NULL */ - archive_name = MALLOC (char, LT_STRLEN (name) + strlen (libext) + 2); + /* libprefix + name + "." + libext + NULL */ + archive_name = MALLOC (char, strlen (libprefix) + LT_STRLEN (name) + strlen (libext) + 2); *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle)); if ((*phandle == NULL) || (archive_name == NULL)) @@ -1282,7 +1290,14 @@ try_dlopen (lt_dlhandle *phandle, const /* Preloaded modules are always named according to their old archive name. */ - sprintf (archive_name, "%s.%s", name, libext); + if (strncmp(name, "lib", 3) == 0) + { + sprintf (archive_name, "%s%s.%s", libprefix, name + 3, libext); + } + else + { + sprintf (archive_name, "%s.%s", name, libext); + } if (tryall_dlopen (&newhandle, archive_name, advise, vtable) == 0) { diff -ruNp libtool-2.2.10/libltdl/ltdl.h libtool-2.4/libltdl/ltdl.h --- libtool-2.2.10/libltdl/ltdl.h 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/libltdl/ltdl.h 2010-09-21 14:07:22.000000000 +0700 @@ -102,10 +102,11 @@ LT_SCOPE int lt_dlpreload_open (const lt_dlpreload_callback_func *func); #define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols -#define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \ - extern const lt_dlsymlist lt_preloaded_symbols[]; \ - lt_dlpreload_default(lt_preloaded_symbols); \ - }LT_STMT_END +/* Ensure C linkage. */ +extern LT_DLSYM_CONST lt_dlsymlist lt__PROGRAM__LTX_preloaded_symbols[]; + +#define LTDL_SET_PRELOADED_SYMBOLS() \ + lt_dlpreload_default(lt_preloaded_symbols) diff -ruNp libtool-2.2.10/libltdl/m4/argz.m4 libtool-2.4/libltdl/m4/argz.m4 --- libtool-2.2.10/libltdl/m4/argz.m4 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/libltdl/m4/argz.m4 2010-09-16 17:58:22.000000000 +0700 @@ -66,7 +66,7 @@ AS_IF([test -z "$ARGZ_H"], ;; #( *) lt_cv_sys_argz_works=yes ;; esac]]) - AS_IF([test $lt_cv_sys_argz_works = yes], + AS_IF([test "$lt_cv_sys_argz_works" = yes], [AC_DEFINE([HAVE_WORKING_ARGZ], 1, [This value is set to 1 to indicate that the system argz facility works])], [ARGZ_H=argz.h diff -ruNp libtool-2.2.10/libltdl/m4/autobuild.m4 libtool-2.4/libltdl/m4/autobuild.m4 --- libtool-2.2.10/libltdl/m4/autobuild.m4 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/libltdl/m4/autobuild.m4 2010-09-21 14:07:22.000000000 +0700 @@ -0,0 +1,40 @@ +# autobuild.m4 serial 7 +dnl Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +dnl Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Simon Josefsson + +# Usage: AB_INIT([MODE]). +AC_DEFUN([AB_INIT], +[ + AC_REQUIRE([AC_CANONICAL_BUILD]) + AC_REQUIRE([AC_CANONICAL_HOST]) + + if test -z "$AB_PACKAGE"; then + AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE} + fi + AC_MSG_NOTICE([autobuild project... $AB_PACKAGE]) + + if test -z "$AB_VERSION"; then + AB_VERSION=${PACKAGE_VERSION:-$VERSION} + fi + AC_MSG_NOTICE([autobuild revision... $AB_VERSION]) + + hostname=`hostname` + if test "$hostname"; then + AC_MSG_NOTICE([autobuild hostname... $hostname]) + fi + + ifelse([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])]) + + date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ` + if test "$?" != 0; then + date=`date` + fi + if test "$date"; then + AC_MSG_NOTICE([autobuild timestamp... $date]) + fi +]) diff -ruNp libtool-2.2.10/libltdl/m4/libtool.m4 libtool-2.4/libltdl/m4/libtool.m4 --- libtool-2.2.10/libltdl/m4/libtool.m4 2010-05-21 04:22:02.000000000 +0700 +++ libtool-2.4/libltdl/m4/libtool.m4 2010-09-22 15:41:19.000000000 +0700 @@ -168,10 +168,13 @@ _LT_DECL([], [exeext], [0], [Executable dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our @@ -748,15 +751,12 @@ _LT_EOF # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) - _LT_PROG_XSI_SHELLFNS + _LT_PROG_REPLACE_SHELLFNS - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], @@ -1073,30 +1073,41 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], fi ]) -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi ])# _LT_SYS_MODULE_PATH_AIX @@ -1121,7 +1132,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -1165,6 +1176,39 @@ _LT_DECL([], [ECHO], [1], [An echo progr ])# _LT_PROG_ECHO_BACKSLASH +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], @@ -1311,14 +1355,47 @@ need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) +[_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: @@ -1658,10 +1735,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -2201,8 +2278,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -2235,13 +2313,71 @@ m4_if([$1], [],[ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -2945,6 +3081,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -3163,6 +3304,21 @@ tpf*) ;; esac ]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -3170,7 +3326,11 @@ test -z "$deplibs_check_method" && depli _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD @@ -3273,6 +3433,67 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + # LT_LIB_M # -------- @@ -3399,8 +3620,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -3436,6 +3657,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -3469,6 +3691,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -3480,7 +3714,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT@&t@_DLSYM_CONST struct { const char *name; void *address; } @@ -3506,15 +3740,15 @@ static const void *lt_preloaded_setup() _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi @@ -3547,6 +3781,13 @@ else AC_MSG_RESULT(ok) fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], @@ -3557,6 +3798,8 @@ _LT_DECL([global_symbol_to_c_name_addres _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -3568,7 +3811,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= -AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -3673,6 +3915,12 @@ m4_if([$1], [CXX], [ ;; esac ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; dgux*) case $cc_basename in ec++*) @@ -4047,6 +4295,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -4166,9 +4420,11 @@ case $host_os in _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. @@ -4187,6 +4443,8 @@ fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # @@ -4207,6 +4465,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl @@ -4215,6 +4474,7 @@ m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. @@ -4229,15 +4489,20 @@ m4_if([$1], [CXX], [ ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; + ;; cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; + case $cc_basename in + cl*) ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; + ;; esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= @@ -4405,7 +4670,8 @@ _LT_EOF _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -4453,7 +4719,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -4523,8 +4789,8 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -4542,8 +4808,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4589,8 +4855,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4720,7 +4986,7 @@ _LT_EOF _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else @@ -4731,7 +4997,7 @@ _LT_EOF else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. @@ -4775,20 +5041,63 @@ _LT_EOF # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac ;; darwin* | rhapsody*) @@ -4826,7 +5135,7 @@ _LT_EOF # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -4834,7 +5143,7 @@ _LT_EOF hpux9*) if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -4850,7 +5159,7 @@ _LT_EOF hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -4874,10 +5183,10 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -4924,16 +5233,31 @@ _LT_EOF irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -5018,7 +5342,7 @@ _LT_EOF osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' @@ -5037,9 +5361,9 @@ _LT_EOF _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -5311,8 +5635,6 @@ _LT_TAGDECL([], [inherit_rpath], [0], to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], @@ -5323,6 +5645,8 @@ _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented @@ -5424,6 +5748,7 @@ CC="$lt_save_CC" m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then @@ -5485,6 +5810,7 @@ if test "$_lt_caught_CXX_error" != yes; # Allow CC to be a program name with arguments. lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX @@ -5502,6 +5828,7 @@ if test "$_lt_caught_CXX_error" != yes; fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -5523,8 +5850,8 @@ if test "$_lt_caught_CXX_error" != yes; # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5665,7 +5992,7 @@ if test "$_lt_caught_CXX_error" != yes; _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -5677,7 +6004,7 @@ if test "$_lt_caught_CXX_error" != yes; else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. @@ -5719,29 +6046,75 @@ if test "$_lt_caught_CXX_error" != yes; ;; cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; @@ -5816,7 +6189,7 @@ if test "$_lt_caught_CXX_error" != yes; ;; *) if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -5887,10 +6260,10 @@ if test "$_lt_caught_CXX_error" != yes; _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -5931,9 +6304,9 @@ if test "$_lt_caught_CXX_error" != yes; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes @@ -6211,7 +6584,7 @@ if test "$_lt_caught_CXX_error" != yes; _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac @@ -6298,9 +6671,9 @@ if test "$_lt_caught_CXX_error" != yes; if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -6429,6 +6802,7 @@ if test "$_lt_caught_CXX_error" != yes; fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -6443,6 +6817,29 @@ AC_LANG_POP ])# _LT_LANG_CXX_CONFIG +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -6451,6 +6848,7 @@ AC_LANG_POP # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= @@ -6501,6 +6899,13 @@ public class foo { }; _LT_EOF ]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then @@ -6512,7 +6917,7 @@ if AC_TRY_EVAL(ac_compile); then pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -6521,13 +6926,22 @@ if AC_TRY_EVAL(ac_compile); then test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} in + -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. @@ -6547,8 +6961,10 @@ if AC_TRY_EVAL(ac_compile); then _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -6584,6 +7000,7 @@ else fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], @@ -6733,7 +7150,9 @@ if test "$_lt_disable_F77" != yes; then # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} + CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -6787,6 +7206,7 @@ if test "$_lt_disable_F77" != yes; then GCC=$lt_save_GCC CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP @@ -6863,7 +7283,9 @@ if test "$_lt_disable_FC" != yes; then # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} + CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu @@ -6919,7 +7341,8 @@ if test "$_lt_disable_FC" != yes; then fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP @@ -6956,10 +7379,12 @@ _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. -lt_save_CC="$CC" +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" @@ -6990,7 +7415,8 @@ fi AC_LANG_RESTORE GCC=$lt_save_GCC -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG @@ -7025,9 +7451,11 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} +CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -7040,7 +7468,8 @@ fi GCC=$lt_save_GCC AC_LANG_RESTORE -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG @@ -7099,6 +7528,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object AC_SUBST([OBJDUMP]) ]) +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) # _LT_DECL_SED # ------------ @@ -7192,8 +7630,8 @@ m4_defun([_LT_CHECK_SHELL_FEATURES], # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -7232,206 +7670,162 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn ])# _LT_CHECK_SHELL_FEATURES -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` -} + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi -_LT_EOF -esac +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac ;; - esac + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac ]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff -ruNp libtool-2.2.10/libltdl/m4/ltdl.m4 libtool-2.4/libltdl/m4/ltdl.m4 --- libtool-2.2.10/libltdl/m4/ltdl.m4 2010-05-21 04:22:02.000000000 +0700 +++ libtool-2.4/libltdl/m4/ltdl.m4 2010-09-16 17:58:22.000000000 +0700 @@ -410,8 +410,13 @@ AC_CHECK_FUNCS([strlcat strlcpy], [], [A m4_pattern_allow([LT_LIBEXT])dnl AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension]) +name= +eval "lt_libprefix=\"$libname_spec\"" +m4_pattern_allow([LT_LIBPREFIX])dnl +AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix]) + name=ltdl -LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` +eval "LTDLOPEN=\"$libname_spec\"" AC_SUBST([LTDLOPEN]) ])# _LTDL_SETUP diff -ruNp libtool-2.2.10/libltdl/m4/ltversion.m4 libtool-2.4/libltdl/m4/ltversion.m4 --- libtool-2.2.10/libltdl/m4/ltversion.m4 2010-06-09 20:05:38.000000000 +0700 +++ libtool-2.4/libltdl/m4/ltversion.m4 2010-09-22 21:44:09.000000000 +0700 @@ -7,17 +7,17 @@ # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# Generated from ltversion.in. +# @configure_input@ -# serial 3175 ltversion.m4 +# serial 3293 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.2.10]) -m4_define([LT_PACKAGE_REVISION], [1.3175]) +m4_define([LT_PACKAGE_VERSION], [2.4]) +m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.10' -macro_revision='1.3175' +[macro_version='2.4' +macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -ruNp libtool-2.2.10/libtoolize.in libtool-2.4/libtoolize.in --- libtool-2.2.10/libtoolize.in 2010-06-09 18:45:26.000000000 +0700 +++ libtool-2.4/libtoolize.in 2010-09-22 16:27:21.000000000 +0700 @@ -1,6 +1,5 @@ #! /bin/sh -# Generated from libtoolize.m4sh by GNU Autoconf 2.65. -# @configure_input@ +# Generated from libtoolize.m4sh by GNU Autoconf 2.67. # libtoolize (GNU @PACKAGE@@TIMESTAMP@) @VERSION@ # Written by Gary V. Vaughan , 2003 @@ -65,7 +64,9 @@ # automake: $automake_version # autoconf: $autoconf_version # -# Report bugs to . +# Report bugs to <@PACKAGE_BUGREPORT@>. +# GNU @PACKAGE@ home page: <@PACKAGE_URL@>. +# General help using GNU software: . : ${TAR=tar} @@ -353,6 +354,27 @@ IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: @@ -367,17 +389,31 @@ basename="s,^.*/,," # those functions but instead duplicate the functionality here. func_dirname_and_basename () { - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation -# Generated shell functions inserted here. # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' @@ -560,6 +596,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. @@ -588,7 +633,7 @@ opt_warning=: # name if it has been set yet. func_echo () { - $ECHO "$progname${mode+: }$mode: $*" + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... @@ -614,14 +659,14 @@ func_echo_all () # Echo program name prefixed message to standard error. func_error () { - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : @@ -840,11 +885,30 @@ func_show_eval_locale () fi } +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + # func_version # Echo version message to standard output and exit. func_version () { + $opt_debug + $SED -n '/(C)/!b go :more /\./!{ @@ -866,6 +930,8 @@ func_version () # Echo short help message to standard output and exit. func_usage () { + $opt_debug + $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// @@ -882,7 +948,10 @@ func_usage () # unless 'noexit' is passed as argument. func_help () { + $opt_debug + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print s/^# // s/^# *$// s*\$progname*'$progname'* @@ -895,7 +964,11 @@ func_help () s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p - }' < "$progpath" + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" ret=$? if test -z "$1"; then exit $ret @@ -907,65 +980,51 @@ func_help () # exit_cmd. func_missing_arg () { + $opt_debug + func_error "missing argument for $1." exit_cmd=exit } -exit_cmd=: +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation +exit_cmd=: -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - SP2NL='tr \040 \012' - NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - SP2NL='tr \100 \n' - NL2SP='tr \r\n \100\100' - ;; -esac -# Command line options: -opt_debug=: -opt_force=false -opt_install=false -opt_link=: -opt_ltdl=false - -seen_autoconf=false -seen_libtool=false -seen_ltdl=false - # ltdl can be installed to be self-contained (subproject, the default); # or to be configured by a parent project, either with a recursive or # nonrecursive automake driven make: ltdl_mode= # Locations for important files: -prefix=@prefix@ -datadir=@datadir@ -pkgdatadir=@pkgdatadir@ -pkgltdldir=@pkgdatadir@ -aclocaldir=@aclocaldir@ -auxdir= -macrodir= ltdldir= -configure_ac=configure.in - -# Lists of all files libtoolize has ever installed. These are removed -# before installing the latest files when --force was passed to help -# ensure a clean upgrade. -# Do not remove config.guess nor config.sub, we don't install them -# without --install, and the project may not be using Automake. -all_pkgconfig_files="ltmain.sh" -all_pkgmacro_files="argz.m4 libtool.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 ltversion.in ltversion.m4 lt~obsolete.m4" -all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c" # Parse environment options { @@ -977,114 +1036,161 @@ all_pkgltdl_files="COPYING.LIB Makefile LIBTOOLIZE_OPTIONS=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_rest"` case $opt in - --debug) opt_debug=: ;; - --no-warn) opt_warning=false ;; - --quiet) opt_quiet=: ;; - --verbose) opt_verbose=: ;; - - --*) func_warning "unrecognized environment option \`$opt'" ;; + --debug|--no-warn|--quiet|--verbose) + envopts="${envopts+$envopts }$opt" ;; + --*) env_warning="${env_warning+$env_warning +}unrecognized environment option \`$opt'" ;; *) func_fatal_help "garbled LIBTOOLIZE_OPTIONS near \`$opt'" ;; esac done + + test -n "$envopts" && { + func_quote_for_eval "$envopts" + eval set dummy "$func_quote_for_eval_result" ${1+"$@"} + shift + } } -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtoolize --version' happen quickly. -{ - # sed scripts: - my_sed_single_opt='1s/^\(..\).*$/\1/;q' - my_sed_single_rest='1s/^..\(.*\)$/\1/;q' - my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' - my_sed_long_arg='1s/^--[^=]*=//' - while test "$#" -gt 0; do +# Option defaults: +opt_debug=: +opt_copy=false +opt_force=false +opt_install=false +opt_dry_run=false +opt_quiet=false +opt_verbose=false +opt_warning=: +opt_nonrecursive=false +opt_recursive=false +opt_standalone=false +opt_ltdl="false" + + +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do opt="$1" shift case $opt in - --copy|-c) opt_link=false ;; - - --debug) func_echo "enabling shell trace mode" - opt_debug='set -x' + --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" $opt_debug ;; - - --dry-run|-n) if $opt_dry_run; then :; else - opt_dry_run=: - RM="func_echo_all $RM" - test -n "$LN_S" && LN_S="func_echo_all $LN_S" - CP="func_echo_all $CP" - MKDIR="func_echo_all $MKDIR" - TAR="func_echo_all $TAR" - fi + --copy|-c) + opt_copy=: ;; - - --force|-f) opt_force=: ;; - - --install|-i) opt_install=: ;; - - --ltdl) opt_ltdl=: - if test "$#" -gt 0; then - case $1 in - -*) ;; - *) ltdldir=`$ECHO "$1" | $SED 's,/*$,,'` - shift - ;; - esac - fi + --force|-f) + opt_force=: ;; - - --no-warn) opt_warning=false ;; - - --nonrecursive|--non-recursive) - ltdl_mode=nonrecursive + --install|-i) + opt_install=: ;; - - --quiet|--automake|-q) # --automake is for 1.5 compatibility + --dry-run|--dryrun|-n) + opt_dry_run=: +CP="func_echo_all $CP" +test -n "$LN_S" && LN_S="func_echo_all $LN_S" +MKDIR="func_echo_all $MKDIR" +RM="func_echo_all $RM" +TAR="func_echo_all $TAR" + ;; + --quiet|--automake|-q) opt_quiet=: ;; + --verbose|-v) + opt_verbose=: + ;; + --no-warning|--no-warn) + opt_warning=false + ;; + --nonrecursive|--non-recursive) + opt_nonrecursive=: + ;; + --recursive) + opt_recursive=: + ;; + --standalone) + opt_standalone=: + ;; + --ltdl) + optarg="$1" + if test $# -gt 0; then + case $optarg in # (( + -*) ;; + *) opt_ltdl="$optarg"; shift ;; + esac + fi +# This is tricky, since we're overloading $opt_ltdl to be the +# optarg for --ltdl during option processing, but then stashing +# the (optional) optarg in $ltdldir and reusing $opt_ltdl to +# indicate that --ltdl was seen during option processing. Also, +# be careful that --ltdl=foo --ltdl=bar results in ltdldir=bar: +case $opt_ltdl in + false|:) ;; # a bare '--ltdl' followed by another option + *) ltdldir=`$ECHO "$optarg" | $SED 's,/*$,,'` ;; +esac +opt_ltdl=: + ;; - --recursive) ltdl_mode=recursive ;; - - --subproject) ltdl_mode=subproject ;; - - --verbose|-v) opt_verbose=: ;; + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; # Separate optargs to long options: --*=*) - arg=`$ECHO "$opt" | $SED "$my_sed_long_arg"` - opt=`$ECHO "$opt" | $SED "$my_sed_long_opt"` - set dummy "$opt" "$arg" ${1+"$@"} + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; - # Separate optargs to short options: - #-X*) - # arg=`$ECHO "$opt" | $SED "$my_sed_single_rest"` - # opt=`$ECHO "$opt" | $SED "$my_sed_single_opt"` - # set dummy "$opt" "$arg" ${1+"$@"} - # shift - # ;; - # Separate non-argument short options: - -c*|-f*|-i*|-n*|-q*|-v*) - rest=`$ECHO "$opt" | $SED "$my_sed_single_rest"` - opt=`$ECHO "$opt" | $SED "$my_sed_single_opt"` - set dummy "$opt" "-$rest" ${1+"$@"} + -\?*|-h*|-c*|-f*|-i*|-n*|-q*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; - -\?|-h) func_usage ;; - --help) func_help ;; - --version) func_version ;; - --) break ;; - -*) func_fatal_help "unrecognized option \`$opt'" ;; - *) func_fatal_help "too many arguments" ;; + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done + + # Validate options: + + # show any warnings saved by LIBTOOLIZE_OPTIONS parsing + test -n "$env_warning" && + echo "$env_warning" |while read line; do func_warning "$line"; done + + # validate $opt_nonrecursive, $opt_recursive and $opt_standalone + if $opt_nonrecursive; then + if $opt_recursive || $opt_standalone; then + func_error "you can have at most one of --non-recursive, --recursive and --standalone" + fi + ltdl_mode=nonrecursive + elif $opt_recursive; then + $opt_standalone && + func_error "you can have at most one of --non-recursive, --recursive and --standalone" + ltdl_mode=recursive + elif $opt_standalone; then + ltdl_mode=standalone + fi + + # any remaining arguments are an error + test $# -gt 0 && + func_fatal_help "unknown additional arguments: \`${1+}'" + + + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE } + + # func_echo_once msg_var # Calls func_echo with the value of MSG_VAR, and then sets MSG_VAR="" so # that subsequent calls have no effect. @@ -1163,7 +1269,15 @@ func_copy_cb () func_mkdir_p `$ECHO "$my_destdir/$my_file" | $SED "$dirname"` $RM "$my_destdir/$my_file" - if $opt_link; then + if $opt_copy; then + if { ( cd "$my_srcdir" && $TAR chf - "$my_file" ) 2>/dev/null \ + | ( umask 0 && cd "$my_destdir" && $TAR xf - ) >/dev/null 2>&1; } \ + && touch "$my_destdir/$my_file"; then + $opt_quiet || func_echo_once "$my_msg_var" + $opt_quiet || func_echo "copying $my_copy_msg" + copy_return_status=0 + fi + else if test "$my_file" = "aclocal.m4"; then if { ( cd "$my_srcdir" && $TAR chf - "$my_file" ) 2>/dev/null \ | ( umask 0 && cd "$my_destdir" && $TAR xf - ) >/dev/null 2>&1 ; } @@ -1179,14 +1293,6 @@ func_copy_cb () copy_return_status=0 fi fi - else - if { ( cd "$my_srcdir" && $TAR chf - "$my_file" ) 2>/dev/null \ - | ( umask 0 && cd "$my_destdir" && $TAR xf - ) >/dev/null 2>&1; } \ - && touch "$my_destdir/$my_file"; then - $opt_quiet || func_echo_once "$my_msg_var" - $opt_quiet || func_echo "copying $my_copy_msg" - copy_return_status=0 - fi fi if test "$copy_return_status" != 0; then $opt_quiet || func_echo_once "$my_msg_var" @@ -2359,6 +2465,42 @@ func_check_macros () ## ----------- ## { + # Lists of all files libtoolize has ever installed. These are removed + # before installing the latest files when --force was passed to help + # ensure a clean upgrade. + # Do not remove config.guess nor config.sub, we don't install them + # without --install, and the project may not be using Automake. + all_pkgconfig_files="ltmain.sh" + all_pkgmacro_files="argz.m4 libtool.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 ltversion.in ltversion.m4 lt~obsolete.m4" + all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c" + + # Locations for important files: + prefix=@prefix@ + datadir=@datadir@ + pkgdatadir=@pkgdatadir@ + pkgltdldir=@pkgdatadir@ + aclocaldir=@aclocaldir@ + auxdir= + macrodir= + configure_ac=configure.in + + seen_autoconf=false + seen_libtool=false + seen_ltdl=false + + # test EBCDIC or ASCII + case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + SP2NL='tr \040 \012' + NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + SP2NL='tr \100 \n' + NL2SP='tr \r\n \100\100' + ;; + esac + # Allow the user to override the master libtoolize repository: if test -n "$_lt_pkgdatadir"; then pkgltdldir="$_lt_pkgdatadir" diff -ruNp libtool-2.2.10/libtoolize.m4sh libtool-2.4/libtoolize.m4sh --- libtool-2.2.10/libtoolize.m4sh 2010-06-09 16:47:55.000000000 +0700 +++ libtool-2.4/libtoolize.m4sh 2010-09-21 14:07:22.000000000 +0700 @@ -1,7 +1,5 @@ m4_pattern_allow([dnl]) -AS_INIT[]m4_divert_push([HEADER-COPYRIGHT])dnl -# @configure_input@ - +AS_INIT[]m4_divert_push([HEADER-COPYRIGHT]) # libtoolize (GNU @PACKAGE@@TIMESTAMP@) @VERSION@ # Written by Gary V. Vaughan , 2003 @@ -65,7 +63,9 @@ AS_INIT[]m4_divert_push([HEADER-COPYRIGH # automake: $automake_version # autoconf: $autoconf_version # -# Report bugs to . +# Report bugs to <@PACKAGE_BUGREPORT@>. +# GNU @PACKAGE@ home page: <@PACKAGE_URL@>. +# General help using GNU software: . : ${TAR=tar} @@ -75,55 +75,13 @@ m4_divert_pop m4_include([getopt.m4sh]) M4SH_VERBATIM([[ -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - SP2NL='tr \040 \012' - NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - SP2NL='tr \100 \n' - NL2SP='tr \r\n \100\100' - ;; -esac - - -# Command line options: -opt_debug=: -opt_force=false -opt_install=false -opt_link=: -opt_ltdl=false - -seen_autoconf=false -seen_libtool=false -seen_ltdl=false - # ltdl can be installed to be self-contained (subproject, the default); # or to be configured by a parent project, either with a recursive or # nonrecursive automake driven make: ltdl_mode= # Locations for important files: -prefix=@prefix@ -datadir=@datadir@ -pkgdatadir=@pkgdatadir@ -pkgltdldir=@pkgdatadir@ -aclocaldir=@aclocaldir@ -auxdir= -macrodir= ltdldir= -configure_ac=configure.in - -# Lists of all files libtoolize has ever installed. These are removed -# before installing the latest files when --force was passed to help -# ensure a clean upgrade. -# Do not remove config.guess nor config.sub, we don't install them -# without --install, and the project may not be using Automake. -all_pkgconfig_files="ltmain.sh" -all_pkgmacro_files="argz.m4 libtool.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 ltversion.in ltversion.m4 lt~obsolete.m4" -all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c" # Parse environment options { @@ -135,114 +93,78 @@ all_pkgltdl_files="COPYING.LIB Makefile LIBTOOLIZE_OPTIONS=`echo "$LIBTOOLIZE_OPTIONS" | sed "$my_sed_env_rest"` case $opt in - --debug) opt_debug=: ;; - --no-warn) opt_warning=false ;; - --quiet) opt_quiet=: ;; - --verbose) opt_verbose=: ;; - - --*) func_warning "unrecognized environment option \`$opt'" ;; + --debug|--no-warn|--quiet|--verbose) + envopts="${envopts+$envopts }$opt" ;; + --*) env_warning="${env_warning+$env_warning +}unrecognized environment option \`$opt'" ;; *) func_fatal_help "garbled LIBTOOLIZE_OPTIONS near \`$opt'" ;; esac done -} - -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtoolize --version' happen quickly. -{ - # sed scripts: - my_sed_single_opt='1s/^\(..\).*$/\1/;q' - my_sed_single_rest='1s/^..\(.*\)$/\1/;q' - my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' - my_sed_long_arg='1s/^--[^=]*=//' - - while test "$#" -gt 0; do - opt="$1" + test -n "$envopts" && { + func_quote_for_eval "$envopts" + eval set dummy "$func_quote_for_eval_result" ${1+"$@"} shift - case $opt in - --copy|-c) opt_link=false ;; - - --debug) func_echo "enabling shell trace mode" - opt_debug='set -x' - $opt_debug - ;; - - --dry-run|-n) if $opt_dry_run; then :; else - opt_dry_run=: - RM="func_echo_all $RM" - test -n "$LN_S" && LN_S="func_echo_all $LN_S" - CP="func_echo_all $CP" - MKDIR="func_echo_all $MKDIR" - TAR="func_echo_all $TAR" - fi - ;; - - --force|-f) opt_force=: ;; - - --install|-i) opt_install=: ;; - - --ltdl) opt_ltdl=: - if test "$#" -gt 0; then - case $1 in - -*) ;; - *) ltdldir=`$ECHO "$1" | $SED 's,/*$,,'` - shift - ;; - esac - fi - ;; - - --no-warn) opt_warning=false ;; - - --nonrecursive|--non-recursive) - ltdl_mode=nonrecursive - ;; - - --quiet|--automake|-q) # --automake is for 1.5 compatibility - opt_quiet=: - ;; - - --recursive) ltdl_mode=recursive ;; - - --subproject) ltdl_mode=subproject ;; - - --verbose|-v) opt_verbose=: ;; - - # Separate optargs to long options: - --*=*) - arg=`$ECHO "$opt" | $SED "$my_sed_long_arg"` - opt=`$ECHO "$opt" | $SED "$my_sed_long_opt"` - set dummy "$opt" "$arg" ${1+"$@"} - shift - ;; - - # Separate optargs to short options: - #-X*) - # arg=`$ECHO "$opt" | $SED "$my_sed_single_rest"` - # opt=`$ECHO "$opt" | $SED "$my_sed_single_opt"` - # set dummy "$opt" "$arg" ${1+"$@"} - # shift - # ;; - - # Separate non-argument short options: - -c*|-f*|-i*|-n*|-q*|-v*) - rest=`$ECHO "$opt" | $SED "$my_sed_single_rest"` - opt=`$ECHO "$opt" | $SED "$my_sed_single_opt"` - set dummy "$opt" "-$rest" ${1+"$@"} - shift - ;; - - -\?|-h) func_usage ;; - --help) func_help ;; - --version) func_version ;; - --) break ;; - -*) func_fatal_help "unrecognized option \`$opt'" ;; - *) func_fatal_help "too many arguments" ;; - esac - done + } } +]]) +dnl SHORT LONG DEFAULT INIT +dnl ---------------------------------------------------------------------- +dnl --automake, below, is for compatibility with automake 1.5 +M4SH_GETOPTS( + [c], [--copy], [], [], + [f], [--force], [], [], + [i], [--install], [], [], + [n], [--dry-run|--dryrun], [], [ + CP="func_echo_all $CP" + test -n "$LN_S" && LN_S="func_echo_all $LN_S" + MKDIR="func_echo_all $MKDIR" + RM="func_echo_all $RM" + TAR="func_echo_all $TAR"], + [q], [--quiet|--automake], [], [], + [v], [--verbose], [], [], + [], [--no-warning|--no-warn], [], [], + [], [--nonrecursive|--non-recursive], [], [], + [], [--recursive], [], [], + [], [--standalone], [], [], + [?], [--ltdl], [false], [ + # This is tricky, since we're overloading $opt_ltdl to be the + # optarg for --ltdl during option processing, but then stashing + # the (optional) optarg in $ltdldir and reusing $opt_ltdl to + # indicate that --ltdl was seen during option processing. Also, + # be careful that --ltdl=foo --ltdl=bar results in ltdldir=bar: + case $opt_ltdl in + false|:) ;; # a bare '--ltdl' followed by another option + *) ltdldir=`$ECHO "$optarg" | $SED 's,/*$,,'` ;; + esac + opt_ltdl=:], +[ + # show any warnings saved by LIBTOOLIZE_OPTIONS parsing + test -n "$env_warning" && + echo "$env_warning" |while read line; do func_warning "$line"; done + + # validate $opt_nonrecursive, $opt_recursive and $opt_standalone + if $opt_nonrecursive; then + if $opt_recursive || $opt_standalone; then + func_error "you can have at most one of --non-recursive, --recursive and --standalone" + fi + ltdl_mode=nonrecursive + elif $opt_recursive; then + $opt_standalone && + func_error "you can have at most one of --non-recursive, --recursive and --standalone" + ltdl_mode=recursive + elif $opt_standalone; then + ltdl_mode=standalone + fi + # any remaining arguments are an error + test [$]# -gt 0 && + func_fatal_help "unknown additional arguments: \`${1+$@}'" +]) + + +M4SH_VERBATIM([[ # func_echo_once msg_var # Calls func_echo with the value of MSG_VAR, and then sets MSG_VAR="" so # that subsequent calls have no effect. @@ -321,7 +243,15 @@ func_copy_cb () func_mkdir_p `$ECHO "$my_destdir/$my_file" | $SED "$dirname"` $RM "$my_destdir/$my_file" - if $opt_link; then + if $opt_copy; then + if { ( cd "$my_srcdir" && $TAR chf - "$my_file" ) 2>/dev/null \ + | ( umask 0 && cd "$my_destdir" && $TAR xf - ) >/dev/null 2>&1; } \ + && touch "$my_destdir/$my_file"; then + $opt_quiet || func_echo_once "$my_msg_var" + $opt_quiet || func_echo "copying $my_copy_msg" + copy_return_status=0 + fi + else if test "$my_file" = "aclocal.m4"; then if { ( cd "$my_srcdir" && $TAR chf - "$my_file" ) 2>/dev/null \ | ( umask 0 && cd "$my_destdir" && $TAR xf - ) >/dev/null 2>&1 ; } @@ -337,14 +267,6 @@ func_copy_cb () copy_return_status=0 fi fi - else - if { ( cd "$my_srcdir" && $TAR chf - "$my_file" ) 2>/dev/null \ - | ( umask 0 && cd "$my_destdir" && $TAR xf - ) >/dev/null 2>&1; } \ - && touch "$my_destdir/$my_file"; then - $opt_quiet || func_echo_once "$my_msg_var" - $opt_quiet || func_echo "copying $my_copy_msg" - copy_return_status=0 - fi fi if test "$copy_return_status" != 0; then $opt_quiet || func_echo_once "$my_msg_var" @@ -1517,6 +1439,42 @@ func_check_macros () ## ----------- ## { + # Lists of all files libtoolize has ever installed. These are removed + # before installing the latest files when --force was passed to help + # ensure a clean upgrade. + # Do not remove config.guess nor config.sub, we don't install them + # without --install, and the project may not be using Automake. + all_pkgconfig_files="ltmain.sh" + all_pkgmacro_files="argz.m4 libtool.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 ltversion.in ltversion.m4 lt~obsolete.m4" + all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c" + + # Locations for important files: + prefix=@prefix@ + datadir=@datadir@ + pkgdatadir=@pkgdatadir@ + pkgltdldir=@pkgdatadir@ + aclocaldir=@aclocaldir@ + auxdir= + macrodir= + configure_ac=configure.in + + seen_autoconf=false + seen_libtool=false + seen_ltdl=false + + # test EBCDIC or ASCII + case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + SP2NL='tr \040 \012' + NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + SP2NL='tr \100 \n' + NL2SP='tr \r\n \100\100' + ;; + esac + # Allow the user to override the master libtoolize repository: if test -n "$_lt_pkgdatadir"; then pkgltdldir="$_lt_pkgdatadir" diff -ruNp libtool-2.2.10/tests/archive-in-archive.at libtool-2.4/tests/archive-in-archive.at --- libtool-2.2.10/tests/archive-in-archive.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/archive-in-archive.at 2010-09-16 10:09:15.000000000 +0700 @@ -1,6 +1,6 @@ # dmacks.at -- test for dmacks bug -*- Autotest -*- # -# Copyright (C) 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc. # Written by Peter O'Gorman, 2007 # # This file is part of GNU Libtool. @@ -26,6 +26,9 @@ AT_SETUP([static library contains static library]) AT_KEYWORDS([libtool]) +# This test passes with MS lib. +AT_XFAIL_IF([case $AR in ar-lib\ * | *[[/\\]]ar-lib\ *) false;; *) :;; esac]) + AT_DATA([foo.c], [ int foo() { return 1;} @@ -42,11 +45,15 @@ $LIBTOOL --mode=compile --tag=CC $CC $CP $LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \ -o libfoo.la foo.lo -version-info 1:0:0 -rpath $thisdir $LIBTOOL --mode=install cp libfoo.la $thisdir +eval `$EGREP '^(old_library)=' < libfoo.la` +libfoo=$old_library AT_CHECK([$LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \ - -o libbar.la bar.lo ./libfoo.a -version-info 1:0:0 -rpath $thisdir], + -o libbar.la bar.lo $libfoo -version-info 1:0:0 -rpath $thisdir], [], [ignore], [ignore]) AT_CHECK([$LIBTOOL --mode=install cp libbar.la $thisdir], [], [ignore], [ignore]) -AT_CHECK([ar -t libbar.a | grep libfoo.a],[1],[ignore],[ignore]) -archive_contents=`ar -t libbar.a` -AT_XFAIL_IF([case "$archive_contents" in *"libfoo.a"*) : ;; esac]) +eval `$EGREP '^(old_library)=' < libbar.la` +libbar=$old_library +AT_CHECK([$AR -t $libbar | grep $libfoo],[1],[ignore],[ignore]) +AT_CHECK([$AR -t $libbar | grep foo.$OBJEXT],[],[ignore],[ignore]) +AT_CHECK([$AR -t $libbar | grep bar.$OBJEXT],[],[ignore],[ignore]) AT_CLEANUP diff -ruNp libtool-2.2.10/tests/bindir.at libtool-2.4/tests/bindir.at --- libtool-2.2.10/tests/bindir.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/bindir.at 2010-09-01 12:09:12.000000000 +0700 @@ -198,6 +198,9 @@ case "$host_os" in ;; esac +eval "`$LIBTOOL --config | grep '^build_libtool_libs='`" +AT_CHECK([test "$build_libtool_libs" = yes || (exit 77)]) + #### # These routines save the PATH before a test and restore it after, # prepending a chosen directory to the path on the platforms where diff -ruNp libtool-2.2.10/tests/cdemo/Makefile.in libtool-2.4/tests/cdemo/Makefile.in --- libtool-2.2.10/tests/cdemo/Makefile.in 2010-06-09 20:05:58.000000000 +0700 +++ libtool-2.4/tests/cdemo/Makefile.in 2010-09-22 21:44:30.000000000 +0700 @@ -122,6 +122,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -147,6 +148,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -172,6 +174,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ diff -ruNp libtool-2.2.10/tests/cdemo/aclocal.m4 libtool-2.4/tests/cdemo/aclocal.m4 --- libtool-2.2.10/tests/cdemo/aclocal.m4 2010-06-09 20:05:56.000000000 +0700 +++ libtool-2.4/tests/cdemo/aclocal.m4 2010-09-22 21:44:29.000000000 +0700 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff -ruNp libtool-2.2.10/tests/cdemo/configure libtool-2.4/tests/cdemo/configure --- libtool-2.2.10/tests/cdemo/configure 2010-06-09 20:05:57.000000000 +0700 +++ libtool-2.4/tests/cdemo/configure 2010-09-22 21:44:29.000000000 +0700 @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for cdemo 1.0. +# Generated by GNU Autoconf 2.67 for cdemo 1.0. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -327,7 +327,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -367,19 +367,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -543,7 +543,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -616,8 +616,11 @@ OTOOL LIPO NMEDIT DSYMUTIL +MANIFEST_TOOL RANLIB +ac_ct_AR AR +DLLTOOL OBJDUMP LN_S NM @@ -723,6 +726,7 @@ enable_static with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias @@ -733,7 +737,8 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP' +CPP +CPPFLAGS' # Initialize some variables set by options. @@ -796,8 +801,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -842,7 +848,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -868,7 +874,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1072,7 +1078,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1088,7 +1094,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1118,8 +1124,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1127,7 +1133,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1145,13 +1151,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1174,7 +1180,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1188,8 +1194,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1204,9 +1210,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1245,11 +1251,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1289,7 +1295,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1367,6 +1373,8 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command @@ -1445,9 +1453,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF cdemo configure 1.0 -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1551,7 +1559,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1594,7 +1602,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1660,7 +1668,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1723,7 +1731,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by cdemo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -1833,11 +1841,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1871,11 +1877,9 @@ $as_echo "$as_me: WARNING: cache variabl ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1888,11 +1892,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -1906,11 +1908,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -1965,7 +1965,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -1980,7 +1985,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2056,7 +2065,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2072,16 +2081,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in ../../libltdl/config "$srcdir"/../../libltdl/config; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2204,11 +2219,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2230,7 +2245,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2240,7 +2255,7 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2478,7 +2493,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2486,7 +2501,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2520,7 +2535,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`" am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2881,8 +2896,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -2996,9 +3011,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3040,8 +3054,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3098,9 +3112,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3151,8 +3165,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3574,8 +3588,8 @@ esac -macro_version='2.2.10' -macro_revision='1.3175' +macro_version='2.4' +macro_revision='1.3293' @@ -3593,7 +3607,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -3604,16 +3618,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3638,7 +3652,7 @@ else ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3646,7 +3660,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3686,7 +3700,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -3788,7 +3802,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -3864,7 +3878,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -3930,7 +3944,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -3997,7 +4011,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -4113,7 +4127,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -4502,8 +4516,8 @@ $as_echo_n "checking whether the shell u # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -4552,6 +4566,80 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if test "${lt_cv_to_host_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : @@ -4568,6 +4656,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -4891,6 +4984,21 @@ esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -4906,9 +5014,163 @@ test -z "$deplibs_check_method" && depli + + + + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : @@ -4924,7 +5186,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4944,11 +5206,15 @@ $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : @@ -4964,7 +5230,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4983,6 +5249,10 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -4994,12 +5264,14 @@ ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + @@ -5007,6 +5279,60 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if test "${lt_cv_ar_at_file+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + @@ -5345,8 +5671,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -5382,6 +5708,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -5423,6 +5750,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -5434,7 +5773,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -5460,8 +5799,8 @@ static const void *lt_preloaded_setup() _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -5471,8 +5810,8 @@ _LT_EOF test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -5509,6 +5848,17 @@ else $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + @@ -5531,6 +5881,43 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -5679,50 +6066,167 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test "${lt_cv_path_mainfest_tool+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes fi - rm -rf conftest* - ;; -esac + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + -need_locks="$enable_libtool_lock" case $host_os in @@ -6383,7 +6887,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6399,11 +6903,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -6442,7 +6946,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6458,18 +6962,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -6598,8 +7102,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7139,8 +7642,6 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -7305,6 +7806,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -7424,13 +7931,17 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -7491,6 +8002,11 @@ fi + + + + + # # Check to make sure the static flag actually works. # @@ -7841,7 +8357,8 @@ _LT_EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -7889,7 +8406,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -7959,8 +8476,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -7978,8 +8495,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8025,8 +8542,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8156,7 +8673,13 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8169,22 +8692,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -8196,7 +8726,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8209,22 +8745,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -8269,20 +8812,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -8347,7 +8933,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -8355,7 +8941,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -8371,7 +8957,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -8395,10 +8981,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -8477,23 +9063,36 @@ fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -8578,7 +9177,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' @@ -8597,9 +9196,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -9175,8 +9774,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -9209,13 +9809,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -10151,10 +10809,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10257,10 +10915,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10714,6 +11372,7 @@ DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -10737,11 +11396,11 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -10891,19 +11550,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -11099,7 +11758,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -11153,7 +11812,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # values after options handling. ac_log=" This file was extended by cdemo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11210,10 +11869,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ cdemo config.status 1.0 -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -11231,11 +11890,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -11257,6 +11921,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -11267,7 +11932,7 @@ do ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -11349,13 +12014,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' @@ -11370,14 +12042,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' @@ -11410,12 +12085,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' @@ -11470,8 +12145,13 @@ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -11481,12 +12161,14 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -11502,7 +12184,6 @@ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -11538,6 +12219,7 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ @@ -11585,7 +12267,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -11622,7 +12304,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -11639,7 +12321,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -11653,18 +12335,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -11753,20 +12435,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -11784,7 +12474,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -11812,7 +12502,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -11839,7 +12529,7 @@ $as_echo "$as_me: creating $ac_file" >&6 case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -11976,22 +12666,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -12222,19 +12912,42 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -12264,6 +12977,12 @@ global_symbol_to_c_name_address=$lt_lt_c # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -12273,6 +12992,9 @@ MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -12387,12 +13109,12 @@ with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -12479,9 +13201,6 @@ inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -12497,6 +13216,9 @@ include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -12529,210 +13251,169 @@ ltmain="$ac_aux_dir/ltmain.sh" # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -12747,7 +13428,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -12768,7 +13449,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -ruNp libtool-2.2.10/tests/cdemo-shared-exec.test libtool-2.4/tests/cdemo-shared-exec.test --- libtool-2.2.10/tests/cdemo-shared-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/cdemo-shared-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/cdemo-exec.test diff -ruNp libtool-2.2.10/tests/cdemo-shared-make.test libtool-2.4/tests/cdemo-shared-make.test --- libtool-2.2.10/tests/cdemo-shared-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/cdemo-shared-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/cdemo-make.test diff -ruNp libtool-2.2.10/tests/cdemo-static-exec.test libtool-2.4/tests/cdemo-static-exec.test --- libtool-2.2.10/tests/cdemo-static-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/cdemo-static-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/cdemo-exec.test diff -ruNp libtool-2.2.10/tests/cdemo-static-make.test libtool-2.4/tests/cdemo-static-make.test --- libtool-2.2.10/tests/cdemo-static-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/cdemo-static-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/cdemo-make.test diff -ruNp libtool-2.2.10/tests/cdemo-undef-exec.test libtool-2.4/tests/cdemo-undef-exec.test --- libtool-2.2.10/tests/cdemo-undef-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/cdemo-undef-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/cdemo-exec.test diff -ruNp libtool-2.2.10/tests/cdemo-undef-make.test libtool-2.4/tests/cdemo-undef-make.test --- libtool-2.2.10/tests/cdemo-undef-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/cdemo-undef-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/cdemo-make.test diff -ruNp libtool-2.2.10/tests/convenience.at libtool-2.4/tests/convenience.at --- libtool-2.2.10/tests/convenience.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/convenience.at 2010-09-01 12:09:12.000000000 +0700 @@ -1,6 +1,7 @@ # convenience.at -- testing C convenience archives -*- Autotest -*- -# Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Ralf Wildenhues, 2005 # # This file is part of GNU Libtool. @@ -227,7 +228,7 @@ AT_CLEANUP AT_SETUP([Java convenience archives]) -LT_AT_TAG([GCJ]) +LT_AT_EXEC_TAG([GCJ]) AT_KEYWORDS([libtool]) cat >foo1.java < ./libtool LIBTOOL=./libtool - # make sure $debugwrapper_flags do not cause a failure + # Make sure $debugwrapper_flags do not cause a failure # themselves (e.g. because a non-gcc compiler doesn't - # understand them) - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c trivial.c || continue + # understand them). Tru64 cc only fails when linking. + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS trivial.c || continue AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c], [], [ignore], [ignore]) diff -ruNp libtool-2.2.10/tests/defs.in libtool-2.4/tests/defs.in --- libtool-2.2.10/tests/defs.in 2010-06-09 18:44:08.000000000 +0700 +++ libtool-2.4/tests/defs.in 2010-09-22 16:27:21.000000000 +0700 @@ -1,9 +1,9 @@ #! /bin/sh -# Generated from tests/defs.m4sh by GNU Autoconf 2.65. -# @configure_input@ +# Generated from tests/defs.m4sh by GNU Autoconf 2.67. + # defs -- Defines for Libtool testing environment. # -# Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 Free Software +# Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # Written by Gord Matzigkeit, 1996 # Rewritten by Gary V. Vaughan, 2003 @@ -309,6 +309,27 @@ IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: @@ -323,17 +344,31 @@ basename="s,^.*/,," # those functions but instead duplicate the functionality here. func_dirname_and_basename () { - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation -# Generated shell functions inserted here. # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' @@ -516,6 +551,15 @@ sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. @@ -544,7 +588,7 @@ opt_warning=: # name if it has been set yet. func_echo () { - $ECHO "$progname${mode+: }$mode: $*" + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... @@ -570,14 +614,14 @@ func_echo_all () # Echo program name prefixed message to standard error. func_error () { - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : @@ -796,6 +840,23 @@ func_show_eval_locale () fi } +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + @@ -812,15 +873,10 @@ if test -z "$DJGPP"; then CONFIG_SITE=/nonexistent fi -# How verbose should we be? Default is no test output. -# Setting VERBOSE=yes enables test output. -# Setting VERBOSE=debug also puts the shell in debug mode. +# How verbose should we be? Default is test output in log file. +# Setting VERBOSE=debug puts the shell in debug mode. opt_debug=: -test "${VERBOSE+set}" != "set" && VERBOSE=no case "$VERBOSE" in -NO | no | 0 | "") - exec > /dev/null 2>&1 - ;; DEBUG | debug ) opt_debug='set -x' $opt_debug @@ -828,7 +884,7 @@ DEBUG | debug ) esac if test -z "$srcdir"; then - srcdir=`$ECHO "$0" | $SED "$dirname"` + srcdir=`$ECHO "$0" | $SED "$dirname; s,/tests\$,,"` test "$srcdir" = "$0" && srcdir=. fi @@ -899,6 +955,7 @@ func_get_config "objext objdir CC host +host_os host_alias build build_alias" "$LIBTOOL --config" ": fatal" @@ -1114,12 +1171,26 @@ func_exec () } # Shared global variables for test scripts -prefix="./_inst" +prefix=./_inst-`echo "$0" | sed 's,.*/,,; s,-.*,,'` srcdir=`cd $srcdir && pwd` m4dir=$srcdir/libltdl/m4 auxdir=$srcdir/libltdl/config scripts="$auxdir/ltmain.m4sh $srcdir/libtoolize.m4sh" +# Unset some MAKE... variables that may cause $MAKE to act like a +# recursively invoked sub-make. Any $MAKE invocation in a test is +# conceptually an independent invocation. +unset MFLAGS MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO + +# On AIX, shared libraries remain loaded in memory after use if they +# are world-readable, until root issues slibclean. On NFS, this causes +# a testsuite rerun to fail to clean up test group directories. Avoid +# this with a suitable umask. Do not do this on other systems, for +# example HP-UX suffers unless shared libraries are mode 555. +case $host_os in +aix*) umask o-rwx ;; +esac + func_msg "Running $progname" # Local Variables: diff -ruNp libtool-2.2.10/tests/defs.m4sh libtool-2.4/tests/defs.m4sh --- libtool-2.2.10/tests/defs.m4sh 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/defs.m4sh 2010-09-16 10:09:16.000000000 +0700 @@ -1,8 +1,7 @@ -AS_INIT[]m4_divert_push([HEADER-COPYRIGHT])dnl -# @configure_input@ +AS_INIT[]m4_divert_push([HEADER-COPYRIGHT]) # defs -- Defines for Libtool testing environment. # -# Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 Free Software +# Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # Written by Gord Matzigkeit, 1996 # Rewritten by Gary V. Vaughan, 2003 @@ -43,15 +42,10 @@ if test -z "$DJGPP"; then CONFIG_SITE=/nonexistent fi -# How verbose should we be? Default is no test output. -# Setting VERBOSE=yes enables test output. -# Setting VERBOSE=debug also puts the shell in debug mode. +# How verbose should we be? Default is test output in log file. +# Setting VERBOSE=debug puts the shell in debug mode. opt_debug=: -test "${VERBOSE+set}" != "set" && VERBOSE=no case "$VERBOSE" in -NO | no | 0 | "") - exec > /dev/null 2>&1 - ;; DEBUG | debug ) opt_debug='set -x' $opt_debug @@ -59,7 +53,7 @@ DEBUG | debug ) esac if test -z "$srcdir"; then - srcdir=`$ECHO "$0" | $SED "$dirname"` + srcdir=`$ECHO "$0" | $SED "$dirname; s,/tests\$,,"` test "$srcdir" = "$0" && srcdir=. fi @@ -130,6 +124,7 @@ func_get_config "objext objdir CC host +host_os host_alias build build_alias" "$LIBTOOL --config" ": fatal" @@ -345,12 +340,26 @@ func_exec () } # Shared global variables for test scripts -prefix="./_inst" +prefix=./_inst-`echo "$0" | sed 's,.*/,,; s,-.*,,'` srcdir=`cd $srcdir && pwd` m4dir=$srcdir/libltdl/m4 auxdir=$srcdir/libltdl/config scripts="$auxdir/ltmain.m4sh $srcdir/libtoolize.m4sh" +# Unset some MAKE... variables that may cause $MAKE to act like a +# recursively invoked sub-make. Any $MAKE invocation in a test is +# conceptually an independent invocation. +unset MFLAGS MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO + +# On AIX, shared libraries remain loaded in memory after use if they +# are world-readable, until root issues slibclean. On NFS, this causes +# a testsuite rerun to fail to clean up test group directories. Avoid +# this with a suitable umask. Do not do this on other systems, for +# example HP-UX suffers unless shared libraries are mode 555. +case $host_os in +aix*) umask o-rwx ;; +esac + func_msg "Running $progname" # Local Variables: diff -ruNp libtool-2.2.10/tests/demo/Makefile.in libtool-2.4/tests/demo/Makefile.in --- libtool-2.2.10/tests/demo/Makefile.in 2010-06-09 20:06:03.000000000 +0700 +++ libtool-2.4/tests/demo/Makefile.in 2010-09-22 21:44:36.000000000 +0700 @@ -211,6 +211,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -237,6 +238,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ diff -ruNp libtool-2.2.10/tests/demo/aclocal.m4 libtool-2.4/tests/demo/aclocal.m4 --- libtool-2.2.10/tests/demo/aclocal.m4 2010-06-09 20:06:01.000000000 +0700 +++ libtool-2.4/tests/demo/aclocal.m4 2010-09-22 21:44:34.000000000 +0700 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff -ruNp libtool-2.2.10/tests/demo/configure libtool-2.4/tests/demo/configure --- libtool-2.2.10/tests/demo/configure 2010-06-09 20:06:02.000000000 +0700 +++ libtool-2.4/tests/demo/configure 2010-09-22 21:44:35.000000000 +0700 @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for demo 1.0. +# Generated by GNU Autoconf 2.67 for demo 1.0. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -327,7 +327,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -367,19 +367,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -543,7 +543,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -619,7 +619,9 @@ OTOOL LIPO NMEDIT DSYMUTIL +MANIFEST_TOOL RANLIB +ac_ct_AR AR LN_S NM @@ -728,6 +730,7 @@ enable_static with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias @@ -738,7 +741,8 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP' +CPP +CPPFLAGS' # Initialize some variables set by options. @@ -801,8 +805,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -847,7 +852,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -873,7 +878,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1077,7 +1082,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1093,7 +1098,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1123,8 +1128,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1132,7 +1137,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1150,13 +1155,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1179,7 +1184,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1193,8 +1198,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1209,9 +1214,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1250,11 +1255,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1294,7 +1299,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1372,6 +1377,8 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command @@ -1450,9 +1457,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF demo configure 1.0 -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1556,7 +1563,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1599,7 +1606,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1665,7 +1672,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1728,7 +1735,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by demo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -1838,11 +1845,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1876,11 +1881,9 @@ $as_echo "$as_me: WARNING: cache variabl ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1893,11 +1896,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -1911,11 +1912,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -1970,7 +1969,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -1985,7 +1989,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2061,7 +2069,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2077,16 +2085,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in ../../libltdl/config "$srcdir"/../../libltdl/config; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2209,11 +2223,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2235,7 +2249,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2245,7 +2259,7 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2483,7 +2497,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2491,7 +2505,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2525,7 +2539,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`" am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2886,8 +2900,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3001,9 +3015,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3045,8 +3058,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3103,9 +3116,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3156,8 +3169,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3579,8 +3592,8 @@ esac -macro_version='2.2.10' -macro_revision='1.3175' +macro_version='2.4' +macro_revision='1.3293' @@ -3598,7 +3611,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -3609,16 +3622,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3643,7 +3656,7 @@ else ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3651,7 +3664,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3691,7 +3704,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -3793,7 +3806,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -3869,7 +3882,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -3935,7 +3948,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4002,7 +4015,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -4118,7 +4131,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -4507,8 +4520,8 @@ $as_echo_n "checking whether the shell u # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -4557,6 +4570,80 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if test "${lt_cv_to_host_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : @@ -4573,6 +4660,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -4893,6 +4985,21 @@ esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -4908,9 +5015,160 @@ test -z "$deplibs_check_method" && depli + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : @@ -4926,7 +5184,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4946,11 +5204,15 @@ $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : @@ -4966,7 +5228,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4985,6 +5247,10 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -4996,16 +5262,72 @@ ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if test "${lt_cv_ar_at_file+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi @@ -5347,8 +5669,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -5384,6 +5706,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -5425,6 +5748,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -5436,7 +5771,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -5462,8 +5797,8 @@ static const void *lt_preloaded_setup() _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -5473,8 +5808,8 @@ _LT_EOF test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -5511,6 +5846,19 @@ else $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + @@ -5531,6 +5879,41 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + # Check whether --enable-libtool-lock was given. @@ -5681,50 +6064,167 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test "${lt_cv_path_mainfest_tool+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes fi - rm -rf conftest* - ;; -esac + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + -need_locks="$enable_libtool_lock" case $host_os in @@ -6385,7 +6885,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6401,11 +6901,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -6444,7 +6944,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6460,18 +6960,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -6600,8 +7100,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7438,8 +7937,6 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -7604,6 +8101,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -7723,13 +8226,17 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -7790,6 +8297,11 @@ fi + + + + + # # Check to make sure the static flag actually works. # @@ -8140,7 +8652,8 @@ _LT_EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -8188,7 +8701,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -8258,8 +8771,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -8277,8 +8790,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8324,8 +8837,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8455,7 +8968,13 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8468,22 +8987,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -8495,7 +9021,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8508,22 +9040,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -8568,20 +9107,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -8646,7 +9228,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -8654,7 +9236,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -8670,7 +9252,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -8694,10 +9276,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -8776,23 +9358,36 @@ fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -8877,7 +9472,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' @@ -8896,9 +9491,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -9474,8 +10069,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -9508,13 +10104,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -10450,10 +11104,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10556,10 +11210,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11029,6 +11683,7 @@ DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -11052,15 +11707,15 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BINARY_HELLDL_TRUE}" && test -z "${BINARY_HELLDL_FALSE}"; then - as_fn_error "conditional \"BINARY_HELLDL\" was never defined. + as_fn_error $? "conditional \"BINARY_HELLDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -11210,19 +11865,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -11418,7 +12073,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -11472,7 +12127,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # values after options handling. ac_log=" This file was extended by demo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11529,10 +12184,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ demo config.status 1.0 -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -11550,11 +12205,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -11576,6 +12236,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -11586,7 +12247,7 @@ do ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -11671,12 +12332,18 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' @@ -11691,14 +12358,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' @@ -11731,12 +12401,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' @@ -11793,8 +12463,12 @@ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -11804,12 +12478,14 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -11825,7 +12501,6 @@ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -11861,6 +12536,7 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ @@ -11908,7 +12584,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -11945,7 +12621,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -11962,7 +12638,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -11976,18 +12652,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -12076,20 +12752,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -12107,7 +12791,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -12135,7 +12819,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -12162,7 +12846,7 @@ $as_echo "$as_me: creating $ac_file" >&6 case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -12299,22 +12983,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -12554,16 +13238,36 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -12593,6 +13297,12 @@ global_symbol_to_c_name_address=$lt_lt_c # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -12602,6 +13312,9 @@ MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -12716,12 +13429,12 @@ with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -12808,9 +13521,6 @@ inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -12826,6 +13536,9 @@ include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -12858,210 +13571,169 @@ ltmain="$ac_aux_dir/ltmain.sh" # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -13076,7 +13748,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -13097,7 +13769,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -ruNp libtool-2.2.10/tests/demo/dlmain.c libtool-2.4/tests/demo/dlmain.c --- libtool-2.2.10/tests/demo/dlmain.c 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/demo/dlmain.c 2010-09-01 13:02:45.000000000 +0700 @@ -34,7 +34,7 @@ typedef struct lt_ptr_t address; } lt_dlsymlist; -extern const lt_dlsymlist lt_preloaded_symbols[]; +extern LT_DLSYM_CONST lt_dlsymlist lt_preloaded_symbols[]; int main () diff -ruNp libtool-2.2.10/tests/demo/foo.h libtool-2.4/tests/demo/foo.h --- libtool-2.2.10/tests/demo/foo.h 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/demo/foo.h 2010-09-01 13:02:45.000000000 +0700 @@ -1,6 +1,6 @@ /* foo.h -- interface to the libfoo library - Copyright (C) 1996-1999 Free Software Foundation, Inc. + Copyright (C) 1996-1999, 2010 Free Software Foundation, Inc. Written by Gord Matzigkeit, 1996 This file is part of GNU Libtool. @@ -62,6 +62,18 @@ or obtained by writing to the Free Softw # define lt_ptr_t char* #endif +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + /* Silly constants that the functions return. */ #define HELLO_RET 0xe110 #define FOO_RET 0xf00 diff -ruNp libtool-2.2.10/tests/demo-nofast-exec.test libtool-2.4/tests/demo-nofast-exec.test --- libtool-2.2.10/tests/demo-nofast-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-nofast-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-exec.test diff -ruNp libtool-2.2.10/tests/demo-nofast-inst.test libtool-2.4/tests/demo-nofast-inst.test --- libtool-2.2.10/tests/demo-nofast-inst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-nofast-inst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-inst.test diff -ruNp libtool-2.2.10/tests/demo-nofast-make.test libtool-2.4/tests/demo-nofast-make.test --- libtool-2.2.10/tests/demo-nofast-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-nofast-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-make.test diff -ruNp libtool-2.2.10/tests/demo-nofast-unst.test libtool-2.4/tests/demo-nofast-unst.test --- libtool-2.2.10/tests/demo-nofast-unst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-nofast-unst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-unst.test diff -ruNp libtool-2.2.10/tests/demo-nopic-exec.test libtool-2.4/tests/demo-nopic-exec.test --- libtool-2.2.10/tests/demo-nopic-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-nopic-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-exec.test diff -ruNp libtool-2.2.10/tests/demo-nopic-make.test libtool-2.4/tests/demo-nopic-make.test --- libtool-2.2.10/tests/demo-nopic-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-nopic-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-make.test diff -ruNp libtool-2.2.10/tests/demo-nopic.test libtool-2.4/tests/demo-nopic.test --- libtool-2.2.10/tests/demo-nopic.test 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/demo-nopic.test 2010-09-01 12:09:12.000000000 +0700 @@ -1,7 +1,7 @@ #! /bin/sh # demo-nopic.test - try configuring the ../demo subdirectory # -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2010 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2003 # # This file is part of GNU Libtool. @@ -34,6 +34,20 @@ hppa*|x86_64*|s390*) ;; esac +if test "$build" = "$host" && test -d "/etc/selinux"; then + _selinux=`getenforce 2>/dev/null || echo "Disabled"` + case "${_selinux}" in + *Enforcing) + _sebool_allow_execmod=`getsebool allow_execmod 2>/dev/null` + case "${_sebool_allow_execmod}" in + *off) + func_skip "SELinux policy disallows" + ;; + esac + ;; + esac +fi + func_rmprefixdir func_cd "tests/demo" func_make_distclean diff -ruNp libtool-2.2.10/tests/demo-pic-exec.test libtool-2.4/tests/demo-pic-exec.test --- libtool-2.2.10/tests/demo-pic-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-pic-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-exec.test diff -ruNp libtool-2.2.10/tests/demo-pic-make.test libtool-2.4/tests/demo-pic-make.test --- libtool-2.2.10/tests/demo-pic-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-pic-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-make.test diff -ruNp libtool-2.2.10/tests/demo-shared-exec.test libtool-2.4/tests/demo-shared-exec.test --- libtool-2.2.10/tests/demo-shared-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-shared-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-exec.test diff -ruNp libtool-2.2.10/tests/demo-shared-inst.test libtool-2.4/tests/demo-shared-inst.test --- libtool-2.2.10/tests/demo-shared-inst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-shared-inst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-inst.test diff -ruNp libtool-2.2.10/tests/demo-shared-make.test libtool-2.4/tests/demo-shared-make.test --- libtool-2.2.10/tests/demo-shared-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-shared-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-make.test diff -ruNp libtool-2.2.10/tests/demo-shared-unst.test libtool-2.4/tests/demo-shared-unst.test --- libtool-2.2.10/tests/demo-shared-unst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-shared-unst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-unst.test diff -ruNp libtool-2.2.10/tests/demo-static-exec.test libtool-2.4/tests/demo-static-exec.test --- libtool-2.2.10/tests/demo-static-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-static-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-exec.test diff -ruNp libtool-2.2.10/tests/demo-static-inst.test libtool-2.4/tests/demo-static-inst.test --- libtool-2.2.10/tests/demo-static-inst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-static-inst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-inst.test diff -ruNp libtool-2.2.10/tests/demo-static-make.test libtool-2.4/tests/demo-static-make.test --- libtool-2.2.10/tests/demo-static-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-static-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-make.test diff -ruNp libtool-2.2.10/tests/demo-static-unst.test libtool-2.4/tests/demo-static-unst.test --- libtool-2.2.10/tests/demo-static-unst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/demo-static-unst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/demo-unst.test diff -ruNp libtool-2.2.10/tests/depdemo/Makefile.in libtool-2.4/tests/depdemo/Makefile.in --- libtool-2.2.10/tests/depdemo/Makefile.in 2010-06-09 20:06:08.000000000 +0700 +++ libtool-2.4/tests/depdemo/Makefile.in 2010-09-22 21:44:42.000000000 +0700 @@ -181,6 +181,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -207,6 +208,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ diff -ruNp libtool-2.2.10/tests/depdemo/aclocal.m4 libtool-2.4/tests/depdemo/aclocal.m4 --- libtool-2.2.10/tests/depdemo/aclocal.m4 2010-06-09 20:06:07.000000000 +0700 +++ libtool-2.4/tests/depdemo/aclocal.m4 2010-09-22 21:44:40.000000000 +0700 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff -ruNp libtool-2.2.10/tests/depdemo/configure libtool-2.4/tests/depdemo/configure --- libtool-2.2.10/tests/depdemo/configure 2010-06-09 20:06:07.000000000 +0700 +++ libtool-2.4/tests/depdemo/configure 2010-09-22 21:44:41.000000000 +0700 @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for depdemo 1.0. +# Generated by GNU Autoconf 2.67 for depdemo 1.0. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -327,7 +327,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -367,19 +367,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -543,7 +543,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -617,7 +617,9 @@ OTOOL LIPO NMEDIT DSYMUTIL +MANIFEST_TOOL RANLIB +ac_ct_AR AR LN_S NM @@ -726,6 +728,7 @@ enable_static with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias @@ -736,7 +739,8 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP' +CPP +CPPFLAGS' # Initialize some variables set by options. @@ -799,8 +803,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -845,7 +850,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -871,7 +876,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1075,7 +1080,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1091,7 +1096,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1121,8 +1126,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1130,7 +1135,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1148,13 +1153,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1177,7 +1182,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1191,8 +1196,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1207,9 +1212,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1248,11 +1253,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1292,7 +1297,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1370,6 +1375,8 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command @@ -1448,9 +1455,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF depdemo configure 1.0 -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1554,7 +1561,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1597,7 +1604,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1663,7 +1670,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1726,7 +1733,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by depdemo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -1836,11 +1843,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1874,11 +1879,9 @@ $as_echo "$as_me: WARNING: cache variabl ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1891,11 +1894,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -1909,11 +1910,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -1968,7 +1967,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -1983,7 +1987,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2059,7 +2067,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2075,16 +2083,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in ../../libltdl/config "$srcdir"/../../libltdl/config; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2207,11 +2221,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2233,7 +2247,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2243,7 +2257,7 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2481,7 +2495,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2489,7 +2503,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2523,7 +2537,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`" am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2884,8 +2898,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -2999,9 +3013,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3043,8 +3056,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3101,9 +3114,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3154,8 +3167,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3576,8 +3589,8 @@ esac -macro_version='2.2.10' -macro_revision='1.3175' +macro_version='2.4' +macro_revision='1.3293' @@ -3595,7 +3608,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -3606,16 +3619,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3640,7 +3653,7 @@ else ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3648,7 +3661,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3688,7 +3701,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -3790,7 +3803,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -3866,7 +3879,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -3932,7 +3945,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -3999,7 +4012,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -4115,7 +4128,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -4504,8 +4517,8 @@ $as_echo_n "checking whether the shell u # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -4554,6 +4567,80 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if test "${lt_cv_to_host_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : @@ -4570,6 +4657,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -4890,6 +4982,21 @@ esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -4905,9 +5012,160 @@ test -z "$deplibs_check_method" && depli + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : @@ -4923,7 +5181,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4943,11 +5201,15 @@ $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : @@ -4963,7 +5225,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4982,6 +5244,10 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -4993,16 +5259,72 @@ ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if test "${lt_cv_ar_at_file+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi @@ -5344,8 +5666,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -5381,6 +5703,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -5422,6 +5745,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -5433,7 +5768,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -5459,8 +5794,8 @@ static const void *lt_preloaded_setup() _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -5470,8 +5805,8 @@ _LT_EOF test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -5508,6 +5843,19 @@ else $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + @@ -5528,6 +5876,41 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + # Check whether --enable-libtool-lock was given. @@ -5678,50 +6061,167 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test "${lt_cv_path_mainfest_tool+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes fi - rm -rf conftest* - ;; -esac + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + -need_locks="$enable_libtool_lock" case $host_os in @@ -6382,7 +6882,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6398,11 +6898,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -6441,7 +6941,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6457,18 +6957,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -6597,8 +7097,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7436,8 +7935,6 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -7602,6 +8099,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -7721,13 +8224,17 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -7788,6 +8295,11 @@ fi + + + + + # # Check to make sure the static flag actually works. # @@ -8138,7 +8650,8 @@ _LT_EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -8186,7 +8699,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -8256,8 +8769,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -8275,8 +8788,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8322,8 +8835,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8453,7 +8966,13 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8466,22 +8985,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -8493,7 +9019,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8506,22 +9038,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -8566,20 +9105,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -8644,7 +9226,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -8652,7 +9234,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -8668,7 +9250,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -8692,10 +9274,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -8774,23 +9356,36 @@ fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -8875,7 +9470,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' @@ -8894,9 +9489,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -9472,8 +10067,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -9506,13 +10102,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -10448,10 +11102,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10554,10 +11208,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11016,6 +11670,7 @@ DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -11039,11 +11694,11 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -11193,19 +11848,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -11401,7 +12056,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -11455,7 +12110,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # values after options handling. ac_log=" This file was extended by depdemo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11512,10 +12167,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ depdemo config.status 1.0 -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -11533,11 +12188,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -11559,6 +12219,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -11569,7 +12230,7 @@ do ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -11654,12 +12315,18 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' @@ -11674,14 +12341,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' @@ -11714,12 +12384,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' @@ -11776,8 +12446,12 @@ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -11787,12 +12461,14 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -11808,7 +12484,6 @@ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -11844,6 +12519,7 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ @@ -11895,7 +12571,7 @@ do "l3/Makefile") CONFIG_FILES="$CONFIG_FILES l3/Makefile" ;; "l4/Makefile") CONFIG_FILES="$CONFIG_FILES l4/Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -11932,7 +12608,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -11949,7 +12625,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -11963,18 +12639,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -12063,20 +12739,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -12094,7 +12778,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -12122,7 +12806,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -12149,7 +12833,7 @@ $as_echo "$as_me: creating $ac_file" >&6 case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -12286,22 +12970,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -12541,16 +13225,36 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -12580,6 +13284,12 @@ global_symbol_to_c_name_address=$lt_lt_c # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -12589,6 +13299,9 @@ MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -12703,12 +13416,12 @@ with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -12795,9 +13508,6 @@ inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -12813,6 +13523,9 @@ include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -12845,210 +13558,169 @@ ltmain="$ac_aux_dir/ltmain.sh" # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -13063,7 +13735,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -13084,7 +13756,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -ruNp libtool-2.2.10/tests/depdemo/l1/Makefile.in libtool-2.4/tests/depdemo/l1/Makefile.in --- libtool-2.2.10/tests/depdemo/l1/Makefile.in 2010-06-09 20:06:08.000000000 +0700 +++ libtool-2.4/tests/depdemo/l1/Makefile.in 2010-09-22 21:44:41.000000000 +0700 @@ -138,6 +138,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -164,6 +165,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ diff -ruNp libtool-2.2.10/tests/depdemo/l2/Makefile.in libtool-2.4/tests/depdemo/l2/Makefile.in --- libtool-2.2.10/tests/depdemo/l2/Makefile.in 2010-06-09 20:06:08.000000000 +0700 +++ libtool-2.4/tests/depdemo/l2/Makefile.in 2010-09-22 21:44:41.000000000 +0700 @@ -138,6 +138,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -164,6 +165,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ diff -ruNp libtool-2.2.10/tests/depdemo/l3/Makefile.in libtool-2.4/tests/depdemo/l3/Makefile.in --- libtool-2.2.10/tests/depdemo/l3/Makefile.in 2010-06-09 20:06:08.000000000 +0700 +++ libtool-2.4/tests/depdemo/l3/Makefile.in 2010-09-22 21:44:41.000000000 +0700 @@ -139,6 +139,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -165,6 +166,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ diff -ruNp libtool-2.2.10/tests/depdemo/l4/Makefile.in libtool-2.4/tests/depdemo/l4/Makefile.in --- libtool-2.2.10/tests/depdemo/l4/Makefile.in 2010-06-09 20:06:08.000000000 +0700 +++ libtool-2.4/tests/depdemo/l4/Makefile.in 2010-09-22 21:44:41.000000000 +0700 @@ -140,6 +140,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -166,6 +167,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ diff -ruNp libtool-2.2.10/tests/depdemo-nofast-exec.test libtool-2.4/tests/depdemo-nofast-exec.test --- libtool-2.2.10/tests/depdemo-nofast-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/depdemo-nofast-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/depdemo-exec.test diff -ruNp libtool-2.2.10/tests/depdemo-nofast-inst.test libtool-2.4/tests/depdemo-nofast-inst.test --- libtool-2.2.10/tests/depdemo-nofast-inst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/depdemo-nofast-inst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/depdemo-inst.test diff -ruNp libtool-2.2.10/tests/depdemo-nofast-make.test libtool-2.4/tests/depdemo-nofast-make.test --- libtool-2.2.10/tests/depdemo-nofast-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/depdemo-nofast-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/depdemo-make.test diff -ruNp libtool-2.2.10/tests/depdemo-nofast-unst.test libtool-2.4/tests/depdemo-nofast-unst.test --- libtool-2.2.10/tests/depdemo-nofast-unst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/depdemo-nofast-unst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/depdemo-unst.test diff -ruNp libtool-2.2.10/tests/depdemo-shared-exec.test libtool-2.4/tests/depdemo-shared-exec.test --- libtool-2.2.10/tests/depdemo-shared-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/depdemo-shared-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/depdemo-exec.test diff -ruNp libtool-2.2.10/tests/depdemo-shared-inst.test libtool-2.4/tests/depdemo-shared-inst.test --- libtool-2.2.10/tests/depdemo-shared-inst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/depdemo-shared-inst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/depdemo-inst.test diff -ruNp libtool-2.2.10/tests/depdemo-shared-make.test libtool-2.4/tests/depdemo-shared-make.test --- libtool-2.2.10/tests/depdemo-shared-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/depdemo-shared-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/depdemo-make.test diff -ruNp libtool-2.2.10/tests/depdemo-shared-unst.test libtool-2.4/tests/depdemo-shared-unst.test --- libtool-2.2.10/tests/depdemo-shared-unst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/depdemo-shared-unst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/depdemo-unst.test diff -ruNp libtool-2.2.10/tests/depdemo-static-exec.test libtool-2.4/tests/depdemo-static-exec.test --- libtool-2.2.10/tests/depdemo-static-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/depdemo-static-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/depdemo-exec.test diff -ruNp libtool-2.2.10/tests/depdemo-static-inst.test libtool-2.4/tests/depdemo-static-inst.test --- libtool-2.2.10/tests/depdemo-static-inst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/depdemo-static-inst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/depdemo-inst.test diff -ruNp libtool-2.2.10/tests/depdemo-static-make.test libtool-2.4/tests/depdemo-static-make.test --- libtool-2.2.10/tests/depdemo-static-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/depdemo-static-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/depdemo-make.test diff -ruNp libtool-2.2.10/tests/depdemo-static-unst.test libtool-2.4/tests/depdemo-static-unst.test --- libtool-2.2.10/tests/depdemo-static-unst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/depdemo-static-unst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/depdemo-unst.test diff -ruNp libtool-2.2.10/tests/deplibs-mingw.at libtool-2.4/tests/deplibs-mingw.at --- libtool-2.2.10/tests/deplibs-mingw.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/deplibs-mingw.at 2010-09-01 13:02:45.000000000 +0700 @@ -74,8 +74,9 @@ EOF chmod +x bin/file PATH=`pwd`/bin${PATH_SEPARATOR-:}$PATH cd new-libtool - AT_CHECK(["$abs_top_srcdir"/configure $configure_options || exit 77], - [], [ignore], [ignore]) + # configure might fail due to in-tree build of toplevel, or + # missing configure flags and other reasons. + LT_AT_CONFIGURE([|| exit 77], ["$abs_top_srcdir"/configure]) cd .. LIBTOOL=new-libtool/libtool export LIBTOOL diff -ruNp libtool-2.2.10/tests/dlloader-api.at libtool-2.4/tests/dlloader-api.at --- libtool-2.2.10/tests/dlloader-api.at 2010-05-21 04:19:02.000000000 +0700 +++ libtool-2.4/tests/dlloader-api.at 2010-09-01 13:02:45.000000000 +0700 @@ -45,7 +45,11 @@ first_open (lt_user_data data, const cha static const char *first_module = "first"; const char *ctx = (const char *) data; - if (!filename || strcmp (filename, "first")) + /* Use a magic string to avoid possible interactions with filesystem + * objects. Prepend '/' to short-circuit libltdl's search of + * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar). + */ + if (!filename || strcmp (filename, "/libltdl_dlloader_api_test_first")) { printf ("first_open denies a request\n"); lt_dlseterror (LT_ERROR_FILE_NOT_FOUND); @@ -111,7 +115,11 @@ last_open (lt_user_data data, const char static const char *last_module = "last"; const char *ctx = (const char *) data; - if (!filename || strcmp (filename, "last")) + /* Use a magic string to avoid possible interactions with filesystem + * objects. Prepend '/' to short-circuit libltdl's search of + * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar). + */ + if (!filename || strcmp (filename, "/libltdl_dlloader_api_test_last")) { printf ("last_open denies a request\n"); lt_dlseterror (LT_ERROR_FILE_NOT_FOUND); @@ -269,7 +277,11 @@ main (int argc, char* argv[]) printf ("Found loader \"%s\"\n", finder->name); - module = lt_dlopen ("first"); + /* Use a magic string to avoid possible interactions with filesystem + * objects. Prepend '/' to short-circuit libltdl's search of + * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar). + */ + module = lt_dlopen ("/libltdl_dlloader_api_test_first"); if (!module) { @@ -311,7 +323,12 @@ main (int argc, char* argv[]) printf ("result: %s\n", symbol ()); lt_dlclose (module); - module = lt_dlopen ("last"); + + /* Use a magic string to avoid possible interactions with filesystem + * objects. Prepend '/' to short-circuit libltdl's search of + * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar). + */ + module = lt_dlopen ("/libltdl_dlloader_api_test_last"); if (!module) { @@ -375,14 +392,14 @@ LT_AT_HOST_DATA(expout, Found loader "first" last_init: last_ctx Found loader "last" -first_open ("first"): first_ctx +first_open ("/libltdl_dlloader_api_test_first"): first_ctx first_sym (first): first_ctx result: first_symbol first_close (first): first_ctx first_open denies a request result: module_symbol first_open denies a request -last_open ("last"): last_ctx +last_open ("/libltdl_dlloader_api_test_last"): last_ctx last_sym (last): last_ctx result: last_symbol first_open denies a request diff -ruNp libtool-2.2.10/tests/duplicate_conv.at libtool-2.4/tests/duplicate_conv.at --- libtool-2.2.10/tests/duplicate_conv.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/duplicate_conv.at 2010-09-22 15:41:19.000000000 +0700 @@ -25,6 +25,8 @@ AT_SETUP([duplicate convenience archive names]) AT_KEYWORDS([libtool]) +eval `$LIBTOOL --config | sed -n '/^reload_cmds=/,/^$/p'` + # We create two convenience archives with the same name, and _also_ # containing an object with the same name. This is necessary to detect # the failure with both 1.5.22 and HEAD, since the latter does not (did @@ -75,6 +77,8 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLA LT_AT_EXEC_CHECK([./main],[0],[ignore],[ignore]) $LIBTOOL --mode=clean rm -f libcee.la +AT_CHECK([test "x$reload_cmds" = xfalse && exit 77], [1]) + # Test whether this works with reloadable objects as well. AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la], [0], [ignore], [ignore]) diff -ruNp libtool-2.2.10/tests/exceptions.at libtool-2.4/tests/exceptions.at --- libtool-2.2.10/tests/exceptions.at 2010-05-21 04:19:02.000000000 +0700 +++ libtool-2.4/tests/exceptions.at 2010-09-21 14:07:22.000000000 +0700 @@ -36,10 +36,65 @@ esac], [], [ignore]) CPPFLAGS="$LTDLINCL $CPPFLAGS" -AT_DATA([module.h], -[[#include +# Win32 (and cygwin) notes +# ------------------------ +# When using C++ and Win32 DLLs, data types used in the DLL's interface +# which are other-than-POD, must have vtables, typeinfo, and other +# elements resolved when the client is linked. This includes exception +# classes. Therefore, the exception class "modexc" thrown by the +# dynamically-loaded module must be defined in a separate DLL, to which +# both that module and main must be directly linked; hence, the 'common' +# library. Not using a 'common' library in this manner represents an +# ODR violation, unless the platform's runtime loader is capable of +# rationalizing vague linkage items such as vtables, typeinfo, and +# typename elements) at runtime. The Win32 loader is not capable of +# this, but some ELF loaders appear to be. +# +# Similar treatment is not necessary for liba (e.g. the libexc +# exception class), because that library is not dynamically loaded. As a +# consequence, vague linkage items for the class libexc are resolved at +# link time using the vague linkage rules, for both Win32 and other +# (e.g. ELF) platforms. +# +# Also, when linking a C++ DLL with another C++ DLL, some versions of +# the GNU toolchain on Win32 (or cygwin) mistakenly re-export symbols +# that were imported from the other DLL, when the client DLL is linked +# using -export-all-symbols. Similar issues MAY also arise with those +# versions of the GNU toolchain if using the libtool link flags +# -export-symbols LIST or -export-symbols-regex REGEX, if any symbols +# from the dependency, rather than client, library are listed (or match +# the regex). However, in this test, none of these situations apply, +# so we don't directly address it. Otherwise, the correct mechanism +# would be to avoid all of those flags, and instead explicitly decorate +# all symbols with appropriate __declspec (dllexport) or +# __declspec (dllimport) flags when building the DLLs and the clients. +# +# For more information, see these two threads: +# http://lists.gnu.org/archive/html/bug-libtool/2010-06/msg00069.html +# http://cygwin.com/ml/cygwin/2010-06/msg00392.html +# To sum up: C++ is complicated. +AT_DATA([common.h], +[[#ifndef LIBTOOL_TEST_COMMON_HEADER +#define LIBTOOL_TEST_COMMON_HEADER + +#include #include -class modexc : public std::exception { + +#if defined(__CYGWIN__) || defined(_WIN32) +# if defined(DLL_EXPORT) || defined(USING_COMMON_DLL) +# if defined(LIBTOOL_TEST_IN_COMMON) +# define COMMON_IMPEXP __declspec (dllexport) +# else +# define COMMON_IMPEXP __declspec (dllimport) +# endif +# else +# define COMMON_IMPEXP +# endif +#else +# define COMMON_IMPEXP +#endif + +class COMMON_IMPEXP modexc : public std::exception { public: modexc (std::string str) : message (str) { } ~modexc () throw () { } @@ -50,11 +105,45 @@ public: private: std::string message; }; -extern "C" int modfoo () throw (modexc); + +extern "C" int COMMON_IMPEXP common_dummy (void); +#endif +]]) + +AT_DATA([common.cpp], +[[#define LIBTOOL_TEST_IN_COMMON +#include "common.h" + +extern "C" +int common_dummy (void) +{ + return 0; +} +]]) + +AT_DATA([module.h], +[[#include "common.h" + +#if defined(__CYGWIN__) || defined(_WIN32) +# if defined(DLL_EXPORT) || defined(USING_MODULE_DLL) +# if defined(LIBTOOL_TEST_IN_MODULE) +# define MODULE_IMPEXP __declspec (dllexport) +# else +# define MODULE_IMPEXP __declspec (dllimport) +# endif +# else +# define MODULE_IMPEXP +# endif +#else +# define MODULE_IMPEXP +#endif + +extern "C" int MODULE_IMPEXP modfoo () throw (modexc); ]]) AT_DATA([module.cpp], [[#include +#define LIBTOOL_TEST_IN_MODULE #include "module.h" int modbar (void) throw (modexc) @@ -79,7 +168,23 @@ int modfoo (void) throw (modexc) AT_DATA([lib.h], [[#include #include -class libexc : public std::exception { + + +#if defined(__CYGWIN__) || defined(_WIN32) +# if defined(DLL_EXPORT) || defined(USING_LIB_DLL) +# if defined(LIBTOOL_TEST_IN_LIB) +# define LIB_IMPEXP __declspec (dllexport) +# else +# define LIB_IMPEXP __declspec (dllimport) +# endif +# else +# define LIB_IMPEXP +# endif +#else +# define LIB_IMPEXP +#endif + +class LIB_IMPEXP libexc : public std::exception { public: libexc (std::string str) : message (str) { } ~libexc () throw () { } @@ -90,11 +195,12 @@ public: private: std::string message; }; -int libfoo () throw (libexc); +int LIB_IMPEXP libfoo () throw (libexc); ]]) AT_DATA([lib.cpp], [[#include +#define LIBTOOL_TEST_IN_LIB #include "lib.h" int libbar (void) throw (libexc) @@ -121,6 +227,7 @@ AT_DATA([main.cpp], #include #include #include +#include "common.h" #include "lib.h" #include "module.h" @@ -202,11 +309,18 @@ int exceptions_in_module (void) return 1; } + bool exception_caught = false; try { (*pf) (); } catch (modexc e) { std::cerr << "caught: " << e.what () << '\n'; + exception_caught = true; + } + + /* Only close the module after all of its objects have gone out of scope. */ + if (exception_caught) + { if (lt_dlclose (handle)) { std::cerr << "dlclose failed: " << lt_dlerror () << '\n'; @@ -224,6 +338,9 @@ int exceptions_in_module (void) int main (void) { + + LTDL_SET_PRELOADED_SYMBOLS(); + if (exceptions_in_prog ()) return 1; if (exceptions_in_lib ()) @@ -241,26 +358,34 @@ moddir=$inst/mod mkdir l m $inst $libdir $bindir $moddir # If the C++ compiler isn't capable, don't bother. -AT_CHECK([$CXX $CPPFLAGS $CXXFLAGS -c main.cpp || exit 77], [], [ignore], [ignore]) +AT_CHECK([$CXX $CPPFLAGS $CXXFLAGS -DUSING_COMMON_DLL -DUSING_MODULE_DLL -DUSING_LIB_DLL -c main.cpp || exit 77], [], [ignore], [ignore]) -for file in lib.cpp module.cpp; do - AT_CHECK([$LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c $file], +AT_CHECK([$LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c common.cpp], + [], [ignore], [ignore]) +AT_CHECK([$LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c lib.cpp], [], [ignore], [ignore]) -done +AT_CHECK([$LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -DUSING_COMMON_DLL -c module.cpp], + [], [ignore], [ignore]) + +AT_CHECK([$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/libcommon.la ]dnl + [common.lo -no-undefined -version-info 1:0:0 -rpath $libdir], + [], [ignore], [ignore]) AT_CHECK([$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/liba.la ]dnl [lib.lo -no-undefined -version-info 1:0:0 -rpath $libdir], [], [ignore], [ignore]) AT_CHECK([$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o m/module.la ]dnl - [module.lo -module -avoid-version -no-undefined -rpath $moddir], + [module.lo l/libcommon.la -module -avoid-version -no-undefined -rpath $moddir], [], [ignore], [ignore]) # We need -export-dynamic for the exception handling in modules to work. AT_CHECK([$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT ]dnl - [main.$OBJEXT l/liba.la -dlopen m/module.la $LIBLTDL -export-dynamic], + [main.$OBJEXT l/liba.la l/libcommon.la -dlopen m/module.la $LIBLTDL -export-dynamic], [], [ignore], [ignore]) LT_AT_NOINST_EXEC_CHECK([./main], [-dlopen m/module.la], [], [ignore], [ignore]) +AT_CHECK([$LIBTOOL --mode=install cp l/libcommon.la $libdir], + [], [ignore], [ignore]) AT_CHECK([$LIBTOOL --mode=install cp l/liba.la $libdir], [], [ignore], [ignore]) AT_CHECK([$LIBTOOL --mode=install cp m/module.la $moddir], diff -ruNp libtool-2.2.10/tests/execute-mode.at libtool-2.4/tests/execute-mode.at --- libtool-2.2.10/tests/execute-mode.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/execute-mode.at 2010-09-01 12:09:12.000000000 +0700 @@ -1,6 +1,6 @@ # execute-mode.at -- libtool --mode=execute -*- Autotest -*- # -# Copyright (C) 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. # Written by Ralf Wildenhues, 2008 # # This file is part of GNU Libtool. @@ -193,19 +193,19 @@ do fi AT_CHECK([$LIBTOOL --mode=execute ./foo abc "$arg1" "$arg2" xyz], [], [stdout], [ignore]) AT_CHECK([$FGREP "$arg1" stdout], [], [ignore]) - AT_CHECK([$FGREP "$arg2" stdout], [], [ignore]) + AT_CHECK([test -z "$arg2" || $FGREP "$arg2" stdout], [], [ignore]) AT_CHECK([test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4]) AT_CHECK([$LIBTOOL --mode=execute ./lt-wrapper abc "$arg1" "$arg2" xyz . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -327,7 +327,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -367,19 +367,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -543,7 +543,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -615,8 +615,11 @@ OTOOL LIPO NMEDIT DSYMUTIL +MANIFEST_TOOL RANLIB +ac_ct_AR AR +DLLTOOL OBJDUMP LN_S NM @@ -727,6 +730,7 @@ enable_static with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias @@ -739,7 +743,10 @@ LIBS CPPFLAGS F77 FFLAGS -CPP' +LDFLAGS +LIBS +CPP +CPPFLAGS' # Initialize some variables set by options. @@ -802,8 +809,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -848,7 +856,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -874,7 +882,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1078,7 +1086,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1094,7 +1102,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1124,8 +1132,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1133,7 +1141,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1151,13 +1159,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1180,7 +1188,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1194,8 +1202,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1210,9 +1218,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1251,11 +1259,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1295,7 +1303,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1374,6 +1382,8 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command @@ -1454,9 +1464,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF f77demo configure 1.0 -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1598,7 +1608,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1641,7 +1651,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1707,7 +1717,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1824,7 +1834,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by f77demo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -1934,11 +1944,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1972,11 +1980,9 @@ $as_echo "$as_me: WARNING: cache variabl ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1989,11 +1995,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2007,11 +2011,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2066,7 +2068,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2081,7 +2088,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2157,7 +2168,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2175,16 +2186,22 @@ ac_config_headers="$ac_config_headers co ac_aux_dir= for ac_dir in ../../libltdl/config "$srcdir"/../../libltdl/config; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2313,11 +2330,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2339,7 +2356,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2349,7 +2366,7 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2587,7 +2604,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2595,7 +2612,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2629,7 +2646,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`" am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2990,8 +3007,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3105,9 +3122,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3149,8 +3165,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3207,9 +3223,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3260,8 +3276,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3679,7 +3695,7 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -3723,7 +3739,7 @@ fi fi if test -z "$F77"; then ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -4103,7 +4119,7 @@ fi ;; # Ignore these flags. -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ - |-LANG:=* | -LIST:* | -LNO:*) + |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) test x"$CYGWIN" != xyes && ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" @@ -4298,8 +4314,8 @@ fi else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "linking to Fortran libraries from C fails -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "linking to Fortran libraries from C fails +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4460,8 +4476,8 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compile a simple Fortran program -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compile a simple Fortran program +See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -4545,8 +4561,8 @@ esac -macro_version='2.2.10' -macro_revision='1.3175' +macro_version='2.4' +macro_revision='1.3293' @@ -4564,7 +4580,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -4575,16 +4591,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -4609,7 +4625,7 @@ else ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -4617,7 +4633,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4657,7 +4673,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -4759,7 +4775,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -4835,7 +4851,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4901,7 +4917,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4968,7 +4984,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -5084,7 +5100,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -5473,8 +5489,8 @@ $as_echo_n "checking whether the shell u # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -5523,6 +5539,80 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if test "${lt_cv_to_host_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : @@ -5539,6 +5629,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -5862,6 +5957,21 @@ esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -5877,9 +5987,162 @@ test -z "$deplibs_check_method" && depli + + + + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : @@ -5895,7 +6158,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5915,11 +6178,15 @@ $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : @@ -5935,7 +6202,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5954,6 +6221,10 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -5965,12 +6236,11 @@ ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + @@ -5981,6 +6251,71 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if test "${lt_cv_ar_at_file+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. @@ -6316,8 +6651,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -6353,6 +6688,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -6394,6 +6730,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -6405,7 +6753,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -6431,8 +6779,8 @@ static const void *lt_preloaded_setup() _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -6442,8 +6790,8 @@ _LT_EOF test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -6480,6 +6828,23 @@ else $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + + + + @@ -6496,6 +6861,38 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } @@ -6702,6 +7099,123 @@ esac need_locks="$enable_libtool_lock" +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test "${lt_cv_path_mainfest_tool+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + case $host_os in rhapsody* | darwin*) @@ -7369,7 +7883,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -7385,11 +7899,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -7428,7 +7942,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -7444,18 +7958,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -7592,8 +8106,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -8133,8 +8646,6 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -8299,6 +8810,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -8418,13 +8935,17 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -8485,6 +9006,11 @@ fi + + + + + # # Check to make sure the static flag actually works. # @@ -8835,7 +9361,8 @@ _LT_EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -8883,7 +9410,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -8953,8 +9480,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -8972,8 +9499,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -9019,8 +9546,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -9150,7 +9677,13 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN @@ -9171,22 +9704,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -9198,7 +9738,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef F77_DUMMY_MAIN @@ -9219,22 +9765,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -9279,20 +9832,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -9357,7 +9953,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -9365,7 +9961,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -9381,7 +9977,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -9405,10 +10001,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -9487,23 +10083,36 @@ fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -9588,7 +10197,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' @@ -9607,9 +10216,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -10185,8 +10794,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -10219,13 +10829,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -11209,10 +11877,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11315,10 +11983,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11581,7 +12249,9 @@ $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} + CFLAGS=$FFLAGS compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do @@ -11642,8 +12312,6 @@ $as_echo "$enable_static" >&6; } lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' @@ -11808,6 +12476,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic_F77='--shared' lt_prog_compiler_static_F77='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_F77='-Wl,-Wl,,' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -11927,10 +12601,17 @@ case $host_os in lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_F77" >&5 -$as_echo "$lt_prog_compiler_pic_F77" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic_F77+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 +$as_echo "$lt_cv_prog_compiler_pic_F77" >&6; } +lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77 # # Check to make sure the PIC flag actually works. @@ -11988,6 +12669,8 @@ fi + + # # Check to make sure the static flag actually works. # @@ -12329,7 +13012,8 @@ _LT_EOF allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_F77='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -12377,7 +13061,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -12447,8 +13131,8 @@ _LT_EOF archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -12466,8 +13150,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi @@ -12513,8 +13197,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi @@ -12644,29 +13328,42 @@ _LT_EOF allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__F77+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -12678,29 +13375,42 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__F77+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -12745,20 +13455,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + file_list_spec_F77='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, F77)='true' + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_F77='chmod 644 $oldlib' + postlink_cmds_F77='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_F77=yes + ;; + esac ;; darwin* | rhapsody*) @@ -12823,7 +13576,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no @@ -12831,7 +13584,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -12847,7 +13600,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -12871,10 +13624,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -12914,22 +13667,37 @@ if test -z "$aix_libpath"; then aix_libp irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat > conftest.$ac_ext <<_ACEOF -int foo(void) {} + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat > conftest.$ac_ext <<_ACEOF + + subroutine foo + end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -13014,7 +13782,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' @@ -13033,9 +13801,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag_F77=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -13445,8 +14213,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -13478,13 +14247,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -14033,6 +14860,7 @@ fi GCC=$lt_save_GCC CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes ac_ext=c @@ -14149,6 +14977,7 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -14172,11 +15001,11 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -14326,19 +15155,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -14534,7 +15363,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -14588,7 +15417,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # values after options handling. ac_log=" This file was extended by f77demo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -14654,10 +15483,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ f77demo config.status 1.0 -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -14675,11 +15504,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -14701,6 +15535,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -14713,7 +15548,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -14722,7 +15557,7 @@ Try \`$0 --help' for more information."; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -14804,13 +15639,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' @@ -14825,14 +15667,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' @@ -14865,12 +15710,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' @@ -14903,8 +15748,8 @@ old_archive_cmds_F77='`$ECHO "$old_archi compiler_F77='`$ECHO "$compiler_F77" | $SED "$delay_single_quote_subst"`' GCC_F77='`$ECHO "$GCC_F77" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_F77='`$ECHO "$lt_prog_compiler_no_builtin_flag_F77" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_F77='`$ECHO "$lt_prog_compiler_pic_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_F77='`$ECHO "$lt_prog_compiler_static_F77" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_F77='`$ECHO "$lt_cv_prog_compiler_c_o_F77" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_F77='`$ECHO "$archive_cmds_need_lc_F77" | $SED "$delay_single_quote_subst"`' @@ -14931,12 +15776,12 @@ hardcode_shlibpath_var_F77='`$ECHO "$har hardcode_automatic_F77='`$ECHO "$hardcode_automatic_F77" | $SED "$delay_single_quote_subst"`' inherit_rpath_F77='`$ECHO "$inherit_rpath_F77" | $SED "$delay_single_quote_subst"`' link_all_deplibs_F77='`$ECHO "$link_all_deplibs_F77" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path_F77='`$ECHO "$fix_srcfile_path_F77" | $SED "$delay_single_quote_subst"`' always_export_symbols_F77='`$ECHO "$always_export_symbols_F77" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_F77='`$ECHO "$export_symbols_cmds_F77" | $SED "$delay_single_quote_subst"`' exclude_expsyms_F77='`$ECHO "$exclude_expsyms_F77" | $SED "$delay_single_quote_subst"`' include_expsyms_F77='`$ECHO "$include_expsyms_F77" | $SED "$delay_single_quote_subst"`' prelink_cmds_F77='`$ECHO "$prelink_cmds_F77" | $SED "$delay_single_quote_subst"`' +postlink_cmds_F77='`$ECHO "$postlink_cmds_F77" | $SED "$delay_single_quote_subst"`' file_list_spec_F77='`$ECHO "$file_list_spec_F77" | $SED "$delay_single_quote_subst"`' hardcode_action_F77='`$ECHO "$hardcode_action_F77" | $SED "$delay_single_quote_subst"`' @@ -14968,8 +15813,13 @@ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -14979,12 +15829,14 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -15000,7 +15852,6 @@ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -15016,8 +15867,8 @@ LD_F77 \ reload_flag_F77 \ compiler_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ -lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ +lt_prog_compiler_wl_F77 \ lt_prog_compiler_static_F77 \ lt_cv_prog_compiler_c_o_F77 \ export_dynamic_flag_spec_F77 \ @@ -15029,7 +15880,6 @@ no_undefined_flag_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ -fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77 \ file_list_spec_F77; do @@ -15057,6 +15907,7 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ @@ -15071,7 +15922,8 @@ archive_expsym_cmds_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ export_symbols_cmds_F77 \ -prelink_cmds_F77; do +prelink_cmds_F77 \ +postlink_cmds_F77; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" @@ -15117,7 +15969,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -15155,7 +16007,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -15172,7 +16024,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -15186,18 +16038,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15286,20 +16138,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -15327,7 +16187,7 @@ for ac_last_try in false false :; do if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15412,7 +16272,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -15425,7 +16285,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -15453,7 +16313,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -15480,7 +16340,7 @@ $as_echo "$as_me: creating $ac_file" >&6 case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -15617,22 +16477,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -15643,19 +16503,19 @@ which seems to be undefined. Please mak $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -15920,19 +16780,42 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -15962,6 +16845,12 @@ global_symbol_to_c_name_address=$lt_lt_c # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -15971,6 +16860,9 @@ MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -16085,12 +16977,12 @@ with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -16177,9 +17069,6 @@ inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -16195,6 +17084,9 @@ include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -16227,210 +17119,169 @@ ltmain="$ac_aux_dir/ltmain.sh" # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -16458,12 +17309,12 @@ with_gcc=$GCC_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 @@ -16550,9 +17401,6 @@ inherit_rpath=$inherit_rpath_F77 # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_F77 - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_F77 @@ -16568,6 +17416,9 @@ include_expsyms=$lt_include_expsyms_F77 # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_F77 +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_F77 + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_F77 @@ -16588,7 +17439,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -16609,7 +17460,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -ruNp libtool-2.2.10/tests/f77demo-shared-exec.test libtool-2.4/tests/f77demo-shared-exec.test --- libtool-2.2.10/tests/f77demo-shared-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/f77demo-shared-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/f77demo-exec.test diff -ruNp libtool-2.2.10/tests/f77demo-shared-make.test libtool-2.4/tests/f77demo-shared-make.test --- libtool-2.2.10/tests/f77demo-shared-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/f77demo-shared-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/f77demo-make.test diff -ruNp libtool-2.2.10/tests/f77demo-static-exec.test libtool-2.4/tests/f77demo-static-exec.test --- libtool-2.2.10/tests/f77demo-static-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/f77demo-static-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/f77demo-exec.test diff -ruNp libtool-2.2.10/tests/f77demo-static-make.test libtool-2.4/tests/f77demo-static-make.test --- libtool-2.2.10/tests/f77demo-static-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/f77demo-static-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/f77demo-make.test diff -ruNp libtool-2.2.10/tests/fcdemo/Makefile.in libtool-2.4/tests/fcdemo/Makefile.in --- libtool-2.2.10/tests/fcdemo/Makefile.in 2010-06-09 20:06:20.000000000 +0700 +++ libtool-2.4/tests/fcdemo/Makefile.in 2010-09-22 21:44:54.000000000 +0700 @@ -177,6 +177,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -205,6 +206,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -230,6 +232,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_FC = @ac_ct_FC@ diff -ruNp libtool-2.2.10/tests/fcdemo/aclocal.m4 libtool-2.4/tests/fcdemo/aclocal.m4 --- libtool-2.2.10/tests/fcdemo/aclocal.m4 2010-06-09 20:06:18.000000000 +0700 +++ libtool-2.4/tests/fcdemo/aclocal.m4 2010-09-22 21:44:52.000000000 +0700 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff -ruNp libtool-2.2.10/tests/fcdemo/configure libtool-2.4/tests/fcdemo/configure --- libtool-2.2.10/tests/fcdemo/configure 2010-06-09 20:06:19.000000000 +0700 +++ libtool-2.4/tests/fcdemo/configure 2010-09-22 21:44:53.000000000 +0700 @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for fcdemo 1.0. +# Generated by GNU Autoconf 2.67 for fcdemo 1.0. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -327,7 +327,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -367,19 +367,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -543,7 +543,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -615,8 +615,11 @@ OTOOL LIPO NMEDIT DSYMUTIL +MANIFEST_TOOL RANLIB +ac_ct_AR AR +DLLTOOL OBJDUMP LN_S NM @@ -728,6 +731,7 @@ enable_static with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias @@ -740,7 +744,10 @@ LIBS CPPFLAGS FC FCFLAGS -CPP' +LDFLAGS +LIBS +CPP +CPPFLAGS' # Initialize some variables set by options. @@ -803,8 +810,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -849,7 +857,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -875,7 +883,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1079,7 +1087,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1095,7 +1103,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1125,8 +1133,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1134,7 +1142,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1152,13 +1160,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1181,7 +1189,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1195,8 +1203,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1211,9 +1219,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1252,11 +1260,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1296,7 +1304,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1375,6 +1383,8 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command @@ -1455,9 +1465,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF fcdemo configure 1.0 -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1599,7 +1609,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1642,7 +1652,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1708,7 +1718,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1825,7 +1835,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by fcdemo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -1935,11 +1945,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1973,11 +1981,9 @@ $as_echo "$as_me: WARNING: cache variabl ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1990,11 +1996,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2008,11 +2012,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2067,7 +2069,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2082,7 +2089,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2158,7 +2169,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2176,16 +2187,22 @@ ac_config_headers="$ac_config_headers co ac_aux_dir= for ac_dir in ../../libltdl/config "$srcdir"/../../libltdl/config; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2314,11 +2331,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2340,7 +2357,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2350,7 +2367,7 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2588,7 +2605,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2596,7 +2613,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2630,7 +2647,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`" am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2991,8 +3008,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3106,9 +3123,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3150,8 +3166,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3208,9 +3224,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3261,8 +3277,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3685,7 +3701,7 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -3729,7 +3745,7 @@ fi fi if test -z "$FC"; then ac_ct_FC=$FC - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 + for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -4103,7 +4119,7 @@ fi ;; # Ignore these flags. -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \ - |-LANG:=* | -LIST:* | -LNO:*) + |-LANG:=* | -LIST:* | -LNO:* | -link) ;; -lkernel32) test x"$CYGWIN" != xyes && ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg" @@ -4297,8 +4313,8 @@ fi else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "linking to Fortran libraries from C fails -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "linking to Fortran libraries from C fails +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=${ac_fc_srcext-f} @@ -4458,8 +4474,8 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compile a simple Fortran program -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compile a simple Fortran program +See \`config.log' for more details" "$LINENO" 5; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -4560,7 +4576,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5 $as_echo "$ac_cv_fc_srcext_f90" >&6; } if test "x$ac_cv_fc_srcext_f90" = xunknown; then - as_fn_error "Fortran could not compile .f90 files" "$LINENO" 5 + as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5 else ac_fc_srcext=f90 if test "x$ac_cv_fc_srcext_f90" = xnone; then @@ -4582,15 +4598,15 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to allow free-form source" >&5 -$as_echo_n "checking for Fortran flag needed to allow free-form source... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag needed to accept free-form source" >&5 +$as_echo_n "checking for Fortran flag needed to accept free-form source... " >&6; } if test "${ac_cv_fc_freeform+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_fc_freeform=unknown ac_fc_freeform_FCFLAGS_save=$FCFLAGS for ac_flag in none -ffree-form -FR -free -qfree -Mfree -Mfreeform \ - -freeform "-f free" + -freeform "-f free" +source=free -nfix do test "x$ac_flag" != xnone && FCFLAGS="$ac_fc_freeform_FCFLAGS_save $ac_flag" cat > conftest.$ac_ext <<_ACEOF @@ -4613,8 +4629,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_freeform" >&5 $as_echo "$ac_cv_fc_freeform" >&6; } if test "x$ac_cv_fc_freeform" = xunknown; then - { as_fn_set_status 77 -as_fn_error "Fortran does not accept free-form source" "$LINENO" 5; } + as_fn_error 77 "Fortran does not accept free-form source" "$LINENO" 5 else if test "x$ac_cv_fc_freeform" != xnone; then FCFLAGS="$FCFLAGS $ac_cv_fc_freeform" @@ -4645,8 +4660,8 @@ esac -macro_version='2.2.10' -macro_revision='1.3175' +macro_version='2.4' +macro_revision='1.3293' @@ -4664,7 +4679,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -4675,16 +4690,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -4709,7 +4724,7 @@ else ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -4717,7 +4732,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4757,7 +4772,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -4859,7 +4874,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -4935,7 +4950,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -5001,7 +5016,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -5068,7 +5083,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -5184,7 +5199,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -5573,8 +5588,8 @@ $as_echo_n "checking whether the shell u # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -5623,6 +5638,80 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if test "${lt_cv_to_host_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : @@ -5639,6 +5728,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -5962,6 +6056,21 @@ esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -5977,9 +6086,162 @@ test -z "$deplibs_check_method" && depli + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : @@ -5995,7 +6257,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6015,11 +6277,15 @@ $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : @@ -6035,7 +6301,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6054,6 +6320,10 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -6065,12 +6335,10 @@ ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} @@ -6082,6 +6350,72 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if test "${lt_cv_ar_at_file+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 @@ -6416,8 +6750,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -6453,6 +6787,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -6494,6 +6829,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -6505,7 +6852,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -6531,8 +6878,8 @@ static const void *lt_preloaded_setup() _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -6542,8 +6889,8 @@ _LT_EOF test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -6580,6 +6927,16 @@ else $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + @@ -6601,6 +6958,45 @@ fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -6802,6 +7198,123 @@ esac need_locks="$enable_libtool_lock" +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test "${lt_cv_path_mainfest_tool+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + case $host_os in rhapsody* | darwin*) @@ -7469,7 +7982,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -7485,11 +7998,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -7528,7 +8041,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -7544,18 +8057,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -7692,8 +8205,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7718,6 +8230,16 @@ done +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf + + + # Set options @@ -8233,8 +8755,6 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -8399,6 +8919,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -8518,13 +9044,17 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -8585,6 +9115,11 @@ fi + + + + + # # Check to make sure the static flag actually works. # @@ -8935,7 +9470,8 @@ _LT_EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -8983,7 +9519,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -9053,8 +9589,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -9072,8 +9608,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -9119,8 +9655,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -9250,7 +9786,13 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef FC_DUMMY_MAIN @@ -9271,22 +9813,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -9298,7 +9847,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef FC_DUMMY_MAIN @@ -9319,22 +9874,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -9379,20 +9941,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -9457,7 +10062,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -9465,7 +10070,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -9481,7 +10086,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -9505,10 +10110,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -9587,23 +10192,36 @@ fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -9688,7 +10306,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' @@ -9707,9 +10325,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -10285,8 +10903,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -10319,13 +10938,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -11309,10 +11986,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11415,10 +12092,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11684,7 +12361,9 @@ $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} + CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu @@ -11759,6 +12438,13 @@ cat > conftest.$ac_ext <<_LT_EOF end _LT_EOF + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -11772,7 +12458,7 @@ if { { eval echo "\"\$as_me\":${as_linen pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -11781,13 +12467,22 @@ if { { eval echo "\"\$as_me\":${as_linen test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} in + -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. @@ -11807,8 +12502,10 @@ if { { eval echo "\"\$as_me\":${as_linen postdeps_FC="${postdeps_FC} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -11844,6 +12541,7 @@ else fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken @@ -11890,8 +12588,6 @@ fi lt_prog_compiler_pic_FC= lt_prog_compiler_static_FC= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_FC='-Wl,' @@ -12056,6 +12752,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic_FC='--shared' lt_prog_compiler_static_FC='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_FC='-Wl,-Wl,,' + lt_prog_compiler_pic_FC='-PIC' + lt_prog_compiler_static_FC='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -12175,10 +12877,17 @@ case $host_os in lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_FC" >&5 -$as_echo "$lt_prog_compiler_pic_FC" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic_FC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_FC=$lt_prog_compiler_pic_FC +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_FC" >&5 +$as_echo "$lt_cv_prog_compiler_pic_FC" >&6; } +lt_prog_compiler_pic_FC=$lt_cv_prog_compiler_pic_FC # # Check to make sure the PIC flag actually works. @@ -12236,6 +12945,8 @@ fi + + # # Check to make sure the static flag actually works. # @@ -12577,7 +13288,8 @@ _LT_EOF allow_undefined_flag_FC=unsupported always_export_symbols_FC=no enable_shared_with_static_runtimes_FC=yes - export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_FC='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -12625,7 +13337,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -12695,8 +13407,8 @@ _LT_EOF archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -12714,8 +13426,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_FC=no fi @@ -12761,8 +13473,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_FC=no fi @@ -12892,29 +13604,42 @@ _LT_EOF allow_undefined_flag_FC='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__FC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__FC +fi hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -12926,29 +13651,42 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__FC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__FC"; then + lt_cv_aix_libpath__FC="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__FC +fi hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -12993,20 +13731,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec_FC=' ' - allow_undefined_flag_FC=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_FC='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_FC='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_FC=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec_FC=' ' + allow_undefined_flag_FC=unsupported + always_export_symbols_FC=yes + file_list_spec_FC='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_FC='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_FC='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, FC)='true' + enable_shared_with_static_runtimes_FC=yes + export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_FC='chmod 644 $oldlib' + postlink_cmds_FC='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec_FC=' ' + allow_undefined_flag_FC=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds_FC='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_FC=yes + ;; + esac ;; darwin* | rhapsody*) @@ -13071,7 +13852,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds_FC='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_FC='-R$libdir' hardcode_direct_FC=yes hardcode_shlibpath_var_FC=no @@ -13079,7 +13860,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -13095,7 +13876,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_FC='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -13119,10 +13900,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_FC='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -13162,22 +13943,37 @@ if test -z "$aix_libpath"; then aix_libp irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat > conftest.$ac_ext <<_ACEOF -int foo(void) {} + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat > conftest.$ac_ext <<_ACEOF + + subroutine foo + end _ACEOF if ac_fn_fc_try_link "$LINENO"; then : - archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -13262,7 +14058,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_FC='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_FC=' -expect_unresolved \*' @@ -13281,9 +14077,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag_FC=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds_FC='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_FC='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -13693,8 +14489,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -13726,13 +14523,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -14280,7 +15135,8 @@ fi fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes ac_ext=c @@ -14395,6 +15251,7 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -14418,11 +15275,11 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -14572,19 +15429,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -14780,7 +15637,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -14834,7 +15691,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # values after options handling. ac_log=" This file was extended by fcdemo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -14900,10 +15757,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ fcdemo config.status 1.0 -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -14921,11 +15778,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -14947,6 +15809,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -14959,7 +15822,7 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -14968,7 +15831,7 @@ Try \`$0 --help' for more information."; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -15050,13 +15913,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' @@ -15071,14 +15941,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' @@ -15111,12 +15984,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' @@ -15155,8 +16028,8 @@ old_archive_cmds_FC='`$ECHO "$old_archiv compiler_FC='`$ECHO "$compiler_FC" | $SED "$delay_single_quote_subst"`' GCC_FC='`$ECHO "$GCC_FC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_FC='`$ECHO "$lt_prog_compiler_no_builtin_flag_FC" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_FC='`$ECHO "$lt_prog_compiler_wl_FC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_FC='`$ECHO "$lt_prog_compiler_pic_FC" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_FC='`$ECHO "$lt_prog_compiler_wl_FC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_FC='`$ECHO "$lt_prog_compiler_static_FC" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_FC='`$ECHO "$lt_cv_prog_compiler_c_o_FC" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_FC='`$ECHO "$archive_cmds_need_lc_FC" | $SED "$delay_single_quote_subst"`' @@ -15183,12 +16056,12 @@ hardcode_shlibpath_var_FC='`$ECHO "$hard hardcode_automatic_FC='`$ECHO "$hardcode_automatic_FC" | $SED "$delay_single_quote_subst"`' inherit_rpath_FC='`$ECHO "$inherit_rpath_FC" | $SED "$delay_single_quote_subst"`' link_all_deplibs_FC='`$ECHO "$link_all_deplibs_FC" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path_FC='`$ECHO "$fix_srcfile_path_FC" | $SED "$delay_single_quote_subst"`' always_export_symbols_FC='`$ECHO "$always_export_symbols_FC" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_FC='`$ECHO "$export_symbols_cmds_FC" | $SED "$delay_single_quote_subst"`' exclude_expsyms_FC='`$ECHO "$exclude_expsyms_FC" | $SED "$delay_single_quote_subst"`' include_expsyms_FC='`$ECHO "$include_expsyms_FC" | $SED "$delay_single_quote_subst"`' prelink_cmds_FC='`$ECHO "$prelink_cmds_FC" | $SED "$delay_single_quote_subst"`' +postlink_cmds_FC='`$ECHO "$postlink_cmds_FC" | $SED "$delay_single_quote_subst"`' file_list_spec_FC='`$ECHO "$file_list_spec_FC" | $SED "$delay_single_quote_subst"`' hardcode_action_FC='`$ECHO "$hardcode_action_FC" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_FC='`$ECHO "$compiler_lib_search_dirs_FC" | $SED "$delay_single_quote_subst"`' @@ -15226,8 +16099,13 @@ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -15237,12 +16115,14 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -15258,7 +16138,6 @@ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -15280,8 +16159,8 @@ LD_FC \ reload_flag_FC \ compiler_FC \ lt_prog_compiler_no_builtin_flag_FC \ -lt_prog_compiler_wl_FC \ lt_prog_compiler_pic_FC \ +lt_prog_compiler_wl_FC \ lt_prog_compiler_static_FC \ lt_cv_prog_compiler_c_o_FC \ export_dynamic_flag_spec_FC \ @@ -15293,7 +16172,6 @@ no_undefined_flag_FC \ hardcode_libdir_flag_spec_FC \ hardcode_libdir_flag_spec_ld_FC \ hardcode_libdir_separator_FC \ -fix_srcfile_path_FC \ exclude_expsyms_FC \ include_expsyms_FC \ file_list_spec_FC \ @@ -15327,6 +16205,7 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ @@ -15341,7 +16220,8 @@ archive_expsym_cmds_FC \ module_cmds_FC \ module_expsym_cmds_FC \ export_symbols_cmds_FC \ -prelink_cmds_FC; do +prelink_cmds_FC \ +postlink_cmds_FC; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" @@ -15387,7 +16267,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -15425,7 +16305,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -15442,7 +16322,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -15456,18 +16336,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15556,20 +16436,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -15597,7 +16485,7 @@ for ac_last_try in false false :; do if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15682,7 +16570,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -15695,7 +16583,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -15723,7 +16611,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -15750,7 +16638,7 @@ $as_echo "$as_me: creating $ac_file" >&6 case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -15887,22 +16775,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -15913,19 +16801,19 @@ which seems to be undefined. Please mak $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -16190,19 +17078,42 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -16232,6 +17143,12 @@ global_symbol_to_c_name_address=$lt_lt_c # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -16241,6 +17158,9 @@ MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -16355,12 +17275,12 @@ with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -16447,9 +17367,6 @@ inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -16465,6 +17382,9 @@ include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -16511,210 +17431,169 @@ ltmain="$ac_aux_dir/ltmain.sh" # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -16742,12 +17621,12 @@ with_gcc=$GCC_FC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_FC -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_FC - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_FC +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_FC + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_FC @@ -16834,9 +17713,6 @@ inherit_rpath=$inherit_rpath_FC # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_FC -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_FC - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_FC @@ -16852,6 +17728,9 @@ include_expsyms=$lt_include_expsyms_FC # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_FC +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_FC + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_FC @@ -16886,7 +17765,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -16907,7 +17786,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -ruNp libtool-2.2.10/tests/fcdemo-shared-exec.test libtool-2.4/tests/fcdemo-shared-exec.test --- libtool-2.2.10/tests/fcdemo-shared-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/fcdemo-shared-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/fcdemo-exec.test diff -ruNp libtool-2.2.10/tests/fcdemo-shared-make.test libtool-2.4/tests/fcdemo-shared-make.test --- libtool-2.2.10/tests/fcdemo-shared-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/fcdemo-shared-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/fcdemo-make.test diff -ruNp libtool-2.2.10/tests/fcdemo-static-exec.test libtool-2.4/tests/fcdemo-static-exec.test --- libtool-2.2.10/tests/fcdemo-static-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/fcdemo-static-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/fcdemo-exec.test diff -ruNp libtool-2.2.10/tests/fcdemo-static-make.test libtool-2.4/tests/fcdemo-static-make.test --- libtool-2.2.10/tests/fcdemo-static-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/fcdemo-static-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/fcdemo-make.test diff -ruNp libtool-2.2.10/tests/flags.at libtool-2.4/tests/flags.at --- libtool-2.2.10/tests/flags.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/flags.at 2010-09-01 12:09:12.000000000 +0700 @@ -1,6 +1,6 @@ # flags.at -- libtool passing of flags -*- Autotest -*- # -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009, 2010 Free Software Foundation, Inc. # # This file is part of GNU Libtool. # @@ -24,7 +24,7 @@ m4_foreach([lt_tag], [CC, CXX, F77, FC, GCJ], [AT_SETUP([passing lt_tag flags through libtool]) AT_KEYWORDS([libtool]) -LT_AT_TAG([lt_tag]) +LT_AT_TAG(m4_defn([lt_tag])) LDFLAGS="$LDFLAGS -no-undefined" eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`" @@ -73,8 +73,8 @@ AT_CHECK([$LIBTOOL --tag=lt_tag --mode=c # Linker flags are prefixed with ${wl} iff they are passed to the # compiler driver, instead of directly to the linker. case $archive_cmds in -*\$LD*\$linker_flags*) maybe_wl= ;; -*) maybe_wl=$wl ;; +*\$LD*\$linker_flags*) maybe_wl= compiler_flags_in_liblink=false ;; +*) maybe_wl=$wl compiler_flags_in_liblink=: ;; esac for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do @@ -83,19 +83,32 @@ for flag in -Wc, -Wl, '-Xcompiler ' '-Xl AT_CHECK([$LIBTOOL -n --tag=lt_tag --mode=compile $compile ]dnl [$flag-foo -c $source], [], [stdout], [ignore]) AT_CHECK([$FGREP " -foo" stdout], [], [ignore]) - flag_prefix= + flag_prefix_prog= + flag_prefix_lib= + flags_in_liblink=$compiler_flags_in_liblink ;; -Wl, | -Xlinker\ ) - flag_prefix=$maybe_wl + flag_prefix_prog=$wl + flag_prefix_lib=$maybe_wl + flags_in_liblink=: ;; esac - eval set program$EXEEXT "$library_and_module" + AT_CHECK([$LIBTOOL -n --tag=lt_tag --mode=link $link ]dnl + [-o program$EXEEXT a.lo $flag-foo], [], [stdout], [ignore]) + AT_CHECK([$FGREP " $flag_prefix_prog-foo" stdout], [], [ignore]) + + eval set x "$library_and_module" for output do + test x = "$output" && continue AT_CHECK([$LIBTOOL -n --tag=lt_tag --mode=link $link ]dnl [-o $output a.lo -rpath /nowhere $flag-foo], [], [stdout], [ignore]) - AT_CHECK([$FGREP " $flag_prefix-foo" stdout], [], [ignore]) + if $flags_in_liblink; then + AT_CHECK([$FGREP " $flag_prefix_lib-foo" stdout], [], [ignore]) + else + AT_CHECK([$FGREP " $flag_prefix_lib-foo" stdout], [1]) + fi done done diff -ruNp libtool-2.2.10/tests/getopt-m4sh.at libtool-2.4/tests/getopt-m4sh.at --- libtool-2.2.10/tests/getopt-m4sh.at 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/getopt-m4sh.at 2010-09-16 10:09:16.000000000 +0700 @@ -0,0 +1,186 @@ +# getopts-m4sh.at -- test getopts.m4sh option parsers -*- Autotest -*- +# +# Copyright (C) 2010 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2010 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +#### + +AT_BANNER([Shell option parser generator.]) + +auxdir="$abs_top_srcdir/libltdl/config" + + +# _LT_AT_GETOPT_M4SH_SETUP +# ------------------------ +m4_define([_LT_AT_GETOPT_M4SH_SETUP], +[m4_pattern_allow([AS_INIT]) +m4_pattern_allow([m4_include]) +AT_DATA([options.m4sh], +[[AS_INIT[]m4_include([getopt.m4sh]) +nl=' +' +list= +opts= +M4SH_GETOPTS( + [a!], [--append], [], [func_append list "$optarg$nl"], + [f], [--force], [], [opts="$opts force"], + [i], [--install], [], [opts="$opts install"], + [v], [--verbose], [], [opts="$opts verbose"], + [!], [--ltdl], [false],[opts="$opts ltdl=$optarg"], +[echo "$list" $opts]) +]]) +m4_pattern_forbid([m4_include]) +m4_pattern_forbid([AS_INIT]) +AT_CHECK([$M4SH --version || exit 77], [], [ignore], [ignore]) +AT_CHECK([$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options], + [], [], [], [AT_CHECK([test $at_status -eq 63 && exit 77])]) +$SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options +])# _LT_AT_GETOPT_M4SH_SETUP + + +# _LT_AT_FALLBACK_FUNC_EXTRACT(FUNC-NAME) +# --------------------------------------- +# Extract the fallback function FUNC-NAME from ltmain.m4sh +m4_define([_LT_AT_FALLBACK_FUNC_EXTRACT], +[dnl {{ +$SED '/^# func_dirname /q' options > options.tmp +echo '# func_append var value' >> options.tmp +$SED -n '/^$1 ()/,/^} # $1 /p' $abs_top_srcdir/libltdl/config/ltmain.m4sh >> options.tmp +$SED '1,/^# func_dirname/d' options >> options.tmp +rm -f options && mv options.tmp options]) + + +# _LT_AT_EXTENDED_SHELL_FUNC_EXTRACT(FUNC-NAME) +# --------------------------------------------- +# Extract the 'Extended-shell'-decorated function FUNC-NAME from libtool +m4_define([_LT_AT_XSI_FUNC_EXTRACT], +[dnl {{ +$SED '/^# $1/q' options > options.tmp +$SED -n '/^$1 ()/,/^} # Extended-shell $1 /p' $abs_top_builddir/libtool >> options.tmp +$SED '1,/^} # $1 /d' options >> options.tmp +rm -f options && mv options.tmp options]) + + +## ----------------------- ## +## Short option splitting. ## +## ----------------------- ## + +AT_SETUP([short option splitting]) + +AT_DATA(expout, +[[ force verbose install +]]) + +_LT_AT_GETOPT_M4SH_SETUP + +AT_CHECK([$SHELL ./options -fvi], 0, [expout]) + +AT_CLEANUP + + +AT_SETUP([enhanced shell short option splitting]) + +# Don't bother with additional XSI checks unless functions were substituted +AT_CHECK([fgrep '@%:@ Extended-shell func_split_short_opt' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)]) + +AT_DATA(expout, +[[ force verbose install +]]) + +_LT_AT_GETOPT_M4SH_SETUP +_LT_AT_XSI_FUNC_EXTRACT(func_split_short_opt) + +AT_CHECK([$SHELL ./options -fvi], 0, [expout]) + +AT_CLEANUP + + +## ---------------------- ## +## Long option splitting. ## +## ---------------------- ## + +AT_SETUP([long option splitting]) + +AT_DATA(expout, +[[ ltdl=long +]]) + +_LT_AT_GETOPT_M4SH_SETUP + +AT_CHECK([$SHELL ./options --ltdl=long], 0, [expout]) + +AT_CLEANUP + + +AT_SETUP([XSI long option splitting]) + +# Don't bother with additional XSI checks unless functions were substituted +AT_CHECK([fgrep '@%:@ Extended-shell func_split_long_opt' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)]) + +AT_DATA(expout, +[[ ltdl=long +]]) + +_LT_AT_GETOPT_M4SH_SETUP +_LT_AT_XSI_FUNC_EXTRACT(func_split_long_opt) + +AT_CHECK([$SHELL ./options --ltdl=long], 0, [expout]) + +AT_CLEANUP + + +## ----------------- ## +## Option appending. ## +## ----------------- ## + +AT_SETUP([option appending]) + +AT_DATA(expout, +[[first --append second +third + +]]) + +_LT_AT_GETOPT_M4SH_SETUP +_LT_AT_FALLBACK_FUNC_EXTRACT(func_append) + +AT_CHECK([$SHELL ./options -a "first --append second" -athird], 0, [expout]) + +AT_CLEANUP + + +AT_SETUP([enhanced shell option appending]) + +# Don't bother with additional += check unless functions were substituted +AT_CHECK([fgrep '@%:@ Extended-shell func_append ' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)]) + +AT_DATA(expout, +[[first --append second +third + +]]) + +_LT_AT_GETOPT_M4SH_SETUP +_LT_AT_FALLBACK_FUNC_EXTRACT(func_append) +_LT_AT_XSI_FUNC_EXTRACT(func_append) + +AT_CHECK([$SHELL ./options -a "first --append second" -athird], 0, [expout]) + +AT_CLEANUP diff -ruNp libtool-2.2.10/tests/help.at libtool-2.4/tests/help.at --- libtool-2.2.10/tests/help.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/help.at 2010-09-16 10:09:16.000000000 +0700 @@ -1,6 +1,6 @@ # help.at -- standard command line options -*- Autotest -*- # -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009, 2010 Free Software Foundation, Inc. # # This file is part of GNU Libtool. # @@ -35,6 +35,10 @@ AT_CHECK([$LIBTOOL --help-all], [], [ign AT_CHECK([$LIBTOOL --version], [], [stdout]) AT_CHECK([grep 'Copyright.*Free Software Foundation' stdout], [], [ignore]) +AT_CHECK([$LIBTOOL], [1], [ignore], [stderr]) +AT_CHECK([grep 'specify a MODE' stderr], [], [ignore]) +AT_CHECK([grep ' --help' stderr], [], [ignore]) + AT_CLEANUP @@ -88,3 +92,100 @@ AT_CHECK([$LIBTOOL cl liba.la], [], [ignore], [ignore]) AT_CLEANUP + + +AT_SETUP([debug tracing]) + +AT_DATA([a.c], +[[int a () { return 0; } +]]) + +AT_DATA([b.c], +[[extern int a (); +int b () { return a (); } +]]) + +AT_DATA([main.c], +[[extern int b (); +int main () { return b (); } +]]) + +inst=`pwd`/inst +libdir=$inst/lib +bindir=$inst/bin +mkdir $inst $libdir $bindir + +# This test will not work correctly if --debug is passed. +AT_CHECK([case "$LIBTOOL $CC $CPPFLAGS $CFLAGS $LDFLAGS " in ]dnl + [ *\ --debug\ *) exit 77;; *) :;; esac]) + +check_trace () +{ + if test "X$trace" = X--debug; then + AT_CHECK([grep 'enabling shell trace mode' stdout stderr], [0], [ignore]) + AT_CHECK([grep ' --mode' stderr], [0], [ignore]) + else + AT_CHECK([grep 'enabling shell trace mode' stdout stderr], [1]) + AT_CHECK([grep ' --mode' stderr], [1]) + fi +} + +orig_LIBTOOL=$LIBTOOL +for trace in '' --debug; do + LIBTOOL="$orig_LIBTOOL $trace" + + # Hypothesis: debug output should happen if (and only if) --debug is + # passed, for compile, link, install, uninstall, and clean modes. + AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c], + [], [stdout], [stderr]) + check_trace + AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c], + [], [stdout], [stderr]) + check_trace + AT_CHECK([$CC $CPPFLAGS $CFLAGS -c main.c], [], [ignore], [ignore]) + AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo ]dnl + [ -no-undefined -rpath $libdir], [], [stdout], [stderr]) + check_trace + AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo ]dnl + [ -no-undefined -rpath $libdir liba.la], [], [stdout], [stderr]) + check_trace + AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ]dnl + [libb.la], [], [stdout], [stderr]) + check_trace + LT_AT_NOINST_EXEC_CHECK([./main], [], [], [stdout], [stderr]) + check_trace + + AT_CHECK([$LIBTOOL --mode=install cp liba.la libb.la $libdir], + [], [stdout], [stderr]) + check_trace + + # Hypothesis: --debug should be passed to relink mode if (and only if) + # it was passed at link mode. + AT_CHECK([$orig_LIBTOOL --mode=install $lt_INSTALL liba.la libb.la $libdir], + [], [stdout], [stderr]) + if grep ': relinking ' stdout stderr; then + if test "X$trace" = X--debug; then + AT_CHECK([grep ' --mode=relink' stdout stderr | grep ' --debug '], + [0], [ignore]) + else + AT_CHECK([grep ' --mode=relink' stdout stderr | grep ' --debug '], + [1]) + fi + fi + + AT_CHECK([$LIBTOOL --mode=install cp main$EXEEXT $bindir], + [], [stdout], [stderr]) + check_trace + AT_CHECK([$LIBTOOL --mode=finish $bindir], [], [stdout], [stderr]) + check_trace + + AT_CHECK([$LIBTOOL --mode=uninstall rm -f $bindir/main$EXEEXT ]dnl + [$libdir/libb.la $libdir/liba.la], [], [stdout], [stderr]) + check_trace + AT_CHECK([$LIBTOOL --mode=clean rm -f $bindir/main$EXEEXT ]dnl + [$libdir/libb.la $libdir/liba.la], [], [stdout], [stderr]) + check_trace + +done + +AT_CLEANUP diff -ruNp libtool-2.2.10/tests/infer-tag.at libtool-2.4/tests/infer-tag.at --- libtool-2.2.10/tests/infer-tag.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/infer-tag.at 2010-09-01 12:09:12.000000000 +0700 @@ -1,6 +1,6 @@ # infer-tag.at -- libtool without --tag -*- Autotest -*- # -# Copyright (C) 2008 Free Software Foundation, Inc. +# Copyright (C) 2008, 2010 Free Software Foundation, Inc. # # This file is part of GNU Libtool. # @@ -91,10 +91,6 @@ AT_DATA([A.java], }; ]]) -# There are just too many broken gcj installations out there, either missing -# libgcj.spec or unable to find it. Skip this test for them. -AT_CHECK([$GCJ $GCJFLAGS -c A.java || exit 77], [], [ignore], [ignore]) - AT_CHECK([$LIBTOOL --mode=compile $GCJ $GCJCFLAGS -c A.java], [], [ignore], [ignore]) diff -ruNp libtool-2.2.10/tests/lalib-syntax.at libtool-2.4/tests/lalib-syntax.at --- libtool-2.2.10/tests/lalib-syntax.at 2010-05-21 04:19:02.000000000 +0700 +++ libtool-2.4/tests/lalib-syntax.at 2010-09-16 10:09:16.000000000 +0700 @@ -1,6 +1,6 @@ # lalib-syntax.at -- parsing .la files robustly -*- Autotest -*- # -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009, 2010 Free Software Foundation, Inc. # # This file is part of GNU Libtool. # @@ -25,9 +25,12 @@ AT_SETUP([syntax of .la files]) AT_KEYWORDS([libtool]) AT_KEYWORDS([libltdl]) +AT_XFAIL_IF([:]) dnl libltdl does not consistently return non-NULL lt_dlerror + AT_DATA([main.c], [[#include #include +#include int main (int argc, char* argv[]) @@ -50,7 +53,9 @@ main (int argc, char* argv[]) } else { - printf ("plugin failed to open: %s\n", lt_dlerror()); + const char *error = lt_dlerror (); + assert (error != NULL); + printf ("plugin failed to open: %s\n", error); err = 1; } lt_dlexit (); diff -ruNp libtool-2.2.10/tests/libtoolize.at libtool-2.4/tests/libtoolize.at --- libtool-2.2.10/tests/libtoolize.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/libtoolize.at 2010-09-16 10:09:16.000000000 +0700 @@ -155,7 +155,7 @@ LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expo ## Next, a second update attempt with everything now updated. ## ## ---------------------------------------------------------- ## -AT_DATA(expout, [[]]) +: >expout AT_DATA(experr, [[libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite @@ -187,7 +187,7 @@ LT_AT_CHECK_LIBTOOLIZE([--copy --force], ## A final update attempt with everything previously force updated. ## ## ---------------------------------------------------------------- ## -AT_DATA(expout, [[]]) +: >expout LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout) @@ -232,7 +232,7 @@ LT_AT_CHECK_LIBTOOLIZE([--copy --install ## Next, a second update attempt with everything now updated. ## ## ---------------------------------------------------------- ## -AT_DATA(expout, [[]]) +: >expout AT_DATA(experr, [[libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite @@ -267,7 +267,7 @@ LT_AT_CHECK_LIBTOOLIZE([--copy --force - ## A final update attempt with everything previously force updated. ## ## ---------------------------------------------------------------- ## -AT_DATA(expout, [[]]) +: >expout LT_AT_CHECK_LIBTOOLIZE([--copy --install], 0, expout) @@ -978,7 +978,7 @@ LT_AT_CHECK_LIBTOOLIZE([--copy], 0, [ign LIBTOOLIZE_OPTIONS=--no-warn,--no-such-option export LIBTOOLIZE_OPTIONS -AT_DATA(experr, [[]]) +: >experr LT_AT_CHECK_LIBTOOLIZE([--copy], 0, [ignore], experr) diff -ruNp libtool-2.2.10/tests/link-order.at libtool-2.4/tests/link-order.at --- libtool-2.2.10/tests/link-order.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/link-order.at 2010-09-01 13:02:45.000000000 +0700 @@ -48,13 +48,31 @@ for i in old new; do mkdir src cat >src/a_$i.c <src/b_$i.c </dev/null 2>&1; then + prefix=`pwd -W`/inst +else + prefix=`pwd`/inst +fi +libdir=$prefix/lib +bindir=$prefix/bin +mkdir $prefix $libdir $bindir + +AT_DATA([a.c], +[[#ifdef __cplusplus +extern "C" +#endif +int f (void) +{ + return 42; +} +]]) + +AT_DATA([m.c], +[[ +#include +#include + +typedef int func_f(void); + +int +main (int argc, const char *argv[]) +{ + lt_dlhandle module = NULL; + func_f *f = NULL; + + if (lt_dlinit()) { + fprintf(stderr, "lt_dlinit failed '%s'\n", lt_dlerror()); + return 1; + } + + module = lt_dlopen("./a.la"); + + if (!module) { + fprintf(stderr, "lt_dlopen failed '%s'\n", lt_dlerror()); + return 1; + } + + f = (func_f *)lt_dlsym(module, "f"); + + if (!f) { + fprintf(stderr, "lt_dlsym failed '%s'\n", lt_dlerror()); + return 1; + } + + if (f() != 42) { + fprintf(stderr, "f did not return 42\n"); + return 1; + } + + lt_dlclose(module); + lt_dlexit(); + return 0; +} +]]) + +: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} +: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} + +# Skip installcheck if --disable-ltdl-install was used. +AT_CHECK([test -f "$LIBLTDL" || exit 77]) + +CPPFLAGS="$LTDLINCL $CPPFLAGS" +LDFLAGS="$LDFLAGS -no-undefined" + +AT_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c], + [], [ignore], [ignore]) +AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a.la ]dnl + [a.lo -rpath $libdir -module -shared -avoid-version], + [], [ignore], [ignore]) +AT_CHECK([$CC $CPPFLAGS $CFLAGS -c m.c], + [], [ignore], [ignore]) +AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT ]dnl + [m.$OBJEXT $LIBLTDL], + [], [ignore], [ignore]) +AT_CHECK([$LIBTOOL --mode=install cp a.la $libdir/a.la], + [], [ignore], [ignore]) +AT_CHECK([$LIBTOOL --mode=install cp m$EXEEXT $bindir/m$EXEEXT], + [], [ignore], [ignore]) + +# Try finding the module via the libdir entry in a misplaced .la file. + +mv $libdir/a.la $bindir/a.la +cd $bindir +LT_AT_EXEC_CHECK([./m], + [], [ignore], [ignore]) + +AT_CLEANUP diff -ruNp libtool-2.2.10/tests/mdemo/Makefile.in libtool-2.4/tests/mdemo/Makefile.in --- libtool-2.2.10/tests/mdemo/Makefile.in 2010-06-09 20:06:25.000000000 +0700 +++ libtool-2.4/tests/mdemo/Makefile.in 2010-09-22 21:45:00.000000000 +0700 @@ -205,6 +205,7 @@ LTDLDEPS = @LTDLDEPS@ LTDLINCL = @LTDLINCL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -231,6 +232,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ diff -ruNp libtool-2.2.10/tests/mdemo/aclocal.m4 libtool-2.4/tests/mdemo/aclocal.m4 --- libtool-2.2.10/tests/mdemo/aclocal.m4 2010-06-09 20:06:24.000000000 +0700 +++ libtool-2.4/tests/mdemo/aclocal.m4 2010-09-22 21:44:58.000000000 +0700 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff -ruNp libtool-2.2.10/tests/mdemo/configure libtool-2.4/tests/mdemo/configure --- libtool-2.2.10/tests/mdemo/configure 2010-06-09 20:06:24.000000000 +0700 +++ libtool-2.4/tests/mdemo/configure 2010-09-22 21:44:59.000000000 +0700 @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for mdemo 1.0. +# Generated by GNU Autoconf 2.67 for mdemo 1.0. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -327,7 +327,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -367,19 +367,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -545,7 +545,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -619,7 +619,9 @@ OTOOL LIPO NMEDIT DSYMUTIL +MANIFEST_TOOL RANLIB +ac_ct_AR AR LN_S NM @@ -732,6 +734,7 @@ enable_static with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias @@ -742,7 +745,8 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP' +CPP +CPPFLAGS' # Initialize some variables set by options. @@ -805,8 +809,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -851,7 +856,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -877,7 +882,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1081,7 +1086,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1097,7 +1102,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1127,8 +1132,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1136,7 +1141,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1154,13 +1159,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1183,7 +1188,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1197,8 +1202,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1213,9 +1218,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1254,11 +1259,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1298,7 +1303,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1376,6 +1381,8 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command @@ -1454,9 +1461,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF mdemo configure 1.0 -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1560,7 +1567,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1603,7 +1610,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1669,7 +1676,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1732,7 +1739,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by mdemo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -1842,11 +1849,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1880,11 +1885,9 @@ $as_echo "$as_me: WARNING: cache variabl ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1897,11 +1900,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -1915,11 +1916,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -1974,7 +1973,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -1989,7 +1993,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2065,7 +2073,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2081,16 +2089,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in ../../libltdl/config "$srcdir"/../../libltdl/config; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2213,11 +2227,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2239,7 +2253,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2249,7 +2263,7 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2487,7 +2501,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2495,7 +2509,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2529,7 +2543,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`" am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2890,8 +2904,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3005,9 +3019,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3049,8 +3062,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3107,9 +3120,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3160,8 +3173,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3580,7 +3593,7 @@ fi case $enable_ltdl_convenience in - no) as_fn_error "this package needs a convenience libltdl" "$LINENO" 5 ;; + no) as_fn_error $? "this package needs a convenience libltdl" "$LINENO" 5 ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac @@ -3608,8 +3621,8 @@ esac -macro_version='2.2.10' -macro_revision='1.3175' +macro_version='2.4' +macro_revision='1.3293' @@ -3627,7 +3640,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -3638,16 +3651,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3672,7 +3685,7 @@ else ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3680,7 +3693,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3720,7 +3733,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -3822,7 +3835,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -3898,7 +3911,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -3964,7 +3977,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4031,7 +4044,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -4147,7 +4160,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -4536,8 +4549,8 @@ $as_echo_n "checking whether the shell u # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -4586,6 +4599,80 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if test "${lt_cv_to_host_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : @@ -4602,6 +4689,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -4922,6 +5014,21 @@ esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -4937,9 +5044,160 @@ test -z "$deplibs_check_method" && depli + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : @@ -4955,7 +5213,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4975,11 +5233,15 @@ $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : @@ -4995,7 +5257,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5014,6 +5276,10 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -5025,16 +5291,72 @@ ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if test "${lt_cv_ar_at_file+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi @@ -5376,8 +5698,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -5413,6 +5735,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -5454,6 +5777,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -5465,7 +5800,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -5491,8 +5826,8 @@ static const void *lt_preloaded_setup() _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -5502,8 +5837,8 @@ _LT_EOF test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -5540,6 +5875,20 @@ else $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + @@ -5559,6 +5908,40 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + @@ -5710,50 +6093,167 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test "${lt_cv_path_mainfest_tool+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes fi - rm -rf conftest* - ;; -esac + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + -need_locks="$enable_libtool_lock" case $host_os in @@ -6414,7 +6914,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6430,11 +6930,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -6473,7 +6973,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6489,18 +6989,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -6629,8 +7129,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7467,8 +7966,6 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -7633,6 +8130,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -7752,13 +8255,17 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -7819,6 +8326,11 @@ fi + + + + + # # Check to make sure the static flag actually works. # @@ -8169,7 +8681,8 @@ _LT_EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -8217,7 +8730,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -8287,8 +8800,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -8306,8 +8819,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8353,8 +8866,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8484,7 +8997,13 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8497,22 +9016,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -8524,7 +9050,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8537,22 +9069,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -8597,20 +9136,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -8675,7 +9257,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -8683,7 +9265,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -8699,7 +9281,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -8723,10 +9305,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -8805,23 +9387,36 @@ fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -8906,7 +9501,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' @@ -8925,9 +9520,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -9503,8 +10098,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -9537,13 +10133,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -10479,10 +11133,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10585,10 +11239,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11046,6 +11700,7 @@ DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -11069,11 +11724,11 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -11223,19 +11878,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -11431,7 +12086,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -11485,7 +12140,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # values after options handling. ac_log=" This file was extended by mdemo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11542,10 +12197,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ mdemo config.status 1.0 -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -11563,11 +12218,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -11589,6 +12249,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -11599,7 +12260,7 @@ do ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -11684,12 +12345,18 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' @@ -11704,14 +12371,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' @@ -11744,12 +12414,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' @@ -11806,8 +12476,12 @@ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -11817,12 +12491,14 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -11838,7 +12514,6 @@ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -11874,6 +12549,7 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ @@ -11921,7 +12597,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -11958,7 +12634,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -11975,7 +12651,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -11989,18 +12665,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -12089,20 +12765,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -12120,7 +12804,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -12148,7 +12832,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -12175,7 +12859,7 @@ $as_echo "$as_me: creating $ac_file" >&6 case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -12312,22 +12996,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -12567,16 +13251,36 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -12606,6 +13310,12 @@ global_symbol_to_c_name_address=$lt_lt_c # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -12615,6 +13325,9 @@ MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -12729,12 +13442,12 @@ with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -12821,9 +13534,6 @@ inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -12839,6 +13549,9 @@ include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -12871,210 +13584,169 @@ ltmain="$ac_aux_dir/ltmain.sh" # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -13089,7 +13761,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -13110,7 +13782,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -ruNp libtool-2.2.10/tests/mdemo-shared-exec.test libtool-2.4/tests/mdemo-shared-exec.test --- libtool-2.2.10/tests/mdemo-shared-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/mdemo-shared-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/mdemo-exec.test diff -ruNp libtool-2.2.10/tests/mdemo-shared-inst.test libtool-2.4/tests/mdemo-shared-inst.test --- libtool-2.2.10/tests/mdemo-shared-inst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/mdemo-shared-inst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/mdemo-inst.test diff -ruNp libtool-2.2.10/tests/mdemo-shared-make.test libtool-2.4/tests/mdemo-shared-make.test --- libtool-2.2.10/tests/mdemo-shared-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/mdemo-shared-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/mdemo-make.test diff -ruNp libtool-2.2.10/tests/mdemo-shared-unst.test libtool-2.4/tests/mdemo-shared-unst.test --- libtool-2.2.10/tests/mdemo-shared-unst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/mdemo-shared-unst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/mdemo-unst.test diff -ruNp libtool-2.2.10/tests/mdemo-static-exec.test libtool-2.4/tests/mdemo-static-exec.test --- libtool-2.2.10/tests/mdemo-static-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/mdemo-static-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/mdemo-exec.test diff -ruNp libtool-2.2.10/tests/mdemo-static-inst.test libtool-2.4/tests/mdemo-static-inst.test --- libtool-2.2.10/tests/mdemo-static-inst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/mdemo-static-inst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/mdemo-inst.test diff -ruNp libtool-2.2.10/tests/mdemo-static-make.test libtool-2.4/tests/mdemo-static-make.test --- libtool-2.2.10/tests/mdemo-static-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/mdemo-static-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/mdemo-make.test diff -ruNp libtool-2.2.10/tests/mdemo-static-unst.test libtool-2.4/tests/mdemo-static-unst.test --- libtool-2.2.10/tests/mdemo-static-unst.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/mdemo-static-unst.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/mdemo-unst.test diff -ruNp libtool-2.2.10/tests/mdemo2/Makefile.in libtool-2.4/tests/mdemo2/Makefile.in --- libtool-2.2.10/tests/mdemo2/Makefile.in 2010-06-09 20:06:30.000000000 +0700 +++ libtool-2.4/tests/mdemo2/Makefile.in 2010-09-22 21:45:05.000000000 +0700 @@ -120,6 +120,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -144,6 +145,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -170,6 +172,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ diff -ruNp libtool-2.2.10/tests/mdemo2/aclocal.m4 libtool-2.4/tests/mdemo2/aclocal.m4 --- libtool-2.2.10/tests/mdemo2/aclocal.m4 2010-06-09 20:06:29.000000000 +0700 +++ libtool-2.4/tests/mdemo2/aclocal.m4 2010-09-22 21:45:04.000000000 +0700 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff -ruNp libtool-2.2.10/tests/mdemo2/configure libtool-2.4/tests/mdemo2/configure --- libtool-2.2.10/tests/mdemo2/configure 2010-06-09 20:06:29.000000000 +0700 +++ libtool-2.4/tests/mdemo2/configure 2010-09-22 21:45:04.000000000 +0700 @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for mdemo2 1.0. +# Generated by GNU Autoconf 2.67 for mdemo2 1.0. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -327,7 +327,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -367,19 +367,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -543,7 +543,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -616,8 +616,11 @@ OTOOL LIPO NMEDIT DSYMUTIL +MANIFEST_TOOL RANLIB +ac_ct_AR AR +DLLTOOL OBJDUMP LN_S NM @@ -723,6 +726,7 @@ enable_static with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias @@ -733,7 +737,8 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP' +CPP +CPPFLAGS' # Initialize some variables set by options. @@ -796,8 +801,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -842,7 +848,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -868,7 +874,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1072,7 +1078,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1088,7 +1094,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1118,8 +1124,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1127,7 +1133,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1145,13 +1151,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1174,7 +1180,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1188,8 +1194,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1204,9 +1210,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1245,11 +1251,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1289,7 +1295,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1367,6 +1373,8 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command @@ -1445,9 +1453,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF mdemo2 configure 1.0 -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1551,7 +1559,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1594,7 +1602,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1660,7 +1668,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1723,7 +1731,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by mdemo2 $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -1833,11 +1841,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1871,11 +1877,9 @@ $as_echo "$as_me: WARNING: cache variabl ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1888,11 +1892,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -1906,11 +1908,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -1965,7 +1965,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -1980,7 +1985,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2056,7 +2065,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2072,16 +2081,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in ../../libltdl/config "$srcdir"/../../libltdl/config; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2204,11 +2219,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2230,7 +2245,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2240,7 +2255,7 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2478,7 +2493,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2486,7 +2501,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2520,7 +2535,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`" am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2881,8 +2896,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -2996,9 +3011,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3040,8 +3054,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3098,9 +3112,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3151,8 +3165,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3574,8 +3588,8 @@ esac -macro_version='2.2.10' -macro_revision='1.3175' +macro_version='2.4' +macro_revision='1.3293' @@ -3593,7 +3607,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -3604,16 +3618,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3638,7 +3652,7 @@ else ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3646,7 +3660,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3686,7 +3700,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -3788,7 +3802,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -3864,7 +3878,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -3930,7 +3944,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -3997,7 +4011,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -4113,7 +4127,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -4502,8 +4516,8 @@ $as_echo_n "checking whether the shell u # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -4552,6 +4566,80 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if test "${lt_cv_to_host_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : @@ -4568,6 +4656,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -4891,6 +4984,21 @@ esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -4906,9 +5014,163 @@ test -z "$deplibs_check_method" && depli + + + + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : @@ -4924,7 +5186,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4944,11 +5206,15 @@ $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : @@ -4964,7 +5230,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4983,6 +5249,10 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -4994,12 +5264,14 @@ ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + @@ -5007,6 +5279,60 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if test "${lt_cv_ar_at_file+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + @@ -5345,8 +5671,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -5382,6 +5708,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -5423,6 +5750,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -5434,7 +5773,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -5460,8 +5799,8 @@ static const void *lt_preloaded_setup() _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -5471,8 +5810,8 @@ _LT_EOF test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -5509,6 +5848,17 @@ else $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + @@ -5531,6 +5881,43 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -5679,50 +6066,167 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test "${lt_cv_path_mainfest_tool+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes fi - rm -rf conftest* - ;; -esac + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + -need_locks="$enable_libtool_lock" case $host_os in @@ -6383,7 +6887,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6399,11 +6903,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -6442,7 +6946,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6458,18 +6962,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -6598,8 +7102,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7138,8 +7641,6 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -7304,6 +7805,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -7423,13 +7930,17 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -7490,6 +8001,11 @@ fi + + + + + # # Check to make sure the static flag actually works. # @@ -7840,7 +8356,8 @@ _LT_EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -7888,7 +8405,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -7958,8 +8475,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -7977,8 +8494,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8024,8 +8541,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8155,7 +8672,13 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8168,22 +8691,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -8195,7 +8725,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8208,22 +8744,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -8268,20 +8811,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -8346,7 +8932,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -8354,7 +8940,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -8370,7 +8956,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -8394,10 +8980,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -8476,23 +9062,36 @@ fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -8577,7 +9176,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' @@ -8596,9 +9195,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -9174,8 +9773,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -9208,13 +9808,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -10150,10 +10808,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10256,10 +10914,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10580,6 +11238,7 @@ DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -10603,11 +11262,11 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -10757,19 +11416,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -10965,7 +11624,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -11019,7 +11678,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # values after options handling. ac_log=" This file was extended by mdemo2 $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11076,10 +11735,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ mdemo2 config.status 1.0 -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -11097,11 +11756,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -11123,6 +11787,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -11133,7 +11798,7 @@ do ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -11215,13 +11880,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' @@ -11236,14 +11908,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' @@ -11276,12 +11951,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' @@ -11336,8 +12011,13 @@ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -11347,12 +12027,14 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -11368,7 +12050,6 @@ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -11404,6 +12085,7 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ @@ -11451,7 +12133,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -11488,7 +12170,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -11505,7 +12187,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -11519,18 +12201,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -11619,20 +12301,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -11650,7 +12340,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -11678,7 +12368,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -11705,7 +12395,7 @@ $as_echo "$as_me: creating $ac_file" >&6 case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -11842,22 +12532,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -12088,19 +12778,42 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -12130,6 +12843,12 @@ global_symbol_to_c_name_address=$lt_lt_c # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -12139,6 +12858,9 @@ MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -12253,12 +12975,12 @@ with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -12345,9 +13067,6 @@ inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -12363,6 +13082,9 @@ include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -12395,210 +13117,169 @@ ltmain="$ac_aux_dir/ltmain.sh" # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -12613,7 +13294,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -12634,7 +13315,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -ruNp libtool-2.2.10/tests/no-executables.at libtool-2.4/tests/no-executables.at --- libtool-2.2.10/tests/no-executables.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/no-executables.at 2010-09-16 10:09:16.000000000 +0700 @@ -1,7 +1,6 @@ # no-executables.at -- Libtool usage in GCC -*- Autotest -*- -# Copyright (C) 2008 Free Software Foundation, Inc. -# Written by Ralf Wildenhues, 2008 +# Copyright (C) 2008, 2010 Free Software Foundation, Inc. # # This file is part of GNU Libtool. # @@ -52,6 +51,8 @@ lt_cv_archive_cmds_need_lc=no lt_cv_cc_needs_belf=no lt_cv_ld_exported_symbols_list=no lt_cv_prog_compiler_static_works=no +lt_cv_aix_libpath="/usr/lib:/lib" +lt_cv_irix_exported_symbol=yes # Deal with AC_LIBTOOL_DLOPEN in one of two possible ways: # - do not execute it at all in the ac_no_link case diff -ruNp libtool-2.2.10/tests/nocase.at libtool-2.4/tests/nocase.at --- libtool-2.2.10/tests/nocase.at 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/nocase.at 2010-09-01 12:09:12.000000000 +0700 @@ -0,0 +1,85 @@ +# nocase.at -- test for nocase lib search -*- Autotest -*- +# +# Copyright (C) 2010 Free Software Foundation, Inc. +# Written by Peter Rosin, 2007 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +#### + + +AT_SETUP([nocase library search]) +AT_KEYWORDS([libtool]) + +eval `$LIBTOOL --config | $EGREP '^(want_nocaseglob|file_magic_glob)='` + +AT_CHECK([test "$want_nocaseglob" != yes && ]dnl + [test -z "$file_magic_glob" && exit 77], + [1], [ignore], [ignore]) + +mkdir foo +AT_DATA([foo/Foo.c], +[ +int Foo (void) { return 1; } +]) + +mkdir bar +AT_DATA([bar/bar.c], +[ +extern int Foo (void); +int bar (void) { return Foo (); } +]) + +AT_DATA([main.c], +[ +extern int bar (void); +int main (void) { return bar (); } +]) + +libdir=`pwd`/inst/lib +mkdir inst inst/bin inst/lib + +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo/Foo.lo foo/Foo.c +AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o foo/libFoo.la foo/Foo.lo ]dnl + [-no-undefined -version-info 1:0:0 -rpath $libdir], + [], [ignore], [ignore]) +AT_CHECK([$LIBTOOL --mode=install cp foo/libFoo.la $libdir], + [], [ignore], [ignore]) +AT_CHECK([$LIBTOOL --mode=clean rm -f foo/libFoo.la], + [], [ignore], [ignore]) + +rm -f $libdir/libFoo.la + +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar/bar.lo bar/bar.c +AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o bar/libbar.la bar/bar.lo ]dnl + [-L$libdir -lfoo -no-undefined -version-info 1:0:0 -rpath $libdir], + [], [ignore], [ignore]) +AT_CHECK([$LIBTOOL --mode=install cp bar/libbar.la $libdir], + [], [ignore], [ignore]) + +str=`$EGREP '^(old_library)=' < $libdir/libbar.la` +eval "$str" +libbar=$old_library +rm -f $libdir/$libbar + +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.$OBJEXT main.c + +AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -L$libdir -lbar], + [], [ignore], [ignore]) + +AT_CLEANUP diff -ruNp libtool-2.2.10/tests/package.m4 libtool-2.4/tests/package.m4 --- libtool-2.2.10/tests/package.m4 2010-06-09 20:05:38.000000000 +0700 +++ libtool-2.4/tests/package.m4 2010-09-22 21:44:09.000000000 +0700 @@ -1,6 +1,7 @@ # Signature of the current package. -m4_define([AT_PACKAGE_NAME], [libtool]) +m4_define([AT_PACKAGE_NAME], [GNU Libtool]) m4_define([AT_PACKAGE_TARNAME], [libtool]) -m4_define([AT_PACKAGE_VERSION], [2.2.10]) -m4_define([AT_PACKAGE_STRING], [libtool 2.2.10]) +m4_define([AT_PACKAGE_VERSION], [2.4]) +m4_define([AT_PACKAGE_STRING], [GNU Libtool 2.4]) m4_define([AT_PACKAGE_BUGREPORT], [bug-libtool@gnu.org]) +m4_define([AT_PACKAGE_URL], [http://www.gnu.org/software/libtool/]) diff -ruNp libtool-2.2.10/tests/pdemo/Makefile.in libtool-2.4/tests/pdemo/Makefile.in --- libtool-2.2.10/tests/pdemo/Makefile.in 2010-06-09 20:06:35.000000000 +0700 +++ libtool-2.4/tests/pdemo/Makefile.in 2010-09-22 21:45:11.000000000 +0700 @@ -187,6 +187,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -212,6 +213,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -238,6 +240,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ diff -ruNp libtool-2.2.10/tests/pdemo/aclocal.m4 libtool-2.4/tests/pdemo/aclocal.m4 --- libtool-2.2.10/tests/pdemo/aclocal.m4 2010-06-09 20:06:34.000000000 +0700 +++ libtool-2.4/tests/pdemo/aclocal.m4 2010-09-22 21:45:09.000000000 +0700 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff -ruNp libtool-2.2.10/tests/pdemo/configure libtool-2.4/tests/pdemo/configure --- libtool-2.2.10/tests/pdemo/configure 2010-06-09 20:06:34.000000000 +0700 +++ libtool-2.4/tests/pdemo/configure 2010-09-22 21:45:10.000000000 +0700 @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for pdemo 1.0. +# Generated by GNU Autoconf 2.67 for pdemo 1.0. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -327,7 +327,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -367,19 +367,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -543,7 +543,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -619,8 +619,11 @@ OTOOL LIPO NMEDIT DSYMUTIL +MANIFEST_TOOL RANLIB +ac_ct_AR AR +DLLTOOL OBJDUMP LN_S NM @@ -726,6 +729,7 @@ enable_static with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias @@ -736,7 +740,8 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP' +CPP +CPPFLAGS' # Initialize some variables set by options. @@ -799,8 +804,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -845,7 +851,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -871,7 +877,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1075,7 +1081,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1091,7 +1097,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1121,8 +1127,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1130,7 +1136,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1148,13 +1154,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1177,7 +1183,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1191,8 +1197,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1207,9 +1213,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1248,11 +1254,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1292,7 +1298,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1370,6 +1376,8 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command @@ -1448,9 +1456,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF pdemo configure 1.0 -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1554,7 +1562,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1597,7 +1605,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1663,7 +1671,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1726,7 +1734,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by pdemo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -1836,11 +1844,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1874,11 +1880,9 @@ $as_echo "$as_me: WARNING: cache variabl ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1891,11 +1895,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -1909,11 +1911,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -1968,7 +1968,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -1983,7 +1988,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2059,7 +2068,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2075,16 +2084,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in ../../libltdl/config "$srcdir"/../../libltdl/config; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2207,11 +2222,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2233,7 +2248,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2243,7 +2258,7 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2481,7 +2496,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2489,7 +2504,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2523,7 +2538,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`" am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -2884,8 +2899,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -2999,9 +3014,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3043,8 +3057,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3101,9 +3115,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3154,8 +3168,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3577,8 +3591,8 @@ esac -macro_version='2.2.10' -macro_revision='1.3175' +macro_version='2.4' +macro_revision='1.3293' @@ -3596,7 +3610,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -3607,16 +3621,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3641,7 +3655,7 @@ else ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3649,7 +3663,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3689,7 +3703,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -3791,7 +3805,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -3867,7 +3881,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -3933,7 +3947,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4000,7 +4014,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -4116,7 +4130,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -4505,8 +4519,8 @@ $as_echo_n "checking whether the shell u # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -4555,6 +4569,80 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if test "${lt_cv_to_host_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : @@ -4571,6 +4659,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -4894,6 +4987,21 @@ esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -4909,9 +5017,163 @@ test -z "$deplibs_check_method" && depli + + + + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : @@ -4927,7 +5189,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4947,11 +5209,15 @@ $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : @@ -4967,7 +5233,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4986,6 +5252,10 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -4997,12 +5267,14 @@ ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + @@ -5010,6 +5282,60 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if test "${lt_cv_ar_at_file+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + @@ -5348,8 +5674,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -5385,6 +5711,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -5426,6 +5753,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -5437,7 +5776,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -5463,8 +5802,8 @@ static const void *lt_preloaded_setup() _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -5474,8 +5813,8 @@ _LT_EOF test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -5512,6 +5851,17 @@ else $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + @@ -5534,6 +5884,43 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -5682,50 +6069,167 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +$as_echo "$lt_cv_cc_needs_belf" >&6; } + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test "${lt_cv_path_mainfest_tool+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes fi - rm -rf conftest* - ;; -esac + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + -need_locks="$enable_libtool_lock" case $host_os in @@ -6386,7 +6890,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6402,11 +6906,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -6445,7 +6949,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6461,18 +6965,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -6601,8 +7105,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7141,8 +7644,6 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -7307,6 +7808,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -7426,13 +7933,17 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -7493,6 +8004,11 @@ fi + + + + + # # Check to make sure the static flag actually works. # @@ -7843,7 +8359,8 @@ _LT_EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -7891,7 +8408,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -7961,8 +8478,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -7980,8 +8497,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8027,8 +8544,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8158,7 +8675,13 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8171,22 +8694,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -8198,7 +8728,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8211,22 +8747,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -8271,20 +8814,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -8349,7 +8935,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -8357,7 +8943,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -8373,7 +8959,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -8397,10 +8983,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -8479,23 +9065,36 @@ fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -8580,7 +9179,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' @@ -8599,9 +9198,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -9177,8 +9776,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -9211,13 +9811,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -10153,10 +10811,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10259,10 +10917,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10732,6 +11390,7 @@ DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -10755,15 +11414,15 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BINARY_HELLDL_TRUE}" && test -z "${BINARY_HELLDL_FALSE}"; then - as_fn_error "conditional \"BINARY_HELLDL\" was never defined. + as_fn_error $? "conditional \"BINARY_HELLDL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -10913,19 +11572,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -11121,7 +11780,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -11175,7 +11834,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # values after options handling. ac_log=" This file was extended by pdemo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11232,10 +11891,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ pdemo config.status 1.0 -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -11253,11 +11912,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -11279,6 +11943,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -11289,7 +11954,7 @@ do ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -11371,13 +12036,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' @@ -11392,14 +12064,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' @@ -11432,12 +12107,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' @@ -11492,8 +12167,13 @@ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -11503,12 +12183,14 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -11524,7 +12206,6 @@ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -11560,6 +12241,7 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ @@ -11607,7 +12289,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -11644,7 +12326,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -11661,7 +12343,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -11675,18 +12357,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -11775,20 +12457,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -11806,7 +12496,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -11834,7 +12524,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -11861,7 +12551,7 @@ $as_echo "$as_me: creating $ac_file" >&6 case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -11998,22 +12688,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -12244,19 +12934,42 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -12286,6 +12999,12 @@ global_symbol_to_c_name_address=$lt_lt_c # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -12295,6 +13014,9 @@ MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -12409,12 +13131,12 @@ with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -12501,9 +13223,6 @@ inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -12519,6 +13238,9 @@ include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -12551,210 +13273,169 @@ ltmain="$ac_aux_dir/ltmain.sh" # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -12769,7 +13450,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -12790,7 +13471,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -ruNp libtool-2.2.10/tests/pdemo/foo.h libtool-2.4/tests/pdemo/foo.h --- libtool-2.2.10/tests/pdemo/foo.h 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/pdemo/foo.h 2010-09-01 13:02:45.000000000 +0700 @@ -1,6 +1,6 @@ /* foo.h -- interface to the libfoo library - Copyright (C) 1996-1999 Free Software Foundation, Inc. + Copyright (C) 1996-1999, 2010 Free Software Foundation, Inc. Written by Gord Matzigkeit, 1996 This file is part of GNU Libtool. @@ -61,6 +61,18 @@ or obtained by writing to the Free Softw # define lt_ptr_t char* #endif +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __CYGWIN32__ # ifdef LIBFOO_DLL /* need some (as yet non-existant) automake magic to tell diff -ruNp libtool-2.2.10/tests/pdemo/longer_file_name_dlmain.c libtool-2.4/tests/pdemo/longer_file_name_dlmain.c --- libtool-2.2.10/tests/pdemo/longer_file_name_dlmain.c 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/pdemo/longer_file_name_dlmain.c 2010-09-01 13:02:45.000000000 +0700 @@ -34,7 +34,7 @@ typedef struct lt_ptr_t address; } lt_dlsymlist; -extern const lt_dlsymlist lt_preloaded_symbols[]; +extern LT_DLSYM_CONST lt_dlsymlist lt_preloaded_symbols[]; int main (int argc, char **argv) diff -ruNp libtool-2.2.10/tests/pic_flag.at libtool-2.4/tests/pic_flag.at --- libtool-2.2.10/tests/pic_flag.at 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/pic_flag.at 2010-09-16 10:09:16.000000000 +0700 @@ -0,0 +1,56 @@ +# pic_flag.at -- override the pic_flag at configure time -*- Autotest -*- + +# Copyright (C) 2010 Free Software Foundation, Inc. +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +#### + +AT_SETUP([override pic_flag at configure time]) + +# Just try to configure the Libtool package with -fpic if we can compile +# with it, for C and C++. + +AT_DATA([foo.c], +[[int data = 42; +int func(void) { return data; } +]]) + +cp foo.c foo.cpp +C_pic_flag='-fpic -DPIC' +AT_CHECK([$CC $CPPFLAGS $CFLAGS $C_pic_flag -c foo.c || exit 77], + [], [stdout], [stderr]) +# The configure test for the PIC flag also checks for warnings. +AT_CHECK([grep fpic stdout stderr && exit 77], [1]) +AT_CHECK([[grep '[uU]nknown.*option' stdout stderr && exit 77]], [1]) + +CXX_pic_flag='-fpic -DPIC' +if $CXX $CPPFLAGS $CXXFLAGS $CXX_pic_flag -c foo.cpp; then :; else + CXX_pic_flag= +fi + +AT_CHECK([test "$at_srcdir" != . || exit 77]) +LT_AT_CONFIGURE([lt_cv_prog_compiler_pic="$C_pic_flag" ]dnl + [lt_cv_prog_compiler_pic_CXX="$CXX_pic_flag"], + ["$abs_top_srcdir"/configure]) +: ${MAKE=make} +AT_CHECK([$MAKE], [], [stdout], [ignore]) +AT_CHECK([if ./libtool --features | grep 'enable shared libraries'; then ]dnl + [ grep ' -fpic' stdout; else exit 77; fi], [], [ignore], [ignore]) + +AT_CLEANUP diff -ruNp libtool-2.2.10/tests/resident.at libtool-2.4/tests/resident.at --- libtool-2.2.10/tests/resident.at 2010-05-21 04:19:02.000000000 +0700 +++ libtool-2.4/tests/resident.at 2010-09-01 12:09:12.000000000 +0700 @@ -38,6 +38,8 @@ main (int argc, char* argv[]) lt_dlhandle plugin_handle; lt_dladvise advise; + LTDL_SET_PRELOADED_SYMBOLS(); + if (argc < 2) { fprintf (stderr, "usage: %s plugin\n", argv[0]); diff -ruNp libtool-2.2.10/tests/sh.test libtool-2.4/tests/sh.test --- libtool-2.2.10/tests/sh.test 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/sh.test 2010-09-18 12:39:21.000000000 +0700 @@ -2,8 +2,8 @@ # sh.test - check for some nonportable or dubious or undesired shell # constructs in shell scripts. # -# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software -# Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010 Free +# Software Foundation, Inc. # Written by Gary V. Vaughan, 2003 # # This file is part of GNU Libtool. @@ -31,7 +31,7 @@ status=$EXIT_SUCCESS # Check for bad binary operators. -if $EGREP -n -e 'if[ ]+["'\'']?\\$[^ ]+[ ]+(=|-[lg][te]|-eq|-ne)' $scripts; then +if $EGREP -n -e 'if[ ]+["'\'']?\$[^ ]+[ ]+(=|-[lg][te]|-eq|-ne)' $scripts; then echo "use \`if test \$something =' instead of \`if \$something ='" status=$EXIT_FAILURE fi diff -ruNp libtool-2.2.10/tests/static.at libtool-2.4/tests/static.at --- libtool-2.2.10/tests/static.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/static.at 2010-09-01 13:02:45.000000000 +0700 @@ -371,7 +371,7 @@ AT_DATA([a.c], [[int main(void) { return 0; } ]]) -AT_CHECK([$CC $CPPFLAGS $CFLAGS -c a.c], [], [ignore]) +AT_CHECK([$CC $CPPFLAGS $CFLAGS -c a.c], [], [ignore], [ignore]) AT_CHECK([$LIBTOOL --mode=link --tag=CC ./ccache $CC $CFLAGS $LDFLAGS -all-static a.$OBJEXT -o a$EXEEXT], [], [ignore], [ignore]) diff -ruNp libtool-2.2.10/tests/stresstest.at libtool-2.4/tests/stresstest.at --- libtool-2.2.10/tests/stresstest.at 2010-05-21 04:18:41.000000000 +0700 +++ libtool-2.4/tests/stresstest.at 2010-09-01 13:02:45.000000000 +0700 @@ -93,29 +93,35 @@ AT_DATA(main.c, #if defined(LIBA_DLL_IMPORT) # if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) # define LIBA_SCOPE extern __declspec(dllimport) +# if defined(_MSC_VER) +# define LIBA_SCOPE_VAR LIBA_SCOPE +# endif # endif #endif #if !defined(LIBA_SCOPE) # define LIBA_SCOPE extern #endif +#if !defined(LIBA_SCOPE_VAR) +# define LIBA_SCOPE_VAR extern +#endif #ifdef __cplusplus extern "C" { #endif -extern int v1; -extern int v3, v4; +LIBA_SCOPE_VAR int v1; +LIBA_SCOPE_VAR int v3, v4; LIBA_SCOPE const int v5, v6; -extern const char* v7; -extern const char v8[]; +LIBA_SCOPE_VAR const char* v7; +LIBA_SCOPE_VAR const char v8[]; extern int v9(void); -extern int (*v10) (void); -extern int (*v11) (void); +LIBA_SCOPE_VAR int (*v10) (void); +LIBA_SCOPE_VAR int (*v11) (void); LIBA_SCOPE int (*const v12) (void); #ifdef __cplusplus } #endif typedef struct { int arr[1000]; } large; -extern large v13, v14, v15; +LIBA_SCOPE_VAR large v13, v14, v15; int main(void) { @@ -131,26 +137,32 @@ AT_DATA(dlself.c, #if defined(LIBA_DLL_IMPORT) # if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) # define LIBA_SCOPE extern __declspec(dllimport) +# if defined(_MSC_VER) +# define LIBA_SCOPE_VAR LIBA_SCOPE +# endif # endif #endif #if !defined(LIBA_SCOPE) # define LIBA_SCOPE extern #endif +#if !defined(LIBA_SCOPE_VAR) +# define LIBA_SCOPE_VAR extern +#endif #ifdef __cplusplus extern "C" { #endif -extern int v1; -extern int v3, v4; +LIBA_SCOPE_VAR int v1; +LIBA_SCOPE_VAR int v3, v4; LIBA_SCOPE const int v5, v6; -extern const char* v7; -extern const char v8[]; +LIBA_SCOPE_VAR const char* v7; +LIBA_SCOPE_VAR const char v8[]; extern int v9(void); -extern int (*v10) (void); -extern int (*v11) (void); +LIBA_SCOPE_VAR int (*v10) (void); +LIBA_SCOPE_VAR int (*v11) (void); LIBA_SCOPE int (*const v12) (void); typedef struct { int arr[1000]; } large; -extern large v13, v14, v15; +LIBA_SCOPE_VAR large v13, v14, v15; extern int w1; extern int w3, w4; @@ -252,9 +264,12 @@ do [0],[ignore],[ignore]) for st in '' '-static' '-no-install' do - case $st,$l3 in - ,-rpath*) mst= ;; - *) mst=-static ;; + # if -static is not passed, and the library is shared, then we have + # to use -DLIBA_DLL_IMPORT, thus main.lo (and not main-static.lo). + case $st,$l3 in + -static,*) mst=-static ;; + *,-rpath*) mst= ;; + *) mst=-static ;; esac LT_AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"main$EXEEXT "$rel"main$mst.lo "$rel"sub2/liba.la], diff -ruNp libtool-2.2.10/tests/sysroot.at libtool-2.4/tests/sysroot.at --- libtool-2.2.10/tests/sysroot.at 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/sysroot.at 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,208 @@ +# static.at -- test flags for sysrooting -*- Autotest -*- +# +# Copyright (C) 2009 Free Software Foundation, Inc. +# Written by Paolo Bonzini, 2009 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +#### + +m4_define([SYSROOT_TEST], [ +AT_SETUP([$1]) +AT_KEYWORDS([libtool sysroot]) + +gcc_sysroot=`$CC --print-sysroot 2> /dev/null` +if test $? != 0; then + gcc_sysroot= +fi +AT_CHECK([test -n "$gcc_sysroot" || exit 77]) + +# Detect installation prefix for the compiler +prefix= +for i in crt0.o crt1.o crt2.o crti.o; do + j=`$CC --print-file-name $i 2> /dev/null` + test $? = 0 || continue + case "$j" in + $gcc_sysroot*/lib/$i) + prefix=`echo "$j" | sed "s,^$gcc_sysroot\\(.*\\)/lib/$i\$,\\1,"` + break ;; + esac +done +AT_CHECK([test -n "$prefix" || exit 77]) + +sysroot=`pwd`/sys-root + +# difficult to use AS_DIRNAME inside the AT_CHECK macro, so +# encapsulate as a shell function. +local_dirname() { + AS_DIRNAME(["$[]1"]) +} + +AT_CHECK([ +(cd "$gcc_sysroot" && find ".$prefix/bin" ".$prefix/include" ".$prefix/lib" \! -type d) | \ +while read file; do + dir=`local_dirname "$sysroot/$file"` + test -d "$dir" || mkdir -p "$dir" + rm -f "$sysroot/$file" + ln -s "$gcc_sysroot/$file" "$sysroot/$file" || \ + cp "$gcc_sysroot/$file" "$sysroot/$file" +done]) + +LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" +configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" + +#??? +if test "$shlibpath_var" = PATH; then + configure_options="$configure_options --libdir=/$prefix/bin" +fi + +AT_CHECK([mkdir lib1 lib2 prog]) + +# Build and install package 1. +AT_DATA([lib1/configure.ac], +[[AC_INIT([lib1], [1.0]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AC_CONFIG_SRCDIR([lib1.c]) +LT_INIT +AC_OUTPUT(Makefile) +]]) + +AT_DATA([lib1/Makefile.am], +[[lib_LTLIBRARIES = lib1.la +lib1_la_SOURCES = lib1.c +lib1_la_LDFLAGS = -rpath $(libdir) +]]) + +AT_DATA([lib1/lib1.c], +[[#include +#include +char *f(const char *s) +{ + return strdup (s); +} +]]) + +cd lib1 +LT_AT_BOOTSTRAP([], [-I $abs_top_srcdir/libltdl/m4], [ignore], + [--add-missing], [], [], [all]) + +AT_CHECK([$MAKE install DESTDIR=$sysroot], [0], [ignore], [ignore]) +AT_CHECK([test -f "$sysroot/$prefix/lib/lib1.la"]) +AT_CHECK([grep -F "$sysroot" "$sysroot/$prefix/lib/lib1.la"], [1]) +cd .. + +# Build and install package 2. +AT_DATA([lib2/configure.ac], +[[AC_INIT([lib2], [1.0]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AC_CONFIG_SRCDIR([lib2.c]) +LT_INIT +sysroot=$with_sysroot +AC_SUBST([sysroot]) +AC_OUTPUT(Makefile) +]]) + +AT_DATA([lib2/Makefile.am], +[[lib_LTLIBRARIES = lib2.la +lib2_la_SOURCES = lib2.c +lib2_la_LDFLAGS = -rpath $(libdir) +lib2_la_LIBADD = $2]1[$3 +]]) + +AT_DATA([lib2/lib2.c], +[[#include +#include +#include +extern char *f(const char *s); +char *g(const char *s) +{ + char *q = f(s); + puts (q); + return q; +} +]]) + +cd lib2 +LT_AT_BOOTSTRAP([], [-I $abs_top_srcdir/libltdl/m4], [ignore], + [--add-missing], [], [], [all]) + +AT_CHECK([$MAKE install DESTDIR=$sysroot], [0], [ignore], [ignore]) +AT_CHECK([test -f $sysroot/$prefix/lib/lib2.la]) +AT_CHECK([grep -F "$sysroot" "$sysroot/$prefix/lib/lib2.la"], [1]) +cd .. + +# Build and install a program. +AT_DATA([prog/configure.ac], +[[AC_INIT([prog], [1.0]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AC_CONFIG_SRCDIR([prog.c]) +LT_INIT +sysroot=$with_sysroot +AC_SUBST([sysroot]) +AC_OUTPUT(Makefile) +]]) + +AT_DATA([prog/Makefile.am], +[[bin_PROGRAMS = prog +prog_SOURCES = prog.c +prog_LDADD = $2]2[$3 +]]) + +AT_DATA([prog/prog.c], +[[#include +#include +#include +extern char *g(const char *s); +int main() +{ + char *q = g("hello world"); + free (q); + return 0; +} +]]) + +cd prog +LT_AT_BOOTSTRAP([], [-I $abs_top_srcdir/libltdl/m4], [ignore], + [--add-missing], [], [], [all]) + +AT_CHECK([$MAKE install DESTDIR=$sysroot], [0], [ignore], [ignore]) +AT_CHECK([test -f $sysroot/$prefix/bin/prog$EXEEXT]) +AT_CHECK([grep -F "$sysroot" "$sysroot/$prefix/bin/prog$EXEEXT"], [1]) +AT_CHECK([grep "'.*=" $sysroot/$prefix/lib/lib2.la], [0], [ignore]) +AT_CHECK([./libtool --mode=finish $sysroot/$prefix/lib/lib@<:@12@:>@.la], [0], [ignore]) +AT_CHECK([grep "'.*=" $sysroot/$prefix/lib/lib@<:@12@:>@.la], [1]) + +# missing tests +# 1) pass absolute .la files +# 2) pass absolute -L +# 2) pass relative .la files + +cd .. +AT_CLEANUP +]) + +AT_BANNER([sysroot tests]) +SYSROOT_TEST([-L=.../lib -l], [-L=$(libdir) -l], []) +SYSROOT_TEST([-L SYSROOT/.../lib -l], [-L$(sysroot)$(libdir) -l], []) +SYSROOT_TEST([SYSROOT/.../*.la], [$(sysroot)$(libdir)/lib], [.la]) + +dnl This one does not make sense. +dnl SYSROOT_TEST([=.../*.la], [=$(libdir)/lib], [.la]) diff -ruNp libtool-2.2.10/tests/tagdemo/Makefile.in libtool-2.4/tests/tagdemo/Makefile.in --- libtool-2.2.10/tests/tagdemo/Makefile.in 2010-06-09 20:06:41.000000000 +0700 +++ libtool-2.4/tests/tagdemo/Makefile.in 2010-09-22 21:45:16.000000000 +0700 @@ -162,6 +162,7 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -186,6 +187,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -211,6 +213,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ diff -ruNp libtool-2.2.10/tests/tagdemo/aclocal.m4 libtool-2.4/tests/tagdemo/aclocal.m4 --- libtool-2.2.10/tests/tagdemo/aclocal.m4 2010-06-09 20:06:39.000000000 +0700 +++ libtool-2.4/tests/tagdemo/aclocal.m4 2010-09-22 21:45:15.000000000 +0700 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff -ruNp libtool-2.2.10/tests/tagdemo/configure libtool-2.4/tests/tagdemo/configure --- libtool-2.2.10/tests/tagdemo/configure 2010-06-09 20:06:40.000000000 +0700 +++ libtool-2.4/tests/tagdemo/configure 2010-09-22 21:45:16.000000000 +0700 @@ -1,13 +1,13 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for tagdemo 1.0. +# Generated by GNU Autoconf 2.67 for tagdemo 1.0. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -327,7 +327,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -367,19 +367,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -543,7 +543,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -614,8 +614,11 @@ OTOOL LIPO NMEDIT DSYMUTIL +MANIFEST_TOOL RANLIB +ac_ct_AR AR +DLLTOOL OBJDUMP LN_S NM @@ -733,7 +736,9 @@ enable_static with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock +with_gnu_ld ' ac_precious_vars='build_alias host_alias @@ -744,8 +749,12 @@ LDFLAGS LIBS CPPFLAGS CPP +CPPFLAGS CXX CXXFLAGS +LDFLAGS +LIBS +CPPFLAGS CCC CXXCPP' @@ -810,8 +819,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -856,7 +866,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -882,7 +892,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1086,7 +1096,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1102,7 +1112,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1132,8 +1142,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1141,7 +1151,7 @@ Try \`$0 --help' for more information." # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1159,13 +1169,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1188,7 +1198,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1202,8 +1212,8 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1218,9 +1228,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1259,11 +1269,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1303,7 +1313,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1382,6 +1392,8 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command @@ -1463,9 +1475,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF tagdemo configure 1.0 -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.67 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1535,7 +1547,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1610,7 +1622,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : @@ -1681,7 +1693,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1753,7 +1765,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1862,7 +1874,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by tagdemo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -1972,11 +1984,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2010,11 +2020,9 @@ $as_echo "$as_me: WARNING: cache variabl ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2027,11 +2035,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2045,11 +2051,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2104,7 +2108,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2119,7 +2128,11 @@ do { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2195,7 +2208,7 @@ if $ac_cache_corrupted; then $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2211,16 +2224,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in ../../libltdl/config "$srcdir"/../../libltdl/config; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../libltdl/config \"$srcdir\"/../../libltdl/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2235,7 +2254,7 @@ ac_configure="$SHELL $ac_aux_dir/configu # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -2246,16 +2265,16 @@ else test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2280,7 +2299,7 @@ else ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -2288,7 +2307,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2313,7 +2332,7 @@ else ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi @@ -2321,7 +2340,7 @@ fi $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; -*) as_fn_error "invalid value of canonical target" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' @@ -2454,11 +2473,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2480,7 +2499,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -2490,7 +2509,7 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -2728,7 +2747,7 @@ done $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2736,7 +2755,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2770,7 +2789,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`" am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -3131,8 +3150,8 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3246,9 +3265,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3290,8 +3308,8 @@ done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3348,9 +3366,9 @@ $as_echo "$ac_try_echo"; } >&5 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3401,8 +3419,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3853,7 +3871,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -3869,11 +3887,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -3912,7 +3930,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -3928,18 +3946,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -3957,7 +3975,7 @@ $as_echo_n "checking whether cc understa fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4482,7 +4500,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4498,11 +4516,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -4541,7 +4559,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -4557,18 +4575,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -4665,8 +4683,8 @@ esac -macro_version='2.2.10' -macro_revision='1.3175' +macro_version='2.4' +macro_revision='1.3293' @@ -4706,7 +4724,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. -if test "X`print -r -- -n 2>/dev/null`" = X-n && \ +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -4808,7 +4826,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -4884,7 +4902,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4950,7 +4968,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -5017,7 +5035,7 @@ esac done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -5133,7 +5151,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -5522,8 +5540,8 @@ $as_echo_n "checking whether the shell u # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -5572,6 +5590,80 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if test "${lt_cv_to_host_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if test "${lt_cv_to_tool_file_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : @@ -5588,6 +5680,11 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -5911,6 +6008,21 @@ esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -5926,9 +6038,162 @@ test -z "$deplibs_check_method" && depli + + + + + + + + + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : @@ -5944,7 +6209,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5964,11 +6229,15 @@ $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : @@ -5984,7 +6253,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6003,6 +6272,10 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -6014,12 +6287,10 @@ ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} @@ -6031,6 +6302,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if test "${lt_cv_ar_at_file+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + + + + + + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 @@ -6365,8 +6694,8 @@ esac lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -6402,6 +6731,7 @@ for ac_symprfx in "" "_"; do else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -6443,6 +6773,18 @@ _LT_EOF if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -6454,7 +6796,7 @@ _LT_EOF cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -6480,8 +6822,8 @@ static const void *lt_preloaded_setup() _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -6491,8 +6833,8 @@ _LT_EOF test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -6529,6 +6871,13 @@ else $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + @@ -6551,6 +6900,48 @@ fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -6744,6 +7135,123 @@ esac need_locks="$enable_libtool_lock" +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test "${lt_cv_path_mainfest_tool+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + case $host_os in rhapsody* | darwin*) @@ -7481,8 +7989,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7507,6 +8014,16 @@ done +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf + + + # Set options @@ -8022,8 +8539,6 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -8188,6 +8703,12 @@ $as_echo_n "checking for $compiler optio lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -8307,13 +8828,17 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -8374,6 +8899,11 @@ fi + + + + + # # Check to make sure the static flag actually works. # @@ -8724,7 +9254,8 @@ _LT_EOF allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -8772,7 +9303,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -8842,8 +9373,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -8861,8 +9392,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -8908,8 +9439,8 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -9039,7 +9570,13 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9052,22 +9589,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" @@ -9079,7 +9623,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath_+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9092,22 +9642,29 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -9152,20 +9709,63 @@ if test -z "$aix_libpath"; then aix_libp # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -9230,7 +9830,7 @@ if test -z "$aix_libpath"; then aix_libp # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -9238,7 +9838,7 @@ if test -z "$aix_libpath"; then aix_libp hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -9254,7 +9854,7 @@ if test -z "$aix_libpath"; then aix_libp hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -9278,10 +9878,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -9360,23 +9960,36 @@ fi irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test "${lt_cv_irix_exported_symbol+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' @@ -9461,7 +10074,7 @@ rm -f core conftest.err conftest.$ac_obj osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' @@ -9480,9 +10093,9 @@ rm -f core conftest.err conftest.$ac_obj no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -10058,8 +10671,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -10092,13 +10706,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -11034,10 +11706,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11140,10 +11812,10 @@ else /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -void fnord () __attribute__((visibility("default"))); +int fnord () __attribute__((visibility("default"))); #endif -void fnord () { int i=42; } +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -11354,7 +12026,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -11370,11 +12042,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -11413,7 +12085,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -11429,18 +12101,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp @@ -11535,6 +12207,7 @@ $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX @@ -11552,6 +12225,7 @@ $RM -r conftest* fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do @@ -11662,7 +12336,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : @@ -11691,8 +12365,8 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -11834,7 +12508,13 @@ $as_echo_n "checking whether the $compil allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -11847,22 +12527,29 @@ main () _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -11875,7 +12562,13 @@ if test -z "$aix_libpath"; then aix_libp else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if test "${lt_cv_aix_libpath__CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -11888,22 +12581,29 @@ main () _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -11946,29 +12646,75 @@ if test -z "$aix_libpath"; then aix_libp ;; cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; darwin* | rhapsody*) @@ -12074,7 +12820,7 @@ if test -z "$aix_libpath"; then aix_libp ;; *) if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -12145,10 +12891,10 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -12189,9 +12935,9 @@ if test -z "$aix_libpath"; then aix_libp *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes @@ -12469,7 +13215,7 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac @@ -12556,9 +13302,9 @@ if test -z "$aix_libpath"; then aix_libp if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -12693,6 +13439,13 @@ private: }; _LT_EOF + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -12706,7 +13459,7 @@ if { { eval echo "\"\$as_me\":${as_linen pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -12715,13 +13468,22 @@ if { { eval echo "\"\$as_me\":${as_linen test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} in + -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. @@ -12741,8 +13503,10 @@ if { { eval echo "\"\$as_me\":${as_linen postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -12778,6 +13542,7 @@ else fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in @@ -12878,8 +13643,6 @@ fi lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -12983,6 +13746,11 @@ $as_echo_n "checking for $compiler optio ;; esac ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; dgux*) case $cc_basename in ec++*) @@ -13200,10 +13968,17 @@ case $host_os in lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_prog_compiler_pic_CXX" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if test "${lt_cv_prog_compiler_pic_CXX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. @@ -13261,6 +14036,8 @@ fi + + # # Check to make sure the static flag actually works. # @@ -13438,6 +14215,7 @@ fi $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. @@ -13452,15 +14230,20 @@ $as_echo_n "checking whether the $compil ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" - ;; + ;; cygwin* | mingw* | cegcc*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; + case $cc_basename in + cl*) ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; + ;; esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } @@ -13723,8 +14506,9 @@ cygwin* | mingw* | pw32* | cegcc*) need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -13756,13 +14540,71 @@ cygwin* | mingw* | pw32* | cegcc*) library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -14316,6 +15158,7 @@ fi fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -14615,6 +15458,7 @@ DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -14638,15 +15482,15 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - as_fn_error "conditional \"am__fastdepCXX\" was never defined. + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -14796,19 +15640,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -15004,7 +15848,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -15058,7 +15902,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # values after options handling. ac_log=" This file was extended by tagdemo $as_me 1.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -15115,10 +15959,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ tagdemo config.status 1.0 -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -15136,11 +15980,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -15162,6 +16011,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -15172,7 +16022,7 @@ do ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -15254,13 +16104,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_ lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' @@ -15275,14 +16132,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$l lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' @@ -15315,12 +16175,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcod hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' @@ -15359,8 +16219,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archi compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' @@ -15387,12 +16247,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$har hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "$fix_srcfile_path_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' @@ -15430,8 +16290,13 @@ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +DLLTOOL \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -15441,12 +16306,14 @@ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -15462,7 +16329,6 @@ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -15484,8 +16350,8 @@ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ -lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ +lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ @@ -15497,7 +16363,6 @@ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ -fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ @@ -15531,6 +16396,7 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ @@ -15545,7 +16411,8 @@ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ -prelink_cmds_CXX; do +prelink_cmds_CXX \ +postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" @@ -15590,7 +16457,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -15627,7 +16494,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -15644,7 +16511,7 @@ if test "x$ac_cr" = x; then fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -15658,18 +16525,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15758,20 +16625,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -15789,7 +16664,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -15817,7 +16692,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -15844,7 +16719,7 @@ $as_echo "$as_me: creating $ac_file" >&6 case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -15981,22 +16856,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -16227,19 +17102,42 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd + # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -16269,6 +17167,12 @@ global_symbol_to_c_name_address=$lt_lt_c # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec + +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -16278,6 +17182,9 @@ MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -16392,12 +17299,12 @@ with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -16484,9 +17391,6 @@ inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -16502,6 +17406,9 @@ include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -16548,210 +17455,169 @@ ltmain="$ac_aux_dir/ltmain.sh" # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -16779,12 +17645,12 @@ with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX @@ -16871,9 +17737,6 @@ inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_CXX - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX @@ -16889,6 +17752,9 @@ include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX @@ -16923,7 +17789,7 @@ _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -16944,7 +17810,7 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -ruNp libtool-2.2.10/tests/tagdemo-shared-exec.test libtool-2.4/tests/tagdemo-shared-exec.test --- libtool-2.2.10/tests/tagdemo-shared-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/tagdemo-shared-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/tagdemo-exec.test diff -ruNp libtool-2.2.10/tests/tagdemo-shared-make.test libtool-2.4/tests/tagdemo-shared-make.test --- libtool-2.2.10/tests/tagdemo-shared-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/tagdemo-shared-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/tagdemo-make.test diff -ruNp libtool-2.2.10/tests/tagdemo-static-exec.test libtool-2.4/tests/tagdemo-static-exec.test --- libtool-2.2.10/tests/tagdemo-static-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/tagdemo-static-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/tagdemo-exec.test diff -ruNp libtool-2.2.10/tests/tagdemo-static-make.test libtool-2.4/tests/tagdemo-static-make.test --- libtool-2.2.10/tests/tagdemo-static-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/tagdemo-static-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/tagdemo-make.test diff -ruNp libtool-2.2.10/tests/tagdemo-undef-exec.test libtool-2.4/tests/tagdemo-undef-exec.test --- libtool-2.2.10/tests/tagdemo-undef-exec.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/tagdemo-undef-exec.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/tagdemo-exec.test diff -ruNp libtool-2.2.10/tests/tagdemo-undef-make.test libtool-2.4/tests/tagdemo-undef-make.test --- libtool-2.2.10/tests/tagdemo-undef-make.test 1970-01-01 07:00:00.000000000 +0700 +++ libtool-2.4/tests/tagdemo-undef-make.test 2010-09-01 13:02:45.000000000 +0700 @@ -0,0 +1,3 @@ +#! /bin/sh +. tests/defs || exit 1 +. $srcdir/tests/tagdemo-make.test diff -ruNp libtool-2.2.10/tests/testsuite libtool-2.4/tests/testsuite --- libtool-2.2.10/tests/testsuite 2010-06-09 20:05:39.000000000 +0700 +++ libtool-2.4/tests/testsuite 2010-09-22 21:44:11.000000000 +0700 @@ -1,7 +1,7 @@ #! /bin/sh -# Generated from testsuite.at by GNU Autoconf 2.65. +# Generated from testsuite.at by GNU Autoconf 2.67. # -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009, 2010 Free Software Foundation, Inc. # # This test suite is free software; the Free Software Foundation gives # unlimited permission to copy, distribute and modify it. @@ -311,7 +311,7 @@ $as_echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -351,19 +351,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -561,6 +561,8 @@ at_list_p=false at_clean=false # Test groups to run at_groups= +# Whether to rerun failed tests. +at_recheck= # Whether a write failure occurred at_write_fail=0 @@ -574,121 +576,137 @@ esac # Whether -C is in effect. at_change_dir=false +# Whether to enable colored test results. +at_color=auto # List of the tested programs. at_tested='' # List of the all the test groups. -at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106' +at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120' # As many question marks as there are digits in the last test group number. # Used to normalize the test group numbers so that `ls' lists them in # numerical order. at_format='???' # Description of all the test groups. -at_help_all="1;libtoolize.at:83;libtoolize macro installation;libtoolize; -2;libtoolize.at:108;libtoolize macro directory mismatch error;libtoolize; -3;libtoolize.at:128;libtoolize macro serial update;libtoolize; -4;libtoolize.at:201;libtoolize config files serial update;libtoolize; -5;libtoolize.at:281;diagnose missing LT_CONFIG_LTDL_DIR;libtoolize; -6;libtoolize.at:426;copy ltdl.m4 with shared macro directory;libtoolize; -7;libtoolize.at:438;correctly parse LTDL_INIT from configure.ac;libtoolize; -8;libtoolize.at:450;diagnose missing LTDL_INIT invocation;libtoolize; -9;libtoolize.at:527;upgrading verbatim style aclocal.m4;libtoolize automake; -10;libtoolize.at:651;verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR;libtoolize automake; -11;libtoolize.at:783;nonrecursive ltdl with AC_CONFIG_MACRO_DIR;libtoolize; -12;libtoolize.at:854;subproject ltdl with non-shared directories;libtoolize; -13;libtoolize.at:945;LIBTOOLIZE_OPTIONS;libtoolize; -14;libtoolize.at:992;cleanup old installation;libtoolize; -15;help.at:26;standard command line options;libtool libtoolize; -16;help.at:41;mode short-hands;; -17;duplicate_members.at:25;duplicate members in archive tests;libtool; -18;duplicate_conv.at:25;duplicate convenience archive names;libtool; -19;duplicate_deps.at:25;preserve duplicate convenience deps;libtool; -20;flags.at:24;passing CC flags through libtool;libtool cc; -21;flags.at:24;passing CXX flags through libtool;libtool cxx; -22;flags.at:24;passing F77 flags through libtool;libtool f77; -23;flags.at:24;passing FC flags through libtool;libtool fc; -24;flags.at:24;passing GCJ flags through libtool;libtool gcj; -25;inherited_flags.at:26;inherited_linker_flags;libtool; -26;convenience.at:30;C convenience archives;libtool; -27;convenience.at:69;C++ convenience archives;cxx libtool; -28;convenience.at:109;F77 convenience archives;f77 libtool; -29;convenience.at:169;FC convenience archives;fc libtool; -30;convenience.at:229;Java convenience archives;gcj libtool; -31;link-order.at:26;Link order test;libtool; -32;link-order2.at:46;Link order of deplibs;libtool interactive; -33;fail.at:27;Failure tests;libtool; -34;shlibpath.at:25;shlibpath_overrides_runpath;libtool; -35;runpath-in-lalib.at:25;Runpath in libtool library files;libtool; -36;static.at:68;static linking flags for programs;libtool interactive; -37;static.at:358;ccache -all-static;; -38;export.at:25;Export test;libtool; -39;search-path.at:25;sys_lib_search_path;libtool; -40;indirect_deps.at:25;indirect convenience;libtool; -41;indirect_deps.at:71;indirect uninstalled;libtool; -42;archive-in-archive.at:26;static library contains static library;libtool; -43;execute-mode.at:25;execute mode;libtool; -44;bindir.at:64;bindir compile check;; -45;bindir.at:81;bindir basic lib test;; -46;bindir.at:190;bindir install tests;; -47;cwrapper.at:25;cwrapper for uninstalled executables;libtool; -48;deplib-in-subdir.at:34;deplib in subdir;libtool; -49;infer-tag.at:30;inferred tag;libtool; -50;infer-tag.at:42;CXX inferred tag;cxx libtool; -51;infer-tag.at:55;F77 inferred tag;f77 libtool; -52;infer-tag.at:69;FC inferred tag;fc libtool; -53;infer-tag.at:83;GCJ inferred tag;gcj libtool; -54;localization.at:25;localized compiler messages;libtool; -55;install.at:25;Install tests;libtool; -56;versioning.at:24;versioning;libtool; -57;destdir.at:48;Simple DESTDIR install;libtool; -58;destdir.at:75;DESTDIR with in-package deplibs;libtool; -59;old-m4-iface.at:40;AM_PROG_LIBTOOL;libtoolize autoconf; -60;old-m4-iface.at:112;AC_WITH_LTDL;libtoolize automake autoconf; -61;am-subdir.at:33;C subdir-objects;libtoolize automake autoconf; -62;am-subdir.at:93;C++ subdir-objects;cxx libtoolize automake autoconf; -63;lt_dlexit.at:30;lt_dlexit unloading libs;libltdl; -64;lt_dladvise.at:28;lt_dlopenadvise library loading;libltdl; -65;lt_dlopen.at:23;lt_dlopen error messages;libltdl; -66;lt_dlopen_a.at:23;lt_dlopen archive;libltdl lt_dlopen_a; -67;lt_dlopenext.at:23;lt_dlopenext error messages;libltdl; -68;ltdl-api.at:25;ltdl API;libltdl; -69;dlloader-api.at:23;dlloader API;libltdl; -70;loadlibrary.at:23;loadlibrary error messages;libltdl; -71;lalib-syntax.at:24;syntax of .la files;libtool libltdl; -72;resident.at:27;resident modules;libltdl; -73;slist.at:24;SList functionality;; -74;need_lib_prefix.at:25;enforced lib prefix;libltdl libtool; -75;standalone.at:31;compiling softlinked libltdl;libtoolize; -76;standalone.at:46;compiling copied libltdl;libtoolize; -77;standalone.at:61;installable libltdl;libtoolize; -78;standalone.at:79;linking libltdl without autotools;libtoolize; -79;subproject.at:57;compiling softlinked libltdl;libtoolize automake autoconf; -80;subproject.at:73;compiling copied libltdl;libtoolize automake autoconf; -81;subproject.at:89;installable libltdl;libtoolize automake autoconf; -82;subproject.at:109;linking libltdl without autotools;libtoolize; -83;nonrecursive.at:78;compiling softlinked libltdl;libtoolize automake autoconf; -84;nonrecursive.at:102;compiling copied libltdl;libtoolize automake autoconf; -85;nonrecursive.at:126;installable libltdl;libtoolize automake autoconf; -86;recursive.at:60;compiling softlinked libltdl;libtoolize autoconf automake; -87;recursive.at:80;compiling copied libltdl;libtoolize autoconf automake; -88;recursive.at:100;installable libltdl;libtoolize autoconf automake; -89;template.at:27;simple template test;cxx libtool; -90;template.at:126;template test with subdirs;cxx libtool; -91;ctor.at:27;C++ static constructors;cxx libtool; -92;exceptions.at:24;C++ exception handling;libtool libltdl; -93;early-libtool.at:32;config.status;libtoolize automake autoconf; -94;early-libtool.at:126;config.lt;libtoolize automake autoconf; -95;no-executables.at:26;AC_NO_EXECUTABLES;libtoolize automake autoconf; -96;deplibs-ident.at:32;build tree relpaths;libtool; -97;configure-iface.at:102;installable libltdl;libltdl libtoolize automake autoconf; -98;configure-iface.at:162;--with-ltdl-include/lib;libltdl libtoolize automake autoconf; -99;configure-iface.at:243;--with-included-ltdl;libltdl libtoolize automake autoconf; -100;configure-iface.at:304;convenience libltdl;libtoolize automake autoconf; -101;stresstest.at:31;Link option thorough search test;libtool; -102;cmdline_wrap.at:28;Run tests with low max_cmd_len;recursive; -103;darwin.at:26;darwin fat compile;; -104;darwin.at:103;darwin concurrent library extraction;; -105;darwin.at:152;darwin gdb debug information;; -106;deplibs-mingw.at:27;deplibs without file command;libtool; +at_help_all="1;getopt-m4sh.at:85;short option splitting;; +2;getopt-m4sh.at:98;enhanced shell short option splitting;; +3;getopt-m4sh.at:119;long option splitting;; +4;getopt-m4sh.at:132;XSI long option splitting;; +5;getopt-m4sh.at:153;option appending;; +6;getopt-m4sh.at:169;enhanced shell option appending;; +7;libtoolize.at:83;libtoolize macro installation;libtoolize; +8;libtoolize.at:108;libtoolize macro directory mismatch error;libtoolize; +9;libtoolize.at:128;libtoolize macro serial update;libtoolize; +10;libtoolize.at:201;libtoolize config files serial update;libtoolize; +11;libtoolize.at:281;diagnose missing LT_CONFIG_LTDL_DIR;libtoolize; +12;libtoolize.at:426;copy ltdl.m4 with shared macro directory;libtoolize; +13;libtoolize.at:438;correctly parse LTDL_INIT from configure.ac;libtoolize; +14;libtoolize.at:450;diagnose missing LTDL_INIT invocation;libtoolize; +15;libtoolize.at:527;upgrading verbatim style aclocal.m4;libtoolize automake; +16;libtoolize.at:651;verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR;libtoolize automake; +17;libtoolize.at:783;nonrecursive ltdl with AC_CONFIG_MACRO_DIR;libtoolize; +18;libtoolize.at:854;subproject ltdl with non-shared directories;libtoolize; +19;libtoolize.at:945;LIBTOOLIZE_OPTIONS;libtoolize; +20;libtoolize.at:992;cleanup old installation;libtoolize; +21;help.at:26;standard command line options;libtool libtoolize; +22;help.at:45;mode short-hands;; +23;help.at:97;debug tracing;; +24;duplicate_members.at:25;duplicate members in archive tests;libtool; +25;duplicate_conv.at:25;duplicate convenience archive names;libtool; +26;duplicate_deps.at:25;preserve duplicate convenience deps;libtool; +27;flags.at:24;passing CC flags through libtool;libtool cc; +28;flags.at:24;passing CXX flags through libtool;libtool cxx; +29;flags.at:24;passing F77 flags through libtool;libtool f77; +30;flags.at:24;passing FC flags through libtool;libtool fc; +31;flags.at:24;passing GCJ flags through libtool;libtool gcj; +32;inherited_flags.at:26;inherited_linker_flags;libtool; +33;convenience.at:31;C convenience archives;libtool; +34;convenience.at:70;C++ convenience archives;cxx libtool; +35;convenience.at:110;F77 convenience archives;f77 libtool; +36;convenience.at:170;FC convenience archives;fc libtool; +37;convenience.at:230;Java convenience archives;gcj libtool; +38;link-order.at:26;Link order test;libtool; +39;link-order2.at:46;Link order of deplibs;libtool interactive; +40;fail.at:27;Failure tests;libtool; +41;shlibpath.at:25;shlibpath_overrides_runpath;libtool; +42;runpath-in-lalib.at:25;Runpath in libtool library files;libtool; +43;static.at:68;static linking flags for programs;libtool interactive; +44;static.at:358;ccache -all-static;; +45;export.at:25;Export test;libtool; +46;search-path.at:25;sys_lib_search_path;libtool; +47;indirect_deps.at:25;indirect convenience;libtool; +48;indirect_deps.at:71;indirect uninstalled;libtool; +49;archive-in-archive.at:26;static library contains static library;libtool; +50;exeext.at:26;both of -o prog and -o prog\$EXEEXT work;libtool; +51;execute-mode.at:25;execute mode;libtool; +52;bindir.at:64;bindir compile check;; +53;bindir.at:81;bindir basic lib test;; +54;bindir.at:190;bindir install tests;; +55;cwrapper.at:25;cwrapper for uninstalled executables;libtool; +56;deplib-in-subdir.at:34;deplib in subdir;libtool; +57;infer-tag.at:30;inferred tag;libtool; +58;infer-tag.at:42;CXX inferred tag;cxx libtool; +59;infer-tag.at:55;F77 inferred tag;f77 libtool; +60;infer-tag.at:69;FC inferred tag;fc libtool; +61;infer-tag.at:83;GCJ inferred tag;gcj libtool; +62;localization.at:24;localized compiler messages;libtool; +63;nocase.at:26;nocase library search;libtool; +64;install.at:25;Install tests;libtool; +65;versioning.at:24;versioning;libtool; +66;destdir.at:48;Simple DESTDIR install;libtool; +67;destdir.at:75;DESTDIR with in-package deplibs;libtool; +68;old-m4-iface.at:40;AM_PROG_LIBTOOL;libtoolize autoconf; +69;old-m4-iface.at:112;AC_WITH_LTDL;libtoolize automake autoconf; +70;am-subdir.at:33;C subdir-objects;libtoolize automake autoconf; +71;am-subdir.at:93;C++ subdir-objects;cxx libtoolize automake automake autoconf; +72;lt_dlexit.at:30;lt_dlexit unloading libs;libltdl; +73;lt_dladvise.at:28;lt_dlopenadvise library loading;libltdl; +74;lt_dlopen.at:23;lt_dlopen error messages;libltdl; +75;lt_dlopen_a.at:23;lt_dlopen archive;libltdl lt_dlopen_a; +76;lt_dlopenext.at:23;lt_dlopenext error messages;libltdl; +77;ltdl-libdir.at:23;libdir of installed modules;libltdl; +78;ltdl-api.at:25;ltdl API;libltdl; +79;dlloader-api.at:23;dlloader API;libltdl; +80;loadlibrary.at:23;loadlibrary error messages;libltdl; +81;lalib-syntax.at:24;syntax of .la files;libtool libltdl; +82;resident.at:27;resident modules;libltdl; +83;slist.at:24;SList functionality;; +84;need_lib_prefix.at:25;enforced lib prefix;libltdl libtool; +85;standalone.at:31;compiling softlinked libltdl;libtoolize; +86;standalone.at:46;compiling copied libltdl;libtoolize; +87;standalone.at:61;installable libltdl;libtoolize; +88;standalone.at:79;linking libltdl without autotools;libtoolize; +89;subproject.at:57;compiling softlinked libltdl;libtoolize automake autoconf; +90;subproject.at:73;compiling copied libltdl;libtoolize automake autoconf; +91;subproject.at:89;installable libltdl;libtoolize automake autoconf; +92;subproject.at:109;linking libltdl without autotools;libtoolize; +93;nonrecursive.at:78;compiling softlinked libltdl;libtoolize automake autoconf autoconf; +94;nonrecursive.at:102;compiling copied libltdl;libtoolize automake autoconf autoconf; +95;nonrecursive.at:126;installable libltdl;libtoolize automake autoconf autoconf; +96;recursive.at:60;compiling softlinked libltdl;libtoolize autoconf automake; +97;recursive.at:80;compiling copied libltdl;libtoolize autoconf automake; +98;recursive.at:100;installable libltdl;libtoolize autoconf automake; +99;template.at:27;simple template test;cxx libtool; +100;template.at:126;template test with subdirs;cxx libtool; +101;ctor.at:27;C++ static constructors;cxx libtool; +102;exceptions.at:24;C++ exception handling;libtool libltdl; +103;early-libtool.at:32;config.status;libtoolize automake autoconf; +104;early-libtool.at:126;config.lt;libtoolize automake autoconf; +105;no-executables.at:25;AC_NO_EXECUTABLES;libtoolize automake autoconf; +106;deplibs-ident.at:32;build tree relpaths;libtool; +107;configure-iface.at:102;installable libltdl;libltdl libtoolize automake autoconf automake; +108;configure-iface.at:162;--with-ltdl-include/lib;libltdl libtoolize automake autoconf automake; +109;configure-iface.at:243;--with-included-ltdl;libltdl libtoolize automake autoconf automake; +110;configure-iface.at:304;convenience libltdl;libtoolize automake autoconf; +111;stresstest.at:31;Link option thorough search test;libtool; +112;cmdline_wrap.at:28;Run tests with low max_cmd_len;recursive; +113;pic_flag.at:24;override pic_flag at configure time;; +114;darwin.at:26;darwin fat compile;; +115;darwin.at:103;darwin concurrent library extraction;; +116;darwin.at:152;darwin gdb debug information;; +117;deplibs-mingw.at:27;deplibs without file command;libtool; +118;sysroot.at:203;-L=.../lib -l;libtool sysroot libtoolize automake automake autoconf autoconf; +119;sysroot.at:204;-L SYSROOT/.../lib -l;libtool sysroot libtoolize automake automake autoconf autoconf; +120;sysroot.at:205;SYSROOT/.../*.la;libtool sysroot libtoolize automake automake autoconf autoconf; " # at_fn_validate_ranges NAME... @@ -700,7 +718,7 @@ at_fn_validate_ranges () for at_grp do eval at_value=\$$at_grp - if test $at_value -lt 1 || test $at_value -gt 106; then + if test $at_value -lt 1 || test $at_value -gt 120; then $as_echo "invalid test group: $at_value" >&2 exit 1 fi @@ -725,8 +743,8 @@ do fi case $at_option in - *=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;; - *) at_optarg= ;; + *=?*) at_optarg=`expr "X$at_option" : '[^=]*=\(.*\)'` ;; + *) at_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -748,6 +766,19 @@ do at_clean=: ;; + --color ) + at_color=always + ;; + --color=* ) + case $at_optarg in + no | never | none) at_color=never ;; + auto | tty | if-tty) at_color=auto ;; + always | yes | force) at_color=always ;; + *) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'` + as_fn_error $? "unrecognized argument to $at_optname: $at_optarg" ;; + esac + ;; + --debug | -d ) at_debug_p=: ;; @@ -816,6 +847,9 @@ do --directory=* ) at_change_dir=: at_dir=$at_optarg + if test x- = "x$at_dir" ; then + at_dir=./- + fi ;; # Parallel execution. @@ -830,7 +864,7 @@ do fi case $at_jobs in *[!0-9]*) at_optname=`echo " $at_option" | sed 's/^ //; s/[0-9=].*//'` - as_fn_error "non-numeric argument to $at_optname: $at_jobs" ;; + as_fn_error $? "non-numeric argument to $at_optname: $at_jobs" ;; esac ;; @@ -864,13 +898,16 @@ do ` as_fn_append at_groups "$at_groups_selected " ;; + --recheck) + at_recheck=: + ;; *=*) at_envvar=`expr "x$at_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $at_envvar in '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$at_envvar'" ;; + as_fn_error $? "invalid variable name: \`$at_envvar'" ;; esac at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"` # Export now, but save eval for later and for debug scripts. @@ -887,17 +924,43 @@ done # Verify our last option didn't require an argument if test -n "$at_prev"; then : - as_fn_error "\`$at_prev' requires an argument." + as_fn_error $? "\`$at_prev' requires an argument" fi +# The file containing the suite. +at_suite_log=$at_dir/$as_me.log + # Selected test groups. -if test -z "$at_groups"; then +if test -z "$at_groups$at_recheck"; then at_groups=$at_groups_all else + if test -n "$at_recheck" && test -r "$at_suite_log"; then + at_oldfails=`sed -n ' + /^Failed tests:$/,/^Skipped tests:$/{ + s/^[ ]*\([1-9][0-9]*\):.*/\1/p + } + /^Unexpected passes:$/,/^## Detailed failed tests/{ + s/^[ ]*\([1-9][0-9]*\):.*/\1/p + } + /^## Detailed failed tests/q + ' "$at_suite_log" | tr "$as_nl" ' '` + as_fn_append at_groups "$at_oldfails" + fi # Sort the tests, removing duplicates. at_groups=`$as_echo "$at_groups" | tr ' ' "$as_nl" | sort -nu` fi +if test x"$at_color" = xalways \ + || { test x"$at_color" = xauto && test -t 1; }; then + at_red=`printf '\033[0;31m'` + at_grn=`printf '\033[0;32m'` + at_lgn=`printf '\033[1;32m'` + at_blu=`printf '\033[1;34m'` + at_std=`printf '\033[m'` +else + at_red= at_grn= at_lgn= at_blu= at_std= +fi + # Help message. if $at_help_p; then cat <<_ATEOF || at_write_fail=1 @@ -931,11 +994,14 @@ cat <<_ATEOF || at_write_fail=1 Execution tuning: -C, --directory=DIR change to directory DIR before starting + --color[=never|auto|always] + disable colored test results, or enable even without terminal -j, --jobs[=N] Allow N jobs at once; infinite jobs with no arg (default 1) -k, --keywords=KEYWORDS select the tests matching all the comma-separated KEYWORDS multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD + --recheck select all tests that failed or passed unexpectedly last time -e, --errexit abort as soon as a test fails; implies --debug -v, --verbose force more detailed output default for debugging scripts @@ -946,6 +1012,8 @@ _ATEOF cat <<_ATEOF || at_write_fail=1 Report bugs to . +GNU Libtool home page: . +General help using GNU software: . _ATEOF exit $at_write_fail fi @@ -953,7 +1021,7 @@ fi # List of tests. if $at_list_p; then cat <<_ATEOF || at_write_fail=1 -libtool 2.2.10 test suite test groups: +GNU Libtool 2.4 test suite test groups: NUM: FILE-NAME:LINE TEST-GROUP-NAME KEYWORDS @@ -1002,10 +1070,10 @@ _ATEOF exit $at_write_fail fi if $at_version_p; then - $as_echo "$as_me (libtool 2.2.10)" && + $as_echo "$as_me (GNU Libtool 2.4)" && cat <<\_ATEOF || at_write_fail=1 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This test suite is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ATEOF @@ -1020,68 +1088,71 @@ case $at_groups in * ) at_print_banners=false ;; esac # Text for banner N, set to empty once printed. -# Banner 1. libtoolize.at:26 +# Banner 1. getopt-m4sh.at:25 # Category starts at test group 1. -at_banner_text_1="Libtoolize operation." -# Banner 2. help.at:24 -# Category starts at test group 15. -at_banner_text_2="Testing libtool functions." -# Banner 3. destdir.at:25 -# Category starts at test group 57. -at_banner_text_3="DESTDIR tests" -# Banner 4. old-m4-iface.at:26 -# Category starts at test group 59. -at_banner_text_4="Support for older m4 interface." -# Banner 5. am-subdir.at:26 -# Category starts at test group 61. -at_banner_text_5="Libtool subdir-objects support." -# Banner 6. lt_dlexit.at:28 -# Category starts at test group 63. -at_banner_text_6="Libltdl functionality." -# Banner 7. standalone.at:25 -# Category starts at test group 75. -at_banner_text_7="Standalone Libltdl." -# Banner 8. subproject.at:25 -# Category starts at test group 79. -at_banner_text_8="Subproject Libltdl." -# Banner 9. nonrecursive.at:26 -# Category starts at test group 83. -at_banner_text_9="Nonrecursive Automake Libltdl." -# Banner 10. recursive.at:25 -# Category starts at test group 86. -at_banner_text_10="Recursive Automake Libltdl." -# Banner 11. template.at:25 +at_banner_text_1="Shell option parser generator." +# Banner 2. libtoolize.at:26 +# Category starts at test group 7. +at_banner_text_2="Libtoolize operation." +# Banner 3. help.at:24 +# Category starts at test group 21. +at_banner_text_3="Testing libtool functions." +# Banner 4. destdir.at:25 +# Category starts at test group 66. +at_banner_text_4="DESTDIR tests" +# Banner 5. old-m4-iface.at:26 +# Category starts at test group 68. +at_banner_text_5="Support for older m4 interface." +# Banner 6. am-subdir.at:26 +# Category starts at test group 70. +at_banner_text_6="Libtool subdir-objects support." +# Banner 7. lt_dlexit.at:28 +# Category starts at test group 72. +at_banner_text_7="Libltdl functionality." +# Banner 8. standalone.at:25 +# Category starts at test group 85. +at_banner_text_8="Standalone Libltdl." +# Banner 9. subproject.at:25 # Category starts at test group 89. -at_banner_text_11="C++ template tests." -# Banner 12. ctor.at:25 -# Category starts at test group 91. -at_banner_text_12="Constructors." -# Banner 13. early-libtool.at:25 +at_banner_text_9="Subproject Libltdl." +# Banner 10. nonrecursive.at:26 # Category starts at test group 93. -at_banner_text_13="libtool script generation." -# Banner 14. no-executables.at:25 -# Category starts at test group 95. -at_banner_text_14="Libtool usage in GCC" -# Banner 15. deplibs-ident.at:25 +at_banner_text_10="Nonrecursive Automake Libltdl." +# Banner 11. recursive.at:25 # Category starts at test group 96. -at_banner_text_15="Detecting identical deplibs." -# Banner 16. configure-iface.at:25 -# Category starts at test group 97. -at_banner_text_16="configure interface to libltdl." -# Banner 17. stresstest.at:30 +at_banner_text_11="Recursive Automake Libltdl." +# Banner 12. template.at:25 +# Category starts at test group 99. +at_banner_text_12="C++ template tests." +# Banner 13. ctor.at:25 # Category starts at test group 101. -at_banner_text_17="Libtool stress test." -# Banner 18. darwin.at:25 +at_banner_text_13="Constructors." +# Banner 14. early-libtool.at:25 # Category starts at test group 103. -at_banner_text_18="Mac OS X tests" +at_banner_text_14="libtool script generation." +# Banner 15. no-executables.at:24 +# Category starts at test group 105. +at_banner_text_15="Libtool usage in GCC" +# Banner 16. deplibs-ident.at:25 +# Category starts at test group 106. +at_banner_text_16="Detecting identical deplibs." +# Banner 17. configure-iface.at:25 +# Category starts at test group 107. +at_banner_text_17="configure interface to libltdl." +# Banner 18. stresstest.at:30 +# Category starts at test group 111. +at_banner_text_18="Libtool stress test." +# Banner 19. darwin.at:25 +# Category starts at test group 114. +at_banner_text_19="Mac OS X tests" +# Banner 20. sysroot.at:202 +# Category starts at test group 118. +at_banner_text_20="sysroot tests" # Take any -C into account. if $at_change_dir ; then - if test x- = "x$at_dir" ; then - at_dir=./- - fi test x != "x$at_dir" && cd "$at_dir" \ - || as_fn_error "unable to change directory" + || as_fn_error $? "unable to change directory" at_dir=`pwd` fi @@ -1089,7 +1160,7 @@ fi for at_file in atconfig atlocal do test -r $at_file || continue - . ./$at_file || as_fn_error "invalid content: $at_file" + . ./$at_file || as_fn_error $? "invalid content: $at_file" done # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix: @@ -1146,7 +1217,7 @@ fi # The directory the whole suite works in. # Should be absolute to let the user `cd' at will. at_suite_dir=$at_dir/$as_me.dir -# The file containing the suite. +# The file containing the suite ($at_dir might have changed since earlier). at_suite_log=$at_dir/$as_me.log # The directory containing helper files per test group. at_helper_dir=$at_suite_dir/at-groups @@ -1226,6 +1297,7 @@ export PATH # Setting up the FDs. + # 5 is the log file. Not to be overwritten if `-d'. if $at_debug_p; then at_suite_log=/dev/null @@ -1235,43 +1307,28 @@ fi exec 5>>"$at_suite_log" # Banners and logs. -cat <<\_ASBOX -## -------------------------- ## -## libtool 2.2.10 test suite. ## -## -------------------------- ## -_ASBOX -{ - cat <<\_ASBOX -## -------------------------- ## -## libtool 2.2.10 test suite. ## -## -------------------------- ## -_ASBOX +$as_echo "## --------------------------- ## +## GNU Libtool 2.4 test suite. ## +## --------------------------- ##" +{ + $as_echo "## --------------------------- ## +## GNU Libtool 2.4 test suite. ## +## --------------------------- ##" echo $as_echo "$as_me: command line was:" $as_echo " \$ $0 $at_cli_args" echo - # Try to find a few ChangeLogs in case it might help determining the - # exact version. Use the relative dir: if the top dir is a symlink, - # find will not follow it (and options to follow the links are not - # portable), which would result in no output here. Prune directories - # matching the package tarname, since they tend to be leftovers from - # `make dist' or `make distcheck' and contain redundant or stale logs. - if test -n "$at_top_srcdir"; then - cat <<\_ASBOX -## ----------- ## -## ChangeLogs. ## -## ----------- ## -_ASBOX + # If ChangeLog exists, list a few lines in case it might help determining + # the exact version. + if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then + $as_echo "## ---------- ## +## ChangeLog. ## +## ---------- ##" + echo + sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog" echo - for at_file in `find "$at_top_srcdir" -name "libtool-*" -prune -o -name ChangeLog -print` - do - $as_echo "$as_me: $at_file:" - sed 's/^/| /;10q' $at_file - echo - done - fi { @@ -1321,6 +1378,59 @@ IFS=$as_save_IFS done } >&5 +: ${tst_dist=dist} +: ${ACLOCAL=aclocal} +: ${AUTOHEADER=autoheader} +: ${AUTOCONF=autoconf} +: ${AUTOMAKE=automake} +: ${AUTORECONF=autoreconf} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${ECHO=$as_echo} +for tool in ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF; do + if eval \$$tool --version >/dev/null 2>&1; then :; else eval $tool=no; fi +done +export ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF +eval `$LIBTOOL --config | grep '^EGREP='` +eval `$LIBTOOL --config | $EGREP '^(host|host_os|host_alias|build|build_alias|to_host_file_cmd|to_tool_file_cmd)='` +configure_options=--prefix=/nonexistent +if test -n "$host_alias"; then + configure_options="$configure_options --host $host_alias" +fi +if test -n "$build_alias"; then + configure_options="$configure_options --build $build_alias" +fi +if test -n "$to_host_file_cmd"; then + configure_options="$configure_options lt_cv_to_host_file_cmd=$to_host_file_cmd" +fi +if test -n "$to_tool_file_cmd"; then + configure_options="$configure_options lt_cv_to_tool_file_cmd=$to_tool_file_cmd" +fi +if (FOO=bar; unset FOO) >/dev/null 2>&1; then + unset=unset +else + unset=false +fi +: ${mkdir_p="$abs_top_srcdir/libltdl/config/install-sh -d"} +# Fix relative paths in $lt_INSTALL +case $lt_INSTALL in + *libltdl/config/install-sh*) + lt_INSTALL=$abs_top_srcdir/libltdl/config/install-sh + ;; +esac + +# Unset some MAKE... variables that may cause $MAKE to act like a +# recursively invoked sub-make. Any $MAKE invocation in a test is +# conceptually an independent invocation. +unset MFLAGS MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO + +# On AIX, shared libraries remain loaded in memory after use if they +# are world-readable, until root issues slibclean. On NFS, this causes +# a testsuite rerun to fail to clean up test group directories. Avoid +# this with a suitable umask. Do not do this on other systems, for +# example HP-UX suffers unless shared libraries are mode 555. +case $host_os in +aix*) umask o-rwx ;; +esac ## ------------------------- ## ## Autotest shell functions. ## @@ -1470,11 +1580,9 @@ at_fn_create_debugging_script () ## End of autotest shell functions. ## ## -------------------------------- ## { - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Tested programs. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo } >&5 @@ -1498,72 +1606,28 @@ IFS=$as_save_IFS esac if test -f "$at_program_"; then { - $as_echo "$at_srcdir/testsuite.at:26: $at_program_ --version" + $as_echo "$at_srcdir/testsuite.at:461: $at_program_ --version" "$at_program_" --version &5 2>&1 else - as_fn_error "cannot find $at_program" "$LINENO" 5 + as_fn_error $? "cannot find $at_program" "$LINENO" 5 fi done { - cat <<\_ASBOX -## ------------------ ## + $as_echo "## ------------------ ## ## Running the tests. ## -## ------------------ ## -_ASBOX +## ------------------ ##" } >&5 at_start_date=`date` at_start_time=`date +%s 2>/dev/null` $as_echo "$as_me: starting at: $at_start_date" >&5 -: ${tst_dist=dist} -: ${ACLOCAL=aclocal} -: ${AUTOHEADER=autoheader} -: ${AUTOCONF=autoconf} -: ${AUTOMAKE=automake} -: ${AUTORECONF=autoreconf} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${ECHO=$as_echo} -for tool in ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF; do - if eval \$$tool --version >/dev/null 2>&1; then :; else eval $tool=no; fi -done -export ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF -eval `$LIBTOOL --config | grep '^EGREP='` -eval `$LIBTOOL --config | $EGREP '^(host|host_os|host_alias|build|build_alias)='` -configure_options=--prefix=/nonexistent -if test -n "$host_alias"; then - configure_options="$configure_options --host $host_alias" -fi -if test -n "$build_alias"; then - configure_options="$configure_options --build $build_alias" -fi -if (FOO=bar; unset FOO) >/dev/null 2>&1; then - unset=unset -else - unset=false -fi -: ${mkdir_p="$abs_top_srcdir/libltdl/config/install-sh -d"} -# Fix relative paths in $lt_INSTALL -case $lt_INSTALL in - *libltdl/config/install-sh*) - lt_INSTALL=$abs_top_srcdir/libltdl/config/install-sh - ;; -esac - -# On AIX, shared libraries remain loaded in memory after use if they -# are world-readable, until root issues slibclean. On NFS, this causes -# a testsuite rerun to fail to clean up test group directories. Avoid -# this with a suitable umask. Do not do this on other systems, for -# example HP-UX suffers unless shared libraries are mode 555. -case $host_os in -aix*) umask o-rwx ;; -esac # Create the master directory if it doesn't already exist. as_dir="$at_suite_dir"; as_fn_mkdir_p || - as_fn_error "cannot create \`$at_suite_dir'" "$LINENO" 5 + as_fn_error $? "cannot create \`$at_suite_dir'" "$LINENO" 5 # Can we diff with `/dev/null'? DU 5.0 refuses. if diff /dev/null /dev/null >/dev/null 2>&1; then @@ -1597,7 +1661,7 @@ BEGIN { FS="" } if (test == "'"$at_group"'") exit }' "$at_myself" > "$at_suite_dir/at-source-lines" && . "$at_suite_dir/at-source-lines" || - as_fn_error "cannot create test line number cache" "$LINENO" 5 + as_fn_error $? "cannot create test line number cache" "$LINENO" 5 rm -f "$at_suite_dir/at-source-lines" # Set number of jobs for `-j'; avoid more jobs than test groups. @@ -1621,7 +1685,7 @@ rm -rf "$at_helper_dir" && mkdir "$at_helper_dir" && cd "$at_helper_dir" && { test -z "$at_groups" || mkdir $at_groups; } || -as_fn_error "testsuite directory setup failed" "$LINENO" 5 +as_fn_error $? "testsuite directory setup failed" "$LINENO" 5 # Functions for running a test group. We leave the actual # test group execution outside of a shell function in order @@ -1629,7 +1693,7 @@ as_fn_error "testsuite directory setup f # at_fn_group_prepare # ------------------- -# Prepare running a test group. +# Prepare for running a test group. at_fn_group_prepare () { # The directory for additional per-group helper files. @@ -1674,8 +1738,8 @@ at_fn_group_prepare () find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx {} \; rm -fr "$at_group_dir"/* "$at_group_dir"/.[!.] "$at_group_dir"/.??* fi || - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned." >&5 -$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test directory for $at_group_normalized could not be cleaned" >&5 +$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned" >&2;} # Be tolerant if the above `rm' was not able to remove the directory. as_dir="$at_group_dir"; as_fn_mkdir_p @@ -1690,6 +1754,25 @@ $as_echo "$as_me: WARNING: test director fi } +# at_fn_group_banner ORDINAL LINE DESC PAD [BANNER] +# ------------------------------------------------- +# Declare the test group ORDINAL, located at LINE with group description DESC, +# and residing under BANNER. Use PAD to align the status column. +at_fn_group_banner () +{ + at_setup_line="$2" + test -n "$5" && at_fn_banner $5 + at_desc="$3" + case $1 in + [0-9]) at_desc_line=" $1: ";; + [0-9][0-9]) at_desc_line=" $1: " ;; + *) at_desc_line="$1: " ;; + esac + as_fn_append at_desc_line "$3$4" + $at_quiet $as_echo_n "$at_desc_line" + echo "# -*- compilation -*-" >> "$at_group_log" +} + # at_fn_group_postprocess # ----------------------- # Perform cleanup after running a test group. @@ -1711,44 +1794,44 @@ _ATEOF $at_verbose $as_echo_n "$at_group. $at_setup_line: " $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log" case $at_xfail:$at_status in - *:99) - at_msg='FAILED ('`cat "$at_check_line_file"`')' - at_res=fail - at_errexit=$at_errexit_p - ;; yes:0) at_msg="UNEXPECTED PASS" at_res=xpass at_errexit=$at_errexit_p + at_color=$at_red ;; no:0) at_msg="ok" at_res=pass at_errexit=false + at_color=$at_grn ;; *:77) at_msg='skipped ('`cat "$at_check_line_file"`')' at_res=skip at_errexit=false + at_color=$at_blu + ;; + no:* | *:99) + at_msg='FAILED ('`cat "$at_check_line_file"`')' + at_res=fail + at_errexit=$at_errexit_p + at_color=$at_red ;; yes:*) at_msg='expected failure ('`cat "$at_check_line_file"`')' at_res=xfail at_errexit=false - ;; - no:*) - at_msg='FAILED ('`cat "$at_check_line_file"`')' - at_res=fail - at_errexit=$at_errexit_p + at_color=$at_lgn ;; esac echo "$at_res" > "$at_job_dir/$at_res" # In parallel mode, output the summary line only afterwards. if test $at_jobs -ne 1 && test -n "$at_verbose"; then - $as_echo "$at_desc_line $at_msg" + $as_echo "$at_desc_line $at_color$at_msg$at_std" else # Make sure there is a separator even with long titles. - $as_echo " $at_msg" + $as_echo " $at_color$at_msg$at_std" fi at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" case $at_status in @@ -1862,28 +1945,32 @@ then ( # Start one test group. $at_job_control_off - exec 6>"$at_job_fifo" + if $at_first; then + exec 7>"$at_job_fifo" + else + exec 6<&- + fi trap 'set +x; set +e trap "" PIPE echo stop > "$at_stop_file" - echo token >&6 + echo >&7 as_fn_exit 141' PIPE at_fn_group_prepare if cd "$at_group_dir" && at_fn_test $at_group && - . "$at_test_source" # AT_JOB_FIFO_FD>&- + . "$at_test_source" then :; else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5 $as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} at_failed=: fi at_fn_group_postprocess - echo token >&6 + echo >&7 ) & $at_job_control_off if $at_first; then at_first=false - exec 6<"$at_job_fifo" + exec 6<"$at_job_fifo" 7>"$at_job_fifo" fi shift # Consume one token. if test $# -gt 0; then :; else @@ -1892,6 +1979,7 @@ $as_echo "$as_me: WARNING: unable to par fi test -f "$at_stop_file" && break done + exec 7>&- # Read back the remaining ($at_jobs - 1) tokens. set X $at_joblist shift @@ -1965,19 +2053,15 @@ case $at_start_time,$at_stop_time in esac echo -cat <<\_ASBOX -## ------------- ## +$as_echo "## ------------- ## ## Test results. ## -## ------------- ## -_ASBOX +## ------------- ##" echo { echo - cat <<\_ASBOX -## ------------- ## + $as_echo "## ------------- ## ## Test results. ## -## ------------- ## -_ASBOX +## ------------- ##" echo } >&5 @@ -1995,12 +2079,14 @@ if $at_errexit_p && test $at_unexpected_ at_result="$at_result $at_were run, one failed" fi at_result="$at_result unexpectedly and inhibited subsequent tests." + at_color=$at_red else # Don't you just love exponential explosion of the number of cases? + at_color=$at_red case $at_xpass_count:$at_fail_count:$at_xfail_count in # So far, so good. - 0:0:0) at_result="$at_result $at_were successful." ;; - 0:0:*) at_result="$at_result behaved as expected." ;; + 0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;; + 0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;; # Some unexpected failures 0:*:0) at_result="$at_result $at_were run, @@ -2046,18 +2132,16 @@ $at_skip_count tests were skipped." ;; esac if test $at_unexpected_count = 0; then - echo "$at_result" + echo "$at_color$at_result$at_std" echo "$at_result" >&5 else - echo "ERROR: $at_result" >&2 + echo "${at_color}ERROR: $at_result$at_std" >&2 echo "ERROR: $at_result" >&5 { echo - cat <<\_ASBOX -## ------------------------ ## + $as_echo "## ------------------------ ## ## Summary of the failures. ## -## ------------------------ ## -_ASBOX +## ------------------------ ##" # Summary of failed and skipped tests. if test $at_fail_count != 0; then @@ -2076,11 +2160,9 @@ _ASBOX echo fi if test $at_fail_count != 0; then - cat <<\_ASBOX -## ---------------------- ## + $as_echo "## ---------------------- ## ## Detailed failed tests. ## -## ---------------------- ## -_ASBOX +## ---------------------- ##" echo for at_group in $at_fail_list do @@ -2120,7 +2202,7 @@ _ASBOX $as_echo "Please send $at_msg and all information you think might help: To: - Subject: [libtool 2.2.10] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} + Subject: [GNU Libtool 2.4] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} You may investigate any problem if you feel able to do so, in which case the test suite provides a good starting point. Its output may @@ -2135,535 +2217,673 @@ exit 0 ## Actual tests. ## ## ------------- ## #AT_START_1 -# 1. libtoolize.at:83: libtoolize macro installation -at_setup_line='libtoolize.at:83' -at_fn_banner 1 -at_desc="libtoolize macro installation" -at_desc_line=" 1: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +at_fn_group_banner 1 'getopt-m4sh.at:85' \ + "short option splitting" " " 1 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "1. libtoolize.at:83: testing ..." + $as_echo "1. $at_setup_line: testing $at_desc ..." $at_traceon -cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([m4]) -LT_INIT -AC_OUTPUT +cat >expout <<'_ATEOF' + force verbose install _ATEOF -cat >expout <<'_ATEOF' -libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. -libtoolize: copying file `build-aux/ltmain.sh' -libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. -libtoolize: copying file `m4/libtool.m4' -libtoolize: copying file `m4/ltoptions.m4' -libtoolize: copying file `m4/ltsugar.m4' -libtoolize: copying file `m4/ltversion.m4' -libtoolize: copying file `m4/lt~obsolete.m4' -libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. + +cat >options.m4sh <<'_ATEOF' +AS_INIT[]m4_include([getopt.m4sh]) +nl=' +' +list= +opts= +M4SH_GETOPTS( + [a!], [--append], [], [func_append list "$optarg$nl"], + [f], [--force], [], [opts="$opts force"], + [i], [--install], [], [opts="$opts install"], + [v], [--verbose], [], [opts="$opts verbose"], + [!], [--ltdl], [false],[opts="$opts ltdl=$optarg"], +[echo "$list" $opts]) _ATEOF -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t -mv -f expout.t expout + { set +x -$as_echo "$at_srcdir/libtoolize.at:99: \$LIBTOOLIZE --copy +$as_echo "$at_srcdir/getopt-m4sh.at:91: \$M4SH --version || exit 77" +at_fn_check_prepare_dynamic "$M4SH --version || exit 77" "getopt-m4sh.at:91" +( $at_check_trace; $M4SH --version || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:91" +$at_failed && at_fn_log_failure +$at_traceon; } -" -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:99" -( $at_check_trace; $LIBTOOLIZE --copy +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:91: \$M4SH -B \$abs_top_srcdir/libltdl/config options.m4sh > t-options" +at_fn_check_prepare_dynamic "$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options" "getopt-m4sh.at:91" +( $at_check_trace; $M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:91" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/getopt-m4sh.at:91: test \$at_status -eq 63 && exit 77" +at_fn_check_prepare_dynamic "test $at_status -eq 63 && exit 77" "getopt-m4sh.at:91" +( $at_check_trace; test $at_status -eq 63 && exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:91" +$at_failed && at_fn_log_failure +$at_traceon; } + +fi +$at_failed && at_fn_log_failure +$at_traceon; } +$SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options + +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:93: \$SHELL ./options -fvi" +at_fn_check_prepare_dynamic "$SHELL ./options -fvi" "getopt-m4sh.at:93" +( $at_check_trace; $SHELL ./options -fvi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:99" +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:93" $at_failed && at_fn_log_failure $at_traceon; } - set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_1 #AT_START_2 -# 2. libtoolize.at:108: libtoolize macro directory mismatch error -at_setup_line='libtoolize.at:108' -at_fn_banner 1 -at_desc="libtoolize macro directory mismatch error" -at_desc_line=" 2: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +at_fn_group_banner 2 'getopt-m4sh.at:98' \ + "enhanced shell short option splitting" " " 1 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "2. libtoolize.at:108: testing ..." + $as_echo "2. $at_setup_line: testing $at_desc ..." $at_traceon -cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([m4]) -LT_INIT -AC_OUTPUT -_ATEOF - +# Don't bother with additional XSI checks unless functions were substituted +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:101: fgrep '# Extended-shell func_split_short_opt' \$abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)" +at_fn_check_prepare_dynamic "fgrep '# Extended-shell func_split_short_opt' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)" "getopt-m4sh.at:101" +( $at_check_trace; fgrep '# Extended-shell func_split_short_opt' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:101" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I me2 +cat >expout <<'_ATEOF' + force verbose install _ATEOF -cat >experr <<'_ATEOF' -libtoolize: AC_CONFIG_MACRO_DIR([m4]) conflicts with ACLOCAL_AMFLAGS=-I me2. -_ATEOF -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t -mv -f experr.t experr -{ set +x -$as_echo "$at_srcdir/libtoolize.at:120: \$LIBTOOLIZE --copy +cat >options.m4sh <<'_ATEOF' +AS_INIT[]m4_include([getopt.m4sh]) +nl=' +' +list= +opts= +M4SH_GETOPTS( + [a!], [--append], [], [func_append list "$optarg$nl"], + [f], [--force], [], [opts="$opts force"], + [i], [--install], [], [opts="$opts install"], + [v], [--verbose], [], [opts="$opts verbose"], + [!], [--ltdl], [false],[opts="$opts ltdl=$optarg"], +[echo "$list" $opts]) +_ATEOF -" -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:120" -( $at_check_trace; $LIBTOOLIZE --copy +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:107: \$M4SH --version || exit 77" +at_fn_check_prepare_dynamic "$M4SH --version || exit 77" "getopt-m4sh.at:107" +( $at_check_trace; $M4SH --version || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -$at_diff experr "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/libtoolize.at:120" +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:107" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:107: \$M4SH -B \$abs_top_srcdir/libltdl/config options.m4sh > t-options" +at_fn_check_prepare_dynamic "$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options" "getopt-m4sh.at:107" +( $at_check_trace; $M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:107" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/getopt-m4sh.at:107: test \$at_status -eq 63 && exit 77" +at_fn_check_prepare_dynamic "test $at_status -eq 63 && exit 77" "getopt-m4sh.at:107" +( $at_check_trace; test $at_status -eq 63 && exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:107" +$at_failed && at_fn_log_failure +$at_traceon; } +fi +$at_failed && at_fn_log_failure +$at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_2 -#AT_START_3 -# 3. libtoolize.at:128: libtoolize macro serial update -at_setup_line='libtoolize.at:128' -at_fn_banner 1 -at_desc="libtoolize macro serial update" -at_desc_line=" 3: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "3. libtoolize.at:128: testing ..." - $at_traceon - - -cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([m4]) -LT_INIT -AC_OUTPUT -_ATEOF - - - -test -d m4 || { rm -f m4 && mkdir m4; } - -rm -f m4/libtool.m4 m4/ltoptions.m4 build-aux/ltmain.sh - -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I m4 -_ATEOF +$SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options +$SED '/^# func_split_short_opt/q' options > options.tmp +$SED -n '/^func_split_short_opt ()/,/^} # Extended-shell func_split_short_opt /p' $abs_top_builddir/libtool >> options.tmp +$SED '1,/^} # func_split_short_opt /d' options >> options.tmp +rm -f options && mv options.tmp options -# This file should be upgraded. -cat >m4/libtool.m4 <<'_ATEOF' +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:110: \$SHELL ./options -fvi" +at_fn_check_prepare_dynamic "$SHELL ./options -fvi" "getopt-m4sh.at:110" +( $at_check_trace; $SHELL ./options -fvi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:110" +$at_failed && at_fn_log_failure +$at_traceon; } -# serial 25 LT_INIT -_ATEOF + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_2 +#AT_START_3 +at_fn_group_banner 3 'getopt-m4sh.at:119' \ + "long option splitting" " " 1 +at_xfail=no +( + $as_echo "3. $at_setup_line: testing $at_desc ..." + $at_traceon -# This file has a very high serial number, and should be left unchanged -# until --force is passed. -cat >m4/ltoptions.m4 <<'_ATEOF' -# serial 99999 ltoptions.m4 +cat >expout <<'_ATEOF' + ltdl=long _ATEOF -test -d build-aux || { rm -f build-aux && mkdir build-aux; } - -# This file has a very high serial number, and needs --force to be updated. -cat >build-aux/ltmain.sh <<'_ATEOF' - -package_revision=9999.9999 -_ATEOF -# This file has a very old serial number, but should be left unchanged -# unless the --install flag is invoked. -cat >build-aux/config.guess <<'_ATEOF' - -timestamp='1970-01-01' +cat >options.m4sh <<'_ATEOF' +AS_INIT[]m4_include([getopt.m4sh]) +nl=' +' +list= +opts= +M4SH_GETOPTS( + [a!], [--append], [], [func_append list "$optarg$nl"], + [f], [--force], [], [opts="$opts force"], + [i], [--install], [], [opts="$opts install"], + [v], [--verbose], [], [opts="$opts verbose"], + [!], [--ltdl], [false],[opts="$opts ltdl=$optarg"], +[echo "$list" $opts]) _ATEOF +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:125: \$M4SH --version || exit 77" +at_fn_check_prepare_dynamic "$M4SH --version || exit 77" "getopt-m4sh.at:125" +( $at_check_trace; $M4SH --version || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:125" +$at_failed && at_fn_log_failure +$at_traceon; } +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:125: \$M4SH -B \$abs_top_srcdir/libltdl/config options.m4sh > t-options" +at_fn_check_prepare_dynamic "$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options" "getopt-m4sh.at:125" +( $at_check_trace; $M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:125" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/getopt-m4sh.at:125: test \$at_status -eq 63 && exit 77" +at_fn_check_prepare_dynamic "test $at_status -eq 63 && exit 77" "getopt-m4sh.at:125" +( $at_check_trace; test $at_status -eq 63 && exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:125" +$at_failed && at_fn_log_failure +$at_traceon; } -## -------------------------------------------------------------------- ## -## First we try to update with some newer files in the destination dir. ## -## -------------------------------------------------------------------- ## - -cat >expout <<'_ATEOF' -libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. -libtoolize: copying file `m4/libtool.m4' -libtoolize: copying file `m4/ltsugar.m4' -libtoolize: copying file `m4/ltversion.m4' -libtoolize: copying file `m4/lt~obsolete.m4' -_ATEOF - +fi +$at_failed && at_fn_log_failure +$at_traceon; } -cat >experr <<'_ATEOF' -libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite -libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite -_ATEOF +$SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t -mv -f expout.t expout -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t -mv -f experr.t experr { set +x -$as_echo "$at_srcdir/libtoolize.at:151: \$LIBTOOLIZE --copy - -" -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:151" -( $at_check_trace; $LIBTOOLIZE --copy - - +$as_echo "$at_srcdir/getopt-m4sh.at:127: \$SHELL ./options --ltdl=long" +at_fn_check_prepare_dynamic "$SHELL ./options --ltdl=long" "getopt-m4sh.at:127" +( $at_check_trace; $SHELL ./options --ltdl=long ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -$at_diff experr "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:151" +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:127" $at_failed && at_fn_log_failure $at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_3 +#AT_START_4 +at_fn_group_banner 4 'getopt-m4sh.at:132' \ + "XSI long option splitting" " " 1 +at_xfail=no +( + $as_echo "4. $at_setup_line: testing $at_desc ..." + $at_traceon + +# Don't bother with additional XSI checks unless functions were substituted +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:135: fgrep '# Extended-shell func_split_long_opt' \$abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)" +at_fn_check_prepare_dynamic "fgrep '# Extended-shell func_split_long_opt' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)" "getopt-m4sh.at:135" +( $at_check_trace; fgrep '# Extended-shell func_split_long_opt' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:135" +$at_failed && at_fn_log_failure +$at_traceon; } -## ---------------------------------------------------------- ## -## Next, a second update attempt with everything now updated. ## -## ---------------------------------------------------------- ## cat >expout <<'_ATEOF' + ltdl=long _ATEOF -cat >experr <<'_ATEOF' -libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite -libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite -_ATEOF -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t -mv -f expout.t expout -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t -mv -f experr.t experr -{ set +x -$as_echo "$at_srcdir/libtoolize.at:165: \$LIBTOOLIZE --copy +cat >options.m4sh <<'_ATEOF' +AS_INIT[]m4_include([getopt.m4sh]) +nl=' +' +list= +opts= +M4SH_GETOPTS( + [a!], [--append], [], [func_append list "$optarg$nl"], + [f], [--force], [], [opts="$opts force"], + [i], [--install], [], [opts="$opts install"], + [v], [--verbose], [], [opts="$opts verbose"], + [!], [--ltdl], [false],[opts="$opts ltdl=$optarg"], +[echo "$list" $opts]) +_ATEOF -" -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:165" -( $at_check_trace; $LIBTOOLIZE --copy +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:141: \$M4SH --version || exit 77" +at_fn_check_prepare_dynamic "$M4SH --version || exit 77" "getopt-m4sh.at:141" +( $at_check_trace; $M4SH --version || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:165" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:141" $at_failed && at_fn_log_failure $at_traceon; } - - - -## ----------------------------------------------------------- ## -## Now, a forced update to downgrade files with newer serials. ## -## ----------------------------------------------------------- ## - -cat >expout <<'_ATEOF' -libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. -libtoolize: copying file `build-aux/ltmain.sh' -libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. -libtoolize: copying file `m4/libtool.m4' -libtoolize: copying file `m4/ltoptions.m4' -libtoolize: copying file `m4/ltsugar.m4' -libtoolize: copying file `m4/ltversion.m4' -libtoolize: copying file `m4/lt~obsolete.m4' -_ATEOF - - -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t -mv -f expout.t expout { set +x -$as_echo "$at_srcdir/libtoolize.at:183: \$LIBTOOLIZE --copy --force - -" -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:183" -( $at_check_trace; $LIBTOOLIZE --copy --force - - +$as_echo "$at_srcdir/getopt-m4sh.at:141: \$M4SH -B \$abs_top_srcdir/libltdl/config options.m4sh > t-options" +at_fn_check_prepare_dynamic "$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options" "getopt-m4sh.at:141" +( $at_check_trace; $M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:183" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:141" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/getopt-m4sh.at:141: test \$at_status -eq 63 && exit 77" +at_fn_check_prepare_dynamic "test $at_status -eq 63 && exit 77" "getopt-m4sh.at:141" +( $at_check_trace; test $at_status -eq 63 && exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:141" $at_failed && at_fn_log_failure $at_traceon; } +fi +$at_failed && at_fn_log_failure +$at_traceon; } +$SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options +$SED '/^# func_split_long_opt/q' options > options.tmp +$SED -n '/^func_split_long_opt ()/,/^} # Extended-shell func_split_long_opt /p' $abs_top_builddir/libtool >> options.tmp +$SED '1,/^} # func_split_long_opt /d' options >> options.tmp +rm -f options && mv options.tmp options -## ---------------------------------------------------------------- ## -## A final update attempt with everything previously force updated. ## -## ---------------------------------------------------------------- ## - -cat >expout <<'_ATEOF' -_ATEOF - - -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t -mv -f expout.t expout { set +x -$as_echo "$at_srcdir/libtoolize.at:192: \$LIBTOOLIZE --copy - -" -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:192" -( $at_check_trace; $LIBTOOLIZE --copy - - +$as_echo "$at_srcdir/getopt-m4sh.at:144: \$SHELL ./options --ltdl=long" +at_fn_check_prepare_dynamic "$SHELL ./options --ltdl=long" "getopt-m4sh.at:144" +( $at_check_trace; $SHELL ./options --ltdl=long ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:192" +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:144" $at_failed && at_fn_log_failure $at_traceon; } - set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_3 -#AT_START_4 -# 4. libtoolize.at:201: libtoolize config files serial update -at_setup_line='libtoolize.at:201' -at_fn_banner 1 -at_desc="libtoolize config files serial update" -at_desc_line=" 4: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_4 +#AT_START_5 +at_fn_group_banner 5 'getopt-m4sh.at:153' \ + "option appending" " " 1 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "4. libtoolize.at:201: testing ..." + $as_echo "5. $at_setup_line: testing $at_desc ..." $at_traceon -cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([m4]) -LT_INIT -AC_OUTPUT -_ATEOF - - - -test -d m4 || { rm -f m4 && mkdir m4; } - -rm -f m4/libtool.m4 m4/ltoptions.m4 build-aux/ltmain.sh +cat >expout <<'_ATEOF' +first --append second +third -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I m4 _ATEOF -# This file should be upgraded. -cat >m4/libtool.m4 <<'_ATEOF' -# serial 25 LT_INIT + +cat >options.m4sh <<'_ATEOF' +AS_INIT[]m4_include([getopt.m4sh]) +nl=' +' +list= +opts= +M4SH_GETOPTS( + [a!], [--append], [], [func_append list "$optarg$nl"], + [f], [--force], [], [opts="$opts force"], + [i], [--install], [], [opts="$opts install"], + [v], [--verbose], [], [opts="$opts verbose"], + [!], [--ltdl], [false],[opts="$opts ltdl=$optarg"], +[echo "$list" $opts]) _ATEOF -# This file has a very high serial number, and should be left unchanged -# until --force is passed. -cat >m4/ltoptions.m4 <<'_ATEOF' -# serial 99999 ltoptions.m4 -_ATEOF - - -test -d build-aux || { rm -f build-aux && mkdir build-aux; } +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:161: \$M4SH --version || exit 77" +at_fn_check_prepare_dynamic "$M4SH --version || exit 77" "getopt-m4sh.at:161" +( $at_check_trace; $M4SH --version || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:161" +$at_failed && at_fn_log_failure +$at_traceon; } -# This file has a very high serial number, and needs --force to be updated. -cat >build-aux/ltmain.sh <<'_ATEOF' +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:161: \$M4SH -B \$abs_top_srcdir/libltdl/config options.m4sh > t-options" +at_fn_check_prepare_dynamic "$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options" "getopt-m4sh.at:161" +( $at_check_trace; $M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:161" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/getopt-m4sh.at:161: test \$at_status -eq 63 && exit 77" +at_fn_check_prepare_dynamic "test $at_status -eq 63 && exit 77" "getopt-m4sh.at:161" +( $at_check_trace; test $at_status -eq 63 && exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:161" +$at_failed && at_fn_log_failure +$at_traceon; } -package_revision=9999.9999 -_ATEOF +fi +$at_failed && at_fn_log_failure +$at_traceon; } +$SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options -# This file has a very old serial number, but should be left unchanged -# unless the --install flag is invoked. -cat >build-aux/config.guess <<'_ATEOF' +$SED '/^# func_dirname /q' options > options.tmp +echo '# func_append var value' >> options.tmp +$SED -n '/^func_append ()/,/^} # func_append /p' $abs_top_srcdir/libltdl/config/ltmain.m4sh >> options.tmp +$SED '1,/^# func_dirname/d' options >> options.tmp +rm -f options && mv options.tmp options -timestamp='1970-01-01' -_ATEOF +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:164: \$SHELL ./options -a \"first --append second\" -athird" +at_fn_check_prepare_dynamic "$SHELL ./options -a \"first --append second\" -athird" "getopt-m4sh.at:164" +( $at_check_trace; $SHELL ./options -a "first --append second" -athird +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:164" +$at_failed && at_fn_log_failure +$at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_5 +#AT_START_6 +at_fn_group_banner 6 'getopt-m4sh.at:169' \ + "enhanced shell option appending" " " 1 +at_xfail=no +( + $as_echo "6. $at_setup_line: testing $at_desc ..." + $at_traceon +# Don't bother with additional += check unless functions were substituted +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:172: fgrep '# Extended-shell func_append ' \$abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)" +at_fn_check_prepare_dynamic "fgrep '# Extended-shell func_append ' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77)" "getopt-m4sh.at:172" +( $at_check_trace; fgrep '# Extended-shell func_append ' $abs_top_builddir/libtool >/dev/null 2>&1 || (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:172" +$at_failed && at_fn_log_failure +$at_traceon; } -## -------------------------------------------------------------------- ## -## First we try to update with some newer files in the destination dir. ## -## -------------------------------------------------------------------- ## cat >expout <<'_ATEOF' -libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. -libtoolize: copying file `build-aux/config.guess' -libtoolize: copying file `build-aux/config.sub' -libtoolize: copying file `build-aux/install-sh' -libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. -libtoolize: copying file `m4/libtool.m4' -libtoolize: copying file `m4/ltsugar.m4' -libtoolize: copying file `m4/ltversion.m4' -libtoolize: copying file `m4/lt~obsolete.m4' +first --append second +third + _ATEOF -cat >experr <<'_ATEOF' -libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite -libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite -_ATEOF -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t -mv -f expout.t expout -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t -mv -f experr.t experr -{ set +x -$as_echo "$at_srcdir/libtoolize.at:228: \$LIBTOOLIZE --copy --install +cat >options.m4sh <<'_ATEOF' +AS_INIT[]m4_include([getopt.m4sh]) +nl=' +' +list= +opts= +M4SH_GETOPTS( + [a!], [--append], [], [func_append list "$optarg$nl"], + [f], [--force], [], [opts="$opts force"], + [i], [--install], [], [opts="$opts install"], + [v], [--verbose], [], [opts="$opts verbose"], + [!], [--ltdl], [false],[opts="$opts ltdl=$optarg"], +[echo "$list" $opts]) +_ATEOF -" -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:228" -( $at_check_trace; $LIBTOOLIZE --copy --install +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:180: \$M4SH --version || exit 77" +at_fn_check_prepare_dynamic "$M4SH --version || exit 77" "getopt-m4sh.at:180" +( $at_check_trace; $M4SH --version || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:228" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:180" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/getopt-m4sh.at:180: \$M4SH -B \$abs_top_srcdir/libltdl/config options.m4sh > t-options" +at_fn_check_prepare_dynamic "$M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options" "getopt-m4sh.at:180" +( $at_check_trace; $M4SH -B $abs_top_srcdir/libltdl/config options.m4sh > t-options +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:180" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/getopt-m4sh.at:180: test \$at_status -eq 63 && exit 77" +at_fn_check_prepare_dynamic "test $at_status -eq 63 && exit 77" "getopt-m4sh.at:180" +( $at_check_trace; test $at_status -eq 63 && exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:180" +$at_failed && at_fn_log_failure +$at_traceon; } +fi +$at_failed && at_fn_log_failure +$at_traceon; } +$SED "s,@LN_S\@,$LN_S,g;s,@SED\@,$SED,g" t-options > options -## ---------------------------------------------------------- ## -## Next, a second update attempt with everything now updated. ## -## ---------------------------------------------------------- ## - -cat >expout <<'_ATEOF' -_ATEOF - - -cat >experr <<'_ATEOF' -libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite -libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite -_ATEOF - +$SED '/^# func_dirname /q' options > options.tmp +echo '# func_append var value' >> options.tmp +$SED -n '/^func_append ()/,/^} # func_append /p' $abs_top_srcdir/libltdl/config/ltmain.m4sh >> options.tmp +$SED '1,/^# func_dirname/d' options >> options.tmp +rm -f options && mv options.tmp options +$SED '/^# func_append/q' options > options.tmp +$SED -n '/^func_append ()/,/^} # Extended-shell func_append /p' $abs_top_builddir/libtool >> options.tmp +$SED '1,/^} # func_append /d' options >> options.tmp +rm -f options && mv options.tmp options -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t -mv -f expout.t expout -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t -mv -f experr.t experr { set +x -$as_echo "$at_srcdir/libtoolize.at:242: \$LIBTOOLIZE --copy --install - -" -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:242" -( $at_check_trace; $LIBTOOLIZE --copy --install - - +$as_echo "$at_srcdir/getopt-m4sh.at:184: \$SHELL ./options -a \"first --append second\" -athird" +at_fn_check_prepare_dynamic "$SHELL ./options -a \"first --append second\" -athird" "getopt-m4sh.at:184" +( $at_check_trace; $SHELL ./options -a "first --append second" -athird ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -$at_diff experr "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:242" +at_fn_check_status 0 $at_status "$at_srcdir/getopt-m4sh.at:184" $at_failed && at_fn_log_failure $at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_6 +#AT_START_7 +at_fn_group_banner 7 'libtoolize.at:83' \ + "libtoolize macro installation" " " 2 +at_xfail=no +( + $as_echo "7. $at_setup_line: testing $at_desc ..." + $at_traceon + + +cat >configure.ac <<'_ATEOF' +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) +LT_INIT +AC_OUTPUT +_ATEOF -## ----------------------------------------------------------- ## -## Now, a forced update to downgrade files with newer serials. ## -## ----------------------------------------------------------- ## cat >expout <<'_ATEOF' libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. -libtoolize: copying file `build-aux/config.guess' -libtoolize: copying file `build-aux/config.sub' -libtoolize: copying file `build-aux/install-sh' libtoolize: copying file `build-aux/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. libtoolize: copying file `m4/libtool.m4' @@ -2671,6 +2891,7 @@ libtoolize: copying file `m4/ltoptions.m libtoolize: copying file `m4/ltsugar.m4' libtoolize: copying file `m4/ltversion.m4' libtoolize: copying file `m4/lt~obsolete.m4' +libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. _ATEOF @@ -2679,11 +2900,11 @@ sed "s/libtoolize/$lt_name/g s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t mv -f expout.t expout { set +x -$as_echo "$at_srcdir/libtoolize.at:263: \$LIBTOOLIZE --copy --force --install +$as_echo "$at_srcdir/libtoolize.at:99: \$LIBTOOLIZE --copy " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:263" -( $at_check_trace; $LIBTOOLIZE --copy --force --install +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:99" +( $at_check_trace; $LIBTOOLIZE --copy ) >>"$at_stdout" 2>>"$at_stderr" @@ -2691,39 +2912,64 @@ at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:263" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:99" $at_failed && at_fn_log_failure $at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_7 +#AT_START_8 +at_fn_group_banner 8 'libtoolize.at:108' \ + "libtoolize macro directory mismatch error" " " 2 +at_xfail=no +( + $as_echo "8. $at_setup_line: testing $at_desc ..." + $at_traceon -## ---------------------------------------------------------------- ## -## A final update attempt with everything previously force updated. ## -## ---------------------------------------------------------------- ## -cat >expout <<'_ATEOF' +cat >configure.ac <<'_ATEOF' +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) +LT_INIT +AC_OUTPUT +_ATEOF + + + +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I me2 +_ATEOF + + +cat >experr <<'_ATEOF' +libtoolize: AC_CONFIG_MACRO_DIR([m4]) conflicts with ACLOCAL_AMFLAGS=-I me2. _ATEOF lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t -mv -f expout.t expout +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t +mv -f experr.t experr { set +x -$as_echo "$at_srcdir/libtoolize.at:272: \$LIBTOOLIZE --copy --install +$as_echo "$at_srcdir/libtoolize.at:120: \$LIBTOOLIZE --copy " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:272" -( $at_check_trace; $LIBTOOLIZE --copy --install +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:120" +( $at_check_trace; $LIBTOOLIZE --copy ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:272" +$at_diff experr "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 1 $at_status "$at_srcdir/libtoolize.at:120" $at_failed && at_fn_log_failure $at_traceon; } @@ -2731,206 +2977,215 @@ $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_4 -#AT_START_5 -# 5. libtoolize.at:281: diagnose missing LT_CONFIG_LTDL_DIR -at_setup_line='libtoolize.at:281' -at_fn_banner 1 -at_desc="diagnose missing LT_CONFIG_LTDL_DIR" -at_desc_line=" 5: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_8 +#AT_START_9 +at_fn_group_banner 9 'libtoolize.at:128' \ + "libtoolize macro serial update" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "5. libtoolize.at:281: testing ..." + $as_echo "9. $at_setup_line: testing $at_desc ..." $at_traceon -cat >expout <<'_ATEOF' -libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. -libtoolize: copying file `build-aux/config.guess' -libtoolize: copying file `build-aux/config.sub' -libtoolize: copying file `build-aux/install-sh' -libtoolize: copying file `build-aux/ltmain.sh' -libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. -libtoolize: copying file `m4/argz.m4' -libtoolize: copying file `m4/libtool.m4' -libtoolize: copying file `m4/ltdl.m4' -libtoolize: copying file `m4/ltoptions.m4' -libtoolize: copying file `m4/ltsugar.m4' -libtoolize: copying file `m4/ltversion.m4' -libtoolize: copying file `m4/lt~obsolete.m4' -libtoolize: putting libltdl files in `ltdl'. -libtoolize: copying file `ltdl/COPYING.LIB' -libtoolize: copying file `ltdl/README' -libtoolize: copying file `ltdl/argz_.h' -libtoolize: copying file `ltdl/argz.c' -libtoolize: copying file `ltdl/loaders/dld_link.c' -libtoolize: copying file `ltdl/loaders/dlopen.c' -libtoolize: copying file `ltdl/loaders/dyld.c' -libtoolize: copying file `ltdl/loaders/load_add_on.c' -libtoolize: copying file `ltdl/loaders/loadlibrary.c' -libtoolize: copying file `ltdl/loaders/shl_load.c' -libtoolize: copying file `ltdl/lt__dirent.c' -libtoolize: copying file `ltdl/lt__strl.c' -libtoolize: copying file `ltdl/libltdl/lt__alloc.h' -libtoolize: copying file `ltdl/libltdl/lt__dirent.h' -libtoolize: copying file `ltdl/libltdl/lt__glibc.h' -libtoolize: copying file `ltdl/libltdl/lt__private.h' -libtoolize: copying file `ltdl/libltdl/lt__strl.h' -libtoolize: copying file `ltdl/libltdl/lt_dlloader.h' -libtoolize: copying file `ltdl/libltdl/lt_error.h' -libtoolize: copying file `ltdl/libltdl/lt_system.h' -libtoolize: copying file `ltdl/libltdl/slist.h' -libtoolize: copying file `ltdl/loaders/preopen.c' -libtoolize: copying file `ltdl/lt__alloc.c' -libtoolize: copying file `ltdl/lt_dlloader.c' -libtoolize: copying file `ltdl/lt_error.c' -libtoolize: copying file `ltdl/ltdl.c' -libtoolize: copying file `ltdl/ltdl.h' -libtoolize: copying file `ltdl/slist.c' -libtoolize: creating file `ltdl/Makefile.inc' -libtoolize: Remember to add `LT_CONFIG_LTDL_DIR([ltdl])' to `configure.ac'. -libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. -_ATEOF - - cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) LT_INIT -LTDL_INIT([nonrecursive]) AC_OUTPUT _ATEOF + +test -d m4 || { rm -f m4 && mkdir m4; } + +rm -f m4/libtool.m4 m4/ltoptions.m4 build-aux/ltmain.sh + +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I m4 +_ATEOF + + +# This file should be upgraded. +cat >m4/libtool.m4 <<'_ATEOF' + +# serial 25 LT_INIT +_ATEOF + + +# This file has a very high serial number, and should be left unchanged +# until --force is passed. +cat >m4/ltoptions.m4 <<'_ATEOF' + +# serial 99999 ltoptions.m4 +_ATEOF + + +test -d build-aux || { rm -f build-aux && mkdir build-aux; } + +# This file has a very high serial number, and needs --force to be updated. +cat >build-aux/ltmain.sh <<'_ATEOF' + +package_revision=9999.9999 +_ATEOF + + +# This file has a very old serial number, but should be left unchanged +# unless the --install flag is invoked. +cat >build-aux/config.guess <<'_ATEOF' + +timestamp='1970-01-01' +_ATEOF + + + + + +## -------------------------------------------------------------------- ## +## First we try to update with some newer files in the destination dir. ## +## -------------------------------------------------------------------- ## + +cat >expout <<'_ATEOF' +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. +libtoolize: copying file `m4/libtool.m4' +libtoolize: copying file `m4/ltsugar.m4' +libtoolize: copying file `m4/ltversion.m4' +libtoolize: copying file `m4/lt~obsolete.m4' +_ATEOF + + +cat >experr <<'_ATEOF' +libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite +libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite +_ATEOF + + lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` sed "s/libtoolize/$lt_name/g s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t mv -f expout.t expout +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t +mv -f experr.t experr { set +x -$as_echo "$at_srcdir/libtoolize.at:340: \$LIBTOOLIZE --copy --install --ltdl=ltdl +$as_echo "$at_srcdir/libtoolize.at:151: \$LIBTOOLIZE --copy " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:340" -( $at_check_trace; $LIBTOOLIZE --copy --install --ltdl=ltdl +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:151" +( $at_check_trace; $LIBTOOLIZE --copy ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +$at_diff experr "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:340" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:151" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_5 -#AT_START_6 -# 6. libtoolize.at:426: copy ltdl.m4 with shared macro directory -at_setup_line='libtoolize.at:426' -at_fn_banner 1 -at_desc="copy ltdl.m4 with shared macro directory" -at_desc_line=" 6: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "6. libtoolize.at:426: testing ..." - $at_traceon +## ---------------------------------------------------------- ## +## Next, a second update attempt with everything now updated. ## +## ---------------------------------------------------------- ## -cat >expout <<'_ATEOF' -libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'. -libtoolize: linking file `ltdl/config/compile' -libtoolize: linking file `ltdl/config/config.guess' -libtoolize: linking file `ltdl/config/config.sub' -libtoolize: linking file `ltdl/config/depcomp' -libtoolize: linking file `ltdl/config/install-sh' -libtoolize: linking file `ltdl/config/missing' -libtoolize: linking file `ltdl/config/ltmain.sh' -libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'. -libtoolize: linking file `ltdl/m4/argz.m4' -libtoolize: linking file `ltdl/m4/libtool.m4' -libtoolize: linking file `ltdl/m4/ltdl.m4' -libtoolize: linking file `ltdl/m4/ltoptions.m4' -libtoolize: linking file `ltdl/m4/ltsugar.m4' -libtoolize: linking file `ltdl/m4/ltversion.m4' -libtoolize: linking file `ltdl/m4/lt~obsolete.m4' -libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'. -libtoolize: linking file `ltdl/COPYING.LIB' -libtoolize: linking file `ltdl/README' -libtoolize: linking file `ltdl/Makefile.am' -libtoolize: linking file `ltdl/configure.ac' -libtoolize: copying file `ltdl/aclocal.m4' -libtoolize: linking file `ltdl/Makefile.in' -libtoolize: linking file `ltdl/config-h.in' -libtoolize: linking file `ltdl/configure' -libtoolize: linking file `ltdl/argz_.h' -libtoolize: linking file `ltdl/argz.c' -libtoolize: linking file `ltdl/loaders/dld_link.c' -libtoolize: linking file `ltdl/loaders/dlopen.c' -libtoolize: linking file `ltdl/loaders/dyld.c' -libtoolize: linking file `ltdl/loaders/load_add_on.c' -libtoolize: linking file `ltdl/loaders/loadlibrary.c' -libtoolize: linking file `ltdl/loaders/shl_load.c' -libtoolize: linking file `ltdl/lt__dirent.c' -libtoolize: linking file `ltdl/lt__strl.c' -libtoolize: linking file `ltdl/libltdl/lt__alloc.h' -libtoolize: linking file `ltdl/libltdl/lt__dirent.h' -libtoolize: linking file `ltdl/libltdl/lt__glibc.h' -libtoolize: linking file `ltdl/libltdl/lt__private.h' -libtoolize: linking file `ltdl/libltdl/lt__strl.h' -libtoolize: linking file `ltdl/libltdl/lt_dlloader.h' -libtoolize: linking file `ltdl/libltdl/lt_error.h' -libtoolize: linking file `ltdl/libltdl/lt_system.h' -libtoolize: linking file `ltdl/libltdl/slist.h' -libtoolize: linking file `ltdl/loaders/preopen.c' -libtoolize: linking file `ltdl/lt__alloc.c' -libtoolize: linking file `ltdl/lt_dlloader.c' -libtoolize: linking file `ltdl/lt_error.c' -libtoolize: linking file `ltdl/ltdl.c' -libtoolize: linking file `ltdl/ltdl.h' -libtoolize: linking file `ltdl/slist.c' +: >expout + +cat >experr <<'_ATEOF' +libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite +libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite _ATEOF -cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) -LT_CONFIG_LTDL_DIR([ltdl]) -AC_CONFIG_AUX_DIR([ltdl/config]) -AC_CONFIG_MACRO_DIR([ltdl/m4]) -LT_INIT -LTDL_INIT -AC_OUTPUT -_ATEOF +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t +mv -f expout.t expout +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t +mv -f experr.t experr +{ set +x +$as_echo "$at_srcdir/libtoolize.at:165: \$LIBTOOLIZE --copy +" +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:165" +( $at_check_trace; $LIBTOOLIZE --copy -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I ltdl/m4 + +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +$at_diff experr "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:165" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +## ----------------------------------------------------------- ## +## Now, a forced update to downgrade files with newer serials. ## +## ----------------------------------------------------------- ## + +cat >expout <<'_ATEOF' +libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. +libtoolize: copying file `build-aux/ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. +libtoolize: copying file `m4/libtool.m4' +libtoolize: copying file `m4/ltoptions.m4' +libtoolize: copying file `m4/ltsugar.m4' +libtoolize: copying file `m4/ltversion.m4' +libtoolize: copying file `m4/lt~obsolete.m4' _ATEOF +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t +mv -f expout.t expout +{ set +x +$as_echo "$at_srcdir/libtoolize.at:183: \$LIBTOOLIZE --copy --force + +" +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:183" +( $at_check_trace; $LIBTOOLIZE --copy --force + + +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:183" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +## ---------------------------------------------------------------- ## +## A final update attempt with everything previously force updated. ## +## ---------------------------------------------------------------- ## + +: >expout lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` sed "s/libtoolize/$lt_name/g s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t mv -f expout.t expout { set +x -$as_echo "$at_srcdir/libtoolize.at:430: \$LIBTOOLIZE --ltdl +$as_echo "$at_srcdir/libtoolize.at:192: \$LIBTOOLIZE --copy " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:430" -( $at_check_trace; $LIBTOOLIZE --ltdl +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:192" +( $at_check_trace; $LIBTOOLIZE --copy ) >>"$at_stdout" 2>>"$at_stderr" @@ -2938,7 +3193,7 @@ at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:430" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:192" $at_failed && at_fn_log_failure $at_traceon; } @@ -2946,201 +3201,92 @@ $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_6 -#AT_START_7 -# 7. libtoolize.at:438: correctly parse LTDL_INIT from configure.ac -at_setup_line='libtoolize.at:438' -at_fn_banner 1 -at_desc="correctly parse LTDL_INIT from configure.ac" -at_desc_line=" 7: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_9 +#AT_START_10 +at_fn_group_banner 10 'libtoolize.at:201' \ + "libtoolize config files serial update" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "7. libtoolize.at:438: testing ..." + $as_echo "10. $at_setup_line: testing $at_desc ..." $at_traceon -cat >expout <<'_ATEOF' -libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'. -libtoolize: linking file `ltdl/config/compile' -libtoolize: linking file `ltdl/config/config.guess' -libtoolize: linking file `ltdl/config/config.sub' -libtoolize: linking file `ltdl/config/depcomp' -libtoolize: linking file `ltdl/config/install-sh' -libtoolize: linking file `ltdl/config/missing' -libtoolize: linking file `ltdl/config/ltmain.sh' -libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'. -libtoolize: linking file `ltdl/m4/argz.m4' -libtoolize: linking file `ltdl/m4/libtool.m4' -libtoolize: linking file `ltdl/m4/ltdl.m4' -libtoolize: linking file `ltdl/m4/ltoptions.m4' -libtoolize: linking file `ltdl/m4/ltsugar.m4' -libtoolize: linking file `ltdl/m4/ltversion.m4' -libtoolize: linking file `ltdl/m4/lt~obsolete.m4' -libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'. -libtoolize: linking file `ltdl/COPYING.LIB' -libtoolize: linking file `ltdl/README' -libtoolize: linking file `ltdl/Makefile.am' -libtoolize: linking file `ltdl/configure.ac' -libtoolize: copying file `ltdl/aclocal.m4' -libtoolize: linking file `ltdl/Makefile.in' -libtoolize: linking file `ltdl/config-h.in' -libtoolize: linking file `ltdl/configure' -libtoolize: linking file `ltdl/argz_.h' -libtoolize: linking file `ltdl/argz.c' -libtoolize: linking file `ltdl/loaders/dld_link.c' -libtoolize: linking file `ltdl/loaders/dlopen.c' -libtoolize: linking file `ltdl/loaders/dyld.c' -libtoolize: linking file `ltdl/loaders/load_add_on.c' -libtoolize: linking file `ltdl/loaders/loadlibrary.c' -libtoolize: linking file `ltdl/loaders/shl_load.c' -libtoolize: linking file `ltdl/lt__dirent.c' -libtoolize: linking file `ltdl/lt__strl.c' -libtoolize: linking file `ltdl/libltdl/lt__alloc.h' -libtoolize: linking file `ltdl/libltdl/lt__dirent.h' -libtoolize: linking file `ltdl/libltdl/lt__glibc.h' -libtoolize: linking file `ltdl/libltdl/lt__private.h' -libtoolize: linking file `ltdl/libltdl/lt__strl.h' -libtoolize: linking file `ltdl/libltdl/lt_dlloader.h' -libtoolize: linking file `ltdl/libltdl/lt_error.h' -libtoolize: linking file `ltdl/libltdl/lt_system.h' -libtoolize: linking file `ltdl/libltdl/slist.h' -libtoolize: linking file `ltdl/loaders/preopen.c' -libtoolize: linking file `ltdl/lt__alloc.c' -libtoolize: linking file `ltdl/lt_dlloader.c' -libtoolize: linking file `ltdl/lt_error.c' -libtoolize: linking file `ltdl/ltdl.c' -libtoolize: linking file `ltdl/ltdl.h' -libtoolize: linking file `ltdl/slist.c' -_ATEOF - - cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) -LT_CONFIG_LTDL_DIR([ltdl]) -AC_CONFIG_AUX_DIR([ltdl/config]) -AC_CONFIG_MACRO_DIR([ltdl/m4]) +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) LT_INIT -LTDL_INIT AC_OUTPUT _ATEOF + +test -d m4 || { rm -f m4 && mkdir m4; } + +rm -f m4/libtool.m4 m4/ltoptions.m4 build-aux/ltmain.sh + cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I ltdl/m4 +ACLOCAL_AMFLAGS = -I m4 _ATEOF +# This file should be upgraded. +cat >m4/libtool.m4 <<'_ATEOF' -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t -mv -f expout.t expout -{ set +x -$as_echo "$at_srcdir/libtoolize.at:442: \$LIBTOOLIZE +# serial 25 LT_INIT +_ATEOF -" -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:442" -( $at_check_trace; $LIBTOOLIZE +# This file has a very high serial number, and should be left unchanged +# until --force is passed. +cat >m4/ltoptions.m4 <<'_ATEOF' -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:442" -$at_failed && at_fn_log_failure -$at_traceon; } +# serial 99999 ltoptions.m4 +_ATEOF +test -d build-aux || { rm -f build-aux && mkdir build-aux; } + +# This file has a very high serial number, and needs --force to be updated. +cat >build-aux/ltmain.sh <<'_ATEOF' + +package_revision=9999.9999 +_ATEOF + + +# This file has a very old serial number, but should be left unchanged +# unless the --install flag is invoked. +cat >build-aux/config.guess <<'_ATEOF' + +timestamp='1970-01-01' +_ATEOF + - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_7 -#AT_START_8 -# 8. libtoolize.at:450: diagnose missing LTDL_INIT invocation -at_setup_line='libtoolize.at:450' -at_fn_banner 1 -at_desc="diagnose missing LTDL_INIT invocation" -at_desc_line=" 8: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "8. libtoolize.at:450: testing ..." - $at_traceon + +## -------------------------------------------------------------------- ## +## First we try to update with some newer files in the destination dir. ## +## -------------------------------------------------------------------- ## + cat >expout <<'_ATEOF' -libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'. -libtoolize: copying file `ltdl/config/compile' -libtoolize: copying file `ltdl/config/config.guess' -libtoolize: copying file `ltdl/config/config.sub' -libtoolize: copying file `ltdl/config/depcomp' -libtoolize: copying file `ltdl/config/install-sh' -libtoolize: copying file `ltdl/config/missing' -libtoolize: copying file `ltdl/config/ltmain.sh' -libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'. -libtoolize: copying file `ltdl/m4/argz.m4' -libtoolize: copying file `ltdl/m4/libtool.m4' -libtoolize: copying file `ltdl/m4/ltdl.m4' -libtoolize: copying file `ltdl/m4/ltoptions.m4' -libtoolize: copying file `ltdl/m4/ltsugar.m4' -libtoolize: copying file `ltdl/m4/ltversion.m4' -libtoolize: copying file `ltdl/m4/lt~obsolete.m4' -libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'. -libtoolize: copying file `ltdl/COPYING.LIB' -libtoolize: copying file `ltdl/README' -libtoolize: copying file `ltdl/Makefile.am' -libtoolize: copying file `ltdl/configure.ac' -libtoolize: copying file `ltdl/aclocal.m4' -libtoolize: copying file `ltdl/Makefile.in' -libtoolize: copying file `ltdl/config-h.in' -libtoolize: copying file `ltdl/configure' -libtoolize: copying file `ltdl/argz_.h' -libtoolize: copying file `ltdl/argz.c' -libtoolize: copying file `ltdl/loaders/dld_link.c' -libtoolize: copying file `ltdl/loaders/dlopen.c' -libtoolize: copying file `ltdl/loaders/dyld.c' -libtoolize: copying file `ltdl/loaders/load_add_on.c' -libtoolize: copying file `ltdl/loaders/loadlibrary.c' -libtoolize: copying file `ltdl/loaders/shl_load.c' -libtoolize: copying file `ltdl/lt__dirent.c' -libtoolize: copying file `ltdl/lt__strl.c' -libtoolize: copying file `ltdl/libltdl/lt__alloc.h' -libtoolize: copying file `ltdl/libltdl/lt__dirent.h' -libtoolize: copying file `ltdl/libltdl/lt__glibc.h' -libtoolize: copying file `ltdl/libltdl/lt__private.h' -libtoolize: copying file `ltdl/libltdl/lt__strl.h' -libtoolize: copying file `ltdl/libltdl/lt_dlloader.h' -libtoolize: copying file `ltdl/libltdl/lt_error.h' -libtoolize: copying file `ltdl/libltdl/lt_system.h' -libtoolize: copying file `ltdl/libltdl/slist.h' -libtoolize: copying file `ltdl/loaders/preopen.c' -libtoolize: copying file `ltdl/lt__alloc.c' -libtoolize: copying file `ltdl/lt_dlloader.c' -libtoolize: copying file `ltdl/lt_error.c' -libtoolize: copying file `ltdl/ltdl.c' -libtoolize: copying file `ltdl/ltdl.h' -libtoolize: copying file `ltdl/slist.c' -libtoolize: Remember to add `LTDL_INIT' to configure.ac. -libtoolize: Consider adding `-I ltdl/m4' to ACLOCAL_AMFLAGS in Makefile.am. +libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. +libtoolize: copying file `build-aux/config.guess' +libtoolize: copying file `build-aux/config.sub' +libtoolize: copying file `build-aux/install-sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. +libtoolize: copying file `m4/libtool.m4' +libtoolize: copying file `m4/ltsugar.m4' +libtoolize: copying file `m4/ltversion.m4' +libtoolize: copying file `m4/lt~obsolete.m4' _ATEOF -cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) -LT_CONFIG_LTDL_DIR([ltdl]) -AC_CONFIG_AUX_DIR([ltdl/config]) -AC_CONFIG_MACRO_DIR([ltdl/m4]) -LT_INIT -AC_OUTPUT +cat >experr <<'_ATEOF' +libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite +libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite _ATEOF @@ -3148,65 +3294,39 @@ lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^. sed "s/libtoolize/$lt_name/g s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t mv -f expout.t expout +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t +mv -f experr.t experr { set +x -$as_echo "$at_srcdir/libtoolize.at:517: \$LIBTOOLIZE --ltdl --copy +$as_echo "$at_srcdir/libtoolize.at:228: \$LIBTOOLIZE --copy --install " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:517" -( $at_check_trace; $LIBTOOLIZE --ltdl --copy +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:228" +( $at_check_trace; $LIBTOOLIZE --copy --install ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +$at_diff experr "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:517" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:228" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_8 -#AT_START_9 -# 9. libtoolize.at:527: upgrading verbatim style aclocal.m4 -at_setup_line='libtoolize.at:527' -at_fn_banner 1 -at_desc="upgrading verbatim style aclocal.m4" -at_desc_line=" 9: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "9. libtoolize.at:527: testing ..." - $at_traceon - -cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) -AC_CONFIG_AUX_DIR([build-aux]) -LT_INIT -AC_OUTPUT -_ATEOF +## ---------------------------------------------------------- ## +## Next, a second update attempt with everything now updated. ## +## ---------------------------------------------------------- ## +: >expout -cat >expout <<'_ATEOF' -libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. -libtoolize: copying file `build-aux/ltmain.sh' -libtoolize: You should add the contents of the following files to `aclocal.m4': -libtoolize: `/usr/local/share/aclocal/libtool.m4' -libtoolize: `/usr/local/share/aclocal/ltoptions.m4' -libtoolize: `/usr/local/share/aclocal/ltversion.m4' -libtoolize: `/usr/local/share/aclocal/ltsugar.m4' -libtoolize: `/usr/local/share/aclocal/lt~obsolete.m4' -libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and -libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. -libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. +cat >experr <<'_ATEOF' +libtoolize: `build-aux/ltmain.sh' is newer: use `--force' to overwrite +libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite _ATEOF @@ -3214,68 +3334,46 @@ lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^. sed "s/libtoolize/$lt_name/g s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t mv -f expout.t expout +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t +mv -f experr.t experr { set +x -$as_echo "$at_srcdir/libtoolize.at:550: \$LIBTOOLIZE --copy +$as_echo "$at_srcdir/libtoolize.at:242: \$LIBTOOLIZE --copy --install " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:550" -( $at_check_trace; $LIBTOOLIZE --copy +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:242" +( $at_check_trace; $LIBTOOLIZE --copy --install ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +$at_diff experr "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:550" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:242" $at_failed && at_fn_log_failure $at_traceon; } -## --------------------------------------- ## -## Upgrading a hand maintained aclocal.m4. ## -## --------------------------------------- ## - -cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([m4]) -LT_INIT -AC_OUTPUT -_ATEOF - - -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I m4 -_ATEOF - - -cat >aclocal.m4 <<'_ATEOF' -# This should need upgrading: -# serial 25 LT_INIT -AC_DEFUN([LT_INIT], -[blah]) - -# This is newer than the upgrade version: -# serial 99999 ltoptions.m4 - -# This is older than the upgrade version: -# serial 1 ltversion.m4 -_ATEOF - +## ----------------------------------------------------------- ## +## Now, a forced update to downgrade files with newer serials. ## +## ----------------------------------------------------------- ## cat >expout <<'_ATEOF' +libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. +libtoolize: copying file `build-aux/config.guess' +libtoolize: copying file `build-aux/config.sub' +libtoolize: copying file `build-aux/install-sh' +libtoolize: copying file `build-aux/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. libtoolize: copying file `m4/libtool.m4' libtoolize: copying file `m4/ltoptions.m4' libtoolize: copying file `m4/ltsugar.m4' -libtoolize: You should add the contents of `m4/ltsugar.m4' to `aclocal.m4'. libtoolize: copying file `m4/ltversion.m4' -libtoolize: You should add the contents of `m4/ltversion.m4' to `aclocal.m4'. libtoolize: copying file `m4/lt~obsolete.m4' -libtoolize: You should add the contents of `m4/lt~obsolete.m4' to `aclocal.m4'. _ATEOF @@ -3284,11 +3382,11 @@ sed "s/libtoolize/$lt_name/g s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t mv -f expout.t expout { set +x -$as_echo "$at_srcdir/libtoolize.at:594: \$LIBTOOLIZE --copy +$as_echo "$at_srcdir/libtoolize.at:263: \$LIBTOOLIZE --copy --force --install " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:594" -( $at_check_trace; $LIBTOOLIZE --copy +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:263" +( $at_check_trace; $LIBTOOLIZE --copy --force --install ) >>"$at_stdout" 2>>"$at_stderr" @@ -3296,102 +3394,112 @@ at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:594" -$at_failed && at_fn_log_failure -$at_traceon; } - - - - -## ------------------------------------------- ## -## Upgrading an aclocal maintained aclocal.m4. ## -## ------------------------------------------- ## - -{ set +x -$as_echo "$at_srcdir/libtoolize.at:601: \$ACLOCAL -I m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "libtoolize.at:601" -( $at_check_trace; $ACLOCAL -I m4 -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:601" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:263" $at_failed && at_fn_log_failure $at_traceon; } +## ---------------------------------------------------------------- ## +## A final update attempt with everything previously force updated. ## +## ---------------------------------------------------------------- ## -rm -f m4/libtool.m4 m4/ltoptions.m4 - -# This file should be upgraded. -cat >m4/libtool.m4 <<'_ATEOF' - -# serial 25 LT_INIT -AC_DEFUN([LT_INIT]) -_ATEOF - - -# This file has a very high serial number, and should be left unchanged. -cat >m4/ltoptions.m4 <<'_ATEOF' - -# serial 99999 ltoptions.m4 -_ATEOF - - -cat >expout <<'_ATEOF' -libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. -libtoolize: copying file `m4/libtool.m4' -_ATEOF - - -cat >experr <<'_ATEOF' -libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite -_ATEOF - +: >expout lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` sed "s/libtoolize/$lt_name/g s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t mv -f expout.t expout -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t -mv -f experr.t experr { set +x -$as_echo "$at_srcdir/libtoolize.at:625: \$LIBTOOLIZE --copy +$as_echo "$at_srcdir/libtoolize.at:272: \$LIBTOOLIZE --copy --install " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:625" -( $at_check_trace; $LIBTOOLIZE --copy +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:272" +( $at_check_trace; $LIBTOOLIZE --copy --install ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -$at_diff experr "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:625" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:272" $at_failed && at_fn_log_failure $at_traceon; } -## ----------------------------------------------------------- ## -## Now, a forced update to downgrade files with newer serials. ## -## ----------------------------------------------------------- ## + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_10 +#AT_START_11 +at_fn_group_banner 11 'libtoolize.at:281' \ + "diagnose missing LT_CONFIG_LTDL_DIR" " " 2 +at_xfail=no +( + $as_echo "11. $at_setup_line: testing $at_desc ..." + $at_traceon + cat >expout <<'_ATEOF' libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. +libtoolize: copying file `build-aux/config.guess' +libtoolize: copying file `build-aux/config.sub' +libtoolize: copying file `build-aux/install-sh' libtoolize: copying file `build-aux/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. +libtoolize: copying file `m4/argz.m4' libtoolize: copying file `m4/libtool.m4' +libtoolize: copying file `m4/ltdl.m4' libtoolize: copying file `m4/ltoptions.m4' libtoolize: copying file `m4/ltsugar.m4' libtoolize: copying file `m4/ltversion.m4' libtoolize: copying file `m4/lt~obsolete.m4' +libtoolize: putting libltdl files in `ltdl'. +libtoolize: copying file `ltdl/COPYING.LIB' +libtoolize: copying file `ltdl/README' +libtoolize: copying file `ltdl/argz_.h' +libtoolize: copying file `ltdl/argz.c' +libtoolize: copying file `ltdl/loaders/dld_link.c' +libtoolize: copying file `ltdl/loaders/dlopen.c' +libtoolize: copying file `ltdl/loaders/dyld.c' +libtoolize: copying file `ltdl/loaders/load_add_on.c' +libtoolize: copying file `ltdl/loaders/loadlibrary.c' +libtoolize: copying file `ltdl/loaders/shl_load.c' +libtoolize: copying file `ltdl/lt__dirent.c' +libtoolize: copying file `ltdl/lt__strl.c' +libtoolize: copying file `ltdl/libltdl/lt__alloc.h' +libtoolize: copying file `ltdl/libltdl/lt__dirent.h' +libtoolize: copying file `ltdl/libltdl/lt__glibc.h' +libtoolize: copying file `ltdl/libltdl/lt__private.h' +libtoolize: copying file `ltdl/libltdl/lt__strl.h' +libtoolize: copying file `ltdl/libltdl/lt_dlloader.h' +libtoolize: copying file `ltdl/libltdl/lt_error.h' +libtoolize: copying file `ltdl/libltdl/lt_system.h' +libtoolize: copying file `ltdl/libltdl/slist.h' +libtoolize: copying file `ltdl/loaders/preopen.c' +libtoolize: copying file `ltdl/lt__alloc.c' +libtoolize: copying file `ltdl/lt_dlloader.c' +libtoolize: copying file `ltdl/lt_error.c' +libtoolize: copying file `ltdl/ltdl.c' +libtoolize: copying file `ltdl/ltdl.h' +libtoolize: copying file `ltdl/slist.c' +libtoolize: creating file `ltdl/Makefile.inc' +libtoolize: Remember to add `LT_CONFIG_LTDL_DIR([ltdl])' to `configure.ac'. +libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. +_ATEOF + + +cat >configure.ac <<'_ATEOF' +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) +LT_INIT +LTDL_INIT([nonrecursive]) +AC_OUTPUT _ATEOF @@ -3400,11 +3508,11 @@ sed "s/libtoolize/$lt_name/g s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t mv -f expout.t expout { set +x -$as_echo "$at_srcdir/libtoolize.at:642: \$LIBTOOLIZE --copy --force +$as_echo "$at_srcdir/libtoolize.at:340: \$LIBTOOLIZE --copy --install --ltdl=ltdl " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:642" -( $at_check_trace; $LIBTOOLIZE --copy --force +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:340" +( $at_check_trace; $LIBTOOLIZE --copy --install --ltdl=ltdl ) >>"$at_stdout" 2>>"$at_stderr" @@ -3412,7 +3520,7 @@ at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:642" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:340" $at_failed && at_fn_log_failure $at_traceon; } @@ -3420,57 +3528,88 @@ $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_9 -#AT_START_10 -# 10. libtoolize.at:651: verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR -at_setup_line='libtoolize.at:651' -at_fn_banner 1 -at_desc="verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR" -at_desc_line=" 10: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_11 +#AT_START_12 +at_fn_group_banner 12 'libtoolize.at:426' \ + "copy ltdl.m4 with shared macro directory" " " 2 at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "10. libtoolize.at:651: testing ..." + $as_echo "12. $at_setup_line: testing $at_desc ..." $at_traceon +cat >expout <<'_ATEOF' +libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'. +libtoolize: linking file `ltdl/config/compile' +libtoolize: linking file `ltdl/config/config.guess' +libtoolize: linking file `ltdl/config/config.sub' +libtoolize: linking file `ltdl/config/depcomp' +libtoolize: linking file `ltdl/config/install-sh' +libtoolize: linking file `ltdl/config/missing' +libtoolize: linking file `ltdl/config/ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'. +libtoolize: linking file `ltdl/m4/argz.m4' +libtoolize: linking file `ltdl/m4/libtool.m4' +libtoolize: linking file `ltdl/m4/ltdl.m4' +libtoolize: linking file `ltdl/m4/ltoptions.m4' +libtoolize: linking file `ltdl/m4/ltsugar.m4' +libtoolize: linking file `ltdl/m4/ltversion.m4' +libtoolize: linking file `ltdl/m4/lt~obsolete.m4' +libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'. +libtoolize: linking file `ltdl/COPYING.LIB' +libtoolize: linking file `ltdl/README' +libtoolize: linking file `ltdl/Makefile.am' +libtoolize: linking file `ltdl/configure.ac' +libtoolize: copying file `ltdl/aclocal.m4' +libtoolize: linking file `ltdl/Makefile.in' +libtoolize: linking file `ltdl/config-h.in' +libtoolize: linking file `ltdl/configure' +libtoolize: linking file `ltdl/argz_.h' +libtoolize: linking file `ltdl/argz.c' +libtoolize: linking file `ltdl/loaders/dld_link.c' +libtoolize: linking file `ltdl/loaders/dlopen.c' +libtoolize: linking file `ltdl/loaders/dyld.c' +libtoolize: linking file `ltdl/loaders/load_add_on.c' +libtoolize: linking file `ltdl/loaders/loadlibrary.c' +libtoolize: linking file `ltdl/loaders/shl_load.c' +libtoolize: linking file `ltdl/lt__dirent.c' +libtoolize: linking file `ltdl/lt__strl.c' +libtoolize: linking file `ltdl/libltdl/lt__alloc.h' +libtoolize: linking file `ltdl/libltdl/lt__dirent.h' +libtoolize: linking file `ltdl/libltdl/lt__glibc.h' +libtoolize: linking file `ltdl/libltdl/lt__private.h' +libtoolize: linking file `ltdl/libltdl/lt__strl.h' +libtoolize: linking file `ltdl/libltdl/lt_dlloader.h' +libtoolize: linking file `ltdl/libltdl/lt_error.h' +libtoolize: linking file `ltdl/libltdl/lt_system.h' +libtoolize: linking file `ltdl/libltdl/slist.h' +libtoolize: linking file `ltdl/loaders/preopen.c' +libtoolize: linking file `ltdl/lt__alloc.c' +libtoolize: linking file `ltdl/lt_dlloader.c' +libtoolize: linking file `ltdl/lt_error.c' +libtoolize: linking file `ltdl/ltdl.c' +libtoolize: linking file `ltdl/ltdl.h' +libtoolize: linking file `ltdl/slist.c' +_ATEOF + + cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) +LT_CONFIG_LTDL_DIR([ltdl]) +AC_CONFIG_AUX_DIR([ltdl/config]) +AC_CONFIG_MACRO_DIR([ltdl/m4]) LT_INIT +LTDL_INIT AC_OUTPUT _ATEOF -cat >aclocal.m4 <<'_ATEOF' -# This should need upgrading: -# serial 25 LT_INIT -AC_DEFUN([LT_INIT], -[blah]) +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I ltdl/m4 +_ATEOF -# This is newer than the upgrade version: -# serial 99999 ltoptions.m4 - -# This is older than the upgrade version: -# serial 1 ltversion.m4 -_ATEOF - - -cat >expout <<'_ATEOF' -libtoolize: putting auxiliary files in `.'. -libtoolize: copying file `./ltmain.sh' -libtoolize: You should add the contents of the following files to `aclocal.m4': -libtoolize: `/usr/local/share/aclocal/libtool.m4' -libtoolize: `/usr/local/share/aclocal/ltversion.m4' -libtoolize: `/usr/local/share/aclocal/ltsugar.m4' -libtoolize: `/usr/local/share/aclocal/lt~obsolete.m4' -libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and -libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. -libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. -_ATEOF lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` @@ -3478,11 +3617,11 @@ sed "s/libtoolize/$lt_name/g s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t mv -f expout.t expout { set +x -$as_echo "$at_srcdir/libtoolize.at:685: \$LIBTOOLIZE --copy +$as_echo "$at_srcdir/libtoolize.at:430: \$LIBTOOLIZE --ltdl " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:685" -( $at_check_trace; $LIBTOOLIZE --copy +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:430" +( $at_check_trace; $LIBTOOLIZE --ltdl ) >>"$at_stdout" 2>>"$at_stderr" @@ -3490,147 +3629,108 @@ at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:685" -$at_failed && at_fn_log_failure -$at_traceon; } - - - - -## ----------------------------------------------------------------------- ## -## Upgrading an aclocal maintained aclocal.m4 without AC_CONFIG_MACRO_DIR. ## -## ----------------------------------------------------------------------- ## - -{ set +x -$as_echo "$at_srcdir/libtoolize.at:692: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "libtoolize.at:692" -( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4 -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:692" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:430" $at_failed && at_fn_log_failure $at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_12 +#AT_START_13 +at_fn_group_banner 13 'libtoolize.at:438' \ + "correctly parse LTDL_INIT from configure.ac" " " 2 +at_xfail=no +( + $as_echo "13. $at_setup_line: testing $at_desc ..." + $at_traceon -## The following code is adapted (and simplified) from libtoolize.m4sh -#### -: ${GREP="grep"} -: ${SED="sed"} - -basename="s,^.*/,," - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - -# func_serial filename [macro_regex] -# Output the value of the serial number comment in FILENAME, where the -# comment line must also match MACRO_REGEX, if given. -func_serial () -{ - my_filename="$1" - my_macro_regex="$2" - my_sed_serial=' - /^# serial [1-9][0-9.]*[ ]*'"$my_macro_regex"'[ ]*$/ { - s,^# serial \([1-9][0-9.]*\).*$,\1, - q - } - d' - - # Search FILENAME and all the files it m4_includes for a serial number - # in the file that AC_DEFUNs MACRO_REGEX. - my_serial= - if test -z "$my_macro_regex" || - test "$my_filename" = aclocal.m4 || - test "$my_macro_regex" = `echo "$my_filename" | $SED "$basename"` || - func_grep '^AC_DEFUN(\['"$my_macro_regex" "$my_filename" - then - my_serial=`$SED -e "$my_sed_serial" "$my_filename"` - fi - - # If the file has no serial number, something is badly wrong! - test -n "$my_serial" || exit 1 - - echo $my_serial -} - -# Make the serial number in aclocal.m4 higher than installed ltoptions.m4, -# and the others match the macro files that libtoolize will compare against. -libtool_serial=`func_serial "$tst_aclocaldir/libtool.m4" LT_INIT` -ltversion_serial=`func_serial "$tst_aclocaldir/ltversion.m4" ltversion.m4` -ltsugar_serial=`func_serial "$tst_aclocaldir/ltsugar.m4" ltsugar.m4` -lt_obsolete_serial=`func_serial "$tst_aclocaldir/lt~obsolete.m4" lt~obsolete.m4` -$SED -e 's,^#.*serial.*ltoptions.m4$,# serial 99999 ltoptions.m4,' \ - -e "s,^#.*serial.*libtool.m4\$,# serial $libtool_serial libtool.m4," \ - -e "s,^#.*serial.*ltversion.m4\$,# serial $ltversion_serial ltversion.m4," \ - -e "s,^#.*serial.*ltsugar.m4\$,# serial $ltsugar_serial ltsugar.m4," \ - -e "s,^#.*serial.*lt~obsolete.m4\$,# serial $lt_obsolete_serial lt~obsolete.m4," \ - < aclocal.m4 > aclocal.m4t -mv -f aclocal.m4t aclocal.m4 - cat >expout <<'_ATEOF' -libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and -libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. -libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. +libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'. +libtoolize: linking file `ltdl/config/compile' +libtoolize: linking file `ltdl/config/config.guess' +libtoolize: linking file `ltdl/config/config.sub' +libtoolize: linking file `ltdl/config/depcomp' +libtoolize: linking file `ltdl/config/install-sh' +libtoolize: linking file `ltdl/config/missing' +libtoolize: linking file `ltdl/config/ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'. +libtoolize: linking file `ltdl/m4/argz.m4' +libtoolize: linking file `ltdl/m4/libtool.m4' +libtoolize: linking file `ltdl/m4/ltdl.m4' +libtoolize: linking file `ltdl/m4/ltoptions.m4' +libtoolize: linking file `ltdl/m4/ltsugar.m4' +libtoolize: linking file `ltdl/m4/ltversion.m4' +libtoolize: linking file `ltdl/m4/lt~obsolete.m4' +libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'. +libtoolize: linking file `ltdl/COPYING.LIB' +libtoolize: linking file `ltdl/README' +libtoolize: linking file `ltdl/Makefile.am' +libtoolize: linking file `ltdl/configure.ac' +libtoolize: copying file `ltdl/aclocal.m4' +libtoolize: linking file `ltdl/Makefile.in' +libtoolize: linking file `ltdl/config-h.in' +libtoolize: linking file `ltdl/configure' +libtoolize: linking file `ltdl/argz_.h' +libtoolize: linking file `ltdl/argz.c' +libtoolize: linking file `ltdl/loaders/dld_link.c' +libtoolize: linking file `ltdl/loaders/dlopen.c' +libtoolize: linking file `ltdl/loaders/dyld.c' +libtoolize: linking file `ltdl/loaders/load_add_on.c' +libtoolize: linking file `ltdl/loaders/loadlibrary.c' +libtoolize: linking file `ltdl/loaders/shl_load.c' +libtoolize: linking file `ltdl/lt__dirent.c' +libtoolize: linking file `ltdl/lt__strl.c' +libtoolize: linking file `ltdl/libltdl/lt__alloc.h' +libtoolize: linking file `ltdl/libltdl/lt__dirent.h' +libtoolize: linking file `ltdl/libltdl/lt__glibc.h' +libtoolize: linking file `ltdl/libltdl/lt__private.h' +libtoolize: linking file `ltdl/libltdl/lt__strl.h' +libtoolize: linking file `ltdl/libltdl/lt_dlloader.h' +libtoolize: linking file `ltdl/libltdl/lt_error.h' +libtoolize: linking file `ltdl/libltdl/lt_system.h' +libtoolize: linking file `ltdl/libltdl/slist.h' +libtoolize: linking file `ltdl/loaders/preopen.c' +libtoolize: linking file `ltdl/lt__alloc.c' +libtoolize: linking file `ltdl/lt_dlloader.c' +libtoolize: linking file `ltdl/lt_error.c' +libtoolize: linking file `ltdl/ltdl.c' +libtoolize: linking file `ltdl/ltdl.h' +libtoolize: linking file `ltdl/slist.c' _ATEOF -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t -mv -f expout.t expout -{ set +x -$as_echo "$at_srcdir/libtoolize.at:759: \$LIBTOOLIZE --copy - -" -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:759" -( $at_check_trace; $LIBTOOLIZE --copy - - -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:759" -$at_failed && at_fn_log_failure -$at_traceon; } - - - +cat >configure.ac <<'_ATEOF' +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) +LT_CONFIG_LTDL_DIR([ltdl]) +AC_CONFIG_AUX_DIR([ltdl/config]) +AC_CONFIG_MACRO_DIR([ltdl/m4]) +LT_INIT +LTDL_INIT +AC_OUTPUT +_ATEOF -## --------------------- ## -## Now, a forced update. ## -## --------------------- ## -cat >expout <<'_ATEOF' -libtoolize: putting auxiliary files in `.'. -libtoolize: copying file `./ltmain.sh' -libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and -libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. -libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I ltdl/m4 _ATEOF + lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` sed "s/libtoolize/$lt_name/g s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t mv -f expout.t expout { set +x -$as_echo "$at_srcdir/libtoolize.at:774: \$LIBTOOLIZE --copy --force +$as_echo "$at_srcdir/libtoolize.at:442: \$LIBTOOLIZE " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:774" -( $at_check_trace; $LIBTOOLIZE --copy --force +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:442" +( $at_check_trace; $LIBTOOLIZE ) >>"$at_stdout" 2>>"$at_stderr" @@ -3638,7 +3738,7 @@ at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:774" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:442" $at_failed && at_fn_log_failure $at_traceon; } @@ -3646,40 +3746,44 @@ $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_10 -#AT_START_11 -# 11. libtoolize.at:783: nonrecursive ltdl with AC_CONFIG_MACRO_DIR -at_setup_line='libtoolize.at:783' -at_fn_banner 1 -at_desc="nonrecursive ltdl with AC_CONFIG_MACRO_DIR" -at_desc_line=" 11: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_13 +#AT_START_14 +at_fn_group_banner 14 'libtoolize.at:450' \ + "diagnose missing LTDL_INIT invocation" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "11. libtoolize.at:783: testing ..." + $as_echo "14. $at_setup_line: testing $at_desc ..." $at_traceon cat >expout <<'_ATEOF' -libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. -libtoolize: copying file `build-aux/config.guess' -libtoolize: copying file `build-aux/config.sub' -libtoolize: copying file `build-aux/install-sh' -libtoolize: copying file `build-aux/ltmain.sh' -libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. -libtoolize: copying file `m4/argz.m4' -libtoolize: copying file `m4/libtool.m4' -libtoolize: copying file `m4/ltdl.m4' -libtoolize: copying file `m4/ltoptions.m4' -libtoolize: copying file `m4/ltsugar.m4' -libtoolize: copying file `m4/ltversion.m4' -libtoolize: copying file `m4/lt~obsolete.m4' +libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `ltdl/config'. +libtoolize: copying file `ltdl/config/compile' +libtoolize: copying file `ltdl/config/config.guess' +libtoolize: copying file `ltdl/config/config.sub' +libtoolize: copying file `ltdl/config/depcomp' +libtoolize: copying file `ltdl/config/install-sh' +libtoolize: copying file `ltdl/config/missing' +libtoolize: copying file `ltdl/config/ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `ltdl/m4'. +libtoolize: copying file `ltdl/m4/argz.m4' +libtoolize: copying file `ltdl/m4/libtool.m4' +libtoolize: copying file `ltdl/m4/ltdl.m4' +libtoolize: copying file `ltdl/m4/ltoptions.m4' +libtoolize: copying file `ltdl/m4/ltsugar.m4' +libtoolize: copying file `ltdl/m4/ltversion.m4' +libtoolize: copying file `ltdl/m4/lt~obsolete.m4' libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'. libtoolize: copying file `ltdl/COPYING.LIB' libtoolize: copying file `ltdl/README' +libtoolize: copying file `ltdl/Makefile.am' +libtoolize: copying file `ltdl/configure.ac' +libtoolize: copying file `ltdl/aclocal.m4' +libtoolize: copying file `ltdl/Makefile.in' +libtoolize: copying file `ltdl/config-h.in' +libtoolize: copying file `ltdl/configure' libtoolize: copying file `ltdl/argz_.h' libtoolize: copying file `ltdl/argz.c' libtoolize: copying file `ltdl/loaders/dld_link.c' @@ -3706,36 +3810,31 @@ libtoolize: copying file `ltdl/lt_error. libtoolize: copying file `ltdl/ltdl.c' libtoolize: copying file `ltdl/ltdl.h' libtoolize: copying file `ltdl/slist.c' -libtoolize: creating file `ltdl/Makefile.inc' +libtoolize: Remember to add `LTDL_INIT' to configure.ac. +libtoolize: Consider adding `-I ltdl/m4' to ACLOCAL_AMFLAGS in Makefile.am. _ATEOF cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) LT_CONFIG_LTDL_DIR([ltdl]) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_AUX_DIR([ltdl/config]) +AC_CONFIG_MACRO_DIR([ltdl/m4]) LT_INIT -LTDL_INIT([nonrecursive]) AC_OUTPUT _ATEOF -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I m4 -_ATEOF - - lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` sed "s/libtoolize/$lt_name/g s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t mv -f expout.t expout { set +x -$as_echo "$at_srcdir/libtoolize.at:845: \$LIBTOOLIZE --copy --install --ltdl=ltdl +$as_echo "$at_srcdir/libtoolize.at:517: \$LIBTOOLIZE --ltdl --copy " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:845" -( $at_check_trace; $LIBTOOLIZE --copy --install --ltdl=ltdl +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:517" +( $at_check_trace; $LIBTOOLIZE --ltdl --copy ) >>"$at_stdout" 2>>"$at_stderr" @@ -3743,7 +3842,7 @@ at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:845" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:517" $at_failed && at_fn_log_failure $at_traceon; } @@ -3751,115 +3850,52 @@ $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_11 -#AT_START_12 -# 12. libtoolize.at:854: subproject ltdl with non-shared directories -at_setup_line='libtoolize.at:854' -at_fn_banner 1 -at_desc="subproject ltdl with non-shared directories" -at_desc_line=" 12: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_14 +#AT_START_15 +at_fn_group_banner 15 'libtoolize.at:527' \ + "upgrading verbatim style aclocal.m4" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" + test "$ACLOCAL" = no && at_xfail=yes ( - $as_echo "12. libtoolize.at:854: testing ..." + $as_echo "15. $at_setup_line: testing $at_desc ..." $at_traceon -cat >expout <<'_ATEOF' -libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. -libtoolize: copying file `build-aux/config.guess' -libtoolize: copying file `build-aux/config.sub' -libtoolize: copying file `build-aux/install-sh' -libtoolize: copying file `build-aux/ltmain.sh' -libtoolize: putting auxiliary files in `build-aux'. -libtoolize: copying file `ltdl/config/compile' -libtoolize: copying file `ltdl/config/config.guess' -libtoolize: copying file `ltdl/config/config.sub' -libtoolize: copying file `ltdl/config/depcomp' -libtoolize: copying file `ltdl/config/install-sh' -libtoolize: copying file `ltdl/config/missing' -libtoolize: copying file `ltdl/config/ltmain.sh' -libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `acm4'. -libtoolize: copying file `acm4/argz.m4' -libtoolize: copying file `acm4/libtool.m4' -libtoolize: copying file `acm4/ltdl.m4' -libtoolize: copying file `acm4/ltoptions.m4' -libtoolize: copying file `acm4/ltsugar.m4' -libtoolize: copying file `acm4/ltversion.m4' -libtoolize: copying file `acm4/lt~obsolete.m4' -libtoolize: putting macros in `ltdl/m4'. -libtoolize: copying file `ltdl/m4/argz.m4' -libtoolize: copying file `ltdl/m4/libtool.m4' -libtoolize: copying file `ltdl/m4/ltdl.m4' -libtoolize: copying file `ltdl/m4/ltoptions.m4' -libtoolize: copying file `ltdl/m4/ltsugar.m4' -libtoolize: copying file `ltdl/m4/ltversion.m4' -libtoolize: copying file `ltdl/m4/lt~obsolete.m4' -libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'. -libtoolize: copying file `ltdl/COPYING.LIB' -libtoolize: copying file `ltdl/README' -libtoolize: copying file `ltdl/Makefile.am' -libtoolize: copying file `ltdl/configure.ac' -libtoolize: copying file `ltdl/aclocal.m4' -libtoolize: copying file `ltdl/Makefile.in' -libtoolize: copying file `ltdl/config-h.in' -libtoolize: copying file `ltdl/configure' -libtoolize: copying file `ltdl/argz_.h' -libtoolize: copying file `ltdl/argz.c' -libtoolize: copying file `ltdl/loaders/dld_link.c' -libtoolize: copying file `ltdl/loaders/dlopen.c' -libtoolize: copying file `ltdl/loaders/dyld.c' -libtoolize: copying file `ltdl/loaders/load_add_on.c' -libtoolize: copying file `ltdl/loaders/loadlibrary.c' -libtoolize: copying file `ltdl/loaders/shl_load.c' -libtoolize: copying file `ltdl/lt__dirent.c' -libtoolize: copying file `ltdl/lt__strl.c' -libtoolize: copying file `ltdl/libltdl/lt__alloc.h' -libtoolize: copying file `ltdl/libltdl/lt__dirent.h' -libtoolize: copying file `ltdl/libltdl/lt__glibc.h' -libtoolize: copying file `ltdl/libltdl/lt__private.h' -libtoolize: copying file `ltdl/libltdl/lt__strl.h' -libtoolize: copying file `ltdl/libltdl/lt_dlloader.h' -libtoolize: copying file `ltdl/libltdl/lt_error.h' -libtoolize: copying file `ltdl/libltdl/lt_system.h' -libtoolize: copying file `ltdl/libltdl/slist.h' -libtoolize: copying file `ltdl/loaders/preopen.c' -libtoolize: copying file `ltdl/lt__alloc.c' -libtoolize: copying file `ltdl/lt_dlloader.c' -libtoolize: copying file `ltdl/lt_error.c' -libtoolize: copying file `ltdl/ltdl.c' -libtoolize: copying file `ltdl/ltdl.h' -libtoolize: copying file `ltdl/slist.c' -libtoolize: Consider using `AC_CONFIG_AUX_DIR([ltdl/config])' in configure.ac. -libtoolize: Consider using `AC_CONFIG_MACRO_DIR([ltdl/m4])' in configure.ac. -libtoolize: Consider adding `-I ltdl/m4' to ACLOCAL_AMFLAGS in Makefile.am. -_ATEOF - - cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) -LT_CONFIG_LTDL_DIR([ltdl]) +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([acm4]) LT_INIT -LTDL_INIT([subproject]) AC_OUTPUT _ATEOF +cat >expout <<'_ATEOF' +libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. +libtoolize: copying file `build-aux/ltmain.sh' +libtoolize: You should add the contents of the following files to `aclocal.m4': +libtoolize: `/usr/local/share/aclocal/libtool.m4' +libtoolize: `/usr/local/share/aclocal/ltoptions.m4' +libtoolize: `/usr/local/share/aclocal/ltversion.m4' +libtoolize: `/usr/local/share/aclocal/ltsugar.m4' +libtoolize: `/usr/local/share/aclocal/lt~obsolete.m4' +libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and +libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. +libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. +_ATEOF + + lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` sed "s/libtoolize/$lt_name/g s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t mv -f expout.t expout { set +x -$as_echo "$at_srcdir/libtoolize.at:936: \$LIBTOOLIZE --copy --install +$as_echo "$at_srcdir/libtoolize.at:550: \$LIBTOOLIZE --copy " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:936" -( $at_check_trace; $LIBTOOLIZE --copy --install +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:550" +( $at_check_trace; $LIBTOOLIZE --copy ) >>"$at_stdout" 2>>"$at_stderr" @@ -3867,33 +3903,19 @@ at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:936" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:550" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_12 -#AT_START_13 -# 13. libtoolize.at:945: LIBTOOLIZE_OPTIONS -at_setup_line='libtoolize.at:945' -at_fn_banner 1 -at_desc="LIBTOOLIZE_OPTIONS" -at_desc_line=" 13: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "13. libtoolize.at:945: testing ..." - $at_traceon +## --------------------------------------- ## +## Upgrading a hand maintained aclocal.m4. ## +## --------------------------------------- ## cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) LT_INIT @@ -3901,96 +3923,124 @@ AC_OUTPUT _ATEOF +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I m4 +_ATEOF -LIBTOOLIZE_OPTIONS="narf" -export LIBTOOLIZE_OPTIONS -cat >experr <<'_ATEOF' -libtoolize: garbled LIBTOOLIZE_OPTIONS near `narf' -libtoolize: Try `libtoolize --help' for more information. +cat >aclocal.m4 <<'_ATEOF' +# This should need upgrading: +# serial 25 LT_INIT +AC_DEFUN([LT_INIT], +[blah]) + +# This is newer than the upgrade version: +# serial 99999 ltoptions.m4 + +# This is older than the upgrade version: +# serial 1 ltversion.m4 +_ATEOF + + +cat >expout <<'_ATEOF' +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. +libtoolize: copying file `m4/libtool.m4' +libtoolize: copying file `m4/ltoptions.m4' +libtoolize: copying file `m4/ltsugar.m4' +libtoolize: You should add the contents of `m4/ltsugar.m4' to `aclocal.m4'. +libtoolize: copying file `m4/ltversion.m4' +libtoolize: You should add the contents of `m4/ltversion.m4' to `aclocal.m4'. +libtoolize: copying file `m4/lt~obsolete.m4' +libtoolize: You should add the contents of `m4/lt~obsolete.m4' to `aclocal.m4'. _ATEOF lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t -mv -f experr.t experr +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t +mv -f expout.t expout { set +x -$as_echo "$at_srcdir/libtoolize.at:957: \$LIBTOOLIZE --copy +$as_echo "$at_srcdir/libtoolize.at:594: \$LIBTOOLIZE --copy " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:957" +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:594" ( $at_check_trace; $LIBTOOLIZE --copy ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -$at_diff experr "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/libtoolize.at:957" +at_fn_diff_devnull "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:594" $at_failed && at_fn_log_failure $at_traceon; } -## --------------------------- ## -## Unknown LIBTOOLIZE_OPTIONS. ## -## --------------------------- ## - -LIBTOOLIZE_OPTIONS=--no-such-option -export LIBTOOLIZE_OPTIONS - -cat >experr <<'_ATEOF' -libtoolize: warning: unrecognized environment option `--no-such-option' -_ATEOF - +## ------------------------------------------- ## +## Upgrading an aclocal maintained aclocal.m4. ## +## ------------------------------------------- ## -lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` -sed "s/libtoolize/$lt_name/g -s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t -mv -f experr.t experr { set +x -$as_echo "$at_srcdir/libtoolize.at:971: \$LIBTOOLIZE --copy - -" -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:971" -( $at_check_trace; $LIBTOOLIZE --copy - - +$as_echo "$at_srcdir/libtoolize.at:601: \$ACLOCAL -I m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "libtoolize.at:601" +( $at_check_trace; $ACLOCAL -I m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -$at_diff experr "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:971" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:601" $at_failed && at_fn_log_failure $at_traceon; } -## ----------------------------- ## -## --no-warn environment option. ## -## ----------------------------- ## -LIBTOOLIZE_OPTIONS=--no-warn,--no-such-option -export LIBTOOLIZE_OPTIONS +rm -f m4/libtool.m4 m4/ltoptions.m4 + +# This file should be upgraded. +cat >m4/libtool.m4 <<'_ATEOF' + +# serial 25 LT_INIT +AC_DEFUN([LT_INIT]) +_ATEOF + + +# This file has a very high serial number, and should be left unchanged. +cat >m4/ltoptions.m4 <<'_ATEOF' + +# serial 99999 ltoptions.m4 +_ATEOF + + +cat >expout <<'_ATEOF' +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. +libtoolize: copying file `m4/libtool.m4' +_ATEOF + cat >experr <<'_ATEOF' +libtoolize: `m4/ltoptions.m4' is newer: use `--force' to overwrite _ATEOF lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t +mv -f expout.t expout +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t mv -f experr.t experr { set +x -$as_echo "$at_srcdir/libtoolize.at:983: \$LIBTOOLIZE --copy +$as_echo "$at_srcdir/libtoolize.at:625: \$LIBTOOLIZE --copy " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:983" +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:625" ( $at_check_trace; $LIBTOOLIZE --copy @@ -3998,10345 +4048,13076 @@ at_fn_check_prepare_notrace 'an embedded at_status=$? at_failed=false $at_check_filter $at_diff experr "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:983" +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:625" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_13 -#AT_START_14 -# 14. libtoolize.at:992: cleanup old installation -at_setup_line='libtoolize.at:992' -at_fn_banner 1 -at_desc="cleanup old installation" -at_desc_line=" 14: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +## ----------------------------------------------------------- ## +## Now, a forced update to downgrade files with newer serials. ## +## ----------------------------------------------------------- ## + +cat >expout <<'_ATEOF' +libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. +libtoolize: copying file `build-aux/ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. +libtoolize: copying file `m4/libtool.m4' +libtoolize: copying file `m4/ltoptions.m4' +libtoolize: copying file `m4/ltsugar.m4' +libtoolize: copying file `m4/ltversion.m4' +libtoolize: copying file `m4/lt~obsolete.m4' +_ATEOF + + +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t +mv -f expout.t expout +{ set +x +$as_echo "$at_srcdir/libtoolize.at:642: \$LIBTOOLIZE --copy --force + +" +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:642" +( $at_check_trace; $LIBTOOLIZE --copy --force + + +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:642" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_15 +#AT_START_16 +at_fn_group_banner 16 'libtoolize.at:651' \ + "verbatim aclocal.m4 w/o AC_CONFIG_MACRO_DIR" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" + test "$ACLOCAL" = no && at_xfail=yes ( - $as_echo "14. libtoolize.at:992: testing ..." + $as_echo "16. $at_setup_line: testing $at_desc ..." $at_traceon cat >configure.ac <<'_ATEOF' -AC_INIT([libtoolize-demo], 2.2.10, bug-libtool@gnu.org) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_MACRO_DIR([m4]) +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) LT_INIT AC_OUTPUT _ATEOF +cat >aclocal.m4 <<'_ATEOF' +# This should need upgrading: +# serial 25 LT_INIT +AC_DEFUN([LT_INIT], +[blah]) -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I m4 -_ATEOF - +# This is newer than the upgrade version: +# serial 99999 ltoptions.m4 -cat >acinclude.m4 <<'_ATEOF' -AC_DEFUN([LT_INIT], -[: keep me, I might be hand maintained!]) # LT_INIT +# This is older than the upgrade version: +# serial 1 ltversion.m4 _ATEOF -cat >libltdl/acinclude.m4 <<'_ATEOF' -AC_DEFUN([LT_INIT], -[: delete me, I was left here by on old libltdl build]) # LT_INIT +cat >expout <<'_ATEOF' +libtoolize: putting auxiliary files in `.'. +libtoolize: copying file `./ltmain.sh' +libtoolize: You should add the contents of the following files to `aclocal.m4': +libtoolize: `/usr/local/share/aclocal/libtool.m4' +libtoolize: `/usr/local/share/aclocal/ltversion.m4' +libtoolize: `/usr/local/share/aclocal/ltsugar.m4' +libtoolize: `/usr/local/share/aclocal/lt~obsolete.m4' +libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and +libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. +libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. _ATEOF +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t +mv -f expout.t expout { set +x -$as_echo "$at_srcdir/libtoolize.at:1010: \$LIBTOOLIZE --copy --force --ltdl +$as_echo "$at_srcdir/libtoolize.at:685: \$LIBTOOLIZE --copy " -at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:1010" -( $at_check_trace; $LIBTOOLIZE --copy --force --ltdl +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:685" +( $at_check_trace; $LIBTOOLIZE --copy ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:1010" +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:685" $at_failed && at_fn_log_failure $at_traceon; } -# check files are left as expected -{ set +x -$as_echo "$at_srcdir/libtoolize.at:1013: grep 'keep me' acinclude.m4" -at_fn_check_prepare_trace "libtoolize.at:1013" -( $at_check_trace; grep 'keep me' acinclude.m4 -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:1013" -$at_failed && at_fn_log_failure -$at_traceon; } + +## ----------------------------------------------------------------------- ## +## Upgrading an aclocal maintained aclocal.m4 without AC_CONFIG_MACRO_DIR. ## +## ----------------------------------------------------------------------- ## { set +x -$as_echo "$at_srcdir/libtoolize.at:1014: test -f libltdl/acinclude.m4" -at_fn_check_prepare_trace "libtoolize.at:1014" -( $at_check_trace; test -f libltdl/acinclude.m4 +$as_echo "$at_srcdir/libtoolize.at:692: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "libtoolize.at:692" +( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/libtoolize.at:1014" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:692" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_14 -#AT_START_15 -# 15. help.at:26: standard command line options -at_setup_line='help.at:26' -at_fn_banner 2 -at_desc="standard command line options" -at_desc_line=" 15: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "15. help.at:26: testing ..." - $at_traceon +## The following code is adapted (and simplified) from libtoolize.m4sh +#### +: ${GREP="grep"} +: ${SED="sed"} + +basename="s,^.*/,," + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + +# func_serial filename [macro_regex] +# Output the value of the serial number comment in FILENAME, where the +# comment line must also match MACRO_REGEX, if given. +func_serial () +{ + my_filename="$1" + my_macro_regex="$2" + my_sed_serial=' + /^# serial [1-9][0-9.]*[ ]*'"$my_macro_regex"'[ ]*$/ { + s,^# serial \([1-9][0-9.]*\).*$,\1, + q + } + d' + + # Search FILENAME and all the files it m4_includes for a serial number + # in the file that AC_DEFUNs MACRO_REGEX. + my_serial= + if test -z "$my_macro_regex" || + test "$my_filename" = aclocal.m4 || + test "$my_macro_regex" = `echo "$my_filename" | $SED "$basename"` || + func_grep '^AC_DEFUN(\['"$my_macro_regex" "$my_filename" + then + my_serial=`$SED -e "$my_sed_serial" "$my_filename"` + fi + + # If the file has no serial number, something is badly wrong! + test -n "$my_serial" || exit 1 + + echo $my_serial +} + +# Make the serial number in aclocal.m4 higher than installed ltoptions.m4, +# and the others match the macro files that libtoolize will compare against. +libtool_serial=`func_serial "$tst_aclocaldir/libtool.m4" LT_INIT` +ltversion_serial=`func_serial "$tst_aclocaldir/ltversion.m4" ltversion.m4` +ltsugar_serial=`func_serial "$tst_aclocaldir/ltsugar.m4" ltsugar.m4` +lt_obsolete_serial=`func_serial "$tst_aclocaldir/lt~obsolete.m4" lt~obsolete.m4` +$SED -e 's,^#.*serial.*ltoptions.m4$,# serial 99999 ltoptions.m4,' \ + -e "s,^#.*serial.*libtool.m4\$,# serial $libtool_serial libtool.m4," \ + -e "s,^#.*serial.*ltversion.m4\$,# serial $ltversion_serial ltversion.m4," \ + -e "s,^#.*serial.*ltsugar.m4\$,# serial $ltsugar_serial ltsugar.m4," \ + -e "s,^#.*serial.*lt~obsolete.m4\$,# serial $lt_obsolete_serial lt~obsolete.m4," \ + < aclocal.m4 > aclocal.m4t +mv -f aclocal.m4t aclocal.m4 + +cat >expout <<'_ATEOF' +libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and +libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. +libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. +_ATEOF -{ set +x -$as_echo "$at_srcdir/help.at:30: \$LIBTOOLIZE --help" -at_fn_check_prepare_dynamic "$LIBTOOLIZE --help" "help.at:30" -( $at_check_trace; $LIBTOOLIZE --help -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:30" -$at_failed && at_fn_log_failure -$at_traceon; } +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t +mv -f expout.t expout { set +x -$as_echo "$at_srcdir/help.at:31: \$LIBTOOLIZE --version" -at_fn_check_prepare_dynamic "$LIBTOOLIZE --version" "help.at:31" -( $at_check_trace; $LIBTOOLIZE --version +$as_echo "$at_srcdir/libtoolize.at:759: \$LIBTOOLIZE --copy + +" +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:759" +( $at_check_trace; $LIBTOOLIZE --copy + + ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:31" +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:759" $at_failed && at_fn_log_failure $at_traceon; } + + + +## --------------------- ## +## Now, a forced update. ## +## --------------------- ## + +cat >expout <<'_ATEOF' +libtoolize: putting auxiliary files in `.'. +libtoolize: copying file `./ltmain.sh' +libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and +libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree. +libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. +_ATEOF + + +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t +mv -f expout.t expout { set +x -$as_echo "$at_srcdir/help.at:32: grep 'Copyright.*Free Software Foundation' stdout" -at_fn_check_prepare_trace "help.at:32" -( $at_check_trace; grep 'Copyright.*Free Software Foundation' stdout +$as_echo "$at_srcdir/libtoolize.at:774: \$LIBTOOLIZE --copy --force + +" +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:774" +( $at_check_trace; $LIBTOOLIZE --copy --force + + ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:32" +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:774" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/help.at:33: \$LIBTOOL --help" -at_fn_check_prepare_dynamic "$LIBTOOL --help" "help.at:33" -( $at_check_trace; $LIBTOOL --help -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:33" -$at_failed && at_fn_log_failure -$at_traceon; } -{ set +x -$as_echo "$at_srcdir/help.at:34: \$LIBTOOL --help-all" -at_fn_check_prepare_dynamic "$LIBTOOL --help-all" "help.at:34" -( $at_check_trace; $LIBTOOL --help-all -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:34" -$at_failed && at_fn_log_failure -$at_traceon; } -{ set +x -$as_echo "$at_srcdir/help.at:35: \$LIBTOOL --version" -at_fn_check_prepare_dynamic "$LIBTOOL --version" "help.at:35" -( $at_check_trace; $LIBTOOL --version -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:35" -$at_failed && at_fn_log_failure -$at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_16 +#AT_START_17 +at_fn_group_banner 17 'libtoolize.at:783' \ + "nonrecursive ltdl with AC_CONFIG_MACRO_DIR" " " 2 +at_xfail=no +( + $as_echo "17. $at_setup_line: testing $at_desc ..." + $at_traceon + + +cat >expout <<'_ATEOF' +libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. +libtoolize: copying file `build-aux/config.guess' +libtoolize: copying file `build-aux/config.sub' +libtoolize: copying file `build-aux/install-sh' +libtoolize: copying file `build-aux/ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. +libtoolize: copying file `m4/argz.m4' +libtoolize: copying file `m4/libtool.m4' +libtoolize: copying file `m4/ltdl.m4' +libtoolize: copying file `m4/ltoptions.m4' +libtoolize: copying file `m4/ltsugar.m4' +libtoolize: copying file `m4/ltversion.m4' +libtoolize: copying file `m4/lt~obsolete.m4' +libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'. +libtoolize: copying file `ltdl/COPYING.LIB' +libtoolize: copying file `ltdl/README' +libtoolize: copying file `ltdl/argz_.h' +libtoolize: copying file `ltdl/argz.c' +libtoolize: copying file `ltdl/loaders/dld_link.c' +libtoolize: copying file `ltdl/loaders/dlopen.c' +libtoolize: copying file `ltdl/loaders/dyld.c' +libtoolize: copying file `ltdl/loaders/load_add_on.c' +libtoolize: copying file `ltdl/loaders/loadlibrary.c' +libtoolize: copying file `ltdl/loaders/shl_load.c' +libtoolize: copying file `ltdl/lt__dirent.c' +libtoolize: copying file `ltdl/lt__strl.c' +libtoolize: copying file `ltdl/libltdl/lt__alloc.h' +libtoolize: copying file `ltdl/libltdl/lt__dirent.h' +libtoolize: copying file `ltdl/libltdl/lt__glibc.h' +libtoolize: copying file `ltdl/libltdl/lt__private.h' +libtoolize: copying file `ltdl/libltdl/lt__strl.h' +libtoolize: copying file `ltdl/libltdl/lt_dlloader.h' +libtoolize: copying file `ltdl/libltdl/lt_error.h' +libtoolize: copying file `ltdl/libltdl/lt_system.h' +libtoolize: copying file `ltdl/libltdl/slist.h' +libtoolize: copying file `ltdl/loaders/preopen.c' +libtoolize: copying file `ltdl/lt__alloc.c' +libtoolize: copying file `ltdl/lt_dlloader.c' +libtoolize: copying file `ltdl/lt_error.c' +libtoolize: copying file `ltdl/ltdl.c' +libtoolize: copying file `ltdl/ltdl.h' +libtoolize: copying file `ltdl/slist.c' +libtoolize: creating file `ltdl/Makefile.inc' +_ATEOF + + +cat >configure.ac <<'_ATEOF' +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) +LT_CONFIG_LTDL_DIR([ltdl]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) +LT_INIT +LTDL_INIT([nonrecursive]) +AC_OUTPUT +_ATEOF + + +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I m4 +_ATEOF + +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t +mv -f expout.t expout { set +x -$as_echo "$at_srcdir/help.at:36: grep 'Copyright.*Free Software Foundation' stdout" -at_fn_check_prepare_trace "help.at:36" -( $at_check_trace; grep 'Copyright.*Free Software Foundation' stdout +$as_echo "$at_srcdir/libtoolize.at:845: \$LIBTOOLIZE --copy --install --ltdl=ltdl + +" +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:845" +( $at_check_trace; $LIBTOOLIZE --copy --install --ltdl=ltdl + + ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:36" +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:845" $at_failed && at_fn_log_failure $at_traceon; } + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_15 -#AT_START_16 -# 16. help.at:41: mode short-hands -at_setup_line='help.at:41' -at_fn_banner 2 -at_desc="mode short-hands" -at_desc_line=" 16: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_17 +#AT_START_18 +at_fn_group_banner 18 'libtoolize.at:854' \ + "subproject ltdl with non-shared directories" " " 2 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "16. help.at:41: testing ..." + $as_echo "18. $at_setup_line: testing $at_desc ..." $at_traceon -cat >a.c <<'_ATEOF' -int a () { return 0; } +cat >expout <<'_ATEOF' +libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'. +libtoolize: copying file `build-aux/config.guess' +libtoolize: copying file `build-aux/config.sub' +libtoolize: copying file `build-aux/install-sh' +libtoolize: copying file `build-aux/ltmain.sh' +libtoolize: putting auxiliary files in `build-aux'. +libtoolize: copying file `ltdl/config/compile' +libtoolize: copying file `ltdl/config/config.guess' +libtoolize: copying file `ltdl/config/config.sub' +libtoolize: copying file `ltdl/config/depcomp' +libtoolize: copying file `ltdl/config/install-sh' +libtoolize: copying file `ltdl/config/missing' +libtoolize: copying file `ltdl/config/ltmain.sh' +libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `acm4'. +libtoolize: copying file `acm4/argz.m4' +libtoolize: copying file `acm4/libtool.m4' +libtoolize: copying file `acm4/ltdl.m4' +libtoolize: copying file `acm4/ltoptions.m4' +libtoolize: copying file `acm4/ltsugar.m4' +libtoolize: copying file `acm4/ltversion.m4' +libtoolize: copying file `acm4/lt~obsolete.m4' +libtoolize: putting macros in `ltdl/m4'. +libtoolize: copying file `ltdl/m4/argz.m4' +libtoolize: copying file `ltdl/m4/libtool.m4' +libtoolize: copying file `ltdl/m4/ltdl.m4' +libtoolize: copying file `ltdl/m4/ltoptions.m4' +libtoolize: copying file `ltdl/m4/ltsugar.m4' +libtoolize: copying file `ltdl/m4/ltversion.m4' +libtoolize: copying file `ltdl/m4/lt~obsolete.m4' +libtoolize: putting libltdl files in LT_CONFIG_LTDL_DIR, `ltdl'. +libtoolize: copying file `ltdl/COPYING.LIB' +libtoolize: copying file `ltdl/README' +libtoolize: copying file `ltdl/Makefile.am' +libtoolize: copying file `ltdl/configure.ac' +libtoolize: copying file `ltdl/aclocal.m4' +libtoolize: copying file `ltdl/Makefile.in' +libtoolize: copying file `ltdl/config-h.in' +libtoolize: copying file `ltdl/configure' +libtoolize: copying file `ltdl/argz_.h' +libtoolize: copying file `ltdl/argz.c' +libtoolize: copying file `ltdl/loaders/dld_link.c' +libtoolize: copying file `ltdl/loaders/dlopen.c' +libtoolize: copying file `ltdl/loaders/dyld.c' +libtoolize: copying file `ltdl/loaders/load_add_on.c' +libtoolize: copying file `ltdl/loaders/loadlibrary.c' +libtoolize: copying file `ltdl/loaders/shl_load.c' +libtoolize: copying file `ltdl/lt__dirent.c' +libtoolize: copying file `ltdl/lt__strl.c' +libtoolize: copying file `ltdl/libltdl/lt__alloc.h' +libtoolize: copying file `ltdl/libltdl/lt__dirent.h' +libtoolize: copying file `ltdl/libltdl/lt__glibc.h' +libtoolize: copying file `ltdl/libltdl/lt__private.h' +libtoolize: copying file `ltdl/libltdl/lt__strl.h' +libtoolize: copying file `ltdl/libltdl/lt_dlloader.h' +libtoolize: copying file `ltdl/libltdl/lt_error.h' +libtoolize: copying file `ltdl/libltdl/lt_system.h' +libtoolize: copying file `ltdl/libltdl/slist.h' +libtoolize: copying file `ltdl/loaders/preopen.c' +libtoolize: copying file `ltdl/lt__alloc.c' +libtoolize: copying file `ltdl/lt_dlloader.c' +libtoolize: copying file `ltdl/lt_error.c' +libtoolize: copying file `ltdl/ltdl.c' +libtoolize: copying file `ltdl/ltdl.h' +libtoolize: copying file `ltdl/slist.c' +libtoolize: Consider using `AC_CONFIG_AUX_DIR([ltdl/config])' in configure.ac. +libtoolize: Consider using `AC_CONFIG_MACRO_DIR([ltdl/m4])' in configure.ac. +libtoolize: Consider adding `-I ltdl/m4' to ACLOCAL_AMFLAGS in Makefile.am. _ATEOF -cat >main.c <<'_ATEOF' -extern int a (); -int main () { return a (); } +cat >configure.ac <<'_ATEOF' +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) +LT_CONFIG_LTDL_DIR([ltdl]) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([acm4]) +LT_INIT +LTDL_INIT([subproject]) +AC_OUTPUT _ATEOF -inst=`pwd`/inst -libdir=$inst/lib -bindir=$inst/bin -mkdir $inst $libdir $bindir - +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < expout > expout.t +mv -f expout.t expout { set +x -$as_echo "$at_srcdir/help.at:57: \$LIBTOOL compile \$CC \$CPPFLAGS \$CFLAGS -c a.c" -at_fn_check_prepare_dynamic "$LIBTOOL compile $CC $CPPFLAGS $CFLAGS -c a.c" "help.at:57" -( $at_check_trace; $LIBTOOL compile $CC $CPPFLAGS $CFLAGS -c a.c -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:57" -$at_failed && at_fn_log_failure -$at_traceon; } +$as_echo "$at_srcdir/libtoolize.at:936: \$LIBTOOLIZE --copy --install -{ set +x -$as_echo "$at_srcdir/help.at:59: \$LIBTOOL co \$CC \$CPPFLAGS \$CFLAGS -c main.c" -at_fn_check_prepare_dynamic "$LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c" "help.at:59" -( $at_check_trace; $LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:59" -$at_failed && at_fn_log_failure -$at_traceon; } +" +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:936" +( $at_check_trace; $LIBTOOLIZE --copy --install -{ set +x -$as_echo "$at_srcdir/help.at:61: \$LIBTOOL co \$CC \$CPPFLAGS \$CFLAGS -c main.c" -at_fn_check_prepare_dynamic "$LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c" "help.at:61" -( $at_check_trace; $LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:61" -$at_failed && at_fn_log_failure -$at_traceon; } -{ set +x -$as_echo "$at_srcdir/help.at:63: \$LIBTOOL link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -no-undefined -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -no-undefined -rpath $libdir" "help.at:63" -( $at_check_trace; $LIBTOOL link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -no-undefined -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:63" +at_fn_diff_devnull "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:936" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/help.at:65: \$LIBTOOL l \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL l $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo liba.la" "help.at:65" -( $at_check_trace; $LIBTOOL l $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo liba.la + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_18 +#AT_START_19 +at_fn_group_banner 19 'libtoolize.at:945' \ + "LIBTOOLIZE_OPTIONS" " " 2 +at_xfail=no +( + $as_echo "19. $at_setup_line: testing $at_desc ..." + $at_traceon + + +cat >configure.ac <<'_ATEOF' +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) +LT_INIT +AC_OUTPUT +_ATEOF + + + +LIBTOOLIZE_OPTIONS="narf" +export LIBTOOLIZE_OPTIONS + +cat >experr <<'_ATEOF' +libtoolize: garbled LIBTOOLIZE_OPTIONS near `narf' +libtoolize: Try `libtoolize --help' for more information. +_ATEOF + + +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t +mv -f experr.t experr +{ set +x +$as_echo "$at_srcdir/libtoolize.at:957: \$LIBTOOLIZE --copy + +" +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:957" +( $at_check_trace; $LIBTOOLIZE --copy + + ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +$at_diff experr "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:65" +at_fn_check_status 1 $at_status "$at_srcdir/libtoolize.at:957" $at_failed && at_fn_log_failure $at_traceon; } + + + +## --------------------------- ## +## Unknown LIBTOOLIZE_OPTIONS. ## +## --------------------------- ## + +LIBTOOLIZE_OPTIONS=--no-such-option +export LIBTOOLIZE_OPTIONS + +cat >experr <<'_ATEOF' +libtoolize: warning: unrecognized environment option `--no-such-option' +_ATEOF + + +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t +mv -f experr.t experr { set +x -$as_echo "$at_srcdir/help.at:67: \$LIBTOOL execute --dry-run ./main\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL execute --dry-run ./main$EXEEXT" "help.at:67" -( $at_check_trace; $LIBTOOL execute --dry-run ./main$EXEEXT +$as_echo "$at_srcdir/libtoolize.at:971: \$LIBTOOLIZE --copy + +" +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:971" +( $at_check_trace; $LIBTOOLIZE --copy + + ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +$at_diff experr "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:67" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:971" $at_failed && at_fn_log_failure $at_traceon; } + + + +## ----------------------------- ## +## --no-warn environment option. ## +## ----------------------------- ## + +LIBTOOLIZE_OPTIONS=--no-warn,--no-such-option +export LIBTOOLIZE_OPTIONS + +: >experr + +lt_name=`$ECHO "$LIBTOOLIZE" | sed "s,^.*/,,"` +sed "s/libtoolize/$lt_name/g +s|/usr/local/share/aclocal/|${tst_aclocaldir-$abs_top_srcdir/libltdl/m4}/|" < experr > experr.t +mv -f experr.t experr { set +x -$as_echo "$at_srcdir/help.at:69: \$LIBTOOL exe --dry-run ./main\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL exe --dry-run ./main$EXEEXT" "help.at:69" -( $at_check_trace; $LIBTOOL exe --dry-run ./main$EXEEXT +$as_echo "$at_srcdir/libtoolize.at:983: \$LIBTOOLIZE --copy + +" +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:983" +( $at_check_trace; $LIBTOOLIZE --copy + + ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +$at_diff experr "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:69" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:983" $at_failed && at_fn_log_failure $at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_19 +#AT_START_20 +at_fn_group_banner 20 'libtoolize.at:992' \ + "cleanup old installation" " " 2 +at_xfail=no +( + $as_echo "20. $at_setup_line: testing $at_desc ..." + $at_traceon + + +cat >configure.ac <<'_ATEOF' +AC_INIT([libtoolize-demo], 2.4, bug-libtool@gnu.org) +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) +LT_INIT +AC_OUTPUT +_ATEOF + + + +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I m4 +_ATEOF + + +cat >acinclude.m4 <<'_ATEOF' +AC_DEFUN([LT_INIT], +[: keep me, I might be hand maintained!]) # LT_INIT +_ATEOF + + +cat >libltdl/acinclude.m4 <<'_ATEOF' +AC_DEFUN([LT_INIT], +[: delete me, I was left here by on old libltdl build]) # LT_INIT +_ATEOF + + { set +x -$as_echo "$at_srcdir/help.at:71: \$LIBTOOL e --dry-run ./main\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL e --dry-run ./main$EXEEXT" "help.at:71" -( $at_check_trace; $LIBTOOL e --dry-run ./main$EXEEXT +$as_echo "$at_srcdir/libtoolize.at:1010: \$LIBTOOLIZE --copy --force --ltdl + +" +at_fn_check_prepare_notrace 'an embedded newline' "libtoolize.at:1010" +( $at_check_trace; $LIBTOOLIZE --copy --force --ltdl + + ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:71" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:1010" $at_failed && at_fn_log_failure $at_traceon; } + + +# check files are left as expected { set +x -$as_echo "$at_srcdir/help.at:73: \$LIBTOOL install cp liba.la \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL install cp liba.la $libdir" "help.at:73" -( $at_check_trace; $LIBTOOL install cp liba.la $libdir +$as_echo "$at_srcdir/libtoolize.at:1013: grep 'keep me' acinclude.m4" +at_fn_check_prepare_trace "libtoolize.at:1013" +( $at_check_trace; grep 'keep me' acinclude.m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:73" +at_fn_check_status 0 $at_status "$at_srcdir/libtoolize.at:1013" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/help.at:75: \$LIBTOOL i cp main\$EXEEXT \$bindir" -at_fn_check_prepare_dynamic "$LIBTOOL i cp main$EXEEXT $bindir" "help.at:75" -( $at_check_trace; $LIBTOOL i cp main$EXEEXT $bindir +$as_echo "$at_srcdir/libtoolize.at:1014: test -f libltdl/acinclude.m4" +at_fn_check_prepare_trace "libtoolize.at:1014" +( $at_check_trace; test -f libltdl/acinclude.m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:75" +at_fn_check_status 1 $at_status "$at_srcdir/libtoolize.at:1014" $at_failed && at_fn_log_failure $at_traceon; } + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_20 +#AT_START_21 +at_fn_group_banner 21 'help.at:26' \ + "standard command line options" " " 3 +at_xfail=no +( + $as_echo "21. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + { set +x -$as_echo "$at_srcdir/help.at:77: \$LIBTOOL finish \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL finish $libdir" "help.at:77" -( $at_check_trace; $LIBTOOL finish $libdir +$as_echo "$at_srcdir/help.at:30: \$LIBTOOLIZE --help" +at_fn_check_prepare_dynamic "$LIBTOOLIZE --help" "help.at:30" +( $at_check_trace; $LIBTOOLIZE --help ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:77" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:30" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/help.at:79: \$LIBTOOL f \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL f $libdir" "help.at:79" -( $at_check_trace; $LIBTOOL f $libdir +$as_echo "$at_srcdir/help.at:31: \$LIBTOOLIZE --version" +at_fn_check_prepare_dynamic "$LIBTOOLIZE --version" "help.at:31" +( $at_check_trace; $LIBTOOLIZE --version ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:79" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:31" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/help.at:81: \$LIBTOOL uninstall rm -f \$libdir/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL uninstall rm -f $libdir/liba.la" "help.at:81" -( $at_check_trace; $LIBTOOL uninstall rm -f $libdir/liba.la +$as_echo "$at_srcdir/help.at:32: grep 'Copyright.*Free Software Foundation' stdout" +at_fn_check_prepare_trace "help.at:32" +( $at_check_trace; grep 'Copyright.*Free Software Foundation' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:81" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:32" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/help.at:83: \$LIBTOOL u rm -f \$bindir/main\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL u rm -f $bindir/main$EXEEXT" "help.at:83" -( $at_check_trace; $LIBTOOL u rm -f $bindir/main$EXEEXT +$as_echo "$at_srcdir/help.at:33: \$LIBTOOL --help" +at_fn_check_prepare_dynamic "$LIBTOOL --help" "help.at:33" +( $at_check_trace; $LIBTOOL --help ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:83" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:33" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/help.at:85: \$LIBTOOL clean rm -f main\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL clean rm -f main$EXEEXT" "help.at:85" -( $at_check_trace; $LIBTOOL clean rm -f main$EXEEXT +$as_echo "$at_srcdir/help.at:34: \$LIBTOOL --help-all" +at_fn_check_prepare_dynamic "$LIBTOOL --help-all" "help.at:34" +( $at_check_trace; $LIBTOOL --help-all ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:85" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:34" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/help.at:87: \$LIBTOOL cl liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL cl liba.la" "help.at:87" -( $at_check_trace; $LIBTOOL cl liba.la +$as_echo "$at_srcdir/help.at:35: \$LIBTOOL --version" +at_fn_check_prepare_dynamic "$LIBTOOL --version" "help.at:35" +( $at_check_trace; $LIBTOOL --version ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/help.at:87" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:35" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/help.at:36: grep 'Copyright.*Free Software Foundation' stdout" +at_fn_check_prepare_trace "help.at:36" +( $at_check_trace; grep 'Copyright.*Free Software Foundation' stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:36" +$at_failed && at_fn_log_failure +$at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_16 -#AT_START_17 -# 17. duplicate_members.at:25: duplicate members in archive tests -at_setup_line='duplicate_members.at:25' -at_fn_banner 2 -at_desc="duplicate members in archive tests" -at_desc_line=" 17: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "17. duplicate_members.at:25: testing ..." - $at_traceon - - -# we don't want to use whole_archive_flag_spec, even if available -sed -e 's|^whole_archive_flag_spec=.*|whole_archive_flag_spec=|g' < $LIBTOOL > libtool - -chmod +x ./libtool -LIBTOOL=./libtool - -cat >bar.c <<'_ATEOF' -extern int foo1 (), foo2 (), foo3 (), foo4 (), foo5 (), foo6 (); -int bar() { - int result = foo1 () + foo2 () + foo3 () + foo4 () + foo5 () + foo6 (); - return result; -} -_ATEOF - - -cat >main.c <<'_ATEOF' -int bar(); -int main() -{ -if (bar() == 21) return 0; -return 1; -} -_ATEOF - - - -for a in 1 2 3 4 5 6 -do - mkdir $a - echo "int foo$a() {return $a;}" > $a/a.c -done - - -for a in 1 2 3 4 5 6 -do - $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o $a/a.lo $a/a.c -done -$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libc0.la 6/a.lo -{ set +x -$as_echo "$at_srcdir/duplicate_members.at:64: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libconv.la 1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la 1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la" "duplicate_members.at:64" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la 1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:64" -$at_failed && at_fn_log_failure -$at_traceon; } - - -$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c { set +x -$as_echo "$at_srcdir/duplicate_members.at:68: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbar.la bar.lo libconv.la -rpath /notexist" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo libconv.la -rpath /notexist" "duplicate_members.at:68" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo libconv.la -rpath /notexist +$as_echo "$at_srcdir/help.at:38: \$LIBTOOL" +at_fn_check_prepare_dynamic "$LIBTOOL" "help.at:38" +( $at_check_trace; $LIBTOOL ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:68" +at_fn_check_status 1 $at_status "$at_srcdir/help.at:38" $at_failed && at_fn_log_failure $at_traceon; } - -$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.lo main.c { set +x -$as_echo "$at_srcdir/duplicate_members.at:72: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo ./libbar.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo ./libbar.la" "duplicate_members.at:72" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo ./libbar.la +$as_echo "$at_srcdir/help.at:39: grep 'specify a MODE' stderr" +at_fn_check_prepare_trace "help.at:39" +( $at_check_trace; grep 'specify a MODE' stderr ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:72" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:39" $at_failed && at_fn_log_failure $at_traceon; } - -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/duplicate_members.at:75: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_members.at:75" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/help.at:40: grep ' --help' stderr" +at_fn_check_prepare_trace "help.at:40" +( $at_check_trace; grep ' --help' stderr ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:75" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:40" $at_failed && at_fn_log_failure $at_traceon; } - set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_17 -#AT_START_18 -# 18. duplicate_conv.at:25: duplicate convenience archive names -at_setup_line='duplicate_conv.at:25' -at_fn_banner 2 -at_desc="duplicate convenience archive names" -at_desc_line=" 18: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_21 +#AT_START_22 +at_fn_group_banner 22 'help.at:45' \ + "mode short-hands" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "18. duplicate_conv.at:25: testing ..." + $as_echo "22. $at_setup_line: testing $at_desc ..." $at_traceon +cat >a.c <<'_ATEOF' +int a () { return 0; } +_ATEOF -# We create two convenience archives with the same name, and _also_ -# containing an object with the same name. This is necessary to detect -# the failure with both 1.5.22 and HEAD, since the latter does not (did -# not?) remove the temporary output directory, thus masking the failure -# when all objects have distinct names. -mkdir a b c +cat >main.c <<'_ATEOF' +extern int a (); +int main () { return a (); } +_ATEOF -echo 'int a () { return 0; }' > a/a.c -echo 'int a2() { return 0; }' > b/a.c -echo 'int b () { return 0; }' > b/b.c -echo 'extern int a(), a2(), b(); int c() { return a() + a2() + b(); }' > c.c -echo 'extern int c(); int main() { return c(); }' > main.c -$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a/a.c -o a/a.lo -$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b/a.c -o b/a.lo -$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b/b.c -o b/b.lo -$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c c.c -$CC $CPPFLAGS $CFLAGS -c main.c -$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o a/liba.la a/a.lo -$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o b/liba.la b/a.lo b/b.lo +inst=`pwd`/inst +libdir=$inst/lib +bindir=$inst/bin +mkdir $inst $libdir $bindir -# Fold into convenience archive. { set +x -$as_echo "$at_srcdir/duplicate_conv.at:51: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la" "duplicate_conv.at:51" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la +$as_echo "$at_srcdir/help.at:61: \$LIBTOOL compile \$CC \$CPPFLAGS \$CFLAGS -c a.c" +at_fn_check_prepare_dynamic "$LIBTOOL compile $CC $CPPFLAGS $CFLAGS -c a.c" "help.at:61" +( $at_check_trace; $LIBTOOL compile $CC $CPPFLAGS $CFLAGS -c a.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:51" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:61" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/duplicate_conv.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT ./libcee.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la" "duplicate_conv.at:53" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la +$as_echo "$at_srcdir/help.at:63: \$LIBTOOL co \$CC \$CPPFLAGS \$CFLAGS -c main.c" +at_fn_check_prepare_dynamic "$LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c" "help.at:63" +( $at_check_trace; $LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:53" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:63" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/duplicate_conv.at:55: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_conv.at:55" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/help.at:65: \$LIBTOOL co \$CC \$CPPFLAGS \$CFLAGS -c main.c" +at_fn_check_prepare_dynamic "$LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c" "help.at:65" +( $at_check_trace; $LIBTOOL co $CC $CPPFLAGS $CFLAGS -c main.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:55" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:65" $at_failed && at_fn_log_failure $at_traceon; } - -$LIBTOOL --mode=clean rm -f libcee.la - - -# FIXME: For this test, we may want to zero out whole_archive_flag_spec; -# OTOH, we'd like to test the other situation, too. - -# Fold into static library. { set +x -$as_echo "$at_srcdir/duplicate_conv.at:63: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -rpath /foo -static -o libcee.la c.lo a/liba.la b/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -static -o libcee.la c.lo a/liba.la b/liba.la" "duplicate_conv.at:63" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -static -o libcee.la c.lo a/liba.la b/liba.la +$as_echo "$at_srcdir/help.at:67: \$LIBTOOL link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -no-undefined -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -no-undefined -rpath $libdir" "help.at:67" +( $at_check_trace; $LIBTOOL link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -no-undefined -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:63" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:67" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/duplicate_conv.at:65: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT ./libcee.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la" "duplicate_conv.at:65" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la +$as_echo "$at_srcdir/help.at:69: \$LIBTOOL l \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL l $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo liba.la" "help.at:69" +( $at_check_trace; $LIBTOOL l $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:65" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:69" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/duplicate_conv.at:67: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_conv.at:67" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/help.at:71: \$LIBTOOL execute --dry-run ./main\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL execute --dry-run ./main$EXEEXT" "help.at:71" +( $at_check_trace; $LIBTOOL execute --dry-run ./main$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:67" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:71" $at_failed && at_fn_log_failure $at_traceon; } - -$LIBTOOL --mode=clean rm -f libcee.la - -# Fold into library. { set +x -$as_echo "$at_srcdir/duplicate_conv.at:71: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -rpath /foo -o libcee.la c.lo a/liba.la b/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -o libcee.la c.lo a/liba.la b/liba.la" "duplicate_conv.at:71" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -o libcee.la c.lo a/liba.la b/liba.la +$as_echo "$at_srcdir/help.at:73: \$LIBTOOL exe --dry-run ./main\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL exe --dry-run ./main$EXEEXT" "help.at:73" +( $at_check_trace; $LIBTOOL exe --dry-run ./main$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:71" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:73" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/duplicate_conv.at:73: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT ./libcee.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la" "duplicate_conv.at:73" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la +$as_echo "$at_srcdir/help.at:75: \$LIBTOOL e --dry-run ./main\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL e --dry-run ./main$EXEEXT" "help.at:75" +( $at_check_trace; $LIBTOOL e --dry-run ./main$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:73" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:75" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/duplicate_conv.at:75: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_conv.at:75" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/help.at:77: \$LIBTOOL install cp liba.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL install cp liba.la $libdir" "help.at:77" +( $at_check_trace; $LIBTOOL install cp liba.la $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:75" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:77" $at_failed && at_fn_log_failure $at_traceon; } - -$LIBTOOL --mode=clean rm -f libcee.la - -# Test whether this works with reloadable objects as well. { set +x -$as_echo "$at_srcdir/duplicate_conv.at:79: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o cee.\$OBJEXT c.lo a/liba.la b/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la" "duplicate_conv.at:79" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la +$as_echo "$at_srcdir/help.at:79: \$LIBTOOL i cp main\$EXEEXT \$bindir" +at_fn_check_prepare_dynamic "$LIBTOOL i cp main$EXEEXT $bindir" "help.at:79" +( $at_check_trace; $LIBTOOL i cp main$EXEEXT $bindir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:79" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:79" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/duplicate_conv.at:81: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT cee.\$OBJEXT" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT cee.$OBJEXT" "duplicate_conv.at:81" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT cee.$OBJEXT +$as_echo "$at_srcdir/help.at:81: \$LIBTOOL finish \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL finish $libdir" "help.at:81" +( $at_check_trace; $LIBTOOL finish $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:81" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:81" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/duplicate_conv.at:83: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_conv.at:83" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/help.at:83: \$LIBTOOL f \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL f $libdir" "help.at:83" +( $at_check_trace; $LIBTOOL f $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:83" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:83" $at_failed && at_fn_log_failure $at_traceon; } - - -# TODO: test dlpreloading of duplicates (when it is implemented) - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_18 -#AT_START_19 -# 19. duplicate_deps.at:25: preserve duplicate convenience deps -at_setup_line='duplicate_deps.at:25' -at_fn_banner 2 -at_desc="preserve duplicate convenience deps" -at_desc_line=" 19: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "19. duplicate_deps.at:25: testing ..." - $at_traceon - - - -# --preserve-dup-deps should work for convenience archives. - -# Create a circular dependency of liba and libb: -# a1 pulls in b1, that pulls in a2. -cat >a1.c <<\EOF -extern int b1 (); -int a1 () { return b1 (); } -EOF -cat >a2.c <<\EOF -int a2 () { return 0; } -EOF -cat >b1.c <<\EOF -extern int a2 (); -int b1 () { return a2 (); } -EOF -cat >main.c <<\EOF -extern int a1 (); -int main () { return a1 (); } -EOF - -for file in a1.c a2.c b1.c; do - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file -done -$CC $CPPFLAGS $CFLAGS -c main.c -$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o liba.la a1.lo a2.lo - -# This could be worked around by adding liba.la to libb.la -# (in that case all objects from liba would be merged into -# libb.a as well, possibly renamed.) -$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libb.la b1.lo liba.la { set +x -$as_echo "$at_srcdir/duplicate_deps.at:58: \$LIBTOOL --mode=link --tag=CC \\ - \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la libb.la" -at_fn_check_prepare_notrace 'an embedded newline' "duplicate_deps.at:58" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC \ - $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la libb.la +$as_echo "$at_srcdir/help.at:85: \$LIBTOOL uninstall rm -f \$libdir/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL uninstall rm -f $libdir/liba.la" "help.at:85" +( $at_check_trace; $LIBTOOL uninstall rm -f $libdir/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_deps.at:58" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:85" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/duplicate_deps.at:61: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_deps.at:61" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/help.at:87: \$LIBTOOL u rm -f \$bindir/main\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL u rm -f $bindir/main$EXEEXT" "help.at:87" +( $at_check_trace; $LIBTOOL u rm -f $bindir/main$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_deps.at:61" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:87" $at_failed && at_fn_log_failure $at_traceon; } - - -# Forgo the workaround and create a true circular dependency. -$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libb.la b1.lo -# Some systems find all symbols anyway; skip this test on such systems. { set +x -$as_echo "$at_srcdir/duplicate_deps.at:66: \$LIBTOOL --mode=link --tag=CC \\ - \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la libb.la liba.la \\ - && exit 77" -at_fn_check_prepare_notrace 'an embedded newline' "duplicate_deps.at:66" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC \ - $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la libb.la liba.la \ - && exit 77 +$as_echo "$at_srcdir/help.at:89: \$LIBTOOL clean rm -f main\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL clean rm -f main$EXEEXT" "help.at:89" +( $at_check_trace; $LIBTOOL clean rm -f main$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/duplicate_deps.at:66" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:89" $at_failed && at_fn_log_failure $at_traceon; } -# Other systems need special treatment, which currently fails. - { set +x -$as_echo "$at_srcdir/duplicate_deps.at:72: \$LIBTOOL --mode=link --preserve-dup-deps --tag=CC \\ - \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la libb.la liba.la" -at_fn_check_prepare_notrace 'an embedded newline' "duplicate_deps.at:72" -( $at_check_trace; $LIBTOOL --mode=link --preserve-dup-deps --tag=CC \ - $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la libb.la liba.la +$as_echo "$at_srcdir/help.at:91: \$LIBTOOL cl liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL cl liba.la" "help.at:91" +( $at_check_trace; $LIBTOOL cl liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/duplicate_deps.at:72" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:91" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_19 -#AT_START_20 -# 20. flags.at:24: passing CC flags through libtool -at_setup_line='flags.at:24' -at_fn_banner 2 -at_desc="passing CC flags through libtool" -at_desc_line=" 20: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_22 +#AT_START_23 +at_fn_group_banner 23 'help.at:97' \ + "debug tracing" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "20. flags.at:24: testing ..." + $as_echo "23. $at_setup_line: testing $at_desc ..." $at_traceon +cat >a.c <<'_ATEOF' +int a () { return 0; } +_ATEOF -{ set +x -$as_echo "$at_srcdir/flags.at:24: { test -n \"\$CC\" && test \"X\$CC\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$CC\" && test \"X$CC\" != Xno; } || (exit 77)" "flags.at:24" -( $at_check_trace; { test -n "$CC" && test "X$CC" != Xno; } || (exit 77) -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" -$at_failed && at_fn_log_failure -$at_traceon; } - - - - -LDFLAGS="$LDFLAGS -no-undefined" -eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`" -cat >a.c <<'_ATEOF' -int main () { return 0; } +cat >b.c <<'_ATEOF' +extern int a (); +int b () { return a (); } _ATEOF -compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.c +cat >main.c <<'_ATEOF' +extern int b (); +int main () { return b (); } +_ATEOF -# Linker flags are not passed to the archiver, so don't test static libraries. -if $LIBTOOL --features | grep 'enable shared libraries'; then - library_and_module='library.la "module.la -module -avoid-version"' -else - library_and_module= -fi -eval "`$LIBTOOL --tag=CC --config | $EGREP '^(wl|archive_cmds)='`" +inst=`pwd`/inst +libdir=$inst/lib +bindir=$inst/bin +mkdir $inst $libdir $bindir +# This test will not work correctly if --debug is passed. { set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=CC --mode=compile \$compile -c \$source" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CC --mode=compile $compile -c $source" "flags.at:24" -( $at_check_trace; $LIBTOOL --tag=CC --mode=compile $compile -c $source +$as_echo "$at_srcdir/help.at:119: case \"\$LIBTOOL \$CC \$CPPFLAGS \$CFLAGS \$LDFLAGS \" in *\\ --debug\\ *) exit 77;; *) :;; esac" +at_fn_check_prepare_dynamic "case \"$LIBTOOL $CC $CPPFLAGS $CFLAGS $LDFLAGS \" in *\\ --debug\\ *) exit 77;; *) :;; esac" "help.at:119" +( $at_check_trace; case "$LIBTOOL $CC $CPPFLAGS $CFLAGS $LDFLAGS " in *\ --debug\ *) exit 77;; *) :;; esac ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/help.at:119" $at_failed && at_fn_log_failure $at_traceon; } -# Linker flags are prefixed with ${wl} iff they are passed to the -# compiler driver, instead of directly to the linker. -case $archive_cmds in -*\$LD*\$linker_flags*) maybe_wl= ;; -*) maybe_wl=$wl ;; -esac - -for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do - case $flag in - -Wc, | -Xcompiler\ ) +check_trace () +{ + if test "X$trace" = X--debug; then { set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CC --mode=compile \$compile \$flag-foo -c \$source" -at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CC --mode=compile $compile $flag-foo -c $source" "flags.at:24" -( $at_check_trace; $LIBTOOL -n --tag=CC --mode=compile $compile $flag-foo -c $source +$as_echo "$at_srcdir/help.at:125: grep 'enabling shell trace mode' stdout stderr" +at_fn_check_prepare_trace "help.at:125" +( $at_check_trace; grep 'enabling shell trace mode' stdout stderr ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:125" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout" -at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24" -( $at_check_trace; $FGREP " -foo" stdout +$as_echo "$at_srcdir/help.at:126: grep ' --mode' stderr" +at_fn_check_prepare_trace "help.at:126" +( $at_check_trace; grep ' --mode' stderr ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:126" $at_failed && at_fn_log_failure $at_traceon; } - flag_prefix= - ;; - -Wl, | -Xlinker\ ) - flag_prefix=$maybe_wl - ;; - esac - - eval set program$EXEEXT "$library_and_module" - for output - do + else { set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CC --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo" -at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CC --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24" -( $at_check_trace; $LIBTOOL -n --tag=CC --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo +$as_echo "$at_srcdir/help.at:128: grep 'enabling shell trace mode' stdout stderr" +at_fn_check_prepare_trace "help.at:128" +( $at_check_trace; grep 'enabling shell trace mode' stdout stderr ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/help.at:128" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix-foo\" stdout" -at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix-foo\" stdout" "flags.at:24" -( $at_check_trace; $FGREP " $flag_prefix-foo" stdout +$as_echo "$at_srcdir/help.at:129: grep ' --mode' stderr" +at_fn_check_prepare_trace "help.at:129" +( $at_check_trace; grep ' --mode' stderr ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/help.at:129" $at_failed && at_fn_log_failure $at_traceon; } - done -done - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_20 -#AT_START_21 -# 21. flags.at:24: passing CXX flags through libtool -at_setup_line='flags.at:24' -at_fn_banner 2 -at_desc="passing CXX flags through libtool" -at_desc_line=" 21: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "21. flags.at:24: testing ..." - $at_traceon - + fi +} +orig_LIBTOOL=$LIBTOOL +for trace in '' --debug; do + LIBTOOL="$orig_LIBTOOL $trace" -{ set +x -$as_echo "$at_srcdir/flags.at:24: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "flags.at:24" -( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) + # Hypothesis: debug output should happen if (and only if) --debug is + # passed, for compile, link, install, uninstall, and clean modes. + { set +x +$as_echo "$at_srcdir/help.at:139: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c" "help.at:139" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:139" $at_failed && at_fn_log_failure $at_traceon; } + check_trace + { set +x +$as_echo "$at_srcdir/help.at:142: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c b.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c" "help.at:142" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:142" +$at_failed && at_fn_log_failure +$at_traceon; } - - -LDFLAGS="$LDFLAGS -no-undefined" -eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`" - -cat >a.cpp <<'_ATEOF' -int main () { return 0; } -_ATEOF - -compile="$CXX $CPPFLAGS $CXXFLAGS" link="$CXX $CXXFLAGS $LDFLAGS" source=a.cpp - - -# Linker flags are not passed to the archiver, so don't test static libraries. -if $LIBTOOL --features | grep 'enable shared libraries'; then - library_and_module='library.la "module.la -module -avoid-version"' -else - library_and_module= -fi - -eval "`$LIBTOOL --tag=CXX --config | $EGREP '^(wl|archive_cmds)='`" - -{ set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=CXX --mode=compile \$compile -c \$source" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $compile -c $source" "flags.at:24" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $compile -c $source + check_trace + { set +x +$as_echo "$at_srcdir/help.at:145: \$CC \$CPPFLAGS \$CFLAGS -c main.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "help.at:145" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:145" $at_failed && at_fn_log_failure $at_traceon; } + { set +x +$as_echo "$at_srcdir/help.at:146: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -no-undefined -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -no-undefined -rpath $libdir" "help.at:146" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -no-undefined -rpath $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:146" +$at_failed && at_fn_log_failure +$at_traceon; } -# Linker flags are prefixed with ${wl} iff they are passed to the -# compiler driver, instead of directly to the linker. -case $archive_cmds in -*\$LD*\$linker_flags*) maybe_wl= ;; -*) maybe_wl=$wl ;; -esac + check_trace + { set +x +$as_echo "$at_srcdir/help.at:149: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la b.lo -no-undefined -rpath \$libdir liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -no-undefined -rpath $libdir liba.la" "help.at:149" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -no-undefined -rpath $libdir liba.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:149" +$at_failed && at_fn_log_failure +$at_traceon; } -for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do - case $flag in - -Wc, | -Xcompiler\ ) - { set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CXX --mode=compile \$compile \$flag-foo -c \$source" -at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CXX --mode=compile $compile $flag-foo -c $source" "flags.at:24" -( $at_check_trace; $LIBTOOL -n --tag=CXX --mode=compile $compile $flag-foo -c $source + check_trace + { set +x +$as_echo "$at_srcdir/help.at:152: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT libb.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT libb.la" "help.at:152" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT libb.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:152" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout" -at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24" -( $at_check_trace; $FGREP " -foo" stdout + check_trace + lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/help.at:155: if \$LIBTOOL --mode=execute \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "help.at:155" +( $at_check_trace; if $LIBTOOL --mode=execute "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:155" $at_failed && at_fn_log_failure $at_traceon; } - flag_prefix= - ;; - -Wl, | -Xlinker\ ) - flag_prefix=$maybe_wl - ;; - esac - eval set program$EXEEXT "$library_and_module" - for output - do - { set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CXX --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo" -at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CXX --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24" -( $at_check_trace; $LIBTOOL -n --tag=CXX --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo + check_trace + + { set +x +$as_echo "$at_srcdir/help.at:158: \$LIBTOOL --mode=install cp liba.la libb.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la libb.la $libdir" "help.at:158" +( $at_check_trace; $LIBTOOL --mode=install cp liba.la libb.la $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:158" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix-foo\" stdout" -at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix-foo\" stdout" "flags.at:24" -( $at_check_trace; $FGREP " $flag_prefix-foo" stdout + check_trace + + # Hypothesis: --debug should be passed to relink mode if (and only if) + # it was passed at link mode. + { set +x +$as_echo "$at_srcdir/help.at:164: \$orig_LIBTOOL --mode=install \$lt_INSTALL liba.la libb.la \$libdir" +at_fn_check_prepare_dynamic "$orig_LIBTOOL --mode=install $lt_INSTALL liba.la libb.la $libdir" "help.at:164" +( $at_check_trace; $orig_LIBTOOL --mode=install $lt_INSTALL liba.la libb.la $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:164" +$at_failed && at_fn_log_failure +$at_traceon; } + + if grep ': relinking ' stdout stderr; then + if test "X$trace" = X--debug; then + { set +x +$as_echo "$at_srcdir/help.at:168: grep ' --mode=relink' stdout stderr | grep ' --debug '" +at_fn_check_prepare_notrace 'a shell pipeline' "help.at:168" +( $at_check_trace; grep ' --mode=relink' stdout stderr | grep ' --debug ' ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:168" $at_failed && at_fn_log_failure $at_traceon; } - done -done - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_21 -#AT_START_22 -# 22. flags.at:24: passing F77 flags through libtool -at_setup_line='flags.at:24' -at_fn_banner 2 -at_desc="passing F77 flags through libtool" -at_desc_line=" 22: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "22. flags.at:24: testing ..." - $at_traceon - - - -{ set +x -$as_echo "$at_srcdir/flags.at:24: { test -n \"\$F77\" && test \"X\$F77\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$F77\" && test \"X$F77\" != Xno; } || (exit 77)" "flags.at:24" -( $at_check_trace; { test -n "$F77" && test "X$F77" != Xno; } || (exit 77) + else + { set +x +$as_echo "$at_srcdir/help.at:171: grep ' --mode=relink' stdout stderr | grep ' --debug '" +at_fn_check_prepare_notrace 'a shell pipeline' "help.at:171" +( $at_check_trace; grep ' --mode=relink' stdout stderr | grep ' --debug ' ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_check_status 1 $at_status "$at_srcdir/help.at:171" $at_failed && at_fn_log_failure $at_traceon; } + fi + fi - - -LDFLAGS="$LDFLAGS -no-undefined" -eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`" - -cat >a.f <<'_ATEOF' - program main - end -_ATEOF - -compile="$F77 $FFLAGS" link="$F77 $FFLAGS $LDFLAGS" source=a.f - - -# Linker flags are not passed to the archiver, so don't test static libraries. -if $LIBTOOL --features | grep 'enable shared libraries'; then - library_and_module='library.la "module.la -module -avoid-version"' -else - library_and_module= -fi - -eval "`$LIBTOOL --tag=F77 --config | $EGREP '^(wl|archive_cmds)='`" - -{ set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=F77 --mode=compile \$compile -c \$source" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=compile $compile -c $source" "flags.at:24" -( $at_check_trace; $LIBTOOL --tag=F77 --mode=compile $compile -c $source -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" -$at_failed && at_fn_log_failure -$at_traceon; } - - -# Linker flags are prefixed with ${wl} iff they are passed to the -# compiler driver, instead of directly to the linker. -case $archive_cmds in -*\$LD*\$linker_flags*) maybe_wl= ;; -*) maybe_wl=$wl ;; -esac - -for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do - case $flag in - -Wc, | -Xcompiler\ ) - { set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=F77 --mode=compile \$compile \$flag-foo -c \$source" -at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=F77 --mode=compile $compile $flag-foo -c $source" "flags.at:24" -( $at_check_trace; $LIBTOOL -n --tag=F77 --mode=compile $compile $flag-foo -c $source + { set +x +$as_echo "$at_srcdir/help.at:176: \$LIBTOOL --mode=install cp main\$EXEEXT \$bindir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp main$EXEEXT $bindir" "help.at:176" +( $at_check_trace; $LIBTOOL --mode=install cp main$EXEEXT $bindir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:176" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout" -at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24" -( $at_check_trace; $FGREP " -foo" stdout + check_trace + { set +x +$as_echo "$at_srcdir/help.at:179: \$LIBTOOL --mode=finish \$bindir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=finish $bindir" "help.at:179" +( $at_check_trace; $LIBTOOL --mode=finish $bindir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:179" $at_failed && at_fn_log_failure $at_traceon; } - flag_prefix= - ;; - -Wl, | -Xlinker\ ) - flag_prefix=$maybe_wl - ;; - esac + check_trace - eval set program$EXEEXT "$library_and_module" - for output - do - { set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=F77 --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo" -at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=F77 --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24" -( $at_check_trace; $LIBTOOL -n --tag=F77 --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo + { set +x +$as_echo "$at_srcdir/help.at:182: \$LIBTOOL --mode=uninstall rm -f \$bindir/main\$EXEEXT \$libdir/libb.la \$libdir/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=uninstall rm -f $bindir/main$EXEEXT $libdir/libb.la $libdir/liba.la" "help.at:182" +( $at_check_trace; $LIBTOOL --mode=uninstall rm -f $bindir/main$EXEEXT $libdir/libb.la $libdir/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:182" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix-foo\" stdout" -at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix-foo\" stdout" "flags.at:24" -( $at_check_trace; $FGREP " $flag_prefix-foo" stdout + check_trace + { set +x +$as_echo "$at_srcdir/help.at:185: \$LIBTOOL --mode=clean rm -f \$bindir/main\$EXEEXT \$libdir/libb.la \$libdir/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f $bindir/main$EXEEXT $libdir/libb.la $libdir/liba.la" "help.at:185" +( $at_check_trace; $LIBTOOL --mode=clean rm -f $bindir/main$EXEEXT $libdir/libb.la $libdir/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/help.at:185" $at_failed && at_fn_log_failure $at_traceon; } - done + check_trace + done set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_22 -#AT_START_23 -# 23. flags.at:24: passing FC flags through libtool -at_setup_line='flags.at:24' -at_fn_banner 2 -at_desc="passing FC flags through libtool" -at_desc_line=" 23: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_23 +#AT_START_24 +at_fn_group_banner 24 'duplicate_members.at:25' \ + "duplicate members in archive tests" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "23. flags.at:24: testing ..." + $as_echo "24. $at_setup_line: testing $at_desc ..." $at_traceon -{ set +x -$as_echo "$at_srcdir/flags.at:24: { test -n \"\$FC\" && test \"X\$FC\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$FC\" && test \"X$FC\" != Xno; } || (exit 77)" "flags.at:24" -( $at_check_trace; { test -n "$FC" && test "X$FC" != Xno; } || (exit 77) -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" -$at_failed && at_fn_log_failure -$at_traceon; } - +# we don't want to use whole_archive_flag_spec, even if available +sed -e 's|^whole_archive_flag_spec=.*|whole_archive_flag_spec=|g' < $LIBTOOL > libtool +chmod +x ./libtool +LIBTOOL=./libtool +cat >bar.c <<'_ATEOF' +extern int foo1 (), foo2 (), foo3 (), foo4 (), foo5 (), foo6 (); +int bar() { + int result = foo1 () + foo2 () + foo3 () + foo4 () + foo5 () + foo6 (); + return result; +} +_ATEOF -LDFLAGS="$LDFLAGS -no-undefined" -eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`" -cat >a.f90 <<'_ATEOF' - program main - end +cat >main.c <<'_ATEOF' +int bar(); +int main() +{ +if (bar() == 21) return 0; +return 1; +} _ATEOF -compile="$FC $FCFLAGS" link="$FC $FCFLAGS $LDFLAGS" source=a.f90 -# Linker flags are not passed to the archiver, so don't test static libraries. -if $LIBTOOL --features | grep 'enable shared libraries'; then - library_and_module='library.la "module.la -module -avoid-version"' -else - library_and_module= -fi +for a in 1 2 3 4 5 6 +do + mkdir $a + echo "int foo$a() {return $a;}" > $a/a.c +done -eval "`$LIBTOOL --tag=FC --config | $EGREP '^(wl|archive_cmds)='`" +for a in 1 2 3 4 5 6 +do + $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o $a/a.lo $a/a.c +done +$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libc0.la 6/a.lo { set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=FC --mode=compile \$compile -c \$source" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=compile $compile -c $source" "flags.at:24" -( $at_check_trace; $LIBTOOL --tag=FC --mode=compile $compile -c $source +$as_echo "$at_srcdir/duplicate_members.at:64: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libconv.la 1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la 1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la" "duplicate_members.at:64" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la 1/a.lo 2/a.lo 3/a.lo 4/a.lo 5/a.lo libc0.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:64" $at_failed && at_fn_log_failure $at_traceon; } -# Linker flags are prefixed with ${wl} iff they are passed to the -# compiler driver, instead of directly to the linker. -case $archive_cmds in -*\$LD*\$linker_flags*) maybe_wl= ;; -*) maybe_wl=$wl ;; -esac - -for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do - case $flag in - -Wc, | -Xcompiler\ ) - { set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=FC --mode=compile \$compile \$flag-foo -c \$source" -at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=FC --mode=compile $compile $flag-foo -c $source" "flags.at:24" -( $at_check_trace; $LIBTOOL -n --tag=FC --mode=compile $compile $flag-foo -c $source +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c +{ set +x +$as_echo "$at_srcdir/duplicate_members.at:68: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbar.la bar.lo libconv.la -rpath /notexist" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo libconv.la -rpath /notexist" "duplicate_members.at:68" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo libconv.la -rpath /notexist ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" -$at_failed && at_fn_log_failure -$at_traceon; } - - { set +x -$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout" -at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24" -( $at_check_trace; $FGREP " -foo" stdout -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:68" $at_failed && at_fn_log_failure $at_traceon; } - flag_prefix= - ;; - -Wl, | -Xlinker\ ) - flag_prefix=$maybe_wl - ;; - esac - eval set program$EXEEXT "$library_and_module" - for output - do - { set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=FC --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo" -at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=FC --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24" -( $at_check_trace; $LIBTOOL -n --tag=FC --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.lo main.c +{ set +x +$as_echo "$at_srcdir/duplicate_members.at:72: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo ./libbar.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo ./libbar.la" "duplicate_members.at:72" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo ./libbar.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:72" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix-foo\" stdout" -at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix-foo\" stdout" "flags.at:24" -( $at_check_trace; $FGREP " $flag_prefix-foo" stdout + +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/duplicate_members.at:75: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_members.at:75" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_members.at:75" $at_failed && at_fn_log_failure $at_traceon; } - done -done + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_23 -#AT_START_24 -# 24. flags.at:24: passing GCJ flags through libtool -at_setup_line='flags.at:24' -at_fn_banner 2 -at_desc="passing GCJ flags through libtool" -at_desc_line=" 24: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_24 +#AT_START_25 +at_fn_group_banner 25 'duplicate_conv.at:25' \ + "duplicate convenience archive names" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "24. flags.at:24: testing ..." + $as_echo "25. $at_setup_line: testing $at_desc ..." $at_traceon +eval `$LIBTOOL --config | sed -n '/^reload_cmds=/,/^$/p'` + +# We create two convenience archives with the same name, and _also_ +# containing an object with the same name. This is necessary to detect +# the failure with both 1.5.22 and HEAD, since the latter does not (did +# not?) remove the temporary output directory, thus masking the failure +# when all objects have distinct names. + +mkdir a b c + +echo 'int a () { return 0; }' > a/a.c +echo 'int a2() { return 0; }' > b/a.c +echo 'int b () { return 0; }' > b/b.c +echo 'extern int a(), a2(), b(); int c() { return a() + a2() + b(); }' > c.c +echo 'extern int c(); int main() { return c(); }' > main.c + +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a/a.c -o a/a.lo +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b/a.c -o b/a.lo +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b/b.c -o b/b.lo +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c c.c +$CC $CPPFLAGS $CFLAGS -c main.c +$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o a/liba.la a/a.lo +$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o b/liba.la b/a.lo b/b.lo + +# Fold into convenience archive. { set +x -$as_echo "$at_srcdir/flags.at:24: { test -n \"\$GCJ\" && test \"X\$GCJ\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$GCJ\" && test \"X$GCJ\" != Xno; } || (exit 77)" "flags.at:24" -( $at_check_trace; { test -n "$GCJ" && test "X$GCJ" != Xno; } || (exit 77) +$as_echo "$at_srcdir/duplicate_conv.at:53: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la" "duplicate_conv.at:53" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libcee.la c.lo a/liba.la b/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:53" $at_failed && at_fn_log_failure $at_traceon; } - - - -LDFLAGS="$LDFLAGS -no-undefined" -eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`" - -cat >a.java <<'_ATEOF' -class a {} -_ATEOF - -compile="$GCJ $GCJFLAGS" link="$GCJ $GCJFLAGS $LDFLAGS" source=a.java - - -# Linker flags are not passed to the archiver, so don't test static libraries. -if $LIBTOOL --features | grep 'enable shared libraries'; then - library_and_module='library.la "module.la -module -avoid-version"' -else - library_and_module= -fi - -eval "`$LIBTOOL --tag=GCJ --config | $EGREP '^(wl|archive_cmds)='`" - { set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=GCJ --mode=compile \$compile -c \$source" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=compile $compile -c $source" "flags.at:24" -( $at_check_trace; $LIBTOOL --tag=GCJ --mode=compile $compile -c $source -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" -$at_failed && at_fn_log_failure -$at_traceon; } - - -# Linker flags are prefixed with ${wl} iff they are passed to the -# compiler driver, instead of directly to the linker. -case $archive_cmds in -*\$LD*\$linker_flags*) maybe_wl= ;; -*) maybe_wl=$wl ;; -esac - -for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do - case $flag in - -Wc, | -Xcompiler\ ) - { set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=GCJ --mode=compile \$compile \$flag-foo -c \$source" -at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=GCJ --mode=compile $compile $flag-foo -c $source" "flags.at:24" -( $at_check_trace; $LIBTOOL -n --tag=GCJ --mode=compile $compile $flag-foo -c $source +$as_echo "$at_srcdir/duplicate_conv.at:55: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT ./libcee.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la" "duplicate_conv.at:55" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" -$at_failed && at_fn_log_failure -$at_traceon; } - - { set +x -$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout" -at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24" -( $at_check_trace; $FGREP " -foo" stdout -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:55" $at_failed && at_fn_log_failure $at_traceon; } - flag_prefix= - ;; - -Wl, | -Xlinker\ ) - flag_prefix=$maybe_wl - ;; - esac - - eval set program$EXEEXT "$library_and_module" - for output - do - { set +x -$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=GCJ --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo" -at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=GCJ --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24" -( $at_check_trace; $LIBTOOL -n --tag=GCJ --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/duplicate_conv.at:57: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_conv.at:57" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" -$at_failed && at_fn_log_failure -$at_traceon; } - - { set +x -$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix-foo\" stdout" -at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix-foo\" stdout" "flags.at:24" -( $at_check_trace; $FGREP " $flag_prefix-foo" stdout -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:57" $at_failed && at_fn_log_failure $at_traceon; } - done -done - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_24 -#AT_START_25 -# 25. inherited_flags.at:26: inherited_linker_flags -at_setup_line='inherited_flags.at:26' -at_fn_banner 2 -at_desc="inherited_linker_flags" -at_desc_line=" 25: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "25. inherited_flags.at:26: testing ..." - $at_traceon - - - -cat >foo.c <<'_ATEOF' - -int foo() { return 1;} -_ATEOF - - -cat >bar.c <<'_ATEOF' - -int bar() { return 1;} -_ATEOF - - -cat >baz.c <<'_ATEOF' - -int baz() { return 1;} -_ATEOF - - -cat >both.c <<'_ATEOF' - -int both() { return 1;} -_ATEOF - - -cat >main.c <<'_ATEOF' - -int main() { return 0;} -_ATEOF - - -$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo.lo foo.c -$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c -$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o baz.lo baz.c -$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o both.lo both.c -$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.lo main.c -$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo -rpath /nonexistent -no-undefined -$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /nonexistent -no-undefined -$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libboth.la both.lo -rpath /nonexistent -no-undefined - -mv libfoo.la libfoo.la.bak -sed -e 's/^inherited_linker_flags.*/inherited_linker_flags=-llt_inlikely_existing_lib/g' < libfoo.la.bak > libfoo.la -rm libfoo.la.bak +$LIBTOOL --mode=clean rm -f libcee.la -mv libbar.la libbar.la.bak -sed -e 's/^inherited_linker_flags.*/inherited_linker_flags=-llt_unlikely_existing_lib/g' < libbar.la.bak > libbar.la -rm libbar.la.bak -mv libboth.la libboth.la.bak -sed -e "s/^inherited_linker_flags.*/inherited_linker_flags='-llt_inlikely_existing_lib -llt_unlikely_existing_lib'/g" < libboth.la.bak > libboth.la -rm libboth.la.bak +# FIXME: For this test, we may want to zero out whole_archive_flag_spec; +# OTOH, we'd like to test the other situation, too. +# Fold into static library. { set +x -$as_echo "$at_srcdir/inherited_flags.at:76: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la" "inherited_flags.at:76" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la +$as_echo "$at_srcdir/duplicate_conv.at:65: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -rpath /foo -static -o libcee.la c.lo a/liba.la b/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -static -o libcee.la c.lo a/liba.la b/liba.la" "duplicate_conv.at:65" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -static -o libcee.la c.lo a/liba.la b/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:76" -$at_failed && at_fn_log_failure -$at_traceon; } - -# We used to grep for -# 'llt_[[ui]]nlikely_existing_lib.*llt_[[ui]]nlikely_existing_lib' -# here. This fails on win32/MSVC because the generated command lines have a -# different syntax. So drop the first `l'. -{ set +x -$as_echo "$at_srcdir/inherited_flags.at:82: \$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)" -at_fn_check_prepare_dynamic "$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)" "inherited_flags.at:82" -( $at_check_trace; $LIBTOOL --features | grep 'disable shared libraries' && (exit 77) -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:82" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:65" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/inherited_flags.at:83: grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout" -at_fn_check_prepare_trace "inherited_flags.at:83" -( $at_check_trace; grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout +$as_echo "$at_srcdir/duplicate_conv.at:67: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT ./libcee.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la" "duplicate_conv.at:67" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:83" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:67" $at_failed && at_fn_log_failure $at_traceon; } +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/inherited_flags.at:85: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la" "inherited_flags.at:85" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la +$as_echo "$at_srcdir/duplicate_conv.at:69: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_conv.at:69" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:85" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:69" $at_failed && at_fn_log_failure $at_traceon; } + +$LIBTOOL --mode=clean rm -f libcee.la + +# Fold into library. { set +x -$as_echo "$at_srcdir/inherited_flags.at:87: grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout" -at_fn_check_prepare_trace "inherited_flags.at:87" -( $at_check_trace; grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout +$as_echo "$at_srcdir/duplicate_conv.at:73: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -rpath /foo -o libcee.la c.lo a/liba.la b/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -o libcee.la c.lo a/liba.la b/liba.la" "duplicate_conv.at:73" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -rpath /foo -o libcee.la c.lo a/liba.la b/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:87" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:73" $at_failed && at_fn_log_failure $at_traceon; } - -# now check for duplicates { set +x -$as_echo "$at_srcdir/inherited_flags.at:91: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la" "inherited_flags.at:91" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la +$as_echo "$at_srcdir/duplicate_conv.at:75: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT ./libcee.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la" "duplicate_conv.at:75" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT ./libcee.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:91" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:75" $at_failed && at_fn_log_failure $at_traceon; } +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/inherited_flags.at:93: grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout" -at_fn_check_prepare_trace "inherited_flags.at:93" -( $at_check_trace; grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout +$as_echo "$at_srcdir/duplicate_conv.at:77: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_conv.at:77" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:93" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:77" $at_failed && at_fn_log_failure $at_traceon; } + +$LIBTOOL --mode=clean rm -f libcee.la + { set +x -$as_echo "$at_srcdir/inherited_flags.at:95: grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout" -at_fn_check_prepare_trace "inherited_flags.at:95" -( $at_check_trace; grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout +$as_echo "$at_srcdir/duplicate_conv.at:80: test \"x\$reload_cmds\" = xfalse && exit 77" +at_fn_check_prepare_dynamic "test \"x$reload_cmds\" = xfalse && exit 77" "duplicate_conv.at:80" +( $at_check_trace; test "x$reload_cmds" = xfalse && exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:95" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/duplicate_conv.at:80" $at_failed && at_fn_log_failure $at_traceon; } + +# Test whether this works with reloadable objects as well. { set +x -$as_echo "$at_srcdir/inherited_flags.at:97: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la" "inherited_flags.at:97" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la +$as_echo "$at_srcdir/duplicate_conv.at:83: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o cee.\$OBJEXT c.lo a/liba.la b/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la" "duplicate_conv.at:83" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:97" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:83" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/inherited_flags.at:99: grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout" -at_fn_check_prepare_trace "inherited_flags.at:99" -( $at_check_trace; grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout +$as_echo "$at_srcdir/duplicate_conv.at:85: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT cee.\$OBJEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT cee.$OBJEXT" "duplicate_conv.at:85" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT cee.$OBJEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:99" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:85" $at_failed && at_fn_log_failure $at_traceon; } +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/inherited_flags.at:101: grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout" -at_fn_check_prepare_trace "inherited_flags.at:101" -( $at_check_trace; grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout +$as_echo "$at_srcdir/duplicate_conv.at:87: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_conv.at:87" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:101" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_conv.at:87" $at_failed && at_fn_log_failure $at_traceon; } -mv libboth.la libboth.la.bak -sed "s/^inherited_linker_flags.*/inherited_linker_flags='-framework Cocoa -framework ApplicationServices'/" < libboth.la.bak > libboth.la -rm libboth.la.bak -{ set +x -$as_echo "$at_srcdir/inherited_flags.at:108: \$LIBTOOL -n --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /nonexistent" -at_fn_check_prepare_dynamic "$LIBTOOL -n --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /nonexistent" "inherited_flags.at:108" -( $at_check_trace; $LIBTOOL -n --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /nonexistent -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false +# TODO: test dlpreloading of duplicates (when it is implemented) + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_25 +#AT_START_26 +at_fn_group_banner 26 'duplicate_deps.at:25' \ + "preserve duplicate convenience deps" " " 3 +at_xfail=yes +( + $as_echo "26. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +# --preserve-dup-deps should work for convenience archives. + +# Create a circular dependency of liba and libb: +# a1 pulls in b1, that pulls in a2. +cat >a1.c <<\EOF +extern int b1 (); +int a1 () { return b1 (); } +EOF +cat >a2.c <<\EOF +int a2 () { return 0; } +EOF +cat >b1.c <<\EOF +extern int a2 (); +int b1 () { return a2 (); } +EOF +cat >main.c <<\EOF +extern int a1 (); +int main () { return a1 (); } +EOF + +for file in a1.c a2.c b1.c; do + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file +done +$CC $CPPFLAGS $CFLAGS -c main.c +$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o liba.la a1.lo a2.lo + +# This could be worked around by adding liba.la to libb.la +# (in that case all objects from liba would be merged into +# libb.a as well, possibly renamed.) +$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libb.la b1.lo liba.la +{ set +x +$as_echo "$at_srcdir/duplicate_deps.at:58: \$LIBTOOL --mode=link --tag=CC \\ + \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la libb.la" +at_fn_check_prepare_notrace 'an embedded newline' "duplicate_deps.at:58" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC \ + $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la libb.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:108" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_deps.at:58" $at_failed && at_fn_log_failure $at_traceon; } +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/inherited_flags.at:110: grep Cocoa.ltframework stdout" -at_fn_check_prepare_trace "inherited_flags.at:110" -( $at_check_trace; grep Cocoa.ltframework stdout +$as_echo "$at_srcdir/duplicate_deps.at:61: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "duplicate_deps.at:61" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:110" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_deps.at:61" $at_failed && at_fn_log_failure $at_traceon; } + + +# Forgo the workaround and create a true circular dependency. +$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libb.la b1.lo +# Some systems find all symbols anyway; skip this test on such systems. { set +x -$as_echo "$at_srcdir/inherited_flags.at:111: grep ' -framework Cocoa' stdout" -at_fn_check_prepare_trace "inherited_flags.at:111" -( $at_check_trace; grep ' -framework Cocoa' stdout +$as_echo "$at_srcdir/duplicate_deps.at:66: \$LIBTOOL --mode=link --tag=CC \\ + \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la libb.la liba.la \\ + && exit 77" +at_fn_check_prepare_notrace 'an embedded newline' "duplicate_deps.at:66" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC \ + $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la libb.la liba.la \ + && exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:111" +at_fn_check_status 1 $at_status "$at_srcdir/duplicate_deps.at:66" +$at_failed && at_fn_log_failure +$at_traceon; } + +# Other systems need special treatment, which currently fails. + +{ set +x +$as_echo "$at_srcdir/duplicate_deps.at:72: \$LIBTOOL --mode=link --preserve-dup-deps --tag=CC \\ + \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la libb.la liba.la" +at_fn_check_prepare_notrace 'an embedded newline' "duplicate_deps.at:72" +( $at_check_trace; $LIBTOOL --mode=link --preserve-dup-deps --tag=CC \ + $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la libb.la liba.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/duplicate_deps.at:72" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_25 -#AT_START_26 -# 26. convenience.at:30: C convenience archives -at_setup_line='convenience.at:30' -at_fn_banner 2 -at_desc="C convenience archives" -at_desc_line=" 26: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_26 +#AT_START_27 +at_fn_group_banner 27 'flags.at:24' \ + "passing CC flags through libtool" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "26. convenience.at:30: testing ..." + $as_echo "27. $at_setup_line: testing $at_desc ..." $at_traceon -cat >main1.c <main2.c <main3.c < a$i.c - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main$i.c - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c - $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a$i.lo -done { set +x -$as_echo "$at_srcdir/convenience.at:51: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:51" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist +$as_echo "$at_srcdir/flags.at:24: { test -n \"\$CC\" && test \"X\$CC\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$CC\" && test \"X$CC\" != Xno; } || (exit 77)" "flags.at:24" +( $at_check_trace; { test -n "$CC" && test "X$CC" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:51" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } + + + +LDFLAGS="$LDFLAGS -no-undefined" +eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`" + +cat >a.c <<'_ATEOF' +int main () { return 0; } +_ATEOF + +compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.c + + +# Linker flags are not passed to the archiver, so don't test static libraries. +if $LIBTOOL --features | grep 'enable shared libraries'; then + library_and_module='library.la "module.la -module -avoid-version"' +else + library_and_module= +fi + +eval "`$LIBTOOL --tag=CC --config | $EGREP '^(wl|archive_cmds)='`" + { set +x -$as_echo "$at_srcdir/convenience.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:53" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=CC --mode=compile \$compile -c \$source" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CC --mode=compile $compile -c $source" "flags.at:24" +( $at_check_trace; $LIBTOOL --tag=CC --mode=compile $compile -c $source ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:53" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } -conv= -for i in 1 2 3; do - conv=$conv$i - { set +x -$as_echo "$at_srcdir/convenience.at:59: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:59" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la +# Linker flags are prefixed with ${wl} iff they are passed to the +# compiler driver, instead of directly to the linker. +case $archive_cmds in +*\$LD*\$linker_flags*) maybe_wl= compiler_flags_in_liblink=false ;; +*) maybe_wl=$wl compiler_flags_in_liblink=: ;; +esac + +for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do + case $flag in + -Wc, | -Xcompiler\ ) + { set +x +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CC --mode=compile \$compile \$flag-foo -c \$source" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CC --mode=compile $compile $flag-foo -c $source" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=CC --mode=compile $compile $flag-foo -c $source ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " -foo" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:59" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } + flag_prefix_prog= + flag_prefix_lib= + flags_in_liblink=$compiler_flags_in_liblink + ;; + -Wl, | -Xlinker\ ) + flag_prefix_prog=$wl + flag_prefix_lib=$maybe_wl + flags_in_liblink=: + ;; + esac + { set +x -$as_echo "$at_srcdir/convenience.at:61: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:61" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CC --mode=link \$link -o program\$EXEEXT a.lo \$flag-foo" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CC --mode=link $link -o program$EXEEXT a.lo $flag-foo" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=CC --mode=link $link -o program$EXEEXT a.lo $flag-foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:61" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/convenience.at:63: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:63" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_prog-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_prog-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_prog-foo" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:63" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/convenience.at:64: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:64" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + eval set x "$library_and_module" + for output + do + test x = "$output" && continue + { set +x +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CC --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CC --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=CC --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + if $flags_in_liblink; then + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:64" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } + else + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/flags.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + fi + done done + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_26 -#AT_START_27 -# 27. convenience.at:69: C++ convenience archives -at_setup_line='convenience.at:69' -at_fn_banner 2 -at_desc="C++ convenience archives" -at_desc_line=" 27: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_27 +#AT_START_28 +at_fn_group_banner 28 'flags.at:24' \ + "passing CXX flags through libtool" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "27. convenience.at:69: testing ..." + $as_echo "28. $at_setup_line: testing $at_desc ..." $at_traceon + { set +x -$as_echo "$at_srcdir/convenience.at:70: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "convenience.at:70" +$as_echo "$at_srcdir/flags.at:24: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "flags.at:24" ( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:70" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/convenience.at:70: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" -at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "convenience.at:70" +$as_echo "$at_srcdir/flags.at:24: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" +at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "flags.at:24" ( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:70" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } +LDFLAGS="$LDFLAGS -no-undefined" +eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`" + +cat >a.cpp <<'_ATEOF' +int main () { return 0; } +_ATEOF + +compile="$CXX $CPPFLAGS $CXXFLAGS" link="$CXX $CXXFLAGS $LDFLAGS" source=a.cpp + + +# Linker flags are not passed to the archiver, so don't test static libraries. +if $LIBTOOL --features | grep 'enable shared libraries'; then + library_and_module='library.la "module.la -module -avoid-version"' +else + library_and_module= +fi + +eval "`$LIBTOOL --tag=CXX --config | $EGREP '^(wl|archive_cmds)='`" -cat >main1.cpp <main2.cpp <main3.cpp < a$i.cpp - $LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c main$i.cpp - $LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c a$i.cpp - $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba$i.la a$i.lo -done { set +x -$as_echo "$at_srcdir/convenience.at:91: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:91" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL --tag=CXX --mode=compile \$compile -c \$source" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $compile -c $source" "flags.at:24" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $compile -c $source ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:91" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/convenience.at:93: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:93" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist + +# Linker flags are prefixed with ${wl} iff they are passed to the +# compiler driver, instead of directly to the linker. +case $archive_cmds in +*\$LD*\$linker_flags*) maybe_wl= compiler_flags_in_liblink=false ;; +*) maybe_wl=$wl compiler_flags_in_liblink=: ;; +esac + +for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do + case $flag in + -Wc, | -Xcompiler\ ) + { set +x +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CXX --mode=compile \$compile \$flag-foo -c \$source" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CXX --mode=compile $compile $flag-foo -c $source" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=CXX --mode=compile $compile $flag-foo -c $source ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " -foo" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:93" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } + flag_prefix_prog= + flag_prefix_lib= + flags_in_liblink=$compiler_flags_in_liblink + ;; + -Wl, | -Xlinker\ ) + flag_prefix_prog=$wl + flag_prefix_lib=$maybe_wl + flags_in_liblink=: + ;; + esac -conv= -for i in 1 2 3; do - conv=$conv$i { set +x -$as_echo "$at_srcdir/convenience.at:99: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:99" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CXX --mode=link \$link -o program\$EXEEXT a.lo \$flag-foo" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CXX --mode=link $link -o program$EXEEXT a.lo $flag-foo" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=CXX --mode=link $link -o program$EXEEXT a.lo $flag-foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:99" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/convenience.at:101: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:101" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_prog-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_prog-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_prog-foo" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:101" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/convenience.at:103: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:103" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + + eval set x "$library_and_module" + for output + do + test x = "$output" && continue + { set +x +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=CXX --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=CXX --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=CXX --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:103" +echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } + if $flags_in_liblink; then + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } - lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/convenience.at:104: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:104" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + else + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:104" +at_fn_check_status 1 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - + fi + done done + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_27 -#AT_START_28 -# 28. convenience.at:109: F77 convenience archives -at_setup_line='convenience.at:109' -at_fn_banner 2 -at_desc="F77 convenience archives" -at_desc_line=" 28: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_28 +#AT_START_29 +at_fn_group_banner 29 'flags.at:24' \ + "passing F77 flags through libtool" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "28. convenience.at:109: testing ..." + $as_echo "29. $at_setup_line: testing $at_desc ..." $at_traceon + { set +x -$as_echo "$at_srcdir/convenience.at:110: { test -n \"\$F77\" && test \"X\$F77\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$F77\" && test \"X$F77\" != Xno; } || (exit 77)" "convenience.at:110" +$as_echo "$at_srcdir/flags.at:24: { test -n \"\$F77\" && test \"X\$F77\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$F77\" && test \"X$F77\" != Xno; } || (exit 77)" "flags.at:24" ( $at_check_trace; { test -n "$F77" && test "X$F77" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:110" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } +LDFLAGS="$LDFLAGS -no-undefined" +eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`" -cat >main1.f <main2.f <main3.f <a.f <<'_ATEOF' program main - implicit none - integer*4 res - call a1(res) - call a2(res) - call a3(res) end -EOF +_ATEOF + +compile="$F77 $FFLAGS" link="$F77 $FFLAGS $LDFLAGS" source=a.f + + +# Linker flags are not passed to the archiver, so don't test static libraries. +if $LIBTOOL --features | grep 'enable shared libraries'; then + library_and_module='library.la "module.la -module -avoid-version"' +else + library_and_module= +fi + +eval "`$LIBTOOL --tag=F77 --config | $EGREP '^(wl|archive_cmds)='`" -for i in 1 2 3; do - cat >a$i.f <>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:151" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/convenience.at:153: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:153" -( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist + +# Linker flags are prefixed with ${wl} iff they are passed to the +# compiler driver, instead of directly to the linker. +case $archive_cmds in +*\$LD*\$linker_flags*) maybe_wl= compiler_flags_in_liblink=false ;; +*) maybe_wl=$wl compiler_flags_in_liblink=: ;; +esac + +for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do + case $flag in + -Wc, | -Xcompiler\ ) + { set +x +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=F77 --mode=compile \$compile \$flag-foo -c \$source" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=F77 --mode=compile $compile $flag-foo -c $source" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=F77 --mode=compile $compile $flag-foo -c $source ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " -foo" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:153" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } + flag_prefix_prog= + flag_prefix_lib= + flags_in_liblink=$compiler_flags_in_liblink + ;; + -Wl, | -Xlinker\ ) + flag_prefix_prog=$wl + flag_prefix_lib=$maybe_wl + flags_in_liblink=: + ;; + esac -conv= -for i in 1 2 3; do - conv=$conv$i { set +x -$as_echo "$at_srcdir/convenience.at:159: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:159" -( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=F77 --mode=link \$link -o program\$EXEEXT a.lo \$flag-foo" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=F77 --mode=link $link -o program$EXEEXT a.lo $flag-foo" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=F77 --mode=link $link -o program$EXEEXT a.lo $flag-foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:159" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/convenience.at:161: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:161" -( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_prog-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_prog-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_prog-foo" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:161" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/convenience.at:163: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:163" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + + eval set x "$library_and_module" + for output + do + test x = "$output" && continue + { set +x +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=F77 --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=F77 --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=F77 --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:163" +echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } + if $flags_in_liblink; then + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } - lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/convenience.at:164: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:164" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + else + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:164" +at_fn_check_status 1 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - + fi + done done + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_28 -#AT_START_29 -# 29. convenience.at:169: FC convenience archives -at_setup_line='convenience.at:169' -at_fn_banner 2 -at_desc="FC convenience archives" -at_desc_line=" 29: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_29 +#AT_START_30 +at_fn_group_banner 30 'flags.at:24' \ + "passing FC flags through libtool" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "29. convenience.at:169: testing ..." + $as_echo "30. $at_setup_line: testing $at_desc ..." $at_traceon + { set +x -$as_echo "$at_srcdir/convenience.at:170: { test -n \"\$FC\" && test \"X\$FC\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$FC\" && test \"X$FC\" != Xno; } || (exit 77)" "convenience.at:170" +$as_echo "$at_srcdir/flags.at:24: { test -n \"\$FC\" && test \"X\$FC\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$FC\" && test \"X$FC\" != Xno; } || (exit 77)" "flags.at:24" ( $at_check_trace; { test -n "$FC" && test "X$FC" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:170" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } +LDFLAGS="$LDFLAGS -no-undefined" +eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`" -cat >main1.f <main2.f <main3.f <a.f90 <<'_ATEOF' program main - implicit none - integer*4 res - call a1(res) - call a2(res) - call a3(res) end -EOF +_ATEOF + +compile="$FC $FCFLAGS" link="$FC $FCFLAGS $LDFLAGS" source=a.f90 + + +# Linker flags are not passed to the archiver, so don't test static libraries. +if $LIBTOOL --features | grep 'enable shared libraries'; then + library_and_module='library.la "module.la -module -avoid-version"' +else + library_and_module= +fi + +eval "`$LIBTOOL --tag=FC --config | $EGREP '^(wl|archive_cmds)='`" -for i in 1 2 3; do - cat >a$i.f <>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:211" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/convenience.at:213: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:213" -( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist + +# Linker flags are prefixed with ${wl} iff they are passed to the +# compiler driver, instead of directly to the linker. +case $archive_cmds in +*\$LD*\$linker_flags*) maybe_wl= compiler_flags_in_liblink=false ;; +*) maybe_wl=$wl compiler_flags_in_liblink=: ;; +esac + +for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do + case $flag in + -Wc, | -Xcompiler\ ) + { set +x +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=FC --mode=compile \$compile \$flag-foo -c \$source" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=FC --mode=compile $compile $flag-foo -c $source" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=FC --mode=compile $compile $flag-foo -c $source ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " -foo" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:213" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } + flag_prefix_prog= + flag_prefix_lib= + flags_in_liblink=$compiler_flags_in_liblink + ;; + -Wl, | -Xlinker\ ) + flag_prefix_prog=$wl + flag_prefix_lib=$maybe_wl + flags_in_liblink=: + ;; + esac -conv= -for i in 1 2 3; do - conv=$conv$i { set +x -$as_echo "$at_srcdir/convenience.at:219: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:219" -( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=FC --mode=link \$link -o program\$EXEEXT a.lo \$flag-foo" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=FC --mode=link $link -o program$EXEEXT a.lo $flag-foo" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=FC --mode=link $link -o program$EXEEXT a.lo $flag-foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:219" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/convenience.at:221: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:221" -( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_prog-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_prog-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_prog-foo" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:221" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/convenience.at:223: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:223" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + + eval set x "$library_and_module" + for output + do + test x = "$output" && continue + { set +x +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=FC --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=FC --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=FC --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:223" +echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } + if $flags_in_liblink; then + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } - lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/convenience.at:224: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:224" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + else + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:224" +at_fn_check_status 1 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - + fi + done done + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_29 -#AT_START_30 -# 30. convenience.at:229: Java convenience archives -at_setup_line='convenience.at:229' -at_fn_banner 2 -at_desc="Java convenience archives" -at_desc_line=" 30: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_30 +#AT_START_31 +at_fn_group_banner 31 'flags.at:24' \ + "passing GCJ flags through libtool" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "30. convenience.at:229: testing ..." + $as_echo "31. $at_setup_line: testing $at_desc ..." $at_traceon + { set +x -$as_echo "$at_srcdir/convenience.at:230: { test -n \"\$GCJ\" && test \"X\$GCJ\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$GCJ\" && test \"X$GCJ\" != Xno; } || (exit 77)" "convenience.at:230" +$as_echo "$at_srcdir/flags.at:24: { test -n \"\$GCJ\" && test \"X\$GCJ\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$GCJ\" && test \"X$GCJ\" != Xno; } || (exit 77)" "flags.at:24" ( $at_check_trace; { test -n "$GCJ" && test "X$GCJ" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:230" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } +# There are just too many broken gcj installations out there, either missing + # libgcj.spec or unable to find it. Skip the test for them. + cat >gcj_test.java <<'_ATEOF' +public class gcj_test { + public static void main(String[] argv) { } + } +_ATEOF + { set +x +$as_echo "$at_srcdir/flags.at:24: \$GCJ \$GCJFLAGS -c gcj_test.java || exit 77" +at_fn_check_prepare_dynamic "$GCJ $GCJFLAGS -c gcj_test.java || exit 77" "flags.at:24" +( $at_check_trace; $GCJ $GCJFLAGS -c gcj_test.java || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >foo1.java <foo2.java <foo3.java <A$i.java <>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:266" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/convenience.at:267: ./foo1\$EXEEXT || exit 77" -at_fn_check_prepare_dynamic "./foo1$EXEEXT || exit 77" "convenience.at:267" -( $at_check_trace; ./foo1$EXEEXT || exit 77 +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" -foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" -foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " -foo" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:267" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - rm -f foo1.o foo1.obj foo1$EXEEXT - fi + flag_prefix_prog= + flag_prefix_lib= + flags_in_liblink=$compiler_flags_in_liblink + ;; + -Wl, | -Xlinker\ ) + flag_prefix_prog=$wl + flag_prefix_lib=$maybe_wl + flags_in_liblink=: + ;; + esac - $LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c foo$i.java - $LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c A$i.java - $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba$i.la A$i.lo -done -{ set +x -$as_echo "$at_srcdir/convenience.at:275: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:275" -( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist + { set +x +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=GCJ --mode=link \$link -o program\$EXEEXT a.lo \$flag-foo" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=GCJ --mode=link $link -o program$EXEEXT a.lo $flag-foo" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=GCJ --mode=link $link -o program$EXEEXT a.lo $flag-foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:275" -$at_failed && at_fn_log_failure -$at_traceon; } - -{ set +x -$as_echo "$at_srcdir/convenience.at:277: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:277" -( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:277" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - -conv= -for i in 1 2 3; do - conv=$conv$i { set +x -$as_echo "$at_srcdir/convenience.at:283: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -static --main=foo\$i -o main_static\$EXEEXT foo\$i.lo liba\$conv.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -static --main=foo$i -o main_static$EXEEXT foo$i.lo liba$conv.la" "convenience.at:283" -( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -static --main=foo$i -o main_static$EXEEXT foo$i.lo liba$conv.la +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_prog-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_prog-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_prog-foo" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:283" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/convenience.at:285: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS --main=foo\$i -o main\$EXEEXT foo\$i.lo liba\$conv.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS --main=foo$i -o main$EXEEXT foo$i.lo liba$conv.la" "convenience.at:285" -( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS --main=foo$i -o main$EXEEXT foo$i.lo liba$conv.la + + eval set x "$library_and_module" + for output + do + test x = "$output" && continue + { set +x +$as_echo "$at_srcdir/flags.at:24: \$LIBTOOL -n --tag=GCJ --mode=link \$link -o \$output a.lo -rpath /nowhere \$flag-foo" +at_fn_check_prepare_dynamic "$LIBTOOL -n --tag=GCJ --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo" "flags.at:24" +( $at_check_trace; $LIBTOOL -n --tag=GCJ --mode=link $link -o $output a.lo -rpath /nowhere $flag-foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:285" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/convenience.at:287: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:287" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + if $flags_in_liblink; then + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:287" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - - lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/convenience.at:288: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:288" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + else + { set +x +$as_echo "$at_srcdir/flags.at:24: \$FGREP \" \$flag_prefix_lib-foo\" stdout" +at_fn_check_prepare_dynamic "$FGREP \" $flag_prefix_lib-foo\" stdout" "flags.at:24" +( $at_check_trace; $FGREP " $flag_prefix_lib-foo" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:288" +at_fn_check_status 1 $at_status "$at_srcdir/flags.at:24" $at_failed && at_fn_log_failure $at_traceon; } - + fi + done done + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_30 -#AT_START_31 -# 31. link-order.at:26: Link order test -at_setup_line='link-order.at:26' -at_fn_banner 2 -at_desc="Link order test" -at_desc_line=" 31: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_31 +#AT_START_32 +at_fn_group_banner 32 'inherited_flags.at:26' \ + "inherited_linker_flags" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "31. link-order.at:26: testing ..." + $as_echo "32. $at_setup_line: testing $at_desc ..." $at_traceon -eval `$LIBTOOL --config | $EGREP '^(hardcode_direct|hardcode_direct_absolute|shrext_cmds)='` -LDFLAGS="$LDFLAGS -no-undefined" -module=no -eval shared_ext=\"$shrext_cmds\" +cat >foo.c <<'_ATEOF' -prefix_old=`pwd`/old -prefix_new=`pwd`/new -mkdir src $prefix_old $prefix_new $prefix_old/lib $prefix_new/lib +int foo() { return 1;} +_ATEOF -cat >src/c.c <<'_ATEOF' -int c = 1; + +cat >bar.c <<'_ATEOF' + +int bar() { return 1;} _ATEOF -$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c src/c.c -o src/c.lo -$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/libcee.la src/c.lo -rpath $prefix_old/lib -$LIBTOOL --mode=install cp src/libcee.la $prefix_old/lib/libcee.la +cat >baz.c <<'_ATEOF' -for i in old new; do - rm -rf src - mkdir src +int baz() { return 1;} +_ATEOF - cat >src/a_$i.c <src/b_$i.c <both.c <<'_ATEOF' - prefix=`eval echo \\$prefix_$i` - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c src/a_$i.c -o src/a.lo - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c src/b_$i.c -o src/b.lo - $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/libb.la src/b.lo \ - -L$prefix_old/lib -lcee -rpath $prefix/lib - $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/liba.la src/a.lo \ - src/libb.la -L$prefix_old/lib -lcee -rpath $prefix/lib - $LIBTOOL --mode=install cp src/libb.la $prefix/lib/libb.la - { set +x -$as_echo "$at_srcdir/link-order.at:69: \$LIBTOOL --mode=install cp src/liba.la \$prefix/lib/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp src/liba.la $prefix/lib/liba.la" "link-order.at:69" -( $at_check_trace; $LIBTOOL --mode=install cp src/liba.la $prefix/lib/liba.la +int both() { return 1;} +_ATEOF + + +cat >main.c <<'_ATEOF' + +int main() { return 0;} +_ATEOF + + +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo.lo foo.c +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o baz.lo baz.c +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o both.lo both.c +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.lo main.c +$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo -rpath /nonexistent -no-undefined +$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /nonexistent -no-undefined +$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libboth.la both.lo -rpath /nonexistent -no-undefined + + +mv libfoo.la libfoo.la.bak +sed -e 's/^inherited_linker_flags.*/inherited_linker_flags=-llt_inlikely_existing_lib/g' < libfoo.la.bak > libfoo.la +rm libfoo.la.bak + +mv libbar.la libbar.la.bak +sed -e 's/^inherited_linker_flags.*/inherited_linker_flags=-llt_unlikely_existing_lib/g' < libbar.la.bak > libbar.la +rm libbar.la.bak + +mv libboth.la libboth.la.bak +sed -e "s/^inherited_linker_flags.*/inherited_linker_flags='-llt_inlikely_existing_lib -llt_unlikely_existing_lib'/g" < libboth.la.bak > libboth.la +rm libboth.la.bak + +{ set +x +$as_echo "$at_srcdir/inherited_flags.at:76: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la" "inherited_flags.at:76" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +echo stderr:; cat "$at_stderr" echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:69" +at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:76" $at_failed && at_fn_log_failure $at_traceon; } -done - -$LIBTOOL --mode=clean rm -f src/libb.la -$LIBTOOL --mode=clean rm -f src/liba.la - -case $host_os in -aix* | interix*) ;; # These systems have different path syntax -*) - # Do not error if we do not relink (e.g. static-only systems) - case $hardcode_direct$hardcode_direct_absolute in - yesno) - { set +x -$as_echo "$at_srcdir/link-order.at:82: if \$EGREP relinking stderr; then - \$EGREP \" .*\\/new\\/lib/libb\$shared_ext .*\\/old\\/lib/libcee\$shared_ext\" stdout - else :; fi" -at_fn_check_prepare_notrace 'an embedded newline' "link-order.at:82" -( $at_check_trace; if $EGREP relinking stderr; then - $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout - else :; fi +# We used to grep for +# 'llt_[[ui]]nlikely_existing_lib.*llt_[[ui]]nlikely_existing_lib' +# here. This fails on win32/MSVC because the generated command lines have a +# different syntax. So drop the first `l'. +{ set +x +$as_echo "$at_srcdir/inherited_flags.at:82: \$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)" +at_fn_check_prepare_notrace 'a shell pipeline' "inherited_flags.at:82" +( $at_check_trace; $LIBTOOL --features | grep 'disable shared libraries' && (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:82" -if $at_failed; then : - echo "wrong link order" -fi +at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:82" $at_failed && at_fn_log_failure $at_traceon; } - ;; - *) - { set +x -$as_echo "$at_srcdir/link-order.at:87: if \$EGREP relinking stderr; then - \$EGREP \" -L.*\\/new\\/lib -lb -L.*\\/old\\/lib -lcee\" stdout - else :; fi" -at_fn_check_prepare_notrace 'an embedded newline' "link-order.at:87" -( $at_check_trace; if $EGREP relinking stderr; then - $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout - else :; fi +{ set +x +$as_echo "$at_srcdir/inherited_flags.at:83: grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout" +at_fn_check_prepare_trace "inherited_flags.at:83" +( $at_check_trace; grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:87" -if $at_failed; then : - echo "wrong link order" -fi +at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:83" $at_failed && at_fn_log_failure $at_traceon; } - ;; - esac - ;; -esac - -for i in old new; do - cat >src/main_$i.c <>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:85" +$at_failed && at_fn_log_failure +$at_traceon; } - prefix=`eval echo \\$prefix_$i` - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c src/main_$i.c -o src/main_$i.lo - { set +x -$as_echo "$at_srcdir/link-order.at:103: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o src/main_\$i\$EXEEXT src/main_\$i.lo -L\$prefix/lib -la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/main_$i$EXEEXT src/main_$i.lo -L$prefix/lib -la" "link-order.at:103" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/main_$i$EXEEXT src/main_$i.lo -L$prefix/lib -la +{ set +x +$as_echo "$at_srcdir/inherited_flags.at:87: grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout" +at_fn_check_prepare_trace "inherited_flags.at:87" +( $at_check_trace; grep 'lt_[ui]nlikely_existing_lib.*lt_[ui]nlikely_existing_lib' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:103" +at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:87" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=src/main_$i; if test -f "src/main_$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi + +# now check for duplicates { set +x -$as_echo "$at_srcdir/link-order.at:105: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order.at:105" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/inherited_flags.at:91: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la" "inherited_flags.at:91" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:105" +echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:91" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/inherited_flags.at:93: grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout" +at_fn_check_prepare_trace "inherited_flags.at:93" +( $at_check_trace; grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:93" +$at_failed && at_fn_log_failure +$at_traceon; } -done +{ set +x +$as_echo "$at_srcdir/inherited_flags.at:95: grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout" +at_fn_check_prepare_trace "inherited_flags.at:95" +( $at_check_trace; grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:95" +$at_failed && at_fn_log_failure +$at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_31 -#AT_START_32 -# 32. link-order2.at:46: Link order of deplibs -at_setup_line='link-order2.at:46' -at_fn_banner 2 -at_desc="Link order of deplibs" -at_desc_line=" 32: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "32. link-order2.at:46: testing ..." - $at_traceon - - - -eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|allow_undefined_flag)='` - -undefined_setting=-no-undefined -shared_fails=no -case $host_os,$LDFLAGS,$allow_undefined_flag in -aix*,*-brtl*,*) ;; -aix*) shared_fails=yes ;; -darwin*,*,*-flat_namespace*) undefined_setting= ;; -darwin*,*,*) shared_fails=yes ;; -esac - -deflibdir=`pwd`/lib -defbindir=`pwd`/lib -libdir=`pwd`/inst/lib -bindir=`pwd`/inst/bin -mkdir bin lib inst inst/bin inst/lib -LDFLAGS="$LDFLAGS $undefined_setting -L$deflibdir" - -cat >a0.c <<\EOF -int a (void) { return 1; } -EOF - -cat >a1.c <<\EOF -int a (void) { return 0; } -EOF - -cat >b.c <<\EOF -int a (void); -int b (void) { return a (); } -EOF - -cat >main.c <<\EOF -#include -extern int a (void); -extern int b (void); -int main (void) -{ - return !(a () + b () == 0); -} -EOF - -for file in a0 a1 b; do - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c -done -$CC $CPPFLAGS $CFLAGS -c main.c - -# Build an old, installed library. -$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba0.la a0.lo -rpath $deflibdir -$LIBTOOL --mode=install cp liba0.la $deflibdir/liba0.la -$LIBTOOL --mode=clean rm -f liba0.la - -for type_of_depdepl in libtool non-libtool; do - echo "type of depdepl: $type_of_depdepl" - if test $type_of_depdepl = non-libtool; then - # Simulate a non-Libtool system library. - rm $deflibdir/liba1.la - addpath=$deflibdir - if test "$shlibpath_var" = PATH; then - addpath=$defbindir - fi - sep= - eval test -n \"\$$shlibpath_var\" && sep=: - eval $shlibpath_var='$addpath$sep$'$shlibpath_var - export $shlibpath_var - fi - for static in '' -static-libtool-libs; do - case `$LIBTOOL --features` in - *disable\ static\ libraries*) test "$static" = '' || continue;; - esac - test "$type_of_depdepl,$static" = "non-libtool,-static-libtool-libs" && - static=-all-static - $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba1.la a1.lo -rpath $libdir - $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o libb.la b.lo liba1.la -rpath $libdir - { set +x -$as_echo "$at_srcdir/link-order2.at:123: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$static -o main\$EXEEXT main.\$OBJEXT libb.la -la0" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0" "link-order2.at:123" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0 +{ set +x +$as_echo "$at_srcdir/inherited_flags.at:97: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la" "inherited_flags.at:97" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.lo -no-undefined -rpath /nonexistent ./libfoo.la ./libbar.la ./libboth.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:123" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_skip $at_status "$at_srcdir/inherited_flags.at:97" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/link-order2.at:125: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order2.at:125" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:125" -$at_failed && at_fn_log_failure -$at_traceon; } - - - # Now test that if we reverse the link order, the program fails. - { set +x -$as_echo "$at_srcdir/link-order2.at:127: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$static -o wrong\$EXEEXT main.\$OBJEXT -la0 libb.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la" "link-order2.at:127" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la +$as_echo "$at_srcdir/inherited_flags.at:99: grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout" +at_fn_check_prepare_trace "inherited_flags.at:99" +( $at_check_trace; grep 'lt_inlikely_existing_lib.*lt_inlikely_existing_lib' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:127" +at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:99" $at_failed && at_fn_log_failure $at_traceon; } - if test $shared_fails,$static != yes,; then - lt_exe=./wrong; if test -f "./wrong$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/link-order2.at:130: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order2.at:130" -( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/inherited_flags.at:101: grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout" +at_fn_check_prepare_trace "inherited_flags.at:101" +( $at_check_trace; grep 'lt_unlikely_existing_lib.*lt_unlikely_existing_lib' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/link-order2.at:130" +echo stdout:; cat "$at_stdout" +at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:101" $at_failed && at_fn_log_failure $at_traceon; } - fi +mv libboth.la libboth.la.bak +sed "s/^inherited_linker_flags.*/inherited_linker_flags='-framework Cocoa -framework ApplicationServices'/" < libboth.la.bak > libboth.la +rm libboth.la.bak - $LIBTOOL --mode=install cp liba1.la $libdir/liba1.la - $LIBTOOL --mode=install cp libb.la $libdir/libb.la - $LIBTOOL --mode=install cp main$EXEEXT $bindir/main$EXEEXT - $LIBTOOL --mode=install cp wrong$EXEEXT $bindir/wrong$EXEEXT - $LIBTOOL --mode=clean rm -f liba1.la libb.la - lt_exe=$bindir/main; if test -f "$bindir/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/link-order2.at:138: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order2.at:138" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/inherited_flags.at:108: \$LIBTOOL -n --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /nonexistent" +at_fn_check_prepare_dynamic "$LIBTOOL -n --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /nonexistent" "inherited_flags.at:108" +( $at_check_trace; $LIBTOOL -n --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -framework Cocoa -framework ApplicationServices -o libbaz.la baz.lo libboth.la -no-undefined -rpath /nonexistent ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:138" +echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:108" $at_failed && at_fn_log_failure $at_traceon; } - - if test $shared_fails,$static != yes,; then - lt_exe=$bindir/wrong; if test -f "$bindir/wrong$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/link-order2.at:140: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order2.at:140" -( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/inherited_flags.at:110: grep Cocoa.ltframework stdout" +at_fn_check_prepare_trace "inherited_flags.at:110" +( $at_check_trace; grep Cocoa.ltframework stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/link-order2.at:140" +at_fn_check_status 1 $at_status "$at_srcdir/inherited_flags.at:110" $at_failed && at_fn_log_failure $at_traceon; } - - fi - done -done - { set +x -$as_echo "$at_srcdir/link-order2.at:145: test \$shared_fails = no || (exit 77)" -at_fn_check_prepare_dynamic "test $shared_fails = no || (exit 77)" "link-order2.at:145" -( $at_check_trace; test $shared_fails = no || (exit 77) +$as_echo "$at_srcdir/inherited_flags.at:111: grep ' -framework Cocoa' stdout" +at_fn_check_prepare_trace "inherited_flags.at:111" +( $at_check_trace; grep ' -framework Cocoa' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:145" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/inherited_flags.at:111" $at_failed && at_fn_log_failure $at_traceon; } -# Now the converse: if both the program and the library need libm, then -# it needs to be sorted last. (TODO) - set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_32 #AT_START_33 -# 33. fail.at:27: Failure tests -at_setup_line='fail.at:27' -at_fn_banner 2 -at_desc="Failure tests" -at_desc_line=" 33: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +at_fn_group_banner 33 'convenience.at:31' \ + "C convenience archives" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "33. fail.at:27: testing ..." + $as_echo "33. $at_setup_line: testing $at_desc ..." $at_traceon -eval `$LIBTOOL --config | $EGREP '^(pic_mode|pic_flag|build_old_libs|build_libtool_libs)='` -LDFLAGS="$LDFLAGS -no-undefined" - - - -cat >script <<'_ATEOF' -#! /bin/sh -exit 0 -_ATEOF - -chmod +x script -if test -x script >/dev/null 2>&1; then - test_x="test -x" -else - test_x=: -fi -# compile failure -echo 'choke me' > a.c +cat >main1.c <main2.c <main3.c < a$i.c + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main$i.c + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c + $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a$i.lo +done { set +x -$as_echo "$at_srcdir/fail.at:49: if \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c; then (exit 1); else :; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c; then (exit 1); else :; fi" "fail.at:49" -( $at_check_trace; if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c; then (exit 1); else :; fi +$as_echo "$at_srcdir/convenience.at:52: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:52" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/fail.at:49" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:52" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/fail.at:50: test -f a.lo" -at_fn_check_prepare_trace "fail.at:50" -( $at_check_trace; test -f a.lo +$as_echo "$at_srcdir/convenience.at:54: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:54" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/fail.at:50" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:54" $at_failed && at_fn_log_failure $at_traceon; } -# non-PIC compile failure -case $pic_mode in default | no) - case " $CFLAGS " in - *\ -prefer-pic\ *) ;; - *) - case $build_old_libs,$pic_flag in yes,*-DPIC*) - cat >a.c <<'_ATEOF' - -#ifndef PIC - choke me -#endif -_ATEOF - - { set +x -$as_echo "$at_srcdir/fail.at:63: if \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi" "fail.at:63" -( $at_check_trace; if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi +conv= +for i in 1 2 3; do + conv=$conv$i + { set +x +$as_echo "$at_srcdir/convenience.at:60: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:60" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/fail.at:63" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:60" $at_failed && at_fn_log_failure $at_traceon; } - - { set +x -$as_echo "$at_srcdir/fail.at:64: test -f a.lo" -at_fn_check_prepare_trace "fail.at:64" -( $at_check_trace; test -f a.lo + { set +x +$as_echo "$at_srcdir/convenience.at:62: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:62" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/fail.at:64" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:62" $at_failed && at_fn_log_failure $at_traceon; } - ;; - esac - ;; - esac - ;; -esac - -# program creation failure. -# We can't rely on `main' not being present: the QNX linker -# won't error out in that case, although the resulting binary won't work. -# So we provoke a link failure due to an unresolved symbol, and require -# libtool to fail only if the link without libtool would have failed, too. -cat > a.c <<'EOF' -extern int nonexistent_function (void); -int main (void) -{ - return nonexistent_function (); -} -EOF -$CC $CPPFLAGS $CFLAGS -c a.c -if $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then :; else - rm -f a a$EXEEXT - { set +x -$as_echo "$at_srcdir/fail.at:87: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o a\$EXEEXT a.\$OBJEXT; then (exit 1); else :; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then (exit 1); else :; fi" "fail.at:87" -( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then (exit 1); else :; fi + lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/convenience.at:64: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:64" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/fail.at:87" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:64" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/fail.at:88: { test -f a && \$test_x a; } || { test -f a\$EXEEXT && \$test_x a\$EXEEXT; }" -at_fn_check_prepare_dynamic "{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }" "fail.at:88" -( $at_check_trace; { test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; } + lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/convenience.at:65: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:65" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/fail.at:88" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:65" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/fail.at:89: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o a\$EXEEXT a.\$OBJEXT -static; then (exit 1); else :; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT -static; then (exit 1); else :; fi" "fail.at:89" -( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT -static; then (exit 1); else :; fi + +done + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_33 +#AT_START_34 +at_fn_group_banner 34 'convenience.at:70' \ + "C++ convenience archives" " " 3 +at_xfail=no +( + $as_echo "34. $at_setup_line: testing $at_desc ..." + $at_traceon + + +{ set +x +$as_echo "$at_srcdir/convenience.at:71: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "convenience.at:71" +( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/fail.at:89" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:71" $at_failed && at_fn_log_failure $at_traceon; } - - { set +x -$as_echo "$at_srcdir/fail.at:90: { test -f a && \$test_x a; } || { test -f a\$EXEEXT && \$test_x a\$EXEEXT; }" -at_fn_check_prepare_dynamic "{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }" "fail.at:90" -( $at_check_trace; { test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; } +{ set +x +$as_echo "$at_srcdir/convenience.at:71: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" +at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "convenience.at:71" +( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/fail.at:90" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:71" $at_failed && at_fn_log_failure $at_traceon; } -fi -# shared library creation failure -case $build_libtool_libs in yes) - echo 'int duplicate_name(void) { return 0; }' > a.c - echo 'double duplicate_name(double x) { return 2.*x; }' > b.c - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c - # Unfortunately, this may actually succeed on AIX and IRIX :( - # So, also add a bogus object file to provoke more failure. - echo 'int whatever(void) { return 0;}' > c.c - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c.c - ( - . ./c.lo - test "$pic_object" != none && echo choke me >"$pic_object" - test "$non_pic_object" != none && echo choke me >"$non_pic_object" - ) - { set +x -$as_echo "$at_srcdir/fail.at:108: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi" "fail.at:108" -( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi + + +cat >main1.cpp <main2.cpp <main3.cpp < a$i.cpp + $LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c main$i.cpp + $LIBTOOL --tag=CXX --mode=compile $CXX $CXXFLAGS -c a$i.cpp + $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba$i.la a$i.lo +done +{ set +x +$as_echo "$at_srcdir/convenience.at:92: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist" "convenience.at:92" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba12.la liba1.la liba2.la -rpath /notexist ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/fail.at:108" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:92" $at_failed && at_fn_log_failure $at_traceon; } - - { set +x -$as_echo "$at_srcdir/fail.at:109: test -f liba.la" -at_fn_check_prepare_trace "fail.at:109" -( $at_check_trace; test -f liba.la +{ set +x +$as_echo "$at_srcdir/convenience.at:94: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:94" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/fail.at:109" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:94" $at_failed && at_fn_log_failure $at_traceon; } - ;; -esac -# Ensure we diagnose '-L path'. -echo 'int main () { return 0; }' > d.c -echo 'int foo () { return 0; }' > space-after-L.c -$CC $CPPFLAGS $CFLAGS -c d.c -$CC $CPPFLAGS $CFLAGS -c space-after-L.c -{ set +x -$as_echo "$at_srcdir/fail.at:118: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -L space-after-L.\$OBJEXT -o d\$EXEEXT d.\$OBJEXT; then (exit 1); else :; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -L space-after-L.$OBJEXT -o d$EXEEXT d.$OBJEXT; then (exit 1); else :; fi" "fail.at:118" -( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -L space-after-L.$OBJEXT -o d$EXEEXT d.$OBJEXT; then (exit 1); else :; fi +conv= +for i in 1 2 3; do + conv=$conv$i + { set +x +$as_echo "$at_srcdir/convenience.at:100: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:100" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/fail.at:118" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:100" $at_failed && at_fn_log_failure $at_traceon; } - -{ set +x -$as_echo "$at_srcdir/fail.at:119: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o d\$EXEEXT d.\$OBJEXT -L; then (exit 1); else :; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o d$EXEEXT d.$OBJEXT -L; then (exit 1); else :; fi" "fail.at:119" -( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o d$EXEEXT d.$OBJEXT -L; then (exit 1); else :; fi + { set +x +$as_echo "$at_srcdir/convenience.at:102: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:102" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/fail.at:119" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:102" $at_failed && at_fn_log_failure $at_traceon; } - - - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_33 -#AT_START_34 -# 34. shlibpath.at:25: shlibpath_overrides_runpath -at_setup_line='shlibpath.at:25' -at_fn_banner 2 -at_desc="shlibpath_overrides_runpath" -at_desc_line=" 34: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "34. shlibpath.at:25: testing ..." - $at_traceon - - - -mkdir sub sub/lib sub/bin -echo 'int a () { return 0; }' > a.c -echo 'extern int a (); int main () { return a(); }' > m.c -$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath `pwd`/sub/lib -$LIBTOOL --mode=install cp liba.la `pwd`/sub/lib/liba.la -$LIBTOOL --mode=clean rm -f liba.la -rm -f sub/lib/liba.la - -$CC $CPPFLAGS $CFLAGS -c m.c + lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/shlibpath.at:38: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m\$EXEEXT m.\$OBJEXT -Lsub/lib -la -R\`pwd\`/sub/lib" -at_fn_check_prepare_notrace 'a `...` command substitution' "shlibpath.at:38" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT -Lsub/lib -la -R`pwd`/sub/lib +$as_echo "$at_srcdir/convenience.at:104: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:104" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:38" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:104" $at_failed && at_fn_log_failure $at_traceon; } + + lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/shlibpath.at:40: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m2\$EXEEXT m.\$OBJEXT -Lsub/lib -la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT -Lsub/lib -la" "shlibpath.at:40" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT -Lsub/lib -la +$as_echo "$at_srcdir/convenience.at:105: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:105" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:40" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:105" $at_failed && at_fn_log_failure $at_traceon; } -$mkdir_p moved -(cd sub && find . -type d) | (cd moved && xargs $mkdir_p) -for file in `cd sub && find . -type f -print -o -type l -print` -do - mv sub/$file moved/$file done -rm -rf sub - -mkdir sub sub/lib sub/bin -echo 'int wrong_lib () { return 0; }' > a.c -$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath `pwd`/sub/lib -$LIBTOOL --mode=install cp liba.la `pwd`/sub/lib/liba.la -$LIBTOOL --mode=clean rm -f liba.la + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_34 +#AT_START_35 +at_fn_group_banner 35 'convenience.at:110' \ + "F77 convenience archives" " " 3 +at_xfail=no +( + $as_echo "35. $at_setup_line: testing $at_desc ..." + $at_traceon -eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|shlibpath_overrides_runpath)='` -# No point checking a system with static libraries: -lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/shlibpath.at:54: if \"\$lt_exe\" || exit 1 && exit 77; then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" || exit 1 && exit 77; then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "shlibpath.at:54" -( $at_check_trace; if "$lt_exe" || exit 1 && exit 77; then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/convenience.at:111: { test -n \"\$F77\" && test \"X\$F77\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$F77\" && test \"X$F77\" != Xno; } || (exit 77)" "convenience.at:111" +( $at_check_trace; { test -n "$F77" && test "X$F77" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/shlibpath.at:54" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:111" $at_failed && at_fn_log_failure $at_traceon; } -if test "$shlibpath_var" = PATH; then - addpath=`pwd`/moved/bin -else - addpath=`pwd`/moved/lib -fi -sep= -eval test -n \"\$$shlibpath_var\" && sep=: -eval $shlibpath_var='$addpath$sep$'$shlibpath_var -export $shlibpath_var -if test "$shlibpath_overrides_runpath" != no; then - lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi + + +cat >main1.f <main2.f <main3.f <a$i.f <>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:66" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:152" $at_failed && at_fn_log_failure $at_traceon; } - -else - lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/shlibpath.at:68: if \"\$lt_exe\" || exit 1; then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" || exit 1; then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "shlibpath.at:68" -( $at_check_trace; if "$lt_exe" || exit 1; then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/convenience.at:154: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:154" +( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/shlibpath.at:68" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:154" $at_failed && at_fn_log_failure $at_traceon; } -fi -# Test that shlibpath_var is effective in adding paths at all: -lt_exe=./m2; if test -f "./m2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/shlibpath.at:71: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "shlibpath.at:71" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +conv= +for i in 1 2 3; do + conv=$conv$i + { set +x +$as_echo "$at_srcdir/convenience.at:160: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:160" +( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:71" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:160" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/convenience.at:162: \$LIBTOOL --tag=F77 --mode=link \$F77 \$FFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:162" +( $at_check_trace; $LIBTOOL --tag=F77 --mode=link $F77 $FFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:162" +$at_failed && at_fn_log_failure +$at_traceon; } + + lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/convenience.at:164: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:164" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:164" $at_failed && at_fn_log_failure $at_traceon; } + lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/convenience.at:165: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:165" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:165" +$at_failed && at_fn_log_failure +$at_traceon; } + +done set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_34 -#AT_START_35 -# 35. runpath-in-lalib.at:25: Runpath in libtool library files -at_setup_line='runpath-in-lalib.at:25' -at_fn_banner 2 -at_desc="Runpath in libtool library files" -at_desc_line=" 35: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_35 +#AT_START_36 +at_fn_group_banner 36 'convenience.at:170' \ + "FC convenience archives" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "35. runpath-in-lalib.at:25: testing ..." + $as_echo "36. $at_setup_line: testing $at_desc ..." $at_traceon +{ set +x +$as_echo "$at_srcdir/convenience.at:171: { test -n \"\$FC\" && test \"X\$FC\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$FC\" && test \"X$FC\" != Xno; } || (exit 77)" "convenience.at:171" +( $at_check_trace; { test -n "$FC" && test "X$FC" != Xno; } || (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:171" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >a.c <<'_ATEOF' -int a () { return 0; } -_ATEOF - -cat >b.c <<'_ATEOF' -extern int a (); -int b () { return a (); } -_ATEOF -cat >m.c <<'_ATEOF' -extern int b (); -int main () { return b (); } -_ATEOF -instdir=`pwd`/inst -libdir=$instdir/lib -bindir=$instdir/bin -addrunpath=`pwd`/foobar -mkdir $instdir $libdir $bindir +cat >main1.f <main2.f <main3.f <a$i.f <>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:51" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:212" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/runpath-in-lalib.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la b.lo -rpath \$libdir liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir liba.la" "runpath-in-lalib.at:53" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir liba.la +$as_echo "$at_srcdir/convenience.at:214: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:214" +( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o liba123.la a3.lo liba1.la liba2.la -rpath /notexist ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:53" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:214" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/runpath-in-lalib.at:55: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m\$EXEEXT m.\$OBJEXT libb.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT libb.la" "runpath-in-lalib.at:55" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT libb.la + +conv= +for i in 1 2 3; do + conv=$conv$i + { set +x +$as_echo "$at_srcdir/convenience.at:220: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -static -o main_static\$EXEEXT main\$i.lo liba\$conv.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la" "convenience.at:220" +( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -static -o main_static$EXEEXT main$i.lo liba$conv.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:55" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:220" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/runpath-in-lalib.at:57: \$LIBTOOL --mode=install cp liba.la \$libdir/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir/liba.la" "runpath-in-lalib.at:57" -( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir/liba.la + { set +x +$as_echo "$at_srcdir/convenience.at:222: \$LIBTOOL --tag=FC --mode=link \$FC \$FCFLAGS \$LDFLAGS -o main\$EXEEXT main\$i.lo liba\$conv.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la" "convenience.at:222" +( $at_check_trace; $LIBTOOL --tag=FC --mode=link $FC $FCFLAGS $LDFLAGS -o main$EXEEXT main$i.lo liba$conv.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:57" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:222" $at_failed && at_fn_log_failure $at_traceon; } + lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/runpath-in-lalib.at:58: \$LIBTOOL --mode=install cp libb.la \$libdir/libb.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp libb.la $libdir/libb.la" "runpath-in-lalib.at:58" -( $at_check_trace; $LIBTOOL --mode=install cp libb.la $libdir/libb.la +$as_echo "$at_srcdir/convenience.at:224: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:224" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:58" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:224" $at_failed && at_fn_log_failure $at_traceon; } + + lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/runpath-in-lalib.at:59: \$LIBTOOL --mode=install cp m\$EXEEXT \$bindir/m\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $bindir/m$EXEEXT" "runpath-in-lalib.at:59" -( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $bindir/m$EXEEXT +$as_echo "$at_srcdir/convenience.at:225: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:225" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:59" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:225" $at_failed && at_fn_log_failure $at_traceon; } +done + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_36 +#AT_START_37 +at_fn_group_banner 37 'convenience.at:230' \ + "Java convenience archives" " " 3 +at_xfail=no +( + $as_echo "37. $at_setup_line: testing $at_desc ..." + $at_traceon + + { set +x -$as_echo "$at_srcdir/runpath-in-lalib.at:61: grep /foobar \$libdir/liba.la" -at_fn_check_prepare_dynamic "grep /foobar $libdir/liba.la" "runpath-in-lalib.at:61" -( $at_check_trace; grep /foobar $libdir/liba.la +$as_echo "$at_srcdir/convenience.at:231: { test -n \"\$GCJ\" && test \"X\$GCJ\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$GCJ\" && test \"X$GCJ\" != Xno; } || (exit 77)" "convenience.at:231" +( $at_check_trace; { test -n "$GCJ" && test "X$GCJ" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:61" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:231" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/runpath-in-lalib.at:62: grep /foobar \$libdir/libb.la" -at_fn_check_prepare_dynamic "grep /foobar $libdir/libb.la" "runpath-in-lalib.at:62" -( $at_check_trace; grep /foobar $libdir/libb.la +# There are just too many broken gcj installations out there, either missing + # libgcj.spec or unable to find it. Skip the test for them. + cat >gcj_test.java <<'_ATEOF' +public class gcj_test { + public static void main(String[] argv) { } + } +_ATEOF + + { set +x +$as_echo "$at_srcdir/convenience.at:231: \$GCJ \$GCJFLAGS -c gcj_test.java || exit 77" +at_fn_check_prepare_dynamic "$GCJ $GCJFLAGS -c gcj_test.java || exit 77" "convenience.at:231" +( $at_check_trace; $GCJ $GCJFLAGS -c gcj_test.java || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:62" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:231" $at_failed && at_fn_log_failure $at_traceon; } -# TODO: check that m gets -R, too. - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_35 -#AT_START_36 -# 36. static.at:68: static linking flags for programs -at_setup_line='static.at:68' -at_fn_banner 2 -at_desc="static linking flags for programs" -at_desc_line=" 36: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "36. static.at:68: testing ..." - $at_traceon - - +{ set +x +$as_echo "$at_srcdir/convenience.at:231: \$GCJ \$GCJFLAGS --main=gcj_test -o gcj_test\$EXEEXT gcj_test.java || exit 77" +at_fn_check_prepare_dynamic "$GCJ $GCJFLAGS --main=gcj_test -o gcj_test$EXEEXT gcj_test.java || exit 77" "convenience.at:231" +( $at_check_trace; $GCJ $GCJFLAGS --main=gcj_test -o gcj_test$EXEEXT gcj_test.java || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:231" +$at_failed && at_fn_log_failure +$at_traceon; } -LDFLAGS="$LDFLAGS -no-undefined" -prefix=`pwd`/inst -bindir=$prefix/bin -prefix1=`pwd`/inst1 -prefix2=`pwd`/inst2 -prefix3=`pwd`/inst3 -libdir1=$prefix1/lib -libdir2=$prefix2/lib -libdir3=$prefix3/lib -srcdir_broken=`pwd`/broken-src -prefix_broken=`pwd`/broken -libdir_broken=$prefix_broken/lib -bindir_broken=$prefix_broken/bin + { set +x +$as_echo "$at_srcdir/convenience.at:231: ./gcj_test\$EXEEXT || exit 77" +at_fn_check_prepare_dynamic "./gcj_test$EXEEXT || exit 77" "convenience.at:231" +( $at_check_trace; ./gcj_test$EXEEXT || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:231" +$at_failed && at_fn_log_failure +$at_traceon; } -have_static=false -have_shared=false -per_deplib=false -$LIBTOOL --features | grep 'enable static libraries' >/dev/null && have_static=: -$LIBTOOL --features | grep 'enable shared libraries' >/dev/null && have_shared=: -eval `$LIBTOOL --config | - $EGREP '^(per_deplib_(static|dynamic)_flag|shlibpath_var|link_static_flag)='` -if test -n "$per_deplib_static_flag" && test -n "$per_deplib_dynamic_flag"; then - per_deplib=: -fi -# On GNU/Linux with --disable-static, m-all-static fails to link. -# What we'd like to state here is: if the user actively passed -# --disable-static (as opposed to: the libtool.m4 macros set -# enable_static=no), then they cannot expect -all-static to work. -# So we punt, knowing that we mangle enable_static on AIX only. -can_link_all_static=-all-static -case $host_os,$have_static,$link_static_flag in - aix*) ;; - *,false,?*) can_link_all_static= ;; -esac -# Create broken libraries. They will later be moved to those -# directories where the respective libraries should be linked -# statically from. This detects both failure to link statically -# and failure to omit extraneous run paths. -mkdir $srcdir_broken $prefix_broken $libdir_broken -( - cd $srcdir_broken - echo 'int this_should_not_be_linked_against() { return 0; }' > a.c - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c - for i in 1 1dep 2 2dep 3 3dep; do - $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a.lo -rpath $libdir_broken - $LIBTOOL --mode=install cp liba$i.la $libdir_broken/liba$i.la - done -) -func_fix_path () -{ - # For w32, hardcoding cannot work, but $libdir/../bin is where binaries - # usually are installed. Since we use several prefixes for testing - # convenience -- it allows us to replace the good libraries easily with - # broken ones and vice versa -- we have to set PATH to find them. - # Since OTOH we put broken libs of all names in the "moved" prefixes, - # we have to ensure that this prefix comes last: otherwise we may link - # against a broken library but the good one would come later in the PATH. - # So we let the caller of this function set the order: the "other" two - # come first. - if test "$shlibpath_var" = PATH; then - save_PATH=$PATH - sep= - test -z "$PATH" || sep=: - PATH=${2}/bin:${3}/bin:${1}/bin$sep$PATH - fi +cat >foo1.java <foo2.java <foo3.java <A$i.java <>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:267" +$at_failed && at_fn_log_failure +$at_traceon; } - $mkdir_p "$srcdir_broken" -(cd "${1}" && find . -type d) | (cd "$srcdir_broken" && xargs $mkdir_p) -for file in `cd "${1}" && find . -type f -print -o -type l -print` -do - mv "${1}"/$file "$srcdir_broken"/$file -done -rm -rf "${1}" +{ set +x +$as_echo "$at_srcdir/convenience.at:269: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist" "convenience.at:269" +( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba123.la A3.lo liba1.la liba2.la -rpath /notexist +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:269" +$at_failed && at_fn_log_failure +$at_traceon; } - $mkdir_p "${2}" -(cd "${2}-moved" && find . -type d) | (cd "${2}" && xargs $mkdir_p) -for file in `cd "${2}-moved" && find . -type f -print -o -type l -print` -do - mv "${2}-moved"/$file "${2}"/$file -done -rm -rf "${2}-moved" - $mkdir_p "${1}" -(cd "${1}-moved" && find . -type d) | (cd "${1}" && xargs $mkdir_p) -for file in `cd "${1}-moved" && find . -type f -print -o -type l -print` -do - mv "${1}-moved"/$file "${1}"/$file -done -rm -rf "${1}-moved" +conv= +for i in 1 2 3; do + conv=$conv$i + { set +x +$as_echo "$at_srcdir/convenience.at:275: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS -static --main=foo\$i -o main_static\$EXEEXT foo\$i.lo liba\$conv.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -static --main=foo$i -o main_static$EXEEXT foo$i.lo liba$conv.la" "convenience.at:275" +( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -static --main=foo$i -o main_static$EXEEXT foo$i.lo liba$conv.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:275" +$at_failed && at_fn_log_failure +$at_traceon; } -} + { set +x +$as_echo "$at_srcdir/convenience.at:277: \$LIBTOOL --tag=GCJ --mode=link \$GCJ \$GCJFLAGS \$LDFLAGS --main=foo\$i -o main\$EXEEXT foo\$i.lo liba\$conv.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS --main=foo$i -o main$EXEEXT foo$i.lo liba$conv.la" "convenience.at:277" +( $at_check_trace; $LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS --main=foo$i -o main$EXEEXT foo$i.lo liba$conv.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:277" +$at_failed && at_fn_log_failure +$at_traceon; } -# make sure the program can be run. -func_test_exec () -{ - # On AIX without runtimelinking, this does not make sense. - if $have_static; then - echo "## The following should succeed:" - for st - do - echo "# m$st" - lt_exe=./m$st; if test -f "./m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi + lt_exe=./main_static; if test -f "./main_static$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/static.at:178: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "static.at:178" +$as_echo "$at_srcdir/convenience.at:279: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:279" ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/static.at:178" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:279" $at_failed && at_fn_log_failure $at_traceon; } - # For some per-deplib flag combinations there may be no installed program, - # because liba2 is not yet installed. - if test -f "$bindir/m${st}$EXEEXT"; then - lt_exe=$bindir/m$st; if test -f "$bindir/m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi + lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/static.at:182: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "static.at:182" +$as_echo "$at_srcdir/convenience.at:280: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "convenience.at:280" ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/static.at:182" +at_fn_check_status 0 $at_status "$at_srcdir/convenience.at:280" $at_failed && at_fn_log_failure $at_traceon; } - fi - done - fi -} - -# make sure the program cannot be run. -func_test_exec_fail () -{ - # No point in testing if we're linking statically anyway. - # TODO: Maybe in the `else' case we could test for success? - if $have_shared; then - echo "## The following should fail:" - for st - do - echo "# m$st" - lt_exe=./m$st; if test -f "./m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/static.at:198: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "static.at:198" -( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/static.at:198" -$at_failed && at_fn_log_failure -$at_traceon; } - +done + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_37 +#AT_START_38 +at_fn_group_banner 38 'link-order.at:26' \ + "Link order test" " " 3 +at_xfail=no +( + $as_echo "38. $at_setup_line: testing $at_desc ..." + $at_traceon - # For some per-deplib flag combinations there may be no installed program, - # because liba2 is not yet installed. - if test -f "$bindir/m${st}$EXEEXT"; then - lt_exe=$bindir/m$st; if test -f "$bindir/m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/static.at:202: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "static.at:202" -( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/static.at:202" -$at_failed && at_fn_log_failure -$at_traceon; } +eval `$LIBTOOL --config | $EGREP '^(hardcode_direct|hardcode_direct_absolute|shrext_cmds)='` +LDFLAGS="$LDFLAGS -no-undefined" - fi - done - fi -} +module=no +eval shared_ext=\"$shrext_cmds\" +prefix_old=`pwd`/old +prefix_new=`pwd`/new +mkdir src $prefix_old $prefix_new $prefix_old/lib $prefix_new/lib -# Try three independent libraries, -# one installed libtool library, -# one uninstalled libtool library, -# one non-libtool library, -# the libtool libraries each having a dependency, or not. -# Try both an uninstalled and the corresponding installed program. +cat >src/c.c <<'_ATEOF' +int c = 1; +_ATEOF -for withdep in no yes; do - echo - echo "### libraries with dependencies: $withdep" - rm -rf src $prefix $prefix1 $prefix2 $prefix3 - mkdir src $prefix $bindir $prefix1 $prefix2 $prefix3 - cd src - ### build the libraries. - for i in 1 2 3; do - eval ldir=\$libdir$i - mkdir a$i $ldir - cd a$i - case $withdep,$i in - no,* | yes,3) - echo "int a$i() { return 0; }" > a$i.c - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c - $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a$i.lo -rpath $ldir - ;; - *) - echo "int a${i}dep() { return 0; }" > a${i}dep.c - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a${i}dep.c - $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba${i}dep.la a${i}dep.lo -rpath $ldir - echo "extern int a${i}dep(); int a$i() { return a${i}dep(); }" > a$i.c - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c - $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a$i.lo -rpath $ldir ./liba${i}dep.la - ;; - esac - cd .. - done +$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c src/c.c -o src/c.lo +$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/libcee.la src/c.lo -rpath $prefix_old/lib +$LIBTOOL --mode=install cp src/libcee.la $prefix_old/lib/libcee.la - ### install the libraries. - test "$withdep" = yes && $LIBTOOL --mode=install cp a1/liba1dep.la $libdir1/liba1dep.la - $LIBTOOL --mode=install cp a1/liba1.la $libdir1/liba1.la - $LIBTOOL --mode=install cp a3/liba3.la $libdir3/liba3.la - $LIBTOOL --mode=clean rm -f a1/liba1.la a3/liba3.la - test "$withdep" = yes && $LIBTOOL --mode=clean rm -f a1/liba1dep.la - # simulate a non-libtool lib: - rm -f $libdir3/liba3.la +for i in old new; do + rm -rf src + mkdir src + cat >src/a_$i.c < m.c - $CC $CPPFLAGS $CFLAGS -c m.c + cat >src/b_$i.c <>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/static.at:263" +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:87" $at_failed && at_fn_log_failure $at_traceon; } - done +done - # per-deplib static/shared flags. - # also try a bit redundant flags, and shuffled order (for run paths check). - if $per_deplib; then - { set +x -$as_echo "$at_srcdir/static.at:271: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m1\$EXEEXT m.\$OBJEXT \\ - -L\$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la -L\$libdir3 -R\$libdir3 -la3" -at_fn_check_prepare_notrace 'an embedded newline' "static.at:271" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m1$EXEEXT m.$OBJEXT \ - -L$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la -L$libdir3 -R$libdir3 -la3 -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/static.at:271" -$at_failed && at_fn_log_failure -$at_traceon; } +$LIBTOOL --mode=clean rm -f src/libb.la +$LIBTOOL --mode=clean rm -f src/liba.la +case $host_os in +aix* | interix*) ;; # These systems have different path syntax +*) + # Do not error if we do not relink (e.g. static-only systems) + case $hardcode_direct$hardcode_direct_absolute in + yesno) { set +x -$as_echo "$at_srcdir/static.at:274: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m2\$EXEEXT m.\$OBJEXT \\ - -L\$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic -L\$libdir3 -R\$libdir3 -la3" -at_fn_check_prepare_notrace 'an embedded newline' "static.at:274" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT \ - -L$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic -L$libdir3 -R$libdir3 -la3 +$as_echo "$at_srcdir/link-order.at:100: if \$EGREP relinking stderr; then + \$EGREP \" .*\\/new\\/lib/libb\$shared_ext .*\\/old\\/lib/libcee\$shared_ext\" stdout + else :; fi" +at_fn_check_prepare_notrace 'an embedded newline' "link-order.at:100" +( $at_check_trace; if $EGREP relinking stderr; then + $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" stdout + else :; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/static.at:274" +at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:100" +if $at_failed; then : + echo "wrong link order" +fi $at_failed && at_fn_log_failure $at_traceon; } + ;; + *) { set +x -$as_echo "$at_srcdir/static.at:277: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m3\$EXEEXT m.\$OBJEXT \\ - -L\$libdir1 -la1 a2/liba2.la -L\$libdir3 -Bstatic -la3 -Bdynamic" -at_fn_check_prepare_notrace 'an embedded newline' "static.at:277" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m3$EXEEXT m.$OBJEXT \ - -L$libdir1 -la1 a2/liba2.la -L$libdir3 -Bstatic -la3 -Bdynamic +$as_echo "$at_srcdir/link-order.at:105: if \$EGREP relinking stderr; then + \$EGREP \" -L.*\\/new\\/lib -lb -L.*\\/old\\/lib -lcee\" stdout + else :; fi" +at_fn_check_prepare_notrace 'an embedded newline' "link-order.at:105" +( $at_check_trace; if $EGREP relinking stderr; then + $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout + else :; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/static.at:277" +at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:105" +if $at_failed; then : + echo "wrong link order" +fi $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/static.at:280: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m12\$EXEEXT m.\$OBJEXT \\ - -L\$libdir1 -Bstatic -la1 a2/liba2.la -Bdynamic -L\$libdir3 -R\$libdir3 -la3" -at_fn_check_prepare_notrace 'an embedded newline' "static.at:280" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m12$EXEEXT m.$OBJEXT \ - -L$libdir1 -Bstatic -la1 a2/liba2.la -Bdynamic -L$libdir3 -R$libdir3 -la3 + ;; + esac + ;; +esac + +for i in old new; do + cat >src/main_$i.c <>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/static.at:280" +at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:121" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/static.at:283: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m13\$EXEEXT m.\$OBJEXT \\ - -L\$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la \\ - -L\$libdir3 -Bstatic -la3 -Bdynamic" -at_fn_check_prepare_notrace 'an embedded newline' "static.at:283" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m13$EXEEXT m.$OBJEXT \ - -L$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la \ - -L$libdir3 -Bstatic -la3 -Bdynamic + lt_exe=src/main_$i; if test -f "src/main_$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/link-order.at:123: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order.at:123" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/static.at:283" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link-order.at:123" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/static.at:287: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m31\$EXEEXT m.\$OBJEXT \\ - -L\$libdir3 -Bstatic -la3 -Bdynamic a2/liba2.la \\ - -L\$libdir1 -Bstatic -la1 -Bdynamic" -at_fn_check_prepare_notrace 'an embedded newline' "static.at:287" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m31$EXEEXT m.$OBJEXT \ - -L$libdir3 -Bstatic -la3 -Bdynamic a2/liba2.la \ - -L$libdir1 -Bstatic -la1 -Bdynamic + +done + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_38 +#AT_START_39 +at_fn_group_banner 39 'link-order2.at:46' \ + "Link order of deplibs" " " 3 +at_xfail=no +( + $as_echo "39. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|allow_undefined_flag)='` + +undefined_setting=-no-undefined +shared_fails=no +case $host_os,$LDFLAGS,$allow_undefined_flag in +aix*,*-brtl*,*) ;; +aix*) shared_fails=yes ;; +darwin*,*,*-flat_namespace*) undefined_setting= ;; +darwin*,*,*) shared_fails=yes ;; +esac + +deflibdir=`pwd`/lib +defbindir=`pwd`/lib +libdir=`pwd`/inst/lib +bindir=`pwd`/inst/bin +mkdir bin lib inst inst/bin inst/lib +LDFLAGS="$LDFLAGS $undefined_setting -L$deflibdir" + +cat >a0.c <<\EOF +int a (void) { return 1; } +EOF + +cat >a1.c <<\EOF +int a (void) { return 0; } +EOF + +cat >b.c <<\EOF +int a (void); +int b (void) { return a (); } +EOF + +cat >main.c <<\EOF +#include +extern int a (void); +extern int b (void); +int main (void) +{ + return !(a () + b () == 0); +} +EOF + +for file in a0 a1 b; do + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c +done +$CC $CPPFLAGS $CFLAGS -c main.c + +# Build an old, installed library. +$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba0.la a0.lo -rpath $deflibdir +$LIBTOOL --mode=install cp liba0.la $deflibdir/liba0.la +$LIBTOOL --mode=clean rm -f liba0.la + +for type_of_depdepl in libtool non-libtool; do + echo "type of depdepl: $type_of_depdepl" + if test $type_of_depdepl = non-libtool; then + # Simulate a non-Libtool system library. + rm $deflibdir/liba1.la + addpath=$deflibdir + if test "$shlibpath_var" = PATH; then + addpath=$defbindir + fi + sep= + eval test -n \"\$$shlibpath_var\" && sep=: + eval $shlibpath_var='$addpath$sep$'$shlibpath_var + export $shlibpath_var + fi + for static in '' -static-libtool-libs; do + case `$LIBTOOL --features` in + *disable\ static\ libraries*) test "$static" = '' || continue;; + esac + test "$type_of_depdepl,$static" = "non-libtool,-static-libtool-libs" && + static=-all-static + $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o liba1.la a1.lo -rpath $libdir + $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o libb.la b.lo liba1.la -rpath $libdir + { set +x +$as_echo "$at_srcdir/link-order2.at:123: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$static -o main\$EXEEXT main.\$OBJEXT libb.la -la0" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0" "link-order2.at:123" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o main$EXEEXT main.$OBJEXT libb.la -la0 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/static.at:287" +at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:123" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/static.at:291: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m23\$EXEEXT m.\$OBJEXT \\ - -L\$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic \\ - -L\$libdir3 -Bstatic -la3 -Bdynamic" -at_fn_check_prepare_notrace 'an embedded newline' "static.at:291" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m23$EXEEXT m.$OBJEXT \ - -L$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic \ - -L$libdir3 -Bstatic -la3 -Bdynamic + lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/link-order2.at:125: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order2.at:125" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/static.at:291" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:125" $at_failed && at_fn_log_failure $at_traceon; } + + # Now test that if we reverse the link order, the program fails. { set +x -$as_echo "$at_srcdir/static.at:295: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m123\$EXEEXT m.\$OBJEXT \\ - -L\$libdir1 -Bstatic -la1 a2/liba2.la -L\$libdir3 -la3 -Bdynamic" -at_fn_check_prepare_notrace 'an embedded newline' "static.at:295" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123$EXEEXT m.$OBJEXT \ - -L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3 -Bdynamic +$as_echo "$at_srcdir/link-order2.at:127: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$static -o wrong\$EXEEXT main.\$OBJEXT -la0 libb.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la" "link-order2.at:127" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $static -o wrong$EXEEXT main.$OBJEXT -la0 libb.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/static.at:295" +at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:127" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/static.at:298: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m123a\$EXEEXT m.\$OBJEXT \\ - -L\$libdir1 -Bstatic -la1 -Bdynamic -Bstatic a2/liba2.la -Bdynamic \\ - -Bstatic -L\$libdir3 -la3 -Bdynamic" -at_fn_check_prepare_notrace 'an embedded newline' "static.at:298" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123a$EXEEXT m.$OBJEXT \ - -L$libdir1 -Bstatic -la1 -Bdynamic -Bstatic a2/liba2.la -Bdynamic \ - -Bstatic -L$libdir3 -la3 -Bdynamic + if test $shared_fails,$static != yes,; then + lt_exe=./wrong; if test -f "./wrong$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/link-order2.at:130: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order2.at:130" +( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/static.at:298" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/link-order2.at:130" $at_failed && at_fn_log_failure $at_traceon; } - fi - ### install the programs. - # We can't install any program that links dynamically against liba2. - for st in -static -static-libtool-libs $can_link_all_static `$per_deplib && echo 2 12 23 123 123a`; do - echo "# m$st" - { set +x -$as_echo "$at_srcdir/static.at:312: \$LIBTOOL --mode=install cp m\${st}\$EXEEXT \$bindir/m\${st}\$EXEEXT" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "static.at:312" -( $at_check_trace; $LIBTOOL --mode=install cp m${st}$EXEEXT $bindir/m${st}$EXEEXT + fi + + $LIBTOOL --mode=install cp liba1.la $libdir/liba1.la + $LIBTOOL --mode=install cp libb.la $libdir/libb.la + $LIBTOOL --mode=install cp main$EXEEXT $bindir/main$EXEEXT + $LIBTOOL --mode=install cp wrong$EXEEXT $bindir/wrong$EXEEXT + $LIBTOOL --mode=clean rm -f liba1.la libb.la + lt_exe=$bindir/main; if test -f "$bindir/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/link-order2.at:138: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order2.at:138" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/static.at:312" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:138" $at_failed && at_fn_log_failure $at_traceon; } - if $have_static; then - { set +x -$as_echo "$at_srcdir/static.at:314: \$EGREP 'relinking|has not been installed' stderr" -at_fn_check_prepare_dynamic "$EGREP 'relinking|has not been installed' stderr" "static.at:314" -( $at_check_trace; $EGREP 'relinking|has not been installed' stderr + + if test $shared_fails,$static != yes,; then + lt_exe=$bindir/wrong; if test -f "$bindir/wrong$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/link-order2.at:140: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "link-order2.at:140" +( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/static.at:314" +at_fn_check_status 1 $at_status "$at_srcdir/link-order2.at:140" $at_failed && at_fn_log_failure $at_traceon; } + fi done +done +{ set +x +$as_echo "$at_srcdir/link-order2.at:145: test \$shared_fails = no || (exit 77)" +at_fn_check_prepare_dynamic "test $shared_fails = no || (exit 77)" "link-order2.at:145" +( $at_check_trace; test $shared_fails = no || (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/link-order2.at:145" +$at_failed && at_fn_log_failure +$at_traceon; } - ### Run each program once so that relinking has happened. - - func_fix_path $prefix1 $prefix2 $prefix3 - func_test_exec -static -static-libtool-libs -all-static `$per_deplib && echo 1 2 3 12 13 23 31 123 123a` - func_restore_path - - # For each library: - # - remove the library images to catch failure to link statically/dynamically, - # - add false other deplibs in the paths to catch (some) wrongly added run paths. - - # if -all-static does not work, do not exercise it any more. - all_static=-all-static - test -z "$link_static_flag" && all_static= - - echo "### test whether installed libtool library liba2 was linked statically" - func_move_libs a2 $prefix2 $prefix3 $prefix1 - func_test_exec -static -static-libtool-libs $all_static `$per_deplib && echo 2 12 23 123 123a` - $per_deplib && func_test_exec_fail 1 3 13 31 - func_restore_libs a2 $prefix2 - - echo "### test whether uninstalled libtool library liba1 was linked statically" - func_move_libs a1 $prefix1 $prefix2 $prefix3 - func_test_exec -static-libtool-libs $all_static `$per_deplib && echo 1 12 13 31 123 123a` - $per_deplib && func_test_exec_fail -static 2 3 23 - func_restore_libs a1 $prefix1 - - echo "### test whether non-libtool library liba3 was linked statically" - func_move_libs a3 $prefix3 $prefix1 $prefix2 - func_test_exec $all_static `$per_deplib && echo 3 13 23 31 123 123a` - func_test_exec_fail -static -static-libtool-libs `$per_deplib && echo 1 2 12` - func_restore_libs a3 $prefix3 - cd .. -done +# Now the converse: if both the program and the library need libm, then +# it needs to be sorted last. (TODO) set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_36 -#AT_START_37 -# 37. static.at:358: ccache -all-static -at_setup_line='static.at:358' -at_fn_banner 2 -at_desc="ccache -all-static" -at_desc_line=" 37: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_39 +#AT_START_40 +at_fn_group_banner 40 'fail.at:27' \ + "Failure tests" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "37. static.at:358: testing ..." + $as_echo "40. $at_setup_line: testing $at_desc ..." $at_traceon -cat >ccache <<'_ATEOF' -#! /bin/sh -# poor man's ccache clone -case $1 in --*) echo "bogus argument: $1" >&2; exit 1 ;; -esac -exec "$@" -_ATEOF +eval `$LIBTOOL --config | $EGREP '^(pic_mode|pic_flag|build_old_libs|build_libtool_libs)='` +LDFLAGS="$LDFLAGS -no-undefined" -chmod +x ./ccache -cat >a.c <<'_ATEOF' -int main(void) { return 0; } -_ATEOF +cat >script <<'_ATEOF' +#! /bin/sh +exit 0 +_ATEOF + +chmod +x script +if test -x script >/dev/null 2>&1; then + test_x="test -x" +else + test_x=: +fi +# compile failure +echo 'choke me' > a.c { set +x -$as_echo "$at_srcdir/static.at:374: \$CC \$CPPFLAGS \$CFLAGS -c a.c" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c a.c" "static.at:374" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c a.c +$as_echo "$at_srcdir/fail.at:49: if \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c; then (exit 1); else :; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c; then (exit 1); else :; fi" "fail.at:49" +( $at_check_trace; if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c; then (exit 1); else :; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/static.at:374" +at_fn_check_status 0 $at_status "$at_srcdir/fail.at:49" $at_failed && at_fn_log_failure $at_traceon; } + { set +x -$as_echo "$at_srcdir/static.at:375: \$LIBTOOL --mode=link --tag=CC ./ccache \$CC \$CFLAGS \$LDFLAGS -all-static a.\$OBJEXT -o a\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC ./ccache $CC $CFLAGS $LDFLAGS -all-static a.$OBJEXT -o a$EXEEXT" "static.at:375" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC ./ccache $CC $CFLAGS $LDFLAGS -all-static a.$OBJEXT -o a$EXEEXT +$as_echo "$at_srcdir/fail.at:50: test -f a.lo" +at_fn_check_prepare_trace "fail.at:50" +( $at_check_trace; test -f a.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/static.at:375" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/fail.at:50" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_37 -#AT_START_38 -# 38. export.at:25: Export test -at_setup_line='export.at:25' -at_fn_banner 2 -at_desc="Export test" -at_desc_line=" 38: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "38. export.at:25: testing ..." - $at_traceon - +# non-PIC compile failure +case $pic_mode in default | no) + case " $CFLAGS " in + *\ -prefer-pic\ *) ;; + *) + case $build_old_libs,$pic_flag in yes,*-DPIC*) + cat >a.c <<'_ATEOF' +#ifndef PIC + choke me +#endif +_ATEOF -{ set +x -$as_echo "$at_srcdir/export.at:28: \$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)" -at_fn_check_prepare_dynamic "$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)" "export.at:28" -( $at_check_trace; $LIBTOOL --features | grep 'disable shared libraries' && (exit 77) + { set +x +$as_echo "$at_srcdir/fail.at:63: if \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi" "fail.at:63" +( $at_check_trace; if $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c a.c; then (exit 1); else :; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/export.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/fail.at:63" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/export.at:30: eval \`\$LIBTOOL --config | sed -n '/^archive_expsym_cmds=/,/^\$/p'\` - test -n \"\$archive_expsym_cmds\" || echo false >can-hide - case \$archive_expsym_cmds in - *-retain-symbols-file*) echo false >can-hide ;; - esac" -at_fn_check_prepare_notrace 'a `...` command substitution' "export.at:30" -( $at_check_trace; eval `$LIBTOOL --config | sed -n '/^archive_expsym_cmds=/,/^$/p'` - test -n "$archive_expsym_cmds" || echo false >can-hide - case $archive_expsym_cmds in - *-retain-symbols-file*) echo false >can-hide ;; - esac + + { set +x +$as_echo "$at_srcdir/fail.at:64: test -f a.lo" +at_fn_check_prepare_trace "fail.at:64" +( $at_check_trace; test -f a.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/export.at:30" +at_fn_check_status 1 $at_status "$at_srcdir/fail.at:64" $at_failed && at_fn_log_failure $at_traceon; } -can_hide=: -test -s can-hide && can_hide=false - -LDFLAGS="$LDFLAGS -no-undefined" -libdir=`pwd`/inst/lib -mkdir inst inst/lib - -cat >a.c <<'_ATEOF' -/* all kinds of data items */ -#ifdef __cplusplus -extern "C" { -#endif - -int v1; -static int v2; -int v3 = 0; -int v4 = 1; -extern const int v5, v6; -extern const char *v7; -extern const char v8[]; -extern int (*const v12) (void); -const int v5 = 0; -const int v6 = 1; -const char* v7 = "\01foo"; -const char v8[] = "\01bar"; -int v9(void) { return v2 + 1; } -int (*v10) (void); -int (*v11) (void) = v9; -int (*const v12) (void) = v9; - -typedef struct { int arr[1000]; } large; -large v13; -large v14 = { { 0 } }; -large v15 = { { 1 } }; - -int w1 (void) { return 0; } - -#ifdef __cplusplus -} -#endif -_ATEOF - - -cat >asyms <<'_ATEOF' -v1 -v3 -v4 -v5 -v6 -v7 -v8 -v9 -v10 -v11 -v12 -v13 -v14 -v15 -_ATEOF - - -cat >main.c <<'_ATEOF' - -#if defined(LIBA_DLL_IMPORT) -# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) -# define LIBA_SCOPE extern __declspec(dllimport) -# endif -#endif -#if !defined(LIBA_SCOPE) -# define LIBA_SCOPE extern -#endif -#ifdef __cplusplus -extern "C" { -#endif -extern int v1; -extern int v3, v4; -LIBA_SCOPE const int v5, v6; -extern const char* v7; -extern const char v8[]; -extern int v9(void); -extern int (*v10) (void); -extern int (*v11) (void); -LIBA_SCOPE int (*const v12) (void); -#ifdef __cplusplus -} -#endif - -typedef struct { int arr[1000]; } large; -extern large v13, v14, v15; - -int main (void) -{ - char s = v7[0] + v8[0]; - return s + v1 + v3 + v4 + v5 + v6 + v9() + v11() + v12() - + v13.arr[0] + v14.arr[0] + v15.arr[0] - - 8; -} -_ATEOF - - -cat >broken.c <<'_ATEOF' + ;; + esac + ;; + esac + ;; +esac -/* these symbols should not be exported */ -#ifdef __cplusplus -extern "C" { -#endif -extern int w1 (void); -#ifdef __cplusplus -} -#endif +# program creation failure. +# We can't rely on `main' not being present: the QNX linker +# won't error out in that case, although the resulting binary won't work. +# So we provoke a link failure due to an unresolved symbol, and require +# libtool to fail only if the link without libtool would have failed, too. +cat > a.c <<'EOF' +extern int nonexistent_function (void); int main (void) { - return w1 (); + return nonexistent_function (); } -_ATEOF - - -{ set +x -$as_echo "$at_srcdir/export.at:148: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c" "export.at:148" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c +EOF +$CC $CPPFLAGS $CFLAGS -c a.c +if $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then :; else + rm -f a a$EXEEXT + { set +x +$as_echo "$at_srcdir/fail.at:87: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o a\$EXEEXT a.\$OBJEXT; then (exit 1); else :; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then (exit 1); else :; fi" "fail.at:87" +( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT; then (exit 1); else :; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/export.at:148" +at_fn_check_status 0 $at_status "$at_srcdir/fail.at:87" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/export.at:149: \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c main.c" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c" "export.at:149" -( $at_check_trace; $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c + + { set +x +$as_echo "$at_srcdir/fail.at:88: { test -f a && \$test_x a; } || { test -f a\$EXEEXT && \$test_x a\$EXEEXT; }" +at_fn_check_prepare_dynamic "{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }" "fail.at:88" +( $at_check_trace; { test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; } ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/export.at:149" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/fail.at:88" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/export.at:150: \$CC \$CPPFLAGS \$CFLAGS -c broken.c" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c broken.c" "export.at:150" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c broken.c + { set +x +$as_echo "$at_srcdir/fail.at:89: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o a\$EXEEXT a.\$OBJEXT -static; then (exit 1); else :; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT -static; then (exit 1); else :; fi" "fail.at:89" +( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a$EXEEXT a.$OBJEXT -static; then (exit 1); else :; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/export.at:150" +at_fn_check_status 0 $at_status "$at_srcdir/fail.at:89" $at_failed && at_fn_log_failure $at_traceon; } -for exportsyms in '' '-export-symbols-regex "v.*"' '-export-symbols asyms' -do - # case 1: shared library built from object. - echo "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo \\ - -rpath $libdir' $exportsyms"; { set +x -$as_echo "$at_srcdir/export.at:155: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo \\ - -rpath \$libdir' \$exportsyms" -at_fn_check_prepare_notrace 'an embedded newline' "export.at:155" -( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo \ - -rpath $libdir' $exportsyms + { set +x +$as_echo "$at_srcdir/fail.at:90: { test -f a && \$test_x a; } || { test -f a\$EXEEXT && \$test_x a\$EXEEXT; }" +at_fn_check_prepare_dynamic "{ test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; }" "fail.at:90" +( $at_check_trace; { test -f a && $test_x a; } || { test -f a$EXEEXT && $test_x a$EXEEXT; } ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/export.at:155" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/fail.at:90" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/export.at:157: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la" "export.at:157" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la +fi + +# shared library creation failure +case $build_libtool_libs in yes) + echo 'int duplicate_name(void) { return 0; }' > a.c + echo 'double duplicate_name(double x) { return 2.*x; }' > b.c + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c + # Unfortunately, this may actually succeed on AIX and IRIX :( + # So, also add a bogus object file to provoke more failure. + echo 'int whatever(void) { return 0;}' > c.c + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c.c + ( + . ./c.lo + test "$pic_object" != none && echo choke me >"$pic_object" + test "$non_pic_object" != none && echo choke me >"$non_pic_object" + ) + { set +x +$as_echo "$at_srcdir/fail.at:108: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi" "fail.at:108" +( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo b.lo c.lo -rpath /foo; then (exit 1); else :; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/export.at:157" +at_fn_check_status 0 $at_status "$at_srcdir/fail.at:108" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/export.at:159: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "export.at:159" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + + { set +x +$as_echo "$at_srcdir/fail.at:109: test -f liba.la" +at_fn_check_prepare_trace "fail.at:109" +( $at_check_trace; test -f liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/export.at:159" +at_fn_check_status 1 $at_status "$at_srcdir/fail.at:109" $at_failed && at_fn_log_failure $at_traceon; } + ;; +esac - if test -n "$exportsyms" && $can_hide; then - { set +x -$as_echo "$at_srcdir/export.at:161: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o broken\$EXEEXT broken.\$OBJEXT liba.la - then (exit 1); else :; fi" -at_fn_check_prepare_notrace 'an embedded newline' "export.at:161" -( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o broken$EXEEXT broken.$OBJEXT liba.la - then (exit 1); else :; fi +# Ensure we diagnose '-L path'. +echo 'int main () { return 0; }' > d.c +echo 'int foo () { return 0; }' > space-after-L.c +$CC $CPPFLAGS $CFLAGS -c d.c +$CC $CPPFLAGS $CFLAGS -c space-after-L.c +{ set +x +$as_echo "$at_srcdir/fail.at:118: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -L space-after-L.\$OBJEXT -o d\$EXEEXT d.\$OBJEXT; then (exit 1); else :; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -L space-after-L.$OBJEXT -o d$EXEEXT d.$OBJEXT; then (exit 1); else :; fi" "fail.at:118" +( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -L space-after-L.$OBJEXT -o d$EXEEXT d.$OBJEXT; then (exit 1); else :; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/export.at:161" +at_fn_check_status 0 $at_status "$at_srcdir/fail.at:118" $at_failed && at_fn_log_failure $at_traceon; } - fi - # case 2: shared library built from convenience archive. - { set +x -$as_echo "$at_srcdir/export.at:166: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libconv.la a.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libconv.la a.lo" "export.at:166" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libconv.la a.lo +{ set +x +$as_echo "$at_srcdir/fail.at:119: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o d\$EXEEXT d.\$OBJEXT -L; then (exit 1); else :; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o d$EXEEXT d.$OBJEXT -L; then (exit 1); else :; fi" "fail.at:119" +( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o d$EXEEXT d.$OBJEXT -L; then (exit 1); else :; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/export.at:166" +at_fn_check_status 0 $at_status "$at_srcdir/fail.at:119" $at_failed && at_fn_log_failure $at_traceon; } - echo "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la libconv.la \\ - -rpath $libdir' $exportsyms"; { set +x -$as_echo "$at_srcdir/export.at:168: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la libconv.la \\ - -rpath \$libdir' \$exportsyms" -at_fn_check_prepare_notrace 'an embedded newline' "export.at:168" -( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la libconv.la \ - -rpath $libdir' $exportsyms + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_40 +#AT_START_41 +at_fn_group_banner 41 'shlibpath.at:25' \ + "shlibpath_overrides_runpath" " " 3 +at_xfail=no +( + $as_echo "41. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +mkdir sub sub/lib sub/bin +echo 'int a () { return 0; }' > a.c +echo 'extern int a (); int main () { return a(); }' > m.c +$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c +$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath `pwd`/sub/lib +$LIBTOOL --mode=install cp liba.la `pwd`/sub/lib/liba.la +$LIBTOOL --mode=clean rm -f liba.la +rm -f sub/lib/liba.la + +$CC $CPPFLAGS $CFLAGS -c m.c +{ set +x +$as_echo "$at_srcdir/shlibpath.at:38: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m\$EXEEXT m.\$OBJEXT -Lsub/lib -la -R\`pwd\`/sub/lib" +at_fn_check_prepare_notrace 'a `...` command substitution' "shlibpath.at:38" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT -Lsub/lib -la -R`pwd`/sub/lib ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/export.at:168" +at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:38" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/export.at:170: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la" "export.at:170" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la +{ set +x +$as_echo "$at_srcdir/shlibpath.at:40: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m2\$EXEEXT m.\$OBJEXT -Lsub/lib -la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT -Lsub/lib -la" "shlibpath.at:40" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT -Lsub/lib -la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/export.at:170" +at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:40" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/export.at:172: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "export.at:172" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/export.at:172" -$at_failed && at_fn_log_failure -$at_traceon; } +$mkdir_p moved +(cd sub && find . -type d) | (cd moved && xargs $mkdir_p) +for file in `cd sub && find . -type f -print -o -type l -print` +do + mv sub/$file moved/$file +done +rm -rf sub + +mkdir sub sub/lib sub/bin +echo 'int wrong_lib () { return 0; }' > a.c +$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c +$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath `pwd`/sub/lib +$LIBTOOL --mode=install cp liba.la `pwd`/sub/lib/liba.la +$LIBTOOL --mode=clean rm -f liba.la - if test -n "$exportsyms" && $can_hide; then - { set +x -$as_echo "$at_srcdir/export.at:174: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o broken\$EXEEXT broken.\$OBJEXT liba.la - then (exit 1); else :; fi" -at_fn_check_prepare_notrace 'an embedded newline' "export.at:174" -( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o broken$EXEEXT broken.$OBJEXT liba.la - then (exit 1); else :; fi +eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|shlibpath_overrides_runpath)='` + +# No point checking a system with static libraries: +lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/shlibpath.at:54: if \"\$lt_exe\" || exit 1 && exit 77; then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" || exit 1 && exit 77; then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "shlibpath.at:54" +( $at_check_trace; if "$lt_exe" || exit 1 && exit 77; then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/export.at:174" +at_fn_check_status 1 $at_status "$at_srcdir/shlibpath.at:54" $at_failed && at_fn_log_failure $at_traceon; } - fi -done + +if test "$shlibpath_var" = PATH; then + addpath=`pwd`/moved/bin +else + addpath=`pwd`/moved/lib +fi +sep= +eval test -n \"\$$shlibpath_var\" && sep=: +eval $shlibpath_var='$addpath$sep$'$shlibpath_var +export $shlibpath_var +if test "$shlibpath_overrides_runpath" != no; then + lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/export.at:179: \$can_hide || (exit 77)" -at_fn_check_prepare_dynamic "$can_hide || (exit 77)" "export.at:179" -( $at_check_trace; $can_hide || (exit 77) +$as_echo "$at_srcdir/shlibpath.at:66: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "shlibpath.at:66" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/export.at:179" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:66" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_38 -#AT_START_39 -# 39. search-path.at:25: sys_lib_search_path -at_setup_line='search-path.at:25' -at_fn_banner 2 -at_desc="sys_lib_search_path" -at_desc_line=" 39: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "39. search-path.at:25: testing ..." - $at_traceon - - -LDFLAGS="$LDFLAGS -no-undefined" - -cat >main.c <<'_ATEOF' -extern -#ifdef __cplusplus -"C" -#endif -int inflate (); -int main() -{ - return inflate (); -} -_ATEOF - - -$CC $CPPFLAGS $CFLAGS -c main.c -eval `$LIBTOOL --config | $EGREP '^(sys_lib_search_path_spec)='` -eval sys_lib_search_path=\"$sys_lib_search_path_spec\" -no_libz=: -for path in $sys_lib_search_path; do - if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -L$path -lz - then - { set +x -$as_echo "$at_srcdir/search-path.at:48: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -lz" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -lz" "search-path.at:48" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -lz +else + lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/shlibpath.at:68: if \"\$lt_exe\" || exit 1; then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" || exit 1; then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "shlibpath.at:68" +( $at_check_trace; if "$lt_exe" || exit 1; then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/search-path.at:48" +at_fn_check_status 1 $at_status "$at_srcdir/shlibpath.at:68" $at_failed && at_fn_log_failure $at_traceon; } - no_libz=false - break - fi -done -# If -lz doesn't exist (hello, cross compiler!), we need a dummy test. -if $no_libz; then - { set +x -$as_echo "$at_srcdir/search-path.at:57: exit 77" -at_fn_check_prepare_trace "search-path.at:57" -( $at_check_trace; exit 77 +fi +# Test that shlibpath_var is effective in adding paths at all: +lt_exe=./m2; if test -f "./m2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/shlibpath.at:71: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "shlibpath.at:71" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/search-path.at:57" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/shlibpath.at:71" $at_failed && at_fn_log_failure $at_traceon; } -fi + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_39 -#AT_START_40 -# 40. indirect_deps.at:25: indirect convenience -at_setup_line='indirect_deps.at:25' -at_fn_banner 2 -at_desc="indirect convenience" -at_desc_line=" 40: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_41 +#AT_START_42 +at_fn_group_banner 42 'runpath-in-lalib.at:25' \ + "Runpath in libtool library files" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "40. indirect_deps.at:25: testing ..." + $as_echo "42. $at_setup_line: testing $at_desc ..." $at_traceon cat >a.c <<'_ATEOF' - -#include int a () { return 0; } -double ad (double x) { return sin (x); } _ATEOF cat >b.c <<'_ATEOF' - extern int a (); -extern double ad (double); -int b () { return a () + (int) ad (0.0); } +int b () { return a (); } _ATEOF -cat >c.c <<'_ATEOF' - +cat >m.c <<'_ATEOF' extern int b (); -int c () { return b (); } +int main () { return b (); } _ATEOF -cat >m.c <<'_ATEOF' -extern int c (); -int main () { return c (); } -_ATEOF +instdir=`pwd`/inst +libdir=$instdir/lib +bindir=$instdir/bin +addrunpath=`pwd`/foobar +mkdir $instdir $libdir $bindir -LDFLAGS="$LDFLAGS -no-undefined" -for file in a.c b.c c.c; do - $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c $file +for file in a.c b.c; do + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file done $CC $CPPFLAGS $CFLAGS -c m.c - -# liba is an indirect dependency of libd and of libconv. -$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath /nowhere -lm -$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libb.la b.lo liba.la -rpath /nowhere -$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la c.lo libb.la -$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libd.la libconv.la -rpath /nowhere - -for st in '' -static; do - { set +x -$as_echo "$at_srcdir/indirect_deps.at:60: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m1\$EXEEXT m.\$OBJEXT libd.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m.$OBJEXT libd.la" "indirect_deps.at:60" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m.$OBJEXT libd.la +{ set +x +$as_echo "$at_srcdir/runpath-in-lalib.at:51: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -rpath \$libdir -R\$addrunpath" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir -R$addrunpath" "runpath-in-lalib.at:51" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir -R$addrunpath ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:60" +at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:51" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/indirect_deps.at:62: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m2\$EXEEXT m.\$OBJEXT libconv.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m.$OBJEXT libconv.la" "indirect_deps.at:62" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m.$OBJEXT libconv.la +{ set +x +$as_echo "$at_srcdir/runpath-in-lalib.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la b.lo -rpath \$libdir liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir liba.la" "runpath-in-lalib.at:53" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:62" +at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:53" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./m1; if test -f "./m1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/indirect_deps.at:64: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "indirect_deps.at:64" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/runpath-in-lalib.at:55: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m\$EXEEXT m.\$OBJEXT libb.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT libb.la" "runpath-in-lalib.at:55" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT libb.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:64" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:55" $at_failed && at_fn_log_failure $at_traceon; } - - lt_exe=./m2; if test -f "./m2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/indirect_deps.at:65: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "indirect_deps.at:65" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:65" -$at_failed && at_fn_log_failure -$at_traceon; } - - -done - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_40 -#AT_START_41 -# 41. indirect_deps.at:71: indirect uninstalled -at_setup_line='indirect_deps.at:71' -at_fn_banner 2 -at_desc="indirect uninstalled" -at_desc_line=" 41: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "41. indirect_deps.at:71: testing ..." - $at_traceon - - - -cat >a.c <<'_ATEOF' - -int a () { return 0; } -_ATEOF - -cat >b.c <<'_ATEOF' - -extern int a (); -int b () { return a (); } -_ATEOF - -cat >c.c <<'_ATEOF' - -extern int b (); -int c () { return b (); } -_ATEOF - - -cat >m1.c <<'_ATEOF' - -extern int b (); -int main () { return b (); } -_ATEOF - -cat >m2.c <<'_ATEOF' - -extern int c (); -int main () { return c (); } -_ATEOF - - -mkdir a b c -LDFLAGS="$LDFLAGS -no-undefined" -for file in a.c b.c c.c; do - $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c $file -done -for file in m1.c m2.c; do - $CC $CPPFLAGS $CFLAGS -c $file -done - -for st in '' -static; do - $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o a/liba.la a.lo -rpath /nowherea - $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o b/libb.la b.lo a/liba.la -rpath /nowhereb - $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o c/libcee.la c.lo b/libb.la -rpath /nowherec - - { set +x -$as_echo "$at_srcdir/indirect_deps.at:109: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m1\$EXEEXT m1.\$OBJEXT b/libb.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m1.$OBJEXT b/libb.la" "indirect_deps.at:109" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m1.$OBJEXT b/libb.la +$as_echo "$at_srcdir/runpath-in-lalib.at:57: \$LIBTOOL --mode=install cp liba.la \$libdir/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir/liba.la" "runpath-in-lalib.at:57" +( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:109" +at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:57" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/indirect_deps.at:111: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m2\$EXEEXT m2.\$OBJEXT c/libcee.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m2.$OBJEXT c/libcee.la" "indirect_deps.at:111" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m2.$OBJEXT c/libcee.la +{ set +x +$as_echo "$at_srcdir/runpath-in-lalib.at:58: \$LIBTOOL --mode=install cp libb.la \$libdir/libb.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp libb.la $libdir/libb.la" "runpath-in-lalib.at:58" +( $at_check_trace; $LIBTOOL --mode=install cp libb.la $libdir/libb.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:111" +at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:58" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./m1; if test -f "./m1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/indirect_deps.at:113: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "indirect_deps.at:113" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/runpath-in-lalib.at:59: \$LIBTOOL --mode=install cp m\$EXEEXT \$bindir/m\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $bindir/m$EXEEXT" "runpath-in-lalib.at:59" +( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $bindir/m$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:113" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:59" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./m2; if test -f "./m2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/indirect_deps.at:114: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "indirect_deps.at:114" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/runpath-in-lalib.at:61: grep /foobar \$libdir/liba.la" +at_fn_check_prepare_dynamic "grep /foobar $libdir/liba.la" "runpath-in-lalib.at:61" +( $at_check_trace; grep /foobar $libdir/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:114" -$at_failed && at_fn_log_failure -$at_traceon; } - - -done - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_41 -#AT_START_42 -# 42. archive-in-archive.at:26: static library contains static library -at_setup_line='archive-in-archive.at:26' -at_fn_banner 2 -at_desc="static library contains static library" -at_desc_line=" 42: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no - case "$archive_contents" in *"libfoo.a"*) : ;; esac && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "42. archive-in-archive.at:26: testing ..." - $at_traceon - - - -cat >foo.c <<'_ATEOF' - -int foo() { return 1;} -_ATEOF - - -cat >bar.c <<'_ATEOF' - -int bar() { return 1;} -_ATEOF - - -thisdir=`cd . && pwd` -$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo.lo foo.c -$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c -$LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \ --o libfoo.la foo.lo -version-info 1:0:0 -rpath $thisdir -$LIBTOOL --mode=install cp libfoo.la $thisdir -{ set +x -$as_echo "$at_srcdir/archive-in-archive.at:45: \$LIBTOOL --mode=link --tag=CC --tag=disable-shared \$CC \$CFLAGS \$LDFLAGS \\ - -o libbar.la bar.lo ./libfoo.a -version-info 1:0:0 -rpath \$thisdir" -at_fn_check_prepare_notrace 'an embedded newline' "archive-in-archive.at:45" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \ - -o libbar.la bar.lo ./libfoo.a -version-info 1:0:0 -rpath $thisdir -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/archive-in-archive.at:45" +at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:61" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/archive-in-archive.at:48: \$LIBTOOL --mode=install cp libbar.la \$thisdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp libbar.la $thisdir" "archive-in-archive.at:48" -( $at_check_trace; $LIBTOOL --mode=install cp libbar.la $thisdir +$as_echo "$at_srcdir/runpath-in-lalib.at:62: grep /foobar \$libdir/libb.la" +at_fn_check_prepare_dynamic "grep /foobar $libdir/libb.la" "runpath-in-lalib.at:62" +( $at_check_trace; grep /foobar $libdir/libb.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/archive-in-archive.at:48" +at_fn_check_status 0 $at_status "$at_srcdir/runpath-in-lalib.at:62" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/archive-in-archive.at:49: ar -t libbar.a | grep libfoo.a" -at_fn_check_prepare_trace "archive-in-archive.at:49" -( $at_check_trace; ar -t libbar.a | grep libfoo.a -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/archive-in-archive.at:49" -$at_failed && at_fn_log_failure -$at_traceon; } -archive_contents=`ar -t libbar.a` +# TODO: check that m gets -R, too. set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_42 #AT_START_43 -# 43. execute-mode.at:25: execute mode -at_setup_line='execute-mode.at:25' -at_fn_banner 2 -at_desc="execute mode" -at_desc_line=" 43: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +at_fn_group_banner 43 'static.at:68' \ + "static linking flags for programs" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "43. execute-mode.at:25: testing ..." + $as_echo "43. $at_setup_line: testing $at_desc ..." $at_traceon -eval `$LIBTOOL --config | $EGREP '^(FGREP)='` +LDFLAGS="$LDFLAGS -no-undefined" +prefix=`pwd`/inst +bindir=$prefix/bin +prefix1=`pwd`/inst1 +prefix2=`pwd`/inst2 +prefix3=`pwd`/inst3 +libdir1=$prefix1/lib +libdir2=$prefix2/lib +libdir3=$prefix3/lib +srcdir_broken=`pwd`/broken-src +prefix_broken=`pwd`/broken +libdir_broken=$prefix_broken/lib +bindir_broken=$prefix_broken/bin -cat >foo <<'_ATEOF' -#! /bin/sh -if test $# -gt 0; then - for arg - do - printf %s\\n "$arg" - done -else - : +have_static=false +have_shared=false +per_deplib=false +$LIBTOOL --features | grep 'enable static libraries' >/dev/null && have_static=: +$LIBTOOL --features | grep 'enable shared libraries' >/dev/null && have_shared=: +eval `$LIBTOOL --config | + $EGREP '^(per_deplib_(static|dynamic)_flag|shlibpath_var|link_static_flag)='` +if test -n "$per_deplib_static_flag" && test -n "$per_deplib_dynamic_flag"; then + per_deplib=: fi -_ATEOF - - -cat >lt-wrapper <<'_ATEOF' -#! /bin/sh -# Generated by GNU libtool. -# fake wrapper script. -program=lt-real -progdir=. -if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then - # Run the actual program with our arguments. - exec "$progdir/$program" ${1+"$@"} - echo "$0: cannot exec $program $*" >&2 - exit 1 -fi -_ATEOF +# On GNU/Linux with --disable-static, m-all-static fails to link. +# What we'd like to state here is: if the user actively passed +# --disable-static (as opposed to: the libtool.m4 macros set +# enable_static=no), then they cannot expect -all-static to work. +# So we punt, knowing that we mangle enable_static on AIX only. +can_link_all_static=-all-static +case $host_os,$have_static,$link_static_flag in + aix*) ;; + *,false,?*) can_link_all_static= ;; +esac +# Create broken libraries. They will later be moved to those +# directories where the respective libraries should be linked +# statically from. This detects both failure to link statically +# and failure to omit extraneous run paths. +mkdir $srcdir_broken $prefix_broken $libdir_broken +( + cd $srcdir_broken + echo 'int this_should_not_be_linked_against() { return 0; }' > a.c + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c + for i in 1 1dep 2 2dep 3 3dep; do + $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a.lo -rpath $libdir_broken + $LIBTOOL --mode=install cp liba$i.la $libdir_broken/liba$i.la + done +) -cat >lt-real <<'_ATEOF' -#! /bin/sh -for arg -do - printf %s\\n "$arg" -done -cat -_ATEOF +func_fix_path () +{ + # For w32, hardcoding cannot work, but $libdir/../bin is where binaries + # usually are installed. Since we use several prefixes for testing + # convenience -- it allows us to replace the good libraries easily with + # broken ones and vice versa -- we have to set PATH to find them. + # Since OTOH we put broken libs of all names in the "moved" prefixes, + # we have to ensure that this prefix comes last: otherwise we may link + # against a broken library but the good one would come later in the PATH. + # So we let the caller of this function set the order: the "other" two + # come first. + if test "$shlibpath_var" = PATH; then + save_PATH=$PATH + sep= + test -z "$PATH" || sep=: + PATH=${2}/bin:${3}/bin:${1}/bin$sep$PATH + fi +} -cat >libfakelib.la <<'_ATEOF' -# libfakelib.la - a libtool library file -# Generated by ltmain.sh (GNU libtool 1.2605 2008/03/04 22:31:32) 2.3a -# -# Please DO NOT delete this file! -# It is necessary for linking the library. +func_restore_path () +{ + if test "$shlibpath_var" = PATH; then + PATH=$save_PATH + fi +} -dlname='' -library_names='' -old_library='libfakelib.a' -inherited_linker_flags='' -dependency_libs='' -weak_library_names='' -current= -age= -revision= -installed=no -shouldnotlink=yes -dlopen='' -dlpreopen='' -libdir='' -_ATEOF +# func_move_libs srcdir_to_move prefix_to_move other_prefix other_prefix +func_move_libs () +{ + $mkdir_p "${1}-moved" +(cd "${1}" && find . -type d) | (cd "${1}-moved" && xargs $mkdir_p) +for file in `cd "${1}" && find . -type f -print -o -type l -print` +do + mv "${1}"/$file "${1}-moved"/$file +done +rm -rf "${1}" + $mkdir_p "${2}-moved" +(cd "${2}" && find . -type d) | (cd "${2}-moved" && xargs $mkdir_p) +for file in `cd "${2}" && find . -type f -print -o -type l -print` +do + mv "${2}"/$file "${2}-moved"/$file +done +rm -rf "${2}" -mkdir sub -cp foo sub/foo -chmod +x foo sub/foo lt-wrapper lt-real + $mkdir_p "${1}" +(cd "$srcdir_broken" && find . -type d) | (cd "${1}" && xargs $mkdir_p) +for file in `cd "$srcdir_broken" && find . -type f -print -o -type l -print` +do + mv "$srcdir_broken"/$file "${1}"/$file +done +rm -rf "$srcdir_broken" -cat >liba.c <<'_ATEOF' -int a () { return 0; } -_ATEOF + $mkdir_p "${2}" +(cd "$prefix_broken" && find . -type d) | (cd "${2}" && xargs $mkdir_p) +for file in `cd "$prefix_broken" && find . -type f -print -o -type l -print` +do + mv "$prefix_broken"/$file "${2}"/$file +done +rm -rf "$prefix_broken" + func_fix_path ${2} ${3} ${4} +} -cat >main.c <<'_ATEOF' -#include -extern int a (); -int main (int argc, char **argv) +# func_restore_libs srcdir_to_restore prefix_to_restore +func_restore_libs () { - int i; - for (i=1; i>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:117" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/static.at:178" $at_failed && at_fn_log_failure $at_traceon; } + + # For some per-deplib flag combinations there may be no installed program, + # because liba2 is not yet installed. + if test -f "$bindir/m${st}$EXEEXT"; then + lt_exe=$bindir/m$st; if test -f "$bindir/m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/execute-mode.at:119: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la -rpath \$libdir liba.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la -rpath $libdir liba.lo" "execute-mode.at:119" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la -rpath $libdir liba.lo +$as_echo "$at_srcdir/static.at:182: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "static.at:182" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:119" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/static.at:182" $at_failed && at_fn_log_failure $at_traceon; } + + fi + done + fi +} + +# make sure the program cannot be run. +func_test_exec_fail () +{ + # No point in testing if we're linking statically anyway. + # TODO: Maybe in the `else' case we could test for success? + if $have_shared; then + echo "## The following should fail:" + for st + do + echo "# m$st" + lt_exe=./m$st; if test -f "./m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/execute-mode.at:121: \$CC \$CPPFLAGS \$CFLAGS -c main.c" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "execute-mode.at:121" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c +$as_echo "$at_srcdir/static.at:198: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "static.at:198" +( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:121" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/static.at:198" $at_failed && at_fn_log_failure $at_traceon; } + + # For some per-deplib flag combinations there may be no installed program, + # because liba2 is not yet installed. + if test -f "$bindir/m${st}$EXEEXT"; then + lt_exe=$bindir/m$st; if test -f "$bindir/m$st$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/execute-mode.at:123: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la" "execute-mode.at:123" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la +$as_echo "$at_srcdir/static.at:202: if \"\$lt_exe\" || (exit 1); then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "static.at:202" +( $at_check_trace; if "$lt_exe" || (exit 1); then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:123" -$at_failed && at_fn_log_failure +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/static.at:202" +$at_failed && at_fn_log_failure $at_traceon; } -# end of preparatory blurb. -# Now, when doing the tests, we both try the fake wrappers plus the real one -# (only the latter exposes the C wrappers used for w32 systems). -# With the latter, however, we need to ignore additional output; esp. wine -# may be rather noisy. + fi + done + fi +} -{ set +x -$as_echo "$at_srcdir/execute-mode.at:132: \$LIBTOOL --mode=execute ./foo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo" "execute-mode.at:132" -( $at_check_trace; $LIBTOOL --mode=execute ./foo + +# Try three independent libraries, +# one installed libtool library, +# one uninstalled libtool library, +# one non-libtool library, +# the libtool libraries each having a dependency, or not. +# Try both an uninstalled and the corresponding installed program. + +for withdep in no yes; do + echo + echo "### libraries with dependencies: $withdep" + rm -rf src $prefix $prefix1 $prefix2 $prefix3 + mkdir src $prefix $bindir $prefix1 $prefix2 $prefix3 + cd src + + ### build the libraries. + for i in 1 2 3; do + eval ldir=\$libdir$i + mkdir a$i $ldir + cd a$i + case $withdep,$i in + no,* | yes,3) + echo "int a$i() { return 0; }" > a$i.c + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c + $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a$i.lo -rpath $ldir + ;; + *) + echo "int a${i}dep() { return 0; }" > a${i}dep.c + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a${i}dep.c + $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba${i}dep.la a${i}dep.lo -rpath $ldir + echo "extern int a${i}dep(); int a$i() { return a${i}dep(); }" > a$i.c + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a$i.c + $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la a$i.lo -rpath $ldir ./liba${i}dep.la + ;; + esac + cd .. + done + + ### install the libraries. + test "$withdep" = yes && $LIBTOOL --mode=install cp a1/liba1dep.la $libdir1/liba1dep.la + $LIBTOOL --mode=install cp a1/liba1.la $libdir1/liba1.la + $LIBTOOL --mode=install cp a3/liba3.la $libdir3/liba3.la + $LIBTOOL --mode=clean rm -f a1/liba1.la a3/liba3.la + test "$withdep" = yes && $LIBTOOL --mode=clean rm -f a1/liba1dep.la + # simulate a non-libtool lib: + rm -f $libdir3/liba3.la + + + ### build the programs. + echo 'extern int a1(), a2(), a3(); + int main() { return a1() + a2() + a3(); }' > m.c + $CC $CPPFLAGS $CFLAGS -c m.c + + # global static flags. + for st in -static -static-libtool-libs $can_link_all_static; do + { set +x +$as_echo "$at_srcdir/static.at:263: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o m\${st}\$EXEEXT m.\$OBJEXT \\ + -L\$libdir1 -la1 a2/liba2.la -L\$libdir3 -R\$libdir3 -la3" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "static.at:263" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o m${st}$EXEEXT m.$OBJEXT \ + -L$libdir1 -la1 a2/liba2.la -L$libdir3 -R$libdir3 -la3 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:132" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/static.at:263" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/execute-mode.at:133: \$LIBTOOL --mode=execute sub/foo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute sub/foo" "execute-mode.at:133" -( $at_check_trace; $LIBTOOL --mode=execute sub/foo + done + + # per-deplib static/shared flags. + # also try a bit redundant flags, and shuffled order (for run paths check). + if $per_deplib; then + { set +x +$as_echo "$at_srcdir/static.at:271: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m1\$EXEEXT m.\$OBJEXT \\ + -L\$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la -L\$libdir3 -R\$libdir3 -la3" +at_fn_check_prepare_notrace 'an embedded newline' "static.at:271" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m1$EXEEXT m.$OBJEXT \ + -L$libdir1 -Bstatic -la1 -Bdynamic a2/liba2.la -L$libdir3 -R$libdir3 -la3 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:133" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/static.at:271" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/execute-mode.at:134: \$LIBTOOL --mode=execute ./foo foo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo foo" "execute-mode.at:134" -( $at_check_trace; $LIBTOOL --mode=execute ./foo foo + { set +x +$as_echo "$at_srcdir/static.at:274: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m2\$EXEEXT m.\$OBJEXT \\ + -L\$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic -L\$libdir3 -R\$libdir3 -la3" +at_fn_check_prepare_notrace 'an embedded newline' "static.at:274" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2$EXEEXT m.$OBJEXT \ + -L$libdir1 -la1 -Bstatic a2/liba2.la -Bdynamic -L$libdir3 -R$libdir3 -la3 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "foo -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:134" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/static.at:274" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/execute-mode.at:136: \$LIBTOOL --mode=execute ./lt-wrapper foo >"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "foo -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:136" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/static.at:277" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/execute-mode.at:138: cd sub && \$LIBTOOL --mode=execute ./foo ../foo" -at_fn_check_prepare_dynamic "cd sub && $LIBTOOL --mode=execute ./foo ../foo" "execute-mode.at:138" -( $at_check_trace; cd sub && $LIBTOOL --mode=execute ./foo ../foo + { set +x +$as_echo "$at_srcdir/static.at:280: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m12\$EXEEXT m.\$OBJEXT \\ + -L\$libdir1 -Bstatic -la1 a2/liba2.la -Bdynamic -L\$libdir3 -R\$libdir3 -la3" +at_fn_check_prepare_notrace 'an embedded newline' "static.at:280" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m12$EXEEXT m.$OBJEXT \ + -L$libdir1 -Bstatic -la1 a2/liba2.la -Bdynamic -L$libdir3 -R$libdir3 -la3 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "../foo -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:138" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/static.at:280" $at_failed && at_fn_log_failure $at_traceon; } -# suppose that ./foo is gdb, and lt-wrapper is the wrapper script. -{ set +x -$as_echo "$at_srcdir/execute-mode.at:141: \$LIBTOOL --mode=execute ./foo lt-wrapper bar baz >"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "./lt-real -bar -baz -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:141" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/static.at:283" $at_failed && at_fn_log_failure $at_traceon; } - -# check that stdin works even with -dlopen. -{ set +x -$as_echo "$at_srcdir/execute-mode.at:148: echo bar | \$LIBTOOL --mode=execute -dlopen libfakelib.la ./lt-wrapper foo" -at_fn_check_prepare_dynamic "echo bar | $LIBTOOL --mode=execute -dlopen libfakelib.la ./lt-wrapper foo" "execute-mode.at:148" -( $at_check_trace; echo bar | $LIBTOOL --mode=execute -dlopen libfakelib.la ./lt-wrapper foo + { set +x +$as_echo "$at_srcdir/static.at:287: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m31\$EXEEXT m.\$OBJEXT \\ + -L\$libdir3 -Bstatic -la3 -Bdynamic a2/liba2.la \\ + -L\$libdir1 -Bstatic -la1 -Bdynamic" +at_fn_check_prepare_notrace 'an embedded newline' "static.at:287" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m31$EXEEXT m.$OBJEXT \ + -L$libdir3 -Bstatic -la3 -Bdynamic a2/liba2.la \ + -L$libdir1 -Bstatic -la1 -Bdynamic ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "foo -bar -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:148" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/static.at:287" $at_failed && at_fn_log_failure $at_traceon; } - -# Check that a missing real program causes an error. -# The error message and code are likely to be 126, -# "No such file or directory" but system-dependent. -mv -f lt-real lt-backup -{ set +x -$as_echo "$at_srcdir/execute-mode.at:157: \$LIBTOOL --mode=execute ./lt-wrapper foo >"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/execute-mode.at:157" +at_fn_check_status 0 $at_status "$at_srcdir/static.at:291" $at_failed && at_fn_log_failure $at_traceon; } -mv -f lt-backup lt-real - -# Now use arguments that require decent quoting. -{ set +x -$as_echo "$at_srcdir/execute-mode.at:162: \$LIBTOOL --mode=execute ./foo \"arg with special chars: \\\$!&*\\\`'()\"" -at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:162" -( $at_check_trace; $LIBTOOL --mode=execute ./foo "arg with special chars: \$!&*\`'()" + { set +x +$as_echo "$at_srcdir/static.at:295: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m123\$EXEEXT m.\$OBJEXT \\ + -L\$libdir1 -Bstatic -la1 a2/liba2.la -L\$libdir3 -la3 -Bdynamic" +at_fn_check_prepare_notrace 'an embedded newline' "static.at:295" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m123$EXEEXT m.$OBJEXT \ + -L$libdir1 -Bstatic -la1 a2/liba2.la -L$libdir3 -la3 -Bdynamic ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "arg with special chars: \$!&*\`'() -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:162" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/static.at:295" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/execute-mode.at:165: \$LIBTOOL --mode=execute ./lt-wrapper \"arg with special chars: \\\$!&*\\\`'()\" >"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "arg with special chars: \$!&*\`'() -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:165" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/static.at:298" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/execute-mode.at:168: \$LIBTOOL --mode=execute ./foo lt-wrapper \"arg with special chars: \\\$!&*\\\`'()\"" -at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:168" -( $at_check_trace; $LIBTOOL --mode=execute ./foo lt-wrapper "arg with special chars: \$!&*\`'()" -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "./lt-real -arg with special chars: \$!&*\`'() -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:168" -$at_failed && at_fn_log_failure -$at_traceon; } + fi -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/execute-mode.at:172: if \$LIBTOOL --mode=execute \"\$lt_exe\" \"arg with special chars: \\\$!&*\\\`'()\"; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:172" -( $at_check_trace; if $LIBTOOL --mode=execute "$lt_exe" "arg with special chars: \$!&*\`'()"; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + ### install the programs. + # We can't install any program that links dynamically against liba2. + for st in -static -static-libtool-libs $can_link_all_static `$per_deplib && echo 2 12 23 123 123a`; do + echo "# m$st" + { set +x +$as_echo "$at_srcdir/static.at:312: \$LIBTOOL --mode=install cp m\${st}\$EXEEXT \$bindir/m\${st}\$EXEEXT" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "static.at:312" +( $at_check_trace; $LIBTOOL --mode=install cp m${st}$EXEEXT $bindir/m${st}$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:172" +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/static.at:312" $at_failed && at_fn_log_failure $at_traceon; } - -{ set +x -$as_echo "$at_srcdir/execute-mode.at:174: \$FGREP 'arg with special chars: \$!&*\`'\\''()' stdout" -at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:174" -( $at_check_trace; $FGREP 'arg with special chars: $!&*`'\''()' stdout + if $have_static; then + { set +x +$as_echo "$at_srcdir/static.at:314: \$EGREP 'relinking|has not been installed' stderr" +at_fn_check_prepare_notrace 'a shell pipeline' "static.at:314" +( $at_check_trace; $EGREP 'relinking|has not been installed' stderr ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:174" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/static.at:314" $at_failed && at_fn_log_failure $at_traceon; } + fi + done -# We always pair two args. The first one is never the empty string. -arg1= -for arg2 in \ - 'def ghi' '' \ - 'd"e' 'f"g' \ - 'd\"e' 'f\"g' \ - 'd\\"e' 'f\\"g' \ - 'd\\\"e' 'f\\\"g' \ - 'd\' '' \ - 'd\\' '' \ - 'd\\\' '' \ - 'd\\\\' '' \ - '<' '>' \ - '' '' -do - if test -z "$arg1"; then - arg1=$arg2; continue - fi - { set +x -$as_echo "$at_srcdir/execute-mode.at:194: \$LIBTOOL --mode=execute ./foo abc \"\$arg1\" \"\$arg2\" xyz" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo abc \"$arg1\" \"$arg2\" xyz" "execute-mode.at:194" -( $at_check_trace; $LIBTOOL --mode=execute ./foo abc "$arg1" "$arg2" xyz -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:194" -$at_failed && at_fn_log_failure -$at_traceon; } - { set +x -$as_echo "$at_srcdir/execute-mode.at:195: \$FGREP \"\$arg1\" stdout" -at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:195" -( $at_check_trace; $FGREP "$arg1" stdout + ### Run each program once so that relinking has happened. + + func_fix_path $prefix1 $prefix2 $prefix3 + func_test_exec -static -static-libtool-libs -all-static `$per_deplib && echo 1 2 3 12 13 23 31 123 123a` + func_restore_path + + # For each library: + # - remove the library images to catch failure to link statically/dynamically, + # - add false other deplibs in the paths to catch (some) wrongly added run paths. + + # if -all-static does not work, do not exercise it any more. + all_static=-all-static + test -z "$link_static_flag" && all_static= + + echo "### test whether installed libtool library liba2 was linked statically" + func_move_libs a2 $prefix2 $prefix3 $prefix1 + func_test_exec -static -static-libtool-libs $all_static `$per_deplib && echo 2 12 23 123 123a` + $per_deplib && func_test_exec_fail 1 3 13 31 + func_restore_libs a2 $prefix2 + + echo "### test whether uninstalled libtool library liba1 was linked statically" + func_move_libs a1 $prefix1 $prefix2 $prefix3 + func_test_exec -static-libtool-libs $all_static `$per_deplib && echo 1 12 13 31 123 123a` + $per_deplib && func_test_exec_fail -static 2 3 23 + func_restore_libs a1 $prefix1 + + echo "### test whether non-libtool library liba3 was linked statically" + func_move_libs a3 $prefix3 $prefix1 $prefix2 + func_test_exec $all_static `$per_deplib && echo 3 13 23 31 123 123a` + func_test_exec_fail -static -static-libtool-libs `$per_deplib && echo 1 2 12` + func_restore_libs a3 $prefix3 + + cd .. +done + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_43 +#AT_START_44 +at_fn_group_banner 44 'static.at:358' \ + "ccache -all-static" " " 3 +at_xfail=no +( + $as_echo "44. $at_setup_line: testing $at_desc ..." + $at_traceon + + +cat >ccache <<'_ATEOF' +#! /bin/sh +# poor man's ccache clone +case $1 in +-*) echo "bogus argument: $1" >&2; exit 1 ;; +esac +exec "$@" +_ATEOF + +chmod +x ./ccache + +cat >a.c <<'_ATEOF' +int main(void) { return 0; } +_ATEOF + + +{ set +x +$as_echo "$at_srcdir/static.at:374: \$CC \$CPPFLAGS \$CFLAGS -c a.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c a.c" "static.at:374" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c a.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:195" +at_fn_check_status 0 $at_status "$at_srcdir/static.at:374" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/execute-mode.at:196: \$FGREP \"\$arg2\" stdout" -at_fn_check_prepare_dynamic "$FGREP \"$arg2\" stdout" "execute-mode.at:196" -( $at_check_trace; $FGREP "$arg2" stdout +{ set +x +$as_echo "$at_srcdir/static.at:375: \$LIBTOOL --mode=link --tag=CC ./ccache \$CC \$CFLAGS \$LDFLAGS -all-static a.\$OBJEXT -o a\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC ./ccache $CC $CFLAGS $LDFLAGS -all-static a.$OBJEXT -o a$EXEEXT" "static.at:375" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC ./ccache $CC $CFLAGS $LDFLAGS -all-static a.$OBJEXT -o a$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:196" +at_fn_check_status 0 $at_status "$at_srcdir/static.at:375" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/execute-mode.at:197: test \`sed -n '/^abc\$/,/^xyz\$/p' stdout | wc -l\` -eq 4" -at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:197" -( $at_check_trace; test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4 -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:197" -$at_failed && at_fn_log_failure -$at_traceon; } - { set +x -$as_echo "$at_srcdir/execute-mode.at:198: \$LIBTOOL --mode=execute ./lt-wrapper abc \"\$arg1\" \"\$arg2\" xyz >"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:198" -$at_failed && at_fn_log_failure -$at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_44 +#AT_START_45 +at_fn_group_banner 45 'export.at:25' \ + "Export test" " " 3 +at_xfail=no +( + $as_echo "45. $at_setup_line: testing $at_desc ..." + $at_traceon - { set +x -$as_echo "$at_srcdir/execute-mode.at:199: \$FGREP \"\$arg1\" stdout" -at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:199" -( $at_check_trace; $FGREP "$arg1" stdout -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:199" -$at_failed && at_fn_log_failure -$at_traceon; } - { set +x -$as_echo "$at_srcdir/execute-mode.at:200: \$FGREP \"\$arg2\" stdout" -at_fn_check_prepare_dynamic "$FGREP \"$arg2\" stdout" "execute-mode.at:200" -( $at_check_trace; $FGREP "$arg2" stdout + +{ set +x +$as_echo "$at_srcdir/export.at:28: \$LIBTOOL --features | grep 'disable shared libraries' && (exit 77)" +at_fn_check_prepare_notrace 'a shell pipeline' "export.at:28" +( $at_check_trace; $LIBTOOL --features | grep 'disable shared libraries' && (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:200" +at_fn_check_status 1 $at_status "$at_srcdir/export.at:28" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/execute-mode.at:201: test \`sed -n '/^abc\$/,/^xyz\$/p' stdout | wc -l\` -eq 4" -at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:201" -( $at_check_trace; test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4 +{ set +x +$as_echo "$at_srcdir/export.at:30: eval \`\$LIBTOOL --config | sed -n '/^archive_expsym_cmds=/,/^\$/p'\` + test -n \"\$archive_expsym_cmds\" || echo false >can-hide + case \$archive_expsym_cmds in + *-retain-symbols-file*) echo false >can-hide ;; + esac" +at_fn_check_prepare_notrace 'a `...` command substitution' "export.at:30" +( $at_check_trace; eval `$LIBTOOL --config | sed -n '/^archive_expsym_cmds=/,/^$/p'` + test -n "$archive_expsym_cmds" || echo false >can-hide + case $archive_expsym_cmds in + *-retain-symbols-file*) echo false >can-hide ;; + esac ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:201" +at_fn_check_status 0 $at_status "$at_srcdir/export.at:30" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/execute-mode.at:202: \$LIBTOOL --mode=execute ./foo lt-wrapper abc \"\$arg1\" \"\$arg2\" xyz" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo lt-wrapper abc \"$arg1\" \"$arg2\" xyz" "execute-mode.at:202" -( $at_check_trace; $LIBTOOL --mode=execute ./foo lt-wrapper abc "$arg1" "$arg2" xyz -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:202" -$at_failed && at_fn_log_failure -$at_traceon; } +can_hide=: +test -s can-hide && can_hide=false - { set +x -$as_echo "$at_srcdir/execute-mode.at:203: \$FGREP \"\$arg1\" stdout" -at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:203" -( $at_check_trace; $FGREP "$arg1" stdout +LDFLAGS="$LDFLAGS -no-undefined" +libdir=`pwd`/inst/lib +mkdir inst inst/lib + +cat >a.c <<'_ATEOF' +/* all kinds of data items */ +#ifdef __cplusplus +extern "C" { +#endif + +int v1; +static int v2; +int v3 = 0; +int v4 = 1; +extern const int v5, v6; +extern const char *v7; +extern const char v8[]; +extern int (*const v12) (void); +const int v5 = 0; +const int v6 = 1; +const char* v7 = "\01foo"; +const char v8[] = "\01bar"; +int v9(void) { return v2 + 1; } +int (*v10) (void); +int (*v11) (void) = v9; +int (*const v12) (void) = v9; + +typedef struct { int arr[1000]; } large; +large v13; +large v14 = { { 0 } }; +large v15 = { { 1 } }; + +int w1 (void) { return 0; } + +#ifdef __cplusplus +} +#endif +_ATEOF + + +cat >asyms <<'_ATEOF' +v1 +v3 +v4 +v5 +v6 +v7 +v8 +v9 +v10 +v11 +v12 +v13 +v14 +v15 +_ATEOF + + +cat >main.c <<'_ATEOF' + +/* w32 fun. With GCC, you can have auto-import, which will work for + * functions and non-const variables. With MSVC, you have to explicitly + * import all variables. Depending on the amount of portability, you + * need these annotations: LIBA_SCOPE for GCC, and also LIBA_SCOPE_VAR + * for MSVC. Of course you can merge both to one, this test only avoids + * that in order to expose the auto-import feature on Cygwin. + * + * For users, it's best to realize that they should not provide any + * non-function API at all. + */ +#if defined(LIBA_DLL_IMPORT) +# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) +# define LIBA_SCOPE extern __declspec(dllimport) +# if defined(_MSC_VER) +# define LIBA_SCOPE_VAR LIBA_SCOPE +# endif +# endif +#endif +#if !defined(LIBA_SCOPE) +# define LIBA_SCOPE extern +#endif +#if !defined(LIBA_SCOPE_VAR) +# define LIBA_SCOPE_VAR extern +#endif +#ifdef __cplusplus +extern "C" { +#endif +LIBA_SCOPE_VAR int v1; +LIBA_SCOPE_VAR int v3, v4; +LIBA_SCOPE const int v5, v6; +LIBA_SCOPE_VAR const char* v7; +LIBA_SCOPE_VAR const char v8[]; +extern int v9(void); +LIBA_SCOPE_VAR int (*v10) (void); +LIBA_SCOPE_VAR int (*v11) (void); +LIBA_SCOPE int (*const v12) (void); +#ifdef __cplusplus +} +#endif + +typedef struct { int arr[1000]; } large; +LIBA_SCOPE_VAR large v13, v14, v15; + +int main (void) +{ + char s = v7[0] + v8[0]; + return s + v1 + v3 + v4 + v5 + v6 + v9() + v11() + v12() + + v13.arr[0] + v14.arr[0] + v15.arr[0] + - 8; +} +_ATEOF + + +cat >broken.c <<'_ATEOF' + +/* these symbols should not be exported */ +#ifdef __cplusplus +extern "C" { +#endif +extern int w1 (void); +#ifdef __cplusplus +} +#endif +int main (void) +{ + return w1 (); +} +_ATEOF + + +{ set +x +$as_echo "$at_srcdir/export.at:164: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c" "export.at:164" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:203" +at_fn_check_status 0 $at_status "$at_srcdir/export.at:164" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/execute-mode.at:204: \$FGREP \"\$arg2\" stdout" -at_fn_check_prepare_dynamic "$FGREP \"$arg2\" stdout" "execute-mode.at:204" -( $at_check_trace; $FGREP "$arg2" stdout +{ set +x +$as_echo "$at_srcdir/export.at:165: \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c main.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c" "export.at:165" +( $at_check_trace; $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:204" +at_fn_check_status 0 $at_status "$at_srcdir/export.at:165" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/execute-mode.at:205: test \`sed -n '/^abc\$/,/^xyz\$/p' stdout | wc -l\` -eq 4" -at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:205" -( $at_check_trace; test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4 +{ set +x +$as_echo "$at_srcdir/export.at:166: \$CC \$CPPFLAGS \$CFLAGS -c broken.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c broken.c" "export.at:166" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c broken.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:205" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/export.at:166" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/execute-mode.at:206: \$LIBTOOL --mode=execute ./main\$EXEEXT abc \"\$arg1\" \"\$arg2\" xyz" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./main$EXEEXT abc \"$arg1\" \"$arg2\" xyz" "execute-mode.at:206" -( $at_check_trace; $LIBTOOL --mode=execute ./main$EXEEXT abc "$arg1" "$arg2" xyz + +for exportsyms in '' '-export-symbols-regex "v.*"' '-export-symbols asyms' +do + # case 1: shared library built from object. + echo "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo \\ + -rpath $libdir' $exportsyms"; { set +x +$as_echo "$at_srcdir/export.at:171: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo \\ + -rpath \$libdir' \$exportsyms" +at_fn_check_prepare_notrace 'an embedded newline' "export.at:171" +( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo \ + -rpath $libdir' $exportsyms ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:206" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/export.at:171" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/execute-mode.at:207: \$FGREP \"\$arg1\" stdout" -at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:207" -( $at_check_trace; $FGREP "$arg1" stdout +$as_echo "$at_srcdir/export.at:173: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la" "export.at:173" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:207" +at_fn_check_status 0 $at_status "$at_srcdir/export.at:173" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/execute-mode.at:208: \$FGREP \"\$arg2\" stdout" -at_fn_check_prepare_dynamic "$FGREP \"$arg2\" stdout" "execute-mode.at:208" -( $at_check_trace; $FGREP "$arg2" stdout + lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/export.at:175: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "export.at:175" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/export.at:175" +$at_failed && at_fn_log_failure +$at_traceon; } + + + if test -n "$exportsyms" && $can_hide; then + { set +x +$as_echo "$at_srcdir/export.at:177: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o broken\$EXEEXT broken.\$OBJEXT liba.la + then (exit 1); else :; fi" +at_fn_check_prepare_notrace 'an embedded newline' "export.at:177" +( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o broken$EXEEXT broken.$OBJEXT liba.la + then (exit 1); else :; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:208" +at_fn_check_status 0 $at_status "$at_srcdir/export.at:177" $at_failed && at_fn_log_failure $at_traceon; } - # Do not match EOL here, cross setups may have an extra \r here. + fi + + # case 2: shared library built from convenience archive. { set +x -$as_echo "$at_srcdir/execute-mode.at:210: test \`sed -n '/^abc/,/^xyz/p' stdout | wc -l\` -eq 4" -at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:210" -( $at_check_trace; test `sed -n '/^abc/,/^xyz/p' stdout | wc -l` -eq 4 +$as_echo "$at_srcdir/export.at:182: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libconv.la a.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libconv.la a.lo" "export.at:182" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libconv.la a.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:210" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/export.at:182" $at_failed && at_fn_log_failure $at_traceon; } - arg1= -done - -# Check that .la files are not transformed by the wrapper searching loop. -{ set +x -$as_echo "$at_srcdir/execute-mode.at:215: \$LIBTOOL --mode=execute echo ./main\$EXEEXT liba.lo libfakelib.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute echo ./main$EXEEXT liba.lo libfakelib.la" "execute-mode.at:215" -( $at_check_trace; $LIBTOOL --mode=execute echo ./main$EXEEXT liba.lo libfakelib.la + echo "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la libconv.la \\ + -rpath $libdir' $exportsyms"; { set +x +$as_echo "$at_srcdir/export.at:184: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la libconv.la \\ + -rpath \$libdir' \$exportsyms" +at_fn_check_prepare_notrace 'an embedded newline' "export.at:184" +( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la libconv.la \ + -rpath $libdir' $exportsyms ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:215" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/export.at:184" $at_failed && at_fn_log_failure $at_traceon; } -# This could be .libs/lt-main or similar (or just plain `main'). -{ set +x -$as_echo "$at_srcdir/execute-mode.at:217: grep main stdout" -at_fn_check_prepare_trace "execute-mode.at:217" -( $at_check_trace; grep main stdout + { set +x +$as_echo "$at_srcdir/export.at:186: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la" "export.at:186" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:217" +at_fn_check_status 0 $at_status "$at_srcdir/export.at:186" $at_failed && at_fn_log_failure $at_traceon; } + lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/execute-mode.at:218: grep liba.lo stdout" -at_fn_check_prepare_trace "execute-mode.at:218" -( $at_check_trace; grep liba.lo stdout +$as_echo "$at_srcdir/export.at:188: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "export.at:188" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/export.at:188" +$at_failed && at_fn_log_failure +$at_traceon; } + + + if test -n "$exportsyms" && $can_hide; then + { set +x +$as_echo "$at_srcdir/export.at:190: if \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o broken\$EXEEXT broken.\$OBJEXT liba.la + then (exit 1); else :; fi" +at_fn_check_prepare_notrace 'an embedded newline' "export.at:190" +( $at_check_trace; if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o broken$EXEEXT broken.$OBJEXT liba.la + then (exit 1); else :; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:218" +at_fn_check_status 0 $at_status "$at_srcdir/export.at:190" $at_failed && at_fn_log_failure $at_traceon; } + fi +done + { set +x -$as_echo "$at_srcdir/execute-mode.at:219: grep libfakelib.la stdout" -at_fn_check_prepare_trace "execute-mode.at:219" -( $at_check_trace; grep libfakelib.la stdout +$as_echo "$at_srcdir/export.at:195: \$can_hide || (exit 77)" +at_fn_check_prepare_dynamic "$can_hide || (exit 77)" "export.at:195" +( $at_check_trace; $can_hide || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:219" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/export.at:195" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_43 -#AT_START_44 -# 44. bindir.at:64: bindir compile check -at_setup_line='bindir.at:64' -at_fn_banner 2 -at_desc="bindir compile check" -at_desc_line=" 44: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_45 +#AT_START_46 +at_fn_group_banner 46 'search-path.at:25' \ + "sys_lib_search_path" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "44. bindir.at:64: testing ..." + $as_echo "46. $at_setup_line: testing $at_desc ..." $at_traceon -cat >simple.c <<'_ATEOF' - -int main() { return 0;} -_ATEOF - +LDFLAGS="$LDFLAGS -no-undefined" -$CC $CPPFLAGS $CFLAGS -o simple simple.c || noskip=false -rm -f simple +cat >main.c <<'_ATEOF' +extern +#ifdef __cplusplus +"C" +#endif +int inflate (); +int main() +{ + return inflate (); +} +_ATEOF -{ set +x -$as_echo "$at_srcdir/bindir.at:73: \$noskip || (exit 77)" -at_fn_check_prepare_dynamic "$noskip || (exit 77)" "bindir.at:73" -( $at_check_trace; $noskip || (exit 77) + +$CC $CPPFLAGS $CFLAGS -c main.c +eval `$LIBTOOL --config | $EGREP '^(sys_lib_search_path_spec)='` +eval sys_lib_search_path=\"$sys_lib_search_path_spec\" +no_libz=: +for path in $sys_lib_search_path; do + if $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -L$path -lz + then + { set +x +$as_echo "$at_srcdir/search-path.at:48: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -lz" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -lz" "search-path.at:48" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -lz +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/search-path.at:48" +$at_failed && at_fn_log_failure +$at_traceon; } + + no_libz=false + break + fi +done + +# If -lz doesn't exist (hello, cross compiler!), we need a dummy test. +if $no_libz; then + { set +x +$as_echo "$at_srcdir/search-path.at:57: exit 77" +at_fn_check_prepare_trace "search-path.at:57" +( $at_check_trace; exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:73" +at_fn_check_status 0 $at_status "$at_srcdir/search-path.at:57" $at_failed && at_fn_log_failure $at_traceon; } +fi set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_44 -#AT_START_45 -# 45. bindir.at:81: bindir basic lib test -at_setup_line='bindir.at:81' -at_fn_banner 2 -at_desc="bindir basic lib test" -at_desc_line=" 45: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_46 +#AT_START_47 +at_fn_group_banner 47 'indirect_deps.at:25' \ + "indirect convenience" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "45. bindir.at:81: testing ..." + $as_echo "47. $at_setup_line: testing $at_desc ..." $at_traceon -bindirneeded=: -case "$host_os" in - cygwin*|mingw*|cegcc*) - ;; - *) - bindirneeded=false - ;; -esac - -#### -# These routines save the PATH before a test and restore it after, -# prepending a chosen directory to the path on the platforms where -# -bindir is needed after saving. -# - -func_save_and_prepend_path () -{ - save_PATH=$PATH - if $bindirneeded ; then - PATH=$1:$PATH - fi - export PATH -} - -func_restore_path () -{ - PATH=$save_PATH - export PATH -} -cat >foo.c <<'_ATEOF' +cat >a.c <<'_ATEOF' -int x=11; +#include +int a () { return 0; } +double ad (double x) { return sin (x); } _ATEOF +cat >b.c <<'_ATEOF' -cat >baz.c <<'_ATEOF' - -extern int x; -int baz (void); -int baz (void) { return x;} +extern int a (); +extern double ad (double); +int b () { return a () + (int) ad (0.0); } _ATEOF +cat >c.c <<'_ATEOF' -cat >bar.c <<'_ATEOF' - -extern int baz (void); -int y=3; -int bar (void); -int bar (void) { return y + baz ();} +extern int b (); +int c () { return b (); } _ATEOF +cat >m.c <<'_ATEOF' -cat >main.c <<'_ATEOF' - -#include -extern int baz (void); -extern int bar (void); -int main() { -if (baz () + bar () - 25) abort (); -return 0; -} +extern int c (); +int main () { return c (); } _ATEOF +LDFLAGS="$LDFLAGS -no-undefined" +for file in a.c b.c c.c; do + $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c $file +done +$CC $CPPFLAGS $CFLAGS -c m.c -curdir=`pwd` -eval "`$LIBTOOL --config | grep '^objdir='`" +# liba is an indirect dependency of libd and of libconv. +$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath /nowhere -lm +$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libb.la b.lo liba.la -rpath /nowhere +$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libconv.la c.lo libb.la +$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o libd.la libconv.la -rpath /nowhere -{ set +x -$as_echo "$at_srcdir/bindir.at:144: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o foo.lo \$CPPFLAGS \$CFLAGS foo.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c" "bindir.at:144" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c +for st in '' -static; do + { set +x +$as_echo "$at_srcdir/indirect_deps.at:60: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m1\$EXEEXT m.\$OBJEXT libd.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m.$OBJEXT libd.la" "indirect_deps.at:60" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m.$OBJEXT libd.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:144" +at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:60" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/bindir.at:145: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o baz.lo \$CPPFLAGS \$CFLAGS baz.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c" "bindir.at:145" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c + { set +x +$as_echo "$at_srcdir/indirect_deps.at:62: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m2\$EXEEXT m.\$OBJEXT libconv.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m.$OBJEXT libconv.la" "indirect_deps.at:62" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m.$OBJEXT libconv.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:145" +at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:62" $at_failed && at_fn_log_failure $at_traceon; } + lt_exe=./m1; if test -f "./m1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/bindir.at:146: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS foo.lo baz.lo -rpath \$curdir/\$objdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo baz.lo -rpath $curdir/$objdir" "bindir.at:146" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo baz.lo -rpath $curdir/$objdir +$as_echo "$at_srcdir/indirect_deps.at:64: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "indirect_deps.at:64" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:146" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:64" $at_failed && at_fn_log_failure $at_traceon; } + lt_exe=./m2; if test -f "./m2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/bindir.at:148: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o bar.lo \$CPPFLAGS \$CFLAGS bar.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c" "bindir.at:148" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c +$as_echo "$at_srcdir/indirect_deps.at:65: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "indirect_deps.at:65" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:148" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:65" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/bindir.at:149: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -o libbar.la \$CPPFLAGS \$CFLAGS \$LDFLAGS bar.lo libfoo.la -rpath \$curdir/\$objdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS bar.lo libfoo.la -rpath $curdir/$objdir" "bindir.at:149" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS bar.lo libfoo.la -rpath $curdir/$objdir -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:149" -$at_failed && at_fn_log_failure -$at_traceon; } +done -{ set +x -$as_echo "$at_srcdir/bindir.at:151: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o main.lo \$CPPFLAGS \$CFLAGS main.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c" "bindir.at:151" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:151" -$at_failed && at_fn_log_failure -$at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_47 +#AT_START_48 +at_fn_group_banner 48 'indirect_deps.at:71' \ + "indirect uninstalled" " " 3 +at_xfail=no +( + $as_echo "48. $at_setup_line: testing $at_desc ..." + $at_traceon -{ set +x -$as_echo "$at_srcdir/bindir.at:152: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS main.lo libbar.la libfoo.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libbar.la libfoo.la" "bindir.at:152" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libbar.la libfoo.la -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:152" -$at_failed && at_fn_log_failure -$at_traceon; } -# Check both static and shared versions run. We don't install them -# here, that will be covered by the later tests; we've rpath'd things -# so that they can all be run in situ. +cat >a.c <<'_ATEOF' -lt_exe=$LIBTOOL; if test -f "$LIBTOOL$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/bindir.at:158: if \$LIBTOOL --mode=execute \"\$lt_exe\" --mode=execute ./main\$EXEEXT; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute \"$lt_exe\" --mode=execute ./main$EXEEXT; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:158" -( $at_check_trace; if $LIBTOOL --mode=execute "$lt_exe" --mode=execute ./main$EXEEXT; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:158" -$at_failed && at_fn_log_failure -$at_traceon; } +int a () { return 0; } +_ATEOF +cat >b.c <<'_ATEOF' +extern int a (); +int b () { return a (); } +_ATEOF -# Ensure libraries can be found on PATH, if we are on one -# of the affected platforms, before testing the shared version. +cat >c.c <<'_ATEOF' -func_save_and_prepend_path $curdir/$objdir -$bindirneeded && { - lt_exe=$LIBTOOL; if test -f "$LIBTOOL$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/bindir.at:165: if \$LIBTOOL --mode=execute \"\$lt_exe\" --mode=execute \$objdir/main\$EXEEXT; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute \"$lt_exe\" --mode=execute $objdir/main$EXEEXT; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:165" -( $at_check_trace; if $LIBTOOL --mode=execute "$lt_exe" --mode=execute $objdir/main$EXEEXT; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +extern int b (); +int c () { return b (); } +_ATEOF + + +cat >m1.c <<'_ATEOF' + +extern int b (); +int main () { return b (); } +_ATEOF + +cat >m2.c <<'_ATEOF' + +extern int c (); +int main () { return c (); } +_ATEOF + + +mkdir a b c +LDFLAGS="$LDFLAGS -no-undefined" +for file in a.c b.c c.c; do + $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c $file +done +for file in m1.c m2.c; do + $CC $CPPFLAGS $CFLAGS -c $file +done + +for st in '' -static; do + $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o a/liba.la a.lo -rpath /nowherea + $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o b/libb.la b.lo a/liba.la -rpath /nowhereb + $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o c/libcee.la c.lo b/libb.la -rpath /nowherec + + { set +x +$as_echo "$at_srcdir/indirect_deps.at:109: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m1\$EXEEXT m1.\$OBJEXT b/libb.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m1.$OBJEXT b/libb.la" "indirect_deps.at:109" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m1$EXEEXT m1.$OBJEXT b/libb.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:165" +at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:109" $at_failed && at_fn_log_failure $at_traceon; } - -} - -# In fact, prepending the PATH as above is superfluous on the windows -# platforms that this feature is primarily aimed at, as the DLL search -# path always includes the directory from which the app was launched. -# To make sure it still works even when not side-by-side, we'll install -# the main executable and execute it from there while the PATH still -# points to the shared libs in the .libs subdir. On other platforms, -# the rpaths we set at link time will guarantee it runs from the bindir. - -mkdir $curdir/bin -{ set +x -$as_echo "$at_srcdir/bindir.at:177: \$LIBTOOL --mode=install \$lt_INSTALL main\$EXEEXT \$curdir/bin/main\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/bin/main$EXEEXT" "bindir.at:177" -( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/bin/main$EXEEXT + { set +x +$as_echo "$at_srcdir/indirect_deps.at:111: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS \$st -o m2\$EXEEXT m2.\$OBJEXT c/libcee.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m2.$OBJEXT c/libcee.la" "indirect_deps.at:111" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS $st -o m2$EXEEXT m2.$OBJEXT c/libcee.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:177" +at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:111" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=$curdir/bin/main$EXEEXT; if test -f "$curdir/bin/main$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi + lt_exe=./m1; if test -f "./m1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/bindir.at:178: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:178" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/indirect_deps.at:113: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "indirect_deps.at:113" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:178" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:113" $at_failed && at_fn_log_failure $at_traceon; } -func_restore_path + lt_exe=./m2; if test -f "./m2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/indirect_deps.at:114: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "indirect_deps.at:114" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/indirect_deps.at:114" +$at_failed && at_fn_log_failure +$at_traceon; } + + +done set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_45 -#AT_START_46 -# 46. bindir.at:190: bindir install tests -at_setup_line='bindir.at:190' -at_fn_banner 2 -at_desc="bindir install tests" -at_desc_line=" 46: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_48 +#AT_START_49 +at_fn_group_banner 49 'archive-in-archive.at:26' \ + "static library contains static library" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" + case $AR in ar-lib\ * | *[/\\]ar-lib\ *) false;; *) :;; esac && at_xfail=yes ( - $as_echo "46. bindir.at:190: testing ..." + $as_echo "49. $at_setup_line: testing $at_desc ..." $at_traceon -bindirneeded=: -case "$host_os" in - cygwin*|mingw*|cegcc*) - ;; - *) - bindirneeded=false - ;; -esac - -#### -# These routines save the PATH before a test and restore it after, -# prepending a chosen directory to the path on the platforms where -# -bindir is needed after saving. -# -func_save_and_prepend_path () -{ - save_PATH=$PATH - if $bindirneeded ; then - PATH=$1:$PATH - fi - export PATH -} +# This test passes with MS lib. -func_restore_path () -{ - PATH=$save_PATH - export PATH -} cat >foo.c <<'_ATEOF' -int x=11; -_ATEOF - - -cat >baz.c <<'_ATEOF' - -extern int x; -int baz (void); -int baz (void) { return x;} +int foo() { return 1;} _ATEOF cat >bar.c <<'_ATEOF' -extern int baz (void); -int y=3; -int bar (void); -int bar (void) { return y + baz ();} -_ATEOF - - -cat >main.c <<'_ATEOF' - -#include -extern int baz (void); -extern int bar (void); -int main() { -if (baz () + bar () - 25) abort (); -return 0; -} +int bar() { return 1;} _ATEOF -# We only need to compile once, but we'll need to relink for each different value -# of libdir in order to set the rpath, and we'll install for each combination of -# libdir and bindir. - +thisdir=`cd . && pwd` +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo.lo foo.c +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar.lo bar.c +$LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \ +-o libfoo.la foo.lo -version-info 1:0:0 -rpath $thisdir +$LIBTOOL --mode=install cp libfoo.la $thisdir +eval `$EGREP '^(old_library)=' < libfoo.la` +libfoo=$old_library { set +x -$as_echo "$at_srcdir/bindir.at:253: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o foo.lo \$CPPFLAGS \$CFLAGS foo.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c" "bindir.at:253" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c +$as_echo "$at_srcdir/archive-in-archive.at:50: \$LIBTOOL --mode=link --tag=CC --tag=disable-shared \$CC \$CFLAGS \$LDFLAGS \\ + -o libbar.la bar.lo \$libfoo -version-info 1:0:0 -rpath \$thisdir" +at_fn_check_prepare_notrace 'an embedded newline' "archive-in-archive.at:50" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC --tag=disable-shared $CC $CFLAGS $LDFLAGS \ + -o libbar.la bar.lo $libfoo -version-info 1:0:0 -rpath $thisdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:253" +at_fn_check_status 0 $at_status "$at_srcdir/archive-in-archive.at:50" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/bindir.at:254: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o baz.lo \$CPPFLAGS \$CFLAGS baz.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c" "bindir.at:254" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c +$as_echo "$at_srcdir/archive-in-archive.at:53: \$LIBTOOL --mode=install cp libbar.la \$thisdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp libbar.la $thisdir" "archive-in-archive.at:53" +( $at_check_trace; $LIBTOOL --mode=install cp libbar.la $thisdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:254" +at_fn_check_status 0 $at_status "$at_srcdir/archive-in-archive.at:53" $at_failed && at_fn_log_failure $at_traceon; } +eval `$EGREP '^(old_library)=' < libbar.la` +libbar=$old_library { set +x -$as_echo "$at_srcdir/bindir.at:255: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o bar.lo \$CPPFLAGS \$CFLAGS bar.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c" "bindir.at:255" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c +$as_echo "$at_srcdir/archive-in-archive.at:56: \$AR -t \$libbar | grep \$libfoo" +at_fn_check_prepare_notrace 'a shell pipeline' "archive-in-archive.at:56" +( $at_check_trace; $AR -t $libbar | grep $libfoo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:255" +at_fn_check_status 1 $at_status "$at_srcdir/archive-in-archive.at:56" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/bindir.at:256: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o main.lo \$CPPFLAGS \$CFLAGS main.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c" "bindir.at:256" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c +$as_echo "$at_srcdir/archive-in-archive.at:57: \$AR -t \$libbar | grep foo.\$OBJEXT" +at_fn_check_prepare_notrace 'a shell pipeline' "archive-in-archive.at:57" +( $at_check_trace; $AR -t $libbar | grep foo.$OBJEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:256" +at_fn_check_status 0 $at_status "$at_srcdir/archive-in-archive.at:57" $at_failed && at_fn_log_failure $at_traceon; } - -# Now try installing the libs. There are the following cases: -# No -bindir -# -bindir below lib install dir -# -bindir is lib install dir -# -bindir beside lib install dir -# -bindir above lib dir -# -bindir above and beside lib dir -# -bindir in entirely unrelated prefix. - -curdir=`pwd` -for libdir in \ - $curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0 \ - $curdir/usr/lib/gcc/../gcc/.//i686-pc-cygwin/4.5.0/../../././//. \ - $curdir/usr/lib/ \ - $curdir/usr/lib \ - $curdir/baz \ - $curdir/baz/lib/ ; -do - - # Do a basic install with no -bindir option for reference. We use the sbin/ - # dir for the main exe to avoid the potential "this only works because it's - # side-by-side with the libs" default DLL search path problem mentioned above. - rm -rf $libdir $curdir/bin $curdir/sbin $curdir/baz $curdir/usr - as_dir=$libdir; as_fn_mkdir_p - as_dir=$curdir/sbin; as_fn_mkdir_p - { set +x -$as_echo "$at_srcdir/bindir.at:283: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS foo.lo bar.lo baz.lo -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir" "bindir.at:283" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir +{ set +x +$as_echo "$at_srcdir/archive-in-archive.at:58: \$AR -t \$libbar | grep bar.\$OBJEXT" +at_fn_check_prepare_notrace 'a shell pipeline' "archive-in-archive.at:58" +( $at_check_trace; $AR -t $libbar | grep bar.$OBJEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:283" +at_fn_check_status 0 $at_status "$at_srcdir/archive-in-archive.at:58" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/bindir.at:284: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS main.lo libfoo.la -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la -rpath $libdir" "bindir.at:284" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la -rpath $libdir + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_49 +#AT_START_50 +at_fn_group_banner 50 'exeext.at:26' \ + "both of -o prog and -o prog\$EXEEXT work" " " 3 +at_xfail=no +( + $as_echo "50. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +{ set +x +$as_echo "$at_srcdir/exeext.at:29: test -n \"\$EXEEXT\" || exit 77" +at_fn_check_prepare_dynamic "test -n \"$EXEEXT\" || exit 77" "exeext.at:29" +( $at_check_trace; test -n "$EXEEXT" || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:284" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exeext.at:29" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/bindir.at:285: \$LIBTOOL --mode=install \$lt_INSTALL libfoo.la \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir" "bindir.at:285" -( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir + +bin=`pwd`/bin +binext=`pwd`/binext +mkdir src $bin srcext $binext + +cat >src/prog.c <<'_ATEOF' + +int main(void) { return 0; } +_ATEOF + + +$CC $CPPFLAGS $CFLAGS -c src/prog.c -o src/prog.$OBJEXT + +{ set +x +$as_echo "$at_srcdir/exeext.at:42: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o src/prog src/prog.\$OBJEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/prog src/prog.$OBJEXT" "exeext.at:42" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/prog src/prog.$OBJEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:285" +at_fn_check_status 0 $at_status "$at_srcdir/exeext.at:42" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/bindir.at:286: \$LIBTOOL --mode=install \$lt_INSTALL main\$EXEEXT \$curdir/sbin/main\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT" "bindir.at:286" -( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT +{ set +x +$as_echo "$at_srcdir/exeext.at:44: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o srcext/prog\$EXEEXT src/prog.\$OBJEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o srcext/prog$EXEEXT src/prog.$OBJEXT" "exeext.at:44" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o srcext/prog$EXEEXT src/prog.$OBJEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:286" +at_fn_check_status 0 $at_status "$at_srcdir/exeext.at:44" $at_failed && at_fn_log_failure $at_traceon; } - # And ensure it went where we expect. Could be looking for any of 'cygfoo-0.dll', - # 'libfoo-0.dll', or 'libfoo.so.0'. We'll simplify this check by taking advantage - # of the fact that if it's a DLL, it has to go in bindir, so we'll not check for - # both forms in libdir. - { set +x -$as_echo "$at_srcdir/bindir.at:292: \$bindirneeded && { test -f \$libdir/../bin/???foo-0.dll || ls \$libdir/../bin/*foo*0* 2>/dev/null ; } || ls \$libdir/*foo*0* 2>/dev/null" -at_fn_check_prepare_dynamic "$bindirneeded && { test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null" "bindir.at:292" -( $at_check_trace; $bindirneeded && { test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null +$LIBTOOL --mode=install cp src/prog $bin/prog +$LIBTOOL --mode=install cp srcext/prog$EXEEXT $binext/prog$EXEEXT + +lt_exe=$bin/prog; if test -f "$bin/prog$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/exeext.at:50: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "exeext.at:50" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:292" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exeext.at:50" $at_failed && at_fn_log_failure $at_traceon; } - # And that it can be executed. - extrapath= - $bindirneeded && extrapath=$libdir/../bin - func_save_and_prepend_path $extrapath - lt_exe=$curdir/sbin/main$EXEEXT; if test -f "$curdir/sbin/main$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +lt_exe=$binext/prog$EXEEXT; if test -f "$binext/prog$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/bindir.at:298: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:298" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/exeext.at:51: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "exeext.at:51" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:298" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/exeext.at:51" $at_failed && at_fn_log_failure $at_traceon; } - func_restore_path - for bindir in \ - $curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/bin/ \ - $curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/bin \ - $curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/ \ - $curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0 \ - $curdir/usr/lib/gcc/i686-pc-cygwin/bin/ \ - $curdir/usr/lib/gcc/i686-pc-cygwin/bin \ - $curdir/usr/lib/gcc/i686-pc-cygwin/ \ - $curdir/usr/lib/gcc/i686-pc-cygwin \ - $curdir/usr/lib/bin/ \ - $curdir/usr/lib/bin \ - $curdir/usr/bin/ \ - $curdir/usr/bin \ - $curdir/bin/ \ - $curdir/bin \ - /tmp/foo/bar ; + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_50 +#AT_START_51 +at_fn_group_banner 51 'execute-mode.at:25' \ + "execute mode" " " 3 +at_xfail=no +( + $as_echo "51. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +eval `$LIBTOOL --config | $EGREP '^(FGREP)='` + +cat >foo <<'_ATEOF' +#! /bin/sh +if test $# -gt 0; then + for arg do + printf %s\\n "$arg" + done +else + : +fi +_ATEOF - # Clear any old stuff out before we install. Because bindir - # may be in /tmp, we have to take care to create it securely - # and not to delete and recreate it if we do. - rm -rf $libdir $curdir/bin $curdir/sbin $curdir/baz $curdir/usr - tmp= - case $bindir in - /tmp*) - # Create a temporary directory $tmp in $TMPDIR (default /tmp). - # Use mktemp if possible; otherwise fall back on mkdir, - # with $RANDOM to make collisions less likely. - : ${TMPDIR=/tmp} - { - tmp=` - (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null - ` && - test -n "$tmp" && test -d "$tmp" - } || { - tmp=$TMPDIR/foo$$-$RANDOM - (umask 077 && mkdir "$tmp") - } || exit 77 - bindir=$tmp/bar - ;; - *) - # Clear any old stuff out before we install. - rm -rf $bindir - as_dir=$bindir; as_fn_mkdir_p - ;; - esac +cat >lt-wrapper <<'_ATEOF' +#! /bin/sh +# Generated by GNU libtool. +# fake wrapper script. +program=lt-real +progdir=. +if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + exec "$progdir/$program" ${1+"$@"} + echo "$0: cannot exec $program $*" >&2 + exit 1 +fi +_ATEOF - # Relink with new rpaths. - { set +x -$as_echo "$at_srcdir/bindir.at:350: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -bindir \$bindir -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS foo.lo bar.lo baz.lo -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -bindir $bindir -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir" "bindir.at:350" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -bindir $bindir -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir + +cat >lt-real <<'_ATEOF' +#! /bin/sh +for arg +do + printf %s\\n "$arg" +done +cat +_ATEOF + + +cat >libfakelib.la <<'_ATEOF' +# libfakelib.la - a libtool library file +# Generated by ltmain.sh (GNU libtool 1.2605 2008/03/04 22:31:32) 2.3a +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +dlname='' +library_names='' +old_library='libfakelib.a' +inherited_linker_flags='' +dependency_libs='' +weak_library_names='' +current= +age= +revision= +installed=no +shouldnotlink=yes +dlopen='' +dlpreopen='' +libdir='' +_ATEOF + + +mkdir sub +cp foo sub/foo +chmod +x foo sub/foo lt-wrapper lt-real + +cat >liba.c <<'_ATEOF' +int a () { return 0; } +_ATEOF + + +cat >main.c <<'_ATEOF' +#include +extern int a (); +int main (int argc, char **argv) +{ + int i; + for (i=1; i>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:350" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:117" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/bindir.at:351: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS main.lo libfoo.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la" "bindir.at:351" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la +{ set +x +$as_echo "$at_srcdir/execute-mode.at:119: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la -rpath \$libdir liba.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la -rpath $libdir liba.lo" "execute-mode.at:119" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la -rpath $libdir liba.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:351" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:119" $at_failed && at_fn_log_failure $at_traceon; } - - # Recreate directories (bindir already done) and install. - as_dir=$libdir; as_fn_mkdir_p - as_dir=$curdir/sbin; as_fn_mkdir_p - { set +x -$as_echo "$at_srcdir/bindir.at:356: \$LIBTOOL --mode=install \$lt_INSTALL libfoo.la \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir" "bindir.at:356" -( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir +{ set +x +$as_echo "$at_srcdir/execute-mode.at:121: \$CC \$CPPFLAGS \$CFLAGS -c main.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "execute-mode.at:121" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:356" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:121" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/bindir.at:357: \$LIBTOOL --mode=install \$lt_INSTALL main\$EXEEXT \$curdir/sbin/main\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT" "bindir.at:357" -( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT +{ set +x +$as_echo "$at_srcdir/execute-mode.at:123: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la" "execute-mode.at:123" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:357" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:123" $at_failed && at_fn_log_failure $at_traceon; } - # Ensure it went to bindir rather than default dir this time. - { set +x -$as_echo "$at_srcdir/bindir.at:360: \$bindirneeded && { test -f \$bindir/???foo-0.dll || ls \$bindir/*foo*0* 2>/dev/null ; } || ls \$libdir/*foo*0* 2>/dev/null" -at_fn_check_prepare_dynamic "$bindirneeded && { test -f $bindir/???foo-0.dll || ls $bindir/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null" "bindir.at:360" -( $at_check_trace; $bindirneeded && { test -f $bindir/???foo-0.dll || ls $bindir/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null +# end of preparatory blurb. +# Now, when doing the tests, we both try the fake wrappers plus the real one +# (only the latter exposes the C wrappers used for w32 systems). +# With the latter, however, we need to ignore additional output; esp. wine +# may be rather noisy. + +{ set +x +$as_echo "$at_srcdir/execute-mode.at:132: \$LIBTOOL --mode=execute ./foo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo" "execute-mode.at:132" +( $at_check_trace; $LIBTOOL --mode=execute ./foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:360" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:132" $at_failed && at_fn_log_failure $at_traceon; } - - # And that it can be executed. - extrapath= - $bindirneeded && extrapath=$bindir - func_save_and_prepend_path $extrapath - lt_exe=$curdir/sbin/main$EXEEXT; if test -f "$curdir/sbin/main$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/bindir.at:366: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:366" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/execute-mode.at:133: \$LIBTOOL --mode=execute sub/foo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute sub/foo" "execute-mode.at:133" +( $at_check_trace; $LIBTOOL --mode=execute sub/foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:366" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:133" $at_failed && at_fn_log_failure $at_traceon; } - - func_restore_path - - # Clean up if we made a temp dir. Subdirs under our testdir get rm'd - # and recreated at the top of the loop. Securely created subdirs under - # /tmp get created precisely once and rm'd when we're done with them. - if test ! -z "$tmp" ; then - rm -rf "$tmp" - fi - - done -done - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_46 -#AT_START_47 -# 47. cwrapper.at:25: cwrapper for uninstalled executables -at_setup_line='cwrapper.at:25' -at_fn_banner 2 -at_desc="cwrapper for uninstalled executables" -at_desc_line=" 47: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "47. cwrapper.at:25: testing ..." - $at_traceon - - - -# make sure existing libtool is configured for shared libraries { set +x -$as_echo "$at_srcdir/cwrapper.at:29: \$LIBTOOL --features | grep 'disable shared libraries' && exit 77" -at_fn_check_prepare_dynamic "$LIBTOOL --features | grep 'disable shared libraries' && exit 77" "cwrapper.at:29" -( $at_check_trace; $LIBTOOL --features | grep 'disable shared libraries' && exit 77 +$as_echo "$at_srcdir/execute-mode.at:134: \$LIBTOOL --mode=execute ./foo foo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo foo" "execute-mode.at:134" +( $at_check_trace; $LIBTOOL --mode=execute ./foo foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/cwrapper.at:29" +echo >>"$at_stdout"; $as_echo "foo +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:134" $at_failed && at_fn_log_failure $at_traceon; } - -cat >trivial.c <<'_ATEOF' - -int main (void) -{ - return 0; -} -_ATEOF - -cat >liba.c <<'_ATEOF' -int liba_func1 (int arg) -{ - return arg + 1; -} -_ATEOF - -cat >usea.c <<'_ATEOF' -extern int liba_func1 (int arg); -int main (void) -{ - int a = 2; - int b = liba_func1 (a); - if (b == 3) return 0; - return 1; -} -_ATEOF - - -orig_CFLAGS=$CFLAGS -orig_LIBTOOL=$LIBTOOL -for restrictive_flags in '-Wall -Werror' '-std=c89 -Wall -Werror' '-std=c99 -Wall -Werror'; do - CFLAGS="$orig_CFLAGS $restrictive_flags" - sed "s/LTCFLAGS=.*/&' $restrictive_flags'/" < "$orig_LIBTOOL" > ./libtool - chmod +x libtool - LIBTOOL=./libtool - - # make sure $restrictive_flags do not cause a failure - # themselves (e.g. because a non-gcc compiler doesn't - # understand them) - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c trivial.c || continue - - { set +x -$as_echo "$at_srcdir/cwrapper.at:69: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "cwrapper.at:69" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c +{ set +x +$as_echo "$at_srcdir/execute-mode.at:136: \$LIBTOOL --mode=execute ./lt-wrapper foo >"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:69" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:136" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/cwrapper.at:71: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -version-info=0.0.0 -no-undefined -o liba.la -rpath /foo liba.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -version-info=0.0.0 -no-undefined -o liba.la -rpath /foo liba.lo" "cwrapper.at:71" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -version-info=0.0.0 -no-undefined -o liba.la -rpath /foo liba.lo +{ set +x +$as_echo "$at_srcdir/execute-mode.at:138: cd sub && \$LIBTOOL --mode=execute ./foo ../foo" +at_fn_check_prepare_dynamic "cd sub && $LIBTOOL --mode=execute ./foo ../foo" "execute-mode.at:138" +( $at_check_trace; cd sub && $LIBTOOL --mode=execute ./foo ../foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:71" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "../foo +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:138" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/cwrapper.at:73: test -f liba.la" -at_fn_check_prepare_trace "cwrapper.at:73" -( $at_check_trace; test -f liba.la +# suppose that ./foo is gdb, and lt-wrapper is the wrapper script. +{ set +x +$as_echo "$at_srcdir/execute-mode.at:141: \$LIBTOOL --mode=execute ./foo lt-wrapper bar baz >"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:73" +echo >>"$at_stdout"; $as_echo "./lt-real +bar +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:141" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/cwrapper.at:75: \$CC \$CPPFLAGS \$CFLAGS -c usea.c" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c usea.c" "cwrapper.at:75" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c usea.c +# check that stdin works even with -dlopen. +{ set +x +$as_echo "$at_srcdir/execute-mode.at:148: echo bar | \$LIBTOOL --mode=execute -dlopen libfakelib.la ./lt-wrapper foo" +at_fn_check_prepare_notrace 'a shell pipeline' "execute-mode.at:148" +( $at_check_trace; echo bar | $LIBTOOL --mode=execute -dlopen libfakelib.la ./lt-wrapper foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:75" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo +bar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:148" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/cwrapper.at:77: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o usea\$EXEEXT usea.\$OBJEXT liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la" "cwrapper.at:77" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la + +# Check that a missing real program causes an error. +# The error message and code are likely to be 126, +# "No such file or directory" but system-dependent. +mv -f lt-real lt-backup +{ set +x +$as_echo "$at_srcdir/execute-mode.at:157: \$LIBTOOL --mode=execute ./lt-wrapper foo >"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:77" +at_fn_check_status 1 $at_status "$at_srcdir/execute-mode.at:157" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./usea; if test -f "./usea$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +mv -f lt-backup lt-real + +# Now use arguments that require decent quoting. { set +x -$as_echo "$at_srcdir/cwrapper.at:79: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "cwrapper.at:79" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/execute-mode.at:162: \$LIBTOOL --mode=execute ./foo \"arg with special chars: \\\$!&*\\\`'()\"" +at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:162" +( $at_check_trace; $LIBTOOL --mode=execute ./foo "arg with special chars: \$!&*\`'()" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:79" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "arg with special chars: \$!&*\`'() +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:162" $at_failed && at_fn_log_failure $at_traceon; } - -done - - -# Test run-time activation of wrapper debugging. -# This is not part of the loop above, because we -# need to check, not ignore, the output. -CFLAGS="$orig_CFLAGS" -LIBTOOL=$orig_LIBTOOL - { set +x -$as_echo "$at_srcdir/cwrapper.at:89: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "cwrapper.at:89" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c +$as_echo "$at_srcdir/execute-mode.at:165: \$LIBTOOL --mode=execute ./lt-wrapper \"arg with special chars: \\\$!&*\\\`'()\" >"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:89" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "arg with special chars: \$!&*\`'() +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:165" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/cwrapper.at:91: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo" "cwrapper.at:91" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo +$as_echo "$at_srcdir/execute-mode.at:168: \$LIBTOOL --mode=execute ./foo lt-wrapper \"arg with special chars: \\\$!&*\\\`'()\"" +at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:168" +( $at_check_trace; $LIBTOOL --mode=execute ./foo lt-wrapper "arg with special chars: \$!&*\`'()" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:91" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "./lt-real +arg with special chars: \$!&*\`'() +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:168" $at_failed && at_fn_log_failure $at_traceon; } +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/cwrapper.at:93: test -f liba.la" -at_fn_check_prepare_trace "cwrapper.at:93" -( $at_check_trace; test -f liba.la +$as_echo "$at_srcdir/execute-mode.at:172: if \$LIBTOOL --mode=execute \"\$lt_exe\" \"arg with special chars: \\\$!&*\\\`'()\"; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:172" +( $at_check_trace; if $LIBTOOL --mode=execute "$lt_exe" "arg with special chars: \$!&*\`'()"; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:93" +echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:172" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/cwrapper.at:95: \$CC \$CPPFLAGS \$CFLAGS -c usea.c" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c usea.c" "cwrapper.at:95" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c usea.c +$as_echo "$at_srcdir/execute-mode.at:174: \$FGREP 'arg with special chars: \$!&*\`'\\''()' stdout" +at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:174" +( $at_check_trace; $FGREP 'arg with special chars: $!&*`'\''()' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:95" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:174" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/cwrapper.at:97: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o usea\$EXEEXT usea.\$OBJEXT liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la" "cwrapper.at:97" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la + +# We always pair two args. The first one is never the empty string. +arg1= +for arg2 in \ + 'def ghi' '' \ + 'd"e' 'f"g' \ + 'd\"e' 'f\"g' \ + 'd\\"e' 'f\\"g' \ + 'd\\\"e' 'f\\\"g' \ + 'd\' '' \ + 'd\\' '' \ + 'd\\\' '' \ + 'd\\\\' '' \ + '<' '>' \ + '' '' +do + if test -z "$arg1"; then + arg1=$arg2; continue + fi + { set +x +$as_echo "$at_srcdir/execute-mode.at:194: \$LIBTOOL --mode=execute ./foo abc \"\$arg1\" \"\$arg2\" xyz" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo abc \"$arg1\" \"$arg2\" xyz" "execute-mode.at:194" +( $at_check_trace; $LIBTOOL --mode=execute ./foo abc "$arg1" "$arg2" xyz ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:97" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:194" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./usea; if test -f "./usea$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/cwrapper.at:99: if \"\$lt_exe\" --lt-debug; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" --lt-debug; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "cwrapper.at:99" -( $at_check_trace; if "$lt_exe" --lt-debug; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + { set +x +$as_echo "$at_srcdir/execute-mode.at:195: \$FGREP \"\$arg1\" stdout" +at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:195" +( $at_check_trace; $FGREP "$arg1" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:99" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:195" $at_failed && at_fn_log_failure $at_traceon; } - -case $host_os in - mingw*) - tr -d '\015' < stderr > stderr.t - mv -f stderr.t stderr ;; -esac -{ set +x -$as_echo "$at_srcdir/cwrapper.at:101: grep 'libtool wrapper' stderr" -at_fn_check_prepare_trace "cwrapper.at:101" -( $at_check_trace; grep 'libtool wrapper' stderr + { set +x +$as_echo "$at_srcdir/execute-mode.at:196: test -z \"\$arg2\" || \$FGREP \"\$arg2\" stdout" +at_fn_check_prepare_dynamic "test -z \"$arg2\" || $FGREP \"$arg2\" stdout" "execute-mode.at:196" +( $at_check_trace; test -z "$arg2" || $FGREP "$arg2" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:101" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:196" $at_failed && at_fn_log_failure $at_traceon; } + { set +x +$as_echo "$at_srcdir/execute-mode.at:197: test \`sed -n '/^abc\$/,/^xyz\$/p' stdout | wc -l\` -eq 4" +at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:197" +( $at_check_trace; test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:197" +$at_failed && at_fn_log_failure +$at_traceon; } - -# Test compile-time activation of wrapper debugging. -# We structure this test as a loop, so that we can 'break' out of it -# if necessary -- even though the loop by design executes only once. -for debugwrapper_flags in '-DLT_DEBUGWRAPPER'; do - CFLAGS="$orig_CFLAGS $debugwrapper_flags" - sed -e "s/LTCFLAGS=.*/&' $debugwrapper_flags'/" \ - -e "s/^lt_option_debug=/lt_option_debug=1/" \ - < "$orig_LIBTOOL" > ./libtool - LIBTOOL=./libtool - - # make sure $debugwrapper_flags do not cause a failure - # themselves (e.g. because a non-gcc compiler doesn't - # understand them) - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c trivial.c || continue + { set +x +$as_echo "$at_srcdir/execute-mode.at:198: \$LIBTOOL --mode=execute ./lt-wrapper abc \"\$arg1\" \"\$arg2\" xyz >"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:198" +$at_failed && at_fn_log_failure +$at_traceon; } { set +x -$as_echo "$at_srcdir/cwrapper.at:119: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "cwrapper.at:119" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c +$as_echo "$at_srcdir/execute-mode.at:199: \$FGREP \"\$arg1\" stdout" +at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:199" +( $at_check_trace; $FGREP "$arg1" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:119" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:199" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/cwrapper.at:121: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo" "cwrapper.at:121" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo +$as_echo "$at_srcdir/execute-mode.at:200: test -z \"\$arg2\" || \$FGREP \"\$arg2\" stdout" +at_fn_check_prepare_dynamic "test -z \"$arg2\" || $FGREP \"$arg2\" stdout" "execute-mode.at:200" +( $at_check_trace; test -z "$arg2" || $FGREP "$arg2" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:121" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:200" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/cwrapper.at:123: test -f liba.la" -at_fn_check_prepare_trace "cwrapper.at:123" -( $at_check_trace; test -f liba.la +$as_echo "$at_srcdir/execute-mode.at:201: test \`sed -n '/^abc\$/,/^xyz\$/p' stdout | wc -l\` -eq 4" +at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:201" +( $at_check_trace; test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:123" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:201" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/cwrapper.at:125: \$CC \$CPPFLAGS \$CFLAGS -c usea.c" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c usea.c" "cwrapper.at:125" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c usea.c +$as_echo "$at_srcdir/execute-mode.at:202: \$LIBTOOL --mode=execute ./foo lt-wrapper abc \"\$arg1\" \"\$arg2\" xyz" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./foo lt-wrapper abc \"$arg1\" \"$arg2\" xyz" "execute-mode.at:202" +( $at_check_trace; $LIBTOOL --mode=execute ./foo lt-wrapper abc "$arg1" "$arg2" xyz ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:125" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:202" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/cwrapper.at:127: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o usea\$EXEEXT usea.\$OBJEXT liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la" "cwrapper.at:127" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la +$as_echo "$at_srcdir/execute-mode.at:203: \$FGREP \"\$arg1\" stdout" +at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:203" +( $at_check_trace; $FGREP "$arg1" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:127" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:203" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./usea; if test -f "./usea$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/cwrapper.at:129: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "cwrapper.at:129" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + { set +x +$as_echo "$at_srcdir/execute-mode.at:204: test -z \"\$arg2\" || \$FGREP \"\$arg2\" stdout" +at_fn_check_prepare_dynamic "test -z \"$arg2\" || $FGREP \"$arg2\" stdout" "execute-mode.at:204" +( $at_check_trace; test -z "$arg2" || $FGREP "$arg2" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:129" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:204" $at_failed && at_fn_log_failure $at_traceon; } - - case $host_os in - mingw*) - tr -d '\015' < stderr > stderr.t - mv -f stderr.t stderr ;; -esac { set +x -$as_echo "$at_srcdir/cwrapper.at:131: grep 'libtool wrapper' stderr" -at_fn_check_prepare_trace "cwrapper.at:131" -( $at_check_trace; grep 'libtool wrapper' stderr +$as_echo "$at_srcdir/execute-mode.at:205: test \`sed -n '/^abc\$/,/^xyz\$/p' stdout | wc -l\` -eq 4" +at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:205" +( $at_check_trace; test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:131" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:205" $at_failed && at_fn_log_failure $at_traceon; } -done - - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_47 -#AT_START_48 -# 48. deplib-in-subdir.at:34: deplib in subdir -at_setup_line='deplib-in-subdir.at:34' -at_fn_banner 2 -at_desc="deplib in subdir" -at_desc_line=" 48: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "48. deplib-in-subdir.at:34: testing ..." - $at_traceon - - - -cat >a1.c <<'_ATEOF' -int a1 () { return 0; } -_ATEOF - -cat >a2.c <<'_ATEOF' -int a2 () { return 0; } -_ATEOF - -cat >a3.c <<'_ATEOF' -int a3 () { return 0; } -_ATEOF - -cat >b1.c <<'_ATEOF' -extern int a1 (); -int b1 () { return a1 (); } -_ATEOF - -cat >b2.c <<'_ATEOF' -extern int a2 (); -int b2 () { return a2 (); } -_ATEOF - -cat >b3.c <<'_ATEOF' -extern int a3 (); -int b3 () { return a3 (); } -_ATEOF - -cat >m.c <<'_ATEOF' -extern int b1 (); -extern int b2 (); -extern int b3 (); -int main () { return b1 () + b2 () + b3 (); } -_ATEOF - - -cwd=`pwd` -instdir=$cwd/inst -lib1dir=$instdir/lib1 -lib2dir=$instdir/lib2 -bindir=$instdir/bin -addrunpath=$cwd/foobar -LDFLAGS="$LDFLAGS -no-undefined" - -flags='-export-symbols-regex ".*"' - -mkdir -p sub1 sub2/subsub sub3/subsub $instdir $lib1dir $lib2dir $bindir + { set +x +$as_echo "$at_srcdir/execute-mode.at:206: \$LIBTOOL --mode=execute ./main\$EXEEXT abc \"\$arg1\" \"\$arg2\" xyz" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute ./main$EXEEXT abc \"$arg1\" \"$arg2\" xyz" "execute-mode.at:206" +( $at_check_trace; $LIBTOOL --mode=execute ./main$EXEEXT abc "$arg1" "$arg2" xyz +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:206" +$at_failed && at_fn_log_failure +$at_traceon; } -for file in a1.c a2.c a3.c b1.c b2.c b3.c; do - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file -done -$CC $CPPFLAGS $CFLAGS -c m.c -{ set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:81: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub1/liba1.la a1.lo -rpath \$lib1dir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba1.la a1.lo -rpath $lib1dir" "deplib-in-subdir.at:81" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba1.la a1.lo -rpath $lib1dir + { set +x +$as_echo "$at_srcdir/execute-mode.at:207: \$FGREP \"\$arg1\" stdout" +at_fn_check_prepare_dynamic "$FGREP \"$arg1\" stdout" "execute-mode.at:207" +( $at_check_trace; $FGREP "$arg1" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:81" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:207" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:83: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub1/liba2.la a2.lo -rpath \$lib1dir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba2.la a2.lo -rpath $lib1dir" "deplib-in-subdir.at:83" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba2.la a2.lo -rpath $lib1dir + { set +x +$as_echo "$at_srcdir/execute-mode.at:208: test -z \"\$arg2\" || \$FGREP \"\$arg2\" stdout" +at_fn_check_prepare_dynamic "test -z \"$arg2\" || $FGREP \"$arg2\" stdout" "execute-mode.at:208" +( $at_check_trace; test -z "$arg2" || $FGREP "$arg2" stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:83" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:208" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:85: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub1/liba3.la a3.lo -rpath \$lib1dir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba3.la a3.lo -rpath $lib1dir" "deplib-in-subdir.at:85" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba3.la a3.lo -rpath $lib1dir + # Do not match EOL here, cross setups may have an extra \r here. + { set +x +$as_echo "$at_srcdir/execute-mode.at:210: test \`sed -n '/^abc/,/^xyz/p' stdout | wc -l\` -eq 4" +at_fn_check_prepare_notrace 'a `...` command substitution' "execute-mode.at:210" +( $at_check_trace; test `sed -n '/^abc/,/^xyz/p' stdout | wc -l` -eq 4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:85" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:210" $at_failed && at_fn_log_failure $at_traceon; } + arg1= +done +# Check that .la files are not transformed by the wrapper searching loop. { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:88: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub2/subsub/libb1.la b1.lo -rpath \$lib2dir sub1/liba1.la' \"\$flags\"" -at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub2/subsub/libb1.la b1.lo -rpath $lib2dir sub1/liba1.la' \"$flags\"" "deplib-in-subdir.at:88" -( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub2/subsub/libb1.la b1.lo -rpath $lib2dir sub1/liba1.la' "$flags" +$as_echo "$at_srcdir/execute-mode.at:215: \$LIBTOOL --mode=execute echo ./main\$EXEEXT liba.lo libfakelib.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=execute echo ./main$EXEEXT liba.lo libfakelib.la" "execute-mode.at:215" +( $at_check_trace; $LIBTOOL --mode=execute echo ./main$EXEEXT liba.lo libfakelib.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:88" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:215" $at_failed && at_fn_log_failure $at_traceon; } -cd sub2 +# This could be .libs/lt-main or similar (or just plain `main'). { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:92: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o subsub/libb2.la ../b2.lo -rpath \$lib2dir ../sub1/liba2.la' \"\$flags\"" -at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/libb2.la ../b2.lo -rpath $lib2dir ../sub1/liba2.la' \"$flags\"" "deplib-in-subdir.at:92" -( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/libb2.la ../b2.lo -rpath $lib2dir ../sub1/liba2.la' "$flags" +$as_echo "$at_srcdir/execute-mode.at:217: grep main stdout" +at_fn_check_prepare_trace "execute-mode.at:217" +( $at_check_trace; grep main stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:92" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:217" $at_failed && at_fn_log_failure $at_traceon; } -cd subsub { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:96: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb3.la ../../b3.lo -rpath \$lib2dir ../../sub1/liba3.la' \"\$flags\"" -at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb3.la ../../b3.lo -rpath $lib2dir ../../sub1/liba3.la' \"$flags\"" "deplib-in-subdir.at:96" -( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb3.la ../../b3.lo -rpath $lib2dir ../../sub1/liba3.la' "$flags" +$as_echo "$at_srcdir/execute-mode.at:218: grep liba.lo stdout" +at_fn_check_prepare_trace "execute-mode.at:218" +( $at_check_trace; grep liba.lo stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:96" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:218" $at_failed && at_fn_log_failure $at_traceon; } -cd ../.. { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:100: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub3/subsub/m1\$EXEEXT m.\$OBJEXT sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub3/subsub/m1$EXEEXT m.$OBJEXT sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la" "deplib-in-subdir.at:100" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub3/subsub/m1$EXEEXT m.$OBJEXT sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la +$as_echo "$at_srcdir/execute-mode.at:219: grep libfakelib.la stdout" +at_fn_check_prepare_trace "execute-mode.at:219" +( $at_check_trace; grep libfakelib.la stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:100" +at_fn_check_status 0 $at_status "$at_srcdir/execute-mode.at:219" $at_failed && at_fn_log_failure $at_traceon; } -cd sub3 -{ set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:104: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o subsub/m2\$EXEEXT ../m.\$OBJEXT ../sub2/subsub/libb1.la ../sub2/subsub/libb2.la ../sub2/subsub/libb3.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/m2$EXEEXT ../m.$OBJEXT ../sub2/subsub/libb1.la ../sub2/subsub/libb2.la ../sub2/subsub/libb3.la" "deplib-in-subdir.at:104" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/m2$EXEEXT ../m.$OBJEXT ../sub2/subsub/libb1.la ../sub2/subsub/libb2.la ../sub2/subsub/libb3.la -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:104" -$at_failed && at_fn_log_failure -$at_traceon; } -cd subsub -{ set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:108: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m3\$EXEEXT ../../m.\$OBJEXT ../../sub2/subsub/libb1.la ../../sub2/subsub/libb2.la ../../sub2/subsub/libb3.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m3$EXEEXT ../../m.$OBJEXT ../../sub2/subsub/libb1.la ../../sub2/subsub/libb2.la ../../sub2/subsub/libb3.la" "deplib-in-subdir.at:108" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m3$EXEEXT ../../m.$OBJEXT ../../sub2/subsub/libb1.la ../../sub2/subsub/libb2.la ../../sub2/subsub/libb3.la -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:108" -$at_failed && at_fn_log_failure -$at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_51 +#AT_START_52 +at_fn_group_banner 52 'bindir.at:64' \ + "bindir compile check" " " 3 +at_xfail=no +( + $as_echo "52. $at_setup_line: testing $at_desc ..." + $at_traceon -cd ../.. -for i in 1 2 3; do - lt_exe=./sub3/subsub/m$i; if test -f "./sub3/subsub/m$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:114: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:114" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:114" -$at_failed && at_fn_log_failure -$at_traceon; } +cat >simple.c <<'_ATEOF' +int main() { return 0;} +_ATEOF - cd sub3 - lt_exe=./subsub/m$i; if test -f "./subsub/m$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:116: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:116" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:116" -$at_failed && at_fn_log_failure -$at_traceon; } +$CC $CPPFLAGS $CFLAGS -o simple simple.c || noskip=false +rm -f simple - cd subsub - lt_exe=./m$i; if test -f "./m$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:118: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:118" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/bindir.at:73: \$noskip || (exit 77)" +at_fn_check_prepare_dynamic "$noskip || (exit 77)" "bindir.at:73" +( $at_check_trace; $noskip || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:118" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:73" $at_failed && at_fn_log_failure $at_traceon; } - cd ../.. -done + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_52 +#AT_START_53 +at_fn_group_banner 53 'bindir.at:81' \ + "bindir basic lib test" " " 3 +at_xfail=no +( + $as_echo "53. $at_setup_line: testing $at_desc ..." + $at_traceon -for i in 1 2 3; do - { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:123: \$LIBTOOL --mode=install cp sub1/liba\$i.la \$lib1dir/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp sub1/liba$i.la $lib1dir/liba.la" "deplib-in-subdir.at:123" -( $at_check_trace; $LIBTOOL --mode=install cp sub1/liba$i.la $lib1dir/liba.la + +bindirneeded=: +case "$host_os" in + cygwin*|mingw*|cegcc*) + ;; + *) + bindirneeded=false + ;; +esac + +#### +# These routines save the PATH before a test and restore it after, +# prepending a chosen directory to the path on the platforms where +# -bindir is needed after saving. +# + +func_save_and_prepend_path () +{ + save_PATH=$PATH + if $bindirneeded ; then + PATH=$1:$PATH + fi + export PATH +} + +func_restore_path () +{ + PATH=$save_PATH + export PATH +} + +cat >foo.c <<'_ATEOF' + +int x=11; +_ATEOF + + +cat >baz.c <<'_ATEOF' + +extern int x; +int baz (void); +int baz (void) { return x;} +_ATEOF + + +cat >bar.c <<'_ATEOF' + +extern int baz (void); +int y=3; +int bar (void); +int bar (void) { return y + baz ();} +_ATEOF + + +cat >main.c <<'_ATEOF' + +#include +extern int baz (void); +extern int bar (void); +int main() { +if (baz () + bar () - 25) abort (); +return 0; +} +_ATEOF + + + +curdir=`pwd` +eval "`$LIBTOOL --config | grep '^objdir='`" + +{ set +x +$as_echo "$at_srcdir/bindir.at:144: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o foo.lo \$CPPFLAGS \$CFLAGS foo.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c" "bindir.at:144" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:123" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:144" $at_failed && at_fn_log_failure $at_traceon; } -done - { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:126: \$LIBTOOL --mode=install cp sub2/subsub/libb1.la \$lib2dir/libb1.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp sub2/subsub/libb1.la $lib2dir/libb1.la" "deplib-in-subdir.at:126" -( $at_check_trace; $LIBTOOL --mode=install cp sub2/subsub/libb1.la $lib2dir/libb1.la +$as_echo "$at_srcdir/bindir.at:145: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o baz.lo \$CPPFLAGS \$CFLAGS baz.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c" "bindir.at:145" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:126" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:145" $at_failed && at_fn_log_failure $at_traceon; } -cd sub2 { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:128: \$LIBTOOL --mode=install cp subsub/libb2.la \$lib2dir/libb2.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp subsub/libb2.la $lib2dir/libb2.la" "deplib-in-subdir.at:128" -( $at_check_trace; $LIBTOOL --mode=install cp subsub/libb2.la $lib2dir/libb2.la +$as_echo "$at_srcdir/bindir.at:146: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS foo.lo baz.lo -rpath \$curdir/\$objdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo baz.lo -rpath $curdir/$objdir" "bindir.at:146" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo baz.lo -rpath $curdir/$objdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:128" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:146" $at_failed && at_fn_log_failure $at_traceon; } -cd subsub + { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:130: \$LIBTOOL --mode=install cp libb3.la \$lib2dir/libb3.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp libb3.la $lib2dir/libb3.la" "deplib-in-subdir.at:130" -( $at_check_trace; $LIBTOOL --mode=install cp libb3.la $lib2dir/libb3.la +$as_echo "$at_srcdir/bindir.at:148: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o bar.lo \$CPPFLAGS \$CFLAGS bar.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c" "bindir.at:148" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:130" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:148" $at_failed && at_fn_log_failure $at_traceon; } -cd ../.. - { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:133: \$LIBTOOL --mode=install cp sub3/subsub/m1\$EXEEXT \$bindir/m1\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp sub3/subsub/m1$EXEEXT $bindir/m1$EXEEXT" "deplib-in-subdir.at:133" -( $at_check_trace; $LIBTOOL --mode=install cp sub3/subsub/m1$EXEEXT $bindir/m1$EXEEXT +$as_echo "$at_srcdir/bindir.at:149: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -o libbar.la \$CPPFLAGS \$CFLAGS \$LDFLAGS bar.lo libfoo.la -rpath \$curdir/\$objdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS bar.lo libfoo.la -rpath $curdir/$objdir" "bindir.at:149" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS bar.lo libfoo.la -rpath $curdir/$objdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:133" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:149" $at_failed && at_fn_log_failure $at_traceon; } -cd sub3 + { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:135: \$LIBTOOL --mode=install cp subsub/m2\$EXEEXT \$bindir/m2\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp subsub/m2$EXEEXT $bindir/m2$EXEEXT" "deplib-in-subdir.at:135" -( $at_check_trace; $LIBTOOL --mode=install cp subsub/m2$EXEEXT $bindir/m2$EXEEXT +$as_echo "$at_srcdir/bindir.at:151: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o main.lo \$CPPFLAGS \$CFLAGS main.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c" "bindir.at:151" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:135" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:151" $at_failed && at_fn_log_failure $at_traceon; } -cd subsub { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:137: \$LIBTOOL --mode=install cp m3\$EXEEXT \$bindir/m3\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m3$EXEEXT $bindir/m3$EXEEXT" "deplib-in-subdir.at:137" -( $at_check_trace; $LIBTOOL --mode=install cp m3$EXEEXT $bindir/m3$EXEEXT +$as_echo "$at_srcdir/bindir.at:152: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS main.lo libbar.la libfoo.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libbar.la libfoo.la" "bindir.at:152" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libbar.la libfoo.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:137" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:152" $at_failed && at_fn_log_failure $at_traceon; } -cd ../.. +# Check both static and shared versions run. We don't install them +# here, that will be covered by the later tests; we've rpath'd things +# so that they can all be run in situ. + +lt_exe=$LIBTOOL; if test -f "$LIBTOOL$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:140: \$LIBTOOL --mode=clean rm -f sub1/liba1.la sub1/liba2.la sub1/liba3.la sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la sub3/subsub/m1\$EXEEXT sub3/subsub/m2\$EXEEXT sub3/subsub/m3\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f sub1/liba1.la sub1/liba2.la sub1/liba3.la sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la sub3/subsub/m1$EXEEXT sub3/subsub/m2$EXEEXT sub3/subsub/m3$EXEEXT" "deplib-in-subdir.at:140" -( $at_check_trace; $LIBTOOL --mode=clean rm -f sub1/liba1.la sub1/liba2.la sub1/liba3.la sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la sub3/subsub/m1$EXEEXT sub3/subsub/m2$EXEEXT sub3/subsub/m3$EXEEXT +$as_echo "$at_srcdir/bindir.at:158: if \$LIBTOOL --mode=execute \"\$lt_exe\" --mode=execute ./main\$EXEEXT; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute \"$lt_exe\" --mode=execute ./main$EXEEXT; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:158" +( $at_check_trace; if $LIBTOOL --mode=execute "$lt_exe" --mode=execute ./main$EXEEXT; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:140" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:158" $at_failed && at_fn_log_failure $at_traceon; } -for i in 1 2 3; do - lt_exe=$bindir/m$i$EXEEXT; if test -f "$bindir/m$i$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:146: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:146" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:146" -$at_failed && at_fn_log_failure -$at_traceon; } +# Ensure libraries can be found on PATH, if we are on one +# of the affected platforms, before testing the shared version. - cd $bindir - lt_exe=./m$i$EXEEXT; if test -f "./m$i$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +func_save_and_prepend_path $curdir/$objdir +$bindirneeded && { + lt_exe=$LIBTOOL; if test -f "$LIBTOOL$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:148: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:148" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/bindir.at:165: if \$LIBTOOL --mode=execute \"\$lt_exe\" --mode=execute \$objdir/main\$EXEEXT; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute \"$lt_exe\" --mode=execute $objdir/main$EXEEXT; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:165" +( $at_check_trace; if $LIBTOOL --mode=execute "$lt_exe" --mode=execute $objdir/main$EXEEXT; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:148" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:165" $at_failed && at_fn_log_failure $at_traceon; } - cd $cwd -done +} -PATH=$bindir${PATH_SEPARATOR-:}$PATH -for i in 1 2 3; do - lt_exe=m$i$EXEEXT; if test -f "m$i$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +# In fact, prepending the PATH as above is superfluous on the windows +# platforms that this feature is primarily aimed at, as the DLL search +# path always includes the directory from which the app was launched. +# To make sure it still works even when not side-by-side, we'll install +# the main executable and execute it from there while the PATH still +# points to the shared libs in the .libs subdir. On other platforms, +# the rpaths we set at link time will guarantee it runs from the bindir. + +mkdir $curdir/bin { set +x -$as_echo "$at_srcdir/deplib-in-subdir.at:154: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:154" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/bindir.at:177: \$LIBTOOL --mode=install \$lt_INSTALL main\$EXEEXT \$curdir/bin/main\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/bin/main$EXEEXT" "bindir.at:177" +( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/bin/main$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:154" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:177" $at_failed && at_fn_log_failure $at_traceon; } - -done - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_48 -#AT_START_49 -# 49. infer-tag.at:30: inferred tag -at_setup_line='infer-tag.at:30' -at_fn_banner 2 -at_desc="inferred tag" -at_desc_line=" 49: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "49. infer-tag.at:30: testing ..." - $at_traceon - - - -cat >a.c <<'_ATEOF' -int a (void) { return 0; } -_ATEOF - - +lt_exe=$curdir/bin/main$EXEEXT; if test -f "$curdir/bin/main$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/infer-tag.at:37: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c" "infer-tag.at:37" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c +$as_echo "$at_srcdir/bindir.at:178: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:178" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:37" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:178" $at_failed && at_fn_log_failure $at_traceon; } +func_restore_path + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_49 -#AT_START_50 -# 50. infer-tag.at:42: CXX inferred tag -at_setup_line='infer-tag.at:42' -at_fn_banner 2 -at_desc="CXX inferred tag" -at_desc_line=" 50: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_53 +#AT_START_54 +at_fn_group_banner 54 'bindir.at:190' \ + "bindir install tests" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "50. infer-tag.at:42: testing ..." + $as_echo "54. $at_setup_line: testing $at_desc ..." $at_traceon -{ set +x -$as_echo "$at_srcdir/infer-tag.at:43: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "infer-tag.at:43" -( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:43" -$at_failed && at_fn_log_failure -$at_traceon; } +bindirneeded=: +case "$host_os" in + cygwin*|mingw*|cegcc*) + ;; + *) + bindirneeded=false + ;; +esac +eval "`$LIBTOOL --config | grep '^build_libtool_libs='`" { set +x -$as_echo "$at_srcdir/infer-tag.at:43: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" -at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "infer-tag.at:43" -( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) +$as_echo "$at_srcdir/bindir.at:202: test \"\$build_libtool_libs\" = yes || (exit 77)" +at_fn_check_prepare_dynamic "test \"$build_libtool_libs\" = yes || (exit 77)" "bindir.at:202" +( $at_check_trace; test "$build_libtool_libs" = yes || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:43" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:202" $at_failed && at_fn_log_failure $at_traceon; } +#### +# These routines save the PATH before a test and restore it after, +# prepending a chosen directory to the path on the platforms where +# -bindir is needed after saving. +# +func_save_and_prepend_path () +{ + save_PATH=$PATH + if $bindirneeded ; then + PATH=$1:$PATH + fi + export PATH +} -cat >a.cpp <<'_ATEOF' -int a (void) { return 0; } -_ATEOF +func_restore_path () +{ + PATH=$save_PATH + export PATH +} +cat >foo.c <<'_ATEOF' -{ set +x -$as_echo "$at_srcdir/infer-tag.at:50: \$LIBTOOL --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c a.cpp" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c a.cpp" "infer-tag.at:50" -( $at_check_trace; $LIBTOOL --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c a.cpp -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:50" -$at_failed && at_fn_log_failure -$at_traceon; } +int x=11; +_ATEOF - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_50 -#AT_START_51 -# 51. infer-tag.at:55: F77 inferred tag -at_setup_line='infer-tag.at:55' -at_fn_banner 2 -at_desc="F77 inferred tag" -at_desc_line=" 51: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "51. infer-tag.at:55: testing ..." - $at_traceon +cat >baz.c <<'_ATEOF' +extern int x; +int baz (void); +int baz (void) { return x;} +_ATEOF -{ set +x -$as_echo "$at_srcdir/infer-tag.at:56: { test -n \"\$F77\" && test \"X\$F77\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$F77\" && test \"X$F77\" != Xno; } || (exit 77)" "infer-tag.at:56" -( $at_check_trace; { test -n "$F77" && test "X$F77" != Xno; } || (exit 77) -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:56" -$at_failed && at_fn_log_failure -$at_traceon; } +cat >bar.c <<'_ATEOF' +extern int baz (void); +int y=3; +int bar (void); +int bar (void) { return y + baz ();} +_ATEOF +cat >main.c <<'_ATEOF' -cat >a.f <<'_ATEOF' - program main - end +#include +extern int baz (void); +extern int bar (void); +int main() { +if (baz () + bar () - 25) abort (); +return 0; +} _ATEOF +# We only need to compile once, but we'll need to relink for each different value +# of libdir in order to set the rpath, and we'll install for each combination of +# libdir and bindir. + { set +x -$as_echo "$at_srcdir/infer-tag.at:64: \$LIBTOOL --mode=compile \$F77 \$FFLAGS -c a.f" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $F77 $FFLAGS -c a.f" "infer-tag.at:64" -( $at_check_trace; $LIBTOOL --mode=compile $F77 $FFLAGS -c a.f +$as_echo "$at_srcdir/bindir.at:256: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o foo.lo \$CPPFLAGS \$CFLAGS foo.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c" "bindir.at:256" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS foo.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:64" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:256" $at_failed && at_fn_log_failure $at_traceon; } - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_51 -#AT_START_52 -# 52. infer-tag.at:69: FC inferred tag -at_setup_line='infer-tag.at:69' -at_fn_banner 2 -at_desc="FC inferred tag" -at_desc_line=" 52: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "52. infer-tag.at:69: testing ..." - $at_traceon - - { set +x -$as_echo "$at_srcdir/infer-tag.at:70: { test -n \"\$FC\" && test \"X\$FC\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$FC\" && test \"X$FC\" != Xno; } || (exit 77)" "infer-tag.at:70" -( $at_check_trace; { test -n "$FC" && test "X$FC" != Xno; } || (exit 77) +$as_echo "$at_srcdir/bindir.at:257: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o baz.lo \$CPPFLAGS \$CFLAGS baz.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c" "bindir.at:257" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS baz.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:70" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:257" $at_failed && at_fn_log_failure $at_traceon; } - - - - -cat >a.f <<'_ATEOF' - program main - end -_ATEOF - - { set +x -$as_echo "$at_srcdir/infer-tag.at:78: \$LIBTOOL --mode=compile \$FC \$FCFLAGS -c a.f" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $FC $FCFLAGS -c a.f" "infer-tag.at:78" -( $at_check_trace; $LIBTOOL --mode=compile $FC $FCFLAGS -c a.f +$as_echo "$at_srcdir/bindir.at:258: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o bar.lo \$CPPFLAGS \$CFLAGS bar.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c" "bindir.at:258" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS bar.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:78" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:258" $at_failed && at_fn_log_failure $at_traceon; } - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_52 -#AT_START_53 -# 53. infer-tag.at:83: GCJ inferred tag -at_setup_line='infer-tag.at:83' -at_fn_banner 2 -at_desc="GCJ inferred tag" -at_desc_line=" 53: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "53. infer-tag.at:83: testing ..." - $at_traceon - - { set +x -$as_echo "$at_srcdir/infer-tag.at:84: { test -n \"\$GCJ\" && test \"X\$GCJ\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$GCJ\" && test \"X$GCJ\" != Xno; } || (exit 77)" "infer-tag.at:84" -( $at_check_trace; { test -n "$GCJ" && test "X$GCJ" != Xno; } || (exit 77) +$as_echo "$at_srcdir/bindir.at:259: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o main.lo \$CPPFLAGS \$CFLAGS main.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c" "bindir.at:259" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS main.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:84" -$at_failed && at_fn_log_failure +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:259" +$at_failed && at_fn_log_failure $at_traceon; } +# Now try installing the libs. There are the following cases: +# No -bindir +# -bindir below lib install dir +# -bindir is lib install dir +# -bindir beside lib install dir +# -bindir above lib dir +# -bindir above and beside lib dir +# -bindir in entirely unrelated prefix. +curdir=`pwd` +for libdir in \ + $curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0 \ + $curdir/usr/lib/gcc/../gcc/.//i686-pc-cygwin/4.5.0/../../././//. \ + $curdir/usr/lib/ \ + $curdir/usr/lib \ + $curdir/baz \ + $curdir/baz/lib/ ; +do - -cat >A.java <<'_ATEOF' -public class A { - private int a; - public A () { a = 0; } -}; -_ATEOF - - -# There are just too many broken gcj installations out there, either missing -# libgcj.spec or unable to find it. Skip this test for them. -{ set +x -$as_echo "$at_srcdir/infer-tag.at:96: \$GCJ \$GCJFLAGS -c A.java || exit 77" -at_fn_check_prepare_dynamic "$GCJ $GCJFLAGS -c A.java || exit 77" "infer-tag.at:96" -( $at_check_trace; $GCJ $GCJFLAGS -c A.java || exit 77 + # Do a basic install with no -bindir option for reference. We use the sbin/ + # dir for the main exe to avoid the potential "this only works because it's + # side-by-side with the libs" default DLL search path problem mentioned above. + rm -rf $libdir $curdir/bin $curdir/sbin $curdir/baz $curdir/usr + as_dir=$libdir; as_fn_mkdir_p + as_dir=$curdir/sbin; as_fn_mkdir_p + { set +x +$as_echo "$at_srcdir/bindir.at:286: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS foo.lo bar.lo baz.lo -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir" "bindir.at:286" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:96" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:286" $at_failed && at_fn_log_failure $at_traceon; } - -{ set +x -$as_echo "$at_srcdir/infer-tag.at:98: \$LIBTOOL --mode=compile \$GCJ \$GCJCFLAGS -c A.java" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $GCJ $GCJCFLAGS -c A.java" "infer-tag.at:98" -( $at_check_trace; $LIBTOOL --mode=compile $GCJ $GCJCFLAGS -c A.java + { set +x +$as_echo "$at_srcdir/bindir.at:287: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS main.lo libfoo.la -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la -rpath $libdir" "bindir.at:287" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:98" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:287" $at_failed && at_fn_log_failure $at_traceon; } + { set +x +$as_echo "$at_srcdir/bindir.at:288: \$LIBTOOL --mode=install \$lt_INSTALL libfoo.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir" "bindir.at:288" +( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:288" +$at_failed && at_fn_log_failure +$at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_53 -#AT_START_54 -# 54. localization.at:25: localized compiler messages -at_setup_line='localization.at:25' -at_fn_banner 2 -at_desc="localized compiler messages" -at_desc_line=" 54: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "54. localization.at:25: testing ..." - $at_traceon - - - -# Let's try German locale. :-) -LANG=de_DE -LANGUAGE=de_DE -LC_ALL=de_DE -export LANG LANGUAGE LC_ALL - -cat >a.c <<'_ATEOF' -int x[-1]; -_ATEOF - -cat >b.c <<'_ATEOF' -int y; -_ATEOF + { set +x +$as_echo "$at_srcdir/bindir.at:289: \$LIBTOOL --mode=install \$lt_INSTALL main\$EXEEXT \$curdir/sbin/main\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT" "bindir.at:289" +( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:289" +$at_failed && at_fn_log_failure +$at_traceon; } -# First see if setting a locale is accepted at all. -{ set +x -$as_echo "$at_srcdir/localization.at:42: \$CC \$CPPFLAGS \$CFLAGS -c b.c || exit 77" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c b.c || exit 77" "localization.at:42" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c b.c || exit 77 + # And ensure it went where we expect. Could be looking for any of 'cygfoo-0.dll', + # 'libfoo-0.dll', or 'libfoo.so.0'. We'll simplify this check by taking advantage + # of the fact that if it's a DLL, it has to go in bindir, so we'll not check for + # both forms in libdir. + { set +x +$as_echo "$at_srcdir/bindir.at:295: \$bindirneeded && { test -f \$libdir/../bin/???foo-0.dll || ls \$libdir/../bin/*foo*0* 2>/dev/null ; } || ls \$libdir/*foo*0* 2>/dev/null" +at_fn_check_prepare_dynamic "$bindirneeded && { test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null" "bindir.at:295" +( $at_check_trace; $bindirneeded && { test -f $libdir/../bin/???foo-0.dll || ls $libdir/../bin/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/localization.at:42" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:295" $at_failed && at_fn_log_failure $at_traceon; } -# Find out about expected output. + # And that it can be executed. + extrapath= + $bindirneeded && extrapath=$libdir/../bin + func_save_and_prepend_path $extrapath + lt_exe=$curdir/sbin/main$EXEEXT; if test -f "$curdir/sbin/main$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/localization.at:45: \$CC \$CPPFLAGS \$CFLAGS -c a.c || exit 1" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c a.c || exit 1" "localization.at:45" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c a.c || exit 1 +$as_echo "$at_srcdir/bindir.at:301: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:301" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/localization.at:45" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:301" $at_failed && at_fn_log_failure $at_traceon; } -_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'` -sed "/^distcc\[[0-9]*\]/d; /^$_ltbase: compile/d" < stdout > stdout.t -case $host_os in - mingw*) - tr -d '\015' < stdout.t > expected-stdout ;; - *) - cp stdout.t expected-stdout ;; -esac -_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'` -sed "/^distcc\[[0-9]*\]/d; /^$_ltbase: compile/d" < stderr > stderr.t -case $host_os in - mingw*) - tr -d '\015' < stderr.t > expected-stderr ;; - *) - cp stderr.t expected-stderr ;; -esac -{ set +x -$as_echo "$at_srcdir/localization.at:48: \$LIBTOOL --mode=compile --tag=CC \$CC \$CPPFLAGS \$CFLAGS -c a.c || exit 1" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c || exit 1" "localization.at:48" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c || exit 1 + + func_restore_path + + for bindir in \ + $curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/bin/ \ + $curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/bin \ + $curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0/ \ + $curdir/usr/lib/gcc/i686-pc-cygwin/4.5.0 \ + $curdir/usr/lib/gcc/i686-pc-cygwin/bin/ \ + $curdir/usr/lib/gcc/i686-pc-cygwin/bin \ + $curdir/usr/lib/gcc/i686-pc-cygwin/ \ + $curdir/usr/lib/gcc/i686-pc-cygwin \ + $curdir/usr/lib/bin/ \ + $curdir/usr/lib/bin \ + $curdir/usr/bin/ \ + $curdir/usr/bin \ + $curdir/bin/ \ + $curdir/bin \ + /tmp/foo/bar ; + do + + # Clear any old stuff out before we install. Because bindir + # may be in /tmp, we have to take care to create it securely + # and not to delete and recreate it if we do. + rm -rf $libdir $curdir/bin $curdir/sbin $curdir/baz $curdir/usr + + tmp= + case $bindir in + /tmp*) + # Create a temporary directory $tmp in $TMPDIR (default /tmp). + # Use mktemp if possible; otherwise fall back on mkdir, + # with $RANDOM to make collisions less likely. + : ${TMPDIR=/tmp} + { + tmp=` + (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null + ` && + test -n "$tmp" && test -d "$tmp" + } || { + tmp=$TMPDIR/foo$$-$RANDOM + (umask 077 && mkdir "$tmp") + } || exit 77 + bindir=$tmp/bar + ;; + *) + # Clear any old stuff out before we install. + rm -rf $bindir + as_dir=$bindir; as_fn_mkdir_p + ;; + esac + + # Relink with new rpaths. + { set +x +$as_echo "$at_srcdir/bindir.at:353: \$LIBTOOL --mode=link --tag=CC \$CC -no-undefined -bindir \$bindir -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS foo.lo bar.lo baz.lo -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -no-undefined -bindir $bindir -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir" "bindir.at:353" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -no-undefined -bindir $bindir -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS foo.lo bar.lo baz.lo -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/localization.at:48" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:353" $at_failed && at_fn_log_failure $at_traceon; } -_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'` -sed "/^distcc\[[0-9]*\]/d; /^$_ltbase: compile/d" < stdout > stdout.t -case $host_os in - mingw*) - tr -d '\015' < stdout.t > libtool-stdout ;; - *) - cp stdout.t libtool-stdout ;; -esac -_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'` -sed "/^distcc\[[0-9]*\]/d; /^$_ltbase: compile/d" < stderr > stderr.t -case $host_os in - mingw*) - tr -d '\015' < stderr.t > libtool-stderr ;; - *) - cp stderr.t libtool-stderr ;; -esac -# Avoid these errors: -# GNU/Linux: -# /bin/sh: warning: setlocale: LC_ALL: cannot change locale (de_DE) -# HP-UX: -# Warning! One or more of your selected locales are not available. -# Please invoke the commands "locale" and "locale -a" to verify your -# selections and the available locales. -# -# Continuing processing using the "C" locale. -{ set +x -$as_echo "$at_srcdir/localization.at:61: grep locale stdout stderr && exit 77" -at_fn_check_prepare_trace "localization.at:61" -( $at_check_trace; grep locale stdout stderr && exit 77 + { set +x +$as_echo "$at_srcdir/bindir.at:354: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS main.lo libfoo.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la" "bindir.at:354" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS main.lo libfoo.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/localization.at:61" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:354" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/localization.at:62: diff expected-stderr libtool-stderr" -at_fn_check_prepare_trace "localization.at:62" -( $at_check_trace; diff expected-stderr libtool-stderr + + # Recreate directories (bindir already done) and install. + as_dir=$libdir; as_fn_mkdir_p + as_dir=$curdir/sbin; as_fn_mkdir_p + { set +x +$as_echo "$at_srcdir/bindir.at:359: \$LIBTOOL --mode=install \$lt_INSTALL libfoo.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir" "bindir.at:359" +( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL libfoo.la $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/localization.at:62" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:359" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/localization.at:63: diff expected-stdout libtool-stdout" -at_fn_check_prepare_trace "localization.at:63" -( $at_check_trace; diff expected-stdout libtool-stdout + { set +x +$as_echo "$at_srcdir/bindir.at:360: \$LIBTOOL --mode=install \$lt_INSTALL main\$EXEEXT \$curdir/sbin/main\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT" "bindir.at:360" +( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL main$EXEEXT $curdir/sbin/main$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/localization.at:63" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:360" $at_failed && at_fn_log_failure $at_traceon; } -# check that we get our quoting right. -LANGUAGE='a; nosuchprogram " '\'' & $x /#+*(){}|,:`\ !%' -export LANGUAGE -{ set +x -$as_echo "$at_srcdir/localization.at:68: \$LIBTOOL --mode=compile --tag=CC \$CC \$CPPFLAGS \$CFLAGS -c b.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b.c" "localization.at:68" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b.c + # Ensure it went to bindir rather than default dir this time. + { set +x +$as_echo "$at_srcdir/bindir.at:363: \$bindirneeded && { test -f \$bindir/???foo-0.dll || ls \$bindir/*foo*0* 2>/dev/null ; } || ls \$libdir/*foo*0* 2>/dev/null" +at_fn_check_prepare_dynamic "$bindirneeded && { test -f $bindir/???foo-0.dll || ls $bindir/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null" "bindir.at:363" +( $at_check_trace; $bindirneeded && { test -f $bindir/???foo-0.dll || ls $bindir/*foo*0* 2>/dev/null ; } || ls $libdir/*foo*0* 2>/dev/null ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/localization.at:68" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:363" $at_failed && at_fn_log_failure $at_traceon; } + + # And that it can be executed. + extrapath= + $bindirneeded && extrapath=$bindir + func_save_and_prepend_path $extrapath + lt_exe=$curdir/sbin/main$EXEEXT; if test -f "$curdir/sbin/main$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/localization.at:70: grep nosuchprogram stdout stderr" -at_fn_check_prepare_trace "localization.at:70" -( $at_check_trace; grep nosuchprogram stdout stderr +$as_echo "$at_srcdir/bindir.at:369: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "bindir.at:369" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/localization.at:70" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/bindir.at:369" $at_failed && at_fn_log_failure $at_traceon; } + func_restore_path + + # Clean up if we made a temp dir. Subdirs under our testdir get rm'd + # and recreated at the top of the loop. Securely created subdirs under + # /tmp get created precisely once and rm'd when we're done with them. + if test ! -z "$tmp" ; then + rm -rf "$tmp" + fi + + done +done + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_54 #AT_START_55 -# 55. install.at:25: Install tests -at_setup_line='install.at:25' -at_fn_banner 2 -at_desc="Install tests" -at_desc_line=" 55: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +at_fn_group_banner 55 'cwrapper.at:25' \ + "cwrapper for uninstalled executables" " " 3 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "55. install.at:25: testing ..." + $as_echo "55. $at_setup_line: testing $at_desc ..." $at_traceon -# Ensure that install_override_mode overrides the mode of the shared -# library (and only the shared library). - +# make sure existing libtool is configured for shared libraries { set +x -$as_echo "$at_srcdir/install.at:31: \$LIBTOOL --features | grep 'enable shared libraries' || exit 77" -at_fn_check_prepare_dynamic "$LIBTOOL --features | grep 'enable shared libraries' || exit 77" "install.at:31" -( $at_check_trace; $LIBTOOL --features | grep 'enable shared libraries' || exit 77 +$as_echo "$at_srcdir/cwrapper.at:29: \$LIBTOOL --features | grep 'disable shared libraries' && exit 77" +at_fn_check_prepare_notrace 'a shell pipeline' "cwrapper.at:29" +( $at_check_trace; $LIBTOOL --features | grep 'disable shared libraries' && exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/install.at:31" +at_fn_check_status 1 $at_status "$at_srcdir/cwrapper.at:29" $at_failed && at_fn_log_failure $at_traceon; } -sed 's,^\(install_override_mode\)=.*,\1=755,' < $LIBTOOL > ./libtool -LIBTOOL=./libtool -chmod a+rx $LIBTOOL -inst=`pwd`/inst -mkdir inst +cat >trivial.c <<'_ATEOF' -echo 'int a () { return 0; }' > a.c -$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -{ set +x -$as_echo "$at_srcdir/install.at:42: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -rpath \$inst -no-undefined" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $inst -no-undefined" "install.at:42" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $inst -no-undefined +int main (void) +{ + return 0; +} +_ATEOF + +cat >liba.c <<'_ATEOF' +int liba_func1 (int arg) +{ + return arg + 1; +} +_ATEOF + +cat >usea.c <<'_ATEOF' +extern int liba_func1 (int arg); +int main (void) +{ + int a = 2; + int b = liba_func1 (a); + if (b == 3) return 0; + return 1; +} +_ATEOF + + +orig_CFLAGS=$CFLAGS +orig_LIBTOOL=$LIBTOOL +for restrictive_flags in '-Wall -Werror' '-std=c89 -Wall -Werror' '-std=c99 -Wall -Werror'; do + CFLAGS="$orig_CFLAGS $restrictive_flags" + sed "s/LTCFLAGS=.*/&' $restrictive_flags'/" < "$orig_LIBTOOL" > ./libtool + chmod +x libtool + LIBTOOL=./libtool + + # Make sure $restrictive_flags do not cause a failure + # themselves (e.g. because a non-gcc compiler doesn't + # understand them). Tru64 cc only fails when linking. + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS trivial.c || continue + + { set +x +$as_echo "$at_srcdir/cwrapper.at:69: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "cwrapper.at:69" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/install.at:42" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:69" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/install.at:44: \$LIBTOOL --mode=install \$lt_INSTALL liba.la \$inst" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL liba.la $inst" "install.at:44" -( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL liba.la $inst + { set +x +$as_echo "$at_srcdir/cwrapper.at:71: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -version-info=0.0.0 -no-undefined -o liba.la -rpath /foo liba.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -version-info=0.0.0 -no-undefined -o liba.la -rpath /foo liba.lo" "cwrapper.at:71" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -version-info=0.0.0 -no-undefined -o liba.la -rpath /foo liba.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/install.at:44" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:71" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/install.at:46: grep ' -m 755' stdout" -at_fn_check_prepare_trace "install.at:46" -( $at_check_trace; grep ' -m 755' stdout + { set +x +$as_echo "$at_srcdir/cwrapper.at:73: test -f liba.la" +at_fn_check_prepare_trace "cwrapper.at:73" +( $at_check_trace; test -f liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/install.at:46" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:73" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/install.at:47: \$LIBTOOL --mode=install \$lt_INSTALL -m 644 liba.la \$inst" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL -m 644 liba.la $inst" "install.at:47" -( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL -m 644 liba.la $inst + + { set +x +$as_echo "$at_srcdir/cwrapper.at:75: \$CC \$CPPFLAGS \$CFLAGS -c usea.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c usea.c" "cwrapper.at:75" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c usea.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/install.at:47" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:75" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/install.at:49: grep ' -m 755' stdout" -at_fn_check_prepare_trace "install.at:49" -( $at_check_trace; grep ' -m 755' stdout + { set +x +$as_echo "$at_srcdir/cwrapper.at:77: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o usea\$EXEEXT usea.\$OBJEXT liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la" "cwrapper.at:77" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/install.at:49" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:77" $at_failed && at_fn_log_failure $at_traceon; } + lt_exe=./usea; if test -f "./usea$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/install.at:50: grep ' -m 644.*liba.la' stdout" -at_fn_check_prepare_trace "install.at:50" -( $at_check_trace; grep ' -m 644.*liba.la' stdout +$as_echo "$at_srcdir/cwrapper.at:79: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "cwrapper.at:79" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/install.at:50" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:79" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_55 -#AT_START_56 -# 56. versioning.at:24: versioning -at_setup_line='versioning.at:24' -at_fn_banner 2 -at_desc="versioning" -at_desc_line=" 56: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "56. versioning.at:24: testing ..." - $at_traceon - - - -eval "`$LIBTOOL --config | $EGREP '^(objdir)='`" +done -# Setup some library and program sources: -# a library (a1), a new revision (a2), a compatible update (a3), -# an incompatible update (a4). -# Another library (libb) using liba, and a couple of programs, -# using liba directly and indirectly through libb. -cat >liba1.c <<'_ATEOF' +# Test run-time activation of wrapper debugging. +# This is not part of the loop above, because we +# need to check, not ignore, the output. +CFLAGS="$orig_CFLAGS" +LIBTOOL=$orig_LIBTOOL -int a (void) -{ - return 0; -} -_ATEOF +{ set +x +$as_echo "$at_srcdir/cwrapper.at:89: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "cwrapper.at:89" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:89" +$at_failed && at_fn_log_failure +$at_traceon; } +{ set +x +$as_echo "$at_srcdir/cwrapper.at:91: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo" "cwrapper.at:91" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:91" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >liba2.c <<'_ATEOF' +{ set +x +$as_echo "$at_srcdir/cwrapper.at:93: test -f liba.la" +at_fn_check_prepare_trace "cwrapper.at:93" +( $at_check_trace; test -f liba.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:93" +$at_failed && at_fn_log_failure +$at_traceon; } -/* The internal detail should be static. It isn't static in this test, - so we can later find out that it's this revision of the library. */ -int internal_detail = 42; -int a (void) -{ - return internal_detail - 42; -} -_ATEOF +{ set +x +$as_echo "$at_srcdir/cwrapper.at:95: \$CC \$CPPFLAGS \$CFLAGS -c usea.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c usea.c" "cwrapper.at:95" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c usea.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:95" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >liba3.c <<'_ATEOF' +{ set +x +$as_echo "$at_srcdir/cwrapper.at:97: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o usea\$EXEEXT usea.\$OBJEXT liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la" "cwrapper.at:97" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:97" +$at_failed && at_fn_log_failure +$at_traceon; } -int a (void) -{ - return 0; -} -int aa (void) -{ - return 0; -} -_ATEOF +lt_exe=./usea; if test -f "./usea$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/cwrapper.at:99: if \"\$lt_exe\" --lt-debug; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" --lt-debug; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "cwrapper.at:99" +( $at_check_trace; if "$lt_exe" --lt-debug; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:99" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >liba4.c <<'_ATEOF' - -int aa (void) -{ - return 0; -} -_ATEOF - - -cat >libb.c <<'_ATEOF' - -extern int a (void); -int b (void) -{ - return a (); -} -_ATEOF - - -cat >prog1.c <<'_ATEOF' - -extern int a (void); -int main (void) -{ - return a (); -} -_ATEOF - - -cat >prog2.c <<'_ATEOF' - -extern int b (void); -int main (void) -{ - return b (); -} -_ATEOF - - -cat >prog3.c <<'_ATEOF' - -extern int a (void), internal_detail; -int main (void) -{ - return a () + internal_detail - 42; -} -_ATEOF - +case $host_os in + mingw*) + tr -d '\015' < stderr > stderr.t + mv -f stderr.t stderr ;; +esac +{ set +x +$as_echo "$at_srcdir/cwrapper.at:101: grep 'libtool wrapper' stderr" +at_fn_check_prepare_trace "cwrapper.at:101" +( $at_check_trace; grep 'libtool wrapper' stderr +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:101" +$at_failed && at_fn_log_failure +$at_traceon; } -inst=`pwd`/inst -libdir=$inst/lib -bindir=$inst/bin -LDFLAGS="$LDFLAGS -no-undefined" -mkdir $inst $libdir $bindir -for file in liba1.c liba2.c liba3.c liba4.c libb.c; do - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file -done -for file in prog1.c prog2.c prog3.c; do - $CC $CPPFLAGS $CFLAGS -c $file -done +# Test compile-time activation of wrapper debugging. +# We structure this test as a loop, so that we can 'break' out of it +# if necessary -- even though the loop by design executes only once. +for debugwrapper_flags in '-DLT_DEBUGWRAPPER'; do + CFLAGS="$orig_CFLAGS $debugwrapper_flags" + sed -e "s/LTCFLAGS=.*/&' $debugwrapper_flags'/" \ + -e "s/^lt_option_debug=/lt_option_debug=1/" \ + < "$orig_LIBTOOL" > ./libtool + LIBTOOL=./libtool -# Setup is finished here. + # Make sure $debugwrapper_flags do not cause a failure + # themselves (e.g. because a non-gcc compiler doesn't + # understand them). Tru64 cc only fails when linking. + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS trivial.c || continue -# Hypothesis: -version-info is ignored for convenience archives. -{ set +x -$as_echo "$at_srcdir/versioning.at:119: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info 0:0:0" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 0:0:0" "versioning.at:119" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 0:0:0 + { set +x +$as_echo "$at_srcdir/cwrapper.at:119: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c" "cwrapper.at:119" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:119" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:119" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/versioning.at:121: grep 'version-info.*ignored for convenience' stderr" -at_fn_check_prepare_trace "versioning.at:121" -( $at_check_trace; grep 'version-info.*ignored for convenience' stderr + { set +x +$as_echo "$at_srcdir/cwrapper.at:121: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo" "cwrapper.at:121" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -no-undefined -o liba.la -rpath /foo liba.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:121" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:121" $at_failed && at_fn_log_failure $at_traceon; } - -# Hypothesis: the deprecated -version-number works. -# Be sure not to use zero here, it's not portable. -for version_number in 1 1:1 2:1 1:1:1 3:2:1; do { set +x -$as_echo "$at_srcdir/versioning.at:126: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-number \$version_number -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-number $version_number -rpath $libdir" "versioning.at:126" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-number $version_number -rpath $libdir +$as_echo "$at_srcdir/cwrapper.at:123: test -f liba.la" +at_fn_check_prepare_trace "cwrapper.at:123" +( $at_check_trace; test -f liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:126" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:123" $at_failed && at_fn_log_failure $at_traceon; } -done -# Hypothesis: -version-info can be passed kinds of values, esp. zero ones -# and large ones. -# TODO: check something like 1001:2419:189 after fixing issues -# for `version_type's of `irix', `nonstopux', or `osf'. -for version_info in 1 1:2 0:0:0 1:1:1 13:241:7; do { set +x -$as_echo "$at_srcdir/versioning.at:135: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info \$version_info -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info $version_info -rpath $libdir" "versioning.at:135" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info $version_info -rpath $libdir +$as_echo "$at_srcdir/cwrapper.at:125: \$CC \$CPPFLAGS \$CFLAGS -c usea.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c usea.c" "cwrapper.at:125" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c usea.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:135" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:125" $at_failed && at_fn_log_failure $at_traceon; } -done - -# Hypothesis: we diagnose when AGE is higher than CURRENT. -{ set +x -$as_echo "$at_srcdir/versioning.at:140: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info 1:3:2 -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 1:3:2 -rpath $libdir" "versioning.at:140" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 1:3:2 -rpath $libdir + { set +x +$as_echo "$at_srcdir/cwrapper.at:127: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o usea\$EXEEXT usea.\$OBJEXT liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la" "cwrapper.at:127" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o usea$EXEEXT usea.$OBJEXT liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/versioning.at:140" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:127" $at_failed && at_fn_log_failure $at_traceon; } + lt_exe=./usea; if test -f "./usea$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/versioning.at:142: grep 'AGE.*is greater than' stderr" -at_fn_check_prepare_trace "versioning.at:142" -( $at_check_trace; grep 'AGE.*is greater than' stderr +$as_echo "$at_srcdir/cwrapper.at:129: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "cwrapper.at:129" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:142" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:129" $at_failed && at_fn_log_failure $at_traceon; } -# Hypothesis: we diagnose invalid values. -for version_info in 1:2:3:4 -1 0:-1 0:0:-1; do + case $host_os in + mingw*) + tr -d '\015' < stderr > stderr.t + mv -f stderr.t stderr ;; +esac { set +x -$as_echo "$at_srcdir/versioning.at:146: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info \$version_info -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info $version_info -rpath $libdir" "versioning.at:146" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info $version_info -rpath $libdir +$as_echo "$at_srcdir/cwrapper.at:131: grep 'libtool wrapper' stderr" +at_fn_check_prepare_trace "cwrapper.at:131" +( $at_check_trace; grep 'libtool wrapper' stderr ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/versioning.at:146" +at_fn_check_status 0 $at_status "$at_srcdir/cwrapper.at:131" $at_failed && at_fn_log_failure $at_traceon; } done -# Now, create an original version of the library and associated users. -# This setup will be reused for further hypotheses below, and these -# functions will be used to test working programs. + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_55 +#AT_START_56 +at_fn_group_banner 56 'deplib-in-subdir.at:34' \ + "deplib in subdir" " " 3 +at_xfail=no +( + $as_echo "56. $at_setup_line: testing $at_desc ..." + $at_traceon -test_uninstalled () -{ - # temporarily move installed libraries out of the way in order to avoid - # skewing test results: - mv $libdir temp-lib - mv $bindir temp-bin - lt_exe=./prog1; if test -f "./prog1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi + + +cat >a1.c <<'_ATEOF' +int a1 () { return 0; } +_ATEOF + +cat >a2.c <<'_ATEOF' +int a2 () { return 0; } +_ATEOF + +cat >a3.c <<'_ATEOF' +int a3 () { return 0; } +_ATEOF + +cat >b1.c <<'_ATEOF' +extern int a1 (); +int b1 () { return a1 (); } +_ATEOF + +cat >b2.c <<'_ATEOF' +extern int a2 (); +int b2 () { return a2 (); } +_ATEOF + +cat >b3.c <<'_ATEOF' +extern int a3 (); +int b3 () { return a3 (); } +_ATEOF + +cat >m.c <<'_ATEOF' +extern int b1 (); +extern int b2 (); +extern int b3 (); +int main () { return b1 () + b2 () + b3 (); } +_ATEOF + + +cwd=`pwd` +instdir=$cwd/inst +lib1dir=$instdir/lib1 +lib2dir=$instdir/lib2 +bindir=$instdir/bin +addrunpath=$cwd/foobar +LDFLAGS="$LDFLAGS -no-undefined" + +flags='-export-symbols-regex ".*"' + +mkdir -p sub1 sub2/subsub sub3/subsub $instdir $lib1dir $lib2dir $bindir + +for file in a1.c a2.c a3.c b1.c b2.c b3.c; do + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file +done +$CC $CPPFLAGS $CFLAGS -c m.c { set +x -$as_echo "$at_srcdir/versioning.at:161: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "versioning.at:161" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/deplib-in-subdir.at:81: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub1/liba1.la a1.lo -rpath \$lib1dir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba1.la a1.lo -rpath $lib1dir" "deplib-in-subdir.at:81" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba1.la a1.lo -rpath $lib1dir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:161" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:81" $at_failed && at_fn_log_failure $at_traceon; } - - lt_exe=./prog2; if test -f "./prog2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/versioning.at:162: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "versioning.at:162" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/deplib-in-subdir.at:83: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub1/liba2.la a2.lo -rpath \$lib1dir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba2.la a2.lo -rpath $lib1dir" "deplib-in-subdir.at:83" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba2.la a2.lo -rpath $lib1dir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:162" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:83" $at_failed && at_fn_log_failure $at_traceon; } - - mv temp-lib $libdir - mv temp-bin $bindir -} - -test_installed () -{ - # temporarily move uninstalled libraries out of the way in order to avoid - # skewing test results: - mv $objdir temp - lt_exe=$bindir/prog1; if test -f "$bindir/prog1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/versioning.at:172: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "versioning.at:172" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/deplib-in-subdir.at:85: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub1/liba3.la a3.lo -rpath \$lib1dir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba3.la a3.lo -rpath $lib1dir" "deplib-in-subdir.at:85" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub1/liba3.la a3.lo -rpath $lib1dir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:172" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:85" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=$bindir/prog2; if test -f "$bindir/prog2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/versioning.at:173: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "versioning.at:173" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/deplib-in-subdir.at:88: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub2/subsub/libb1.la b1.lo -rpath \$lib2dir sub1/liba1.la' \"\$flags\"" +at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub2/subsub/libb1.la b1.lo -rpath $lib2dir sub1/liba1.la' \"$flags\"" "deplib-in-subdir.at:88" +( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub2/subsub/libb1.la b1.lo -rpath $lib2dir sub1/liba1.la' "$flags" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:173" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:88" $at_failed && at_fn_log_failure $at_traceon; } - - mv temp $objdir -} - +cd sub2 { set +x -$as_echo "$at_srcdir/versioning.at:177: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info 0:0:0 -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 0:0:0 -rpath $libdir" "versioning.at:177" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 0:0:0 -rpath $libdir +$as_echo "$at_srcdir/deplib-in-subdir.at:92: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o subsub/libb2.la ../b2.lo -rpath \$lib2dir ../sub1/liba2.la' \"\$flags\"" +at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/libb2.la ../b2.lo -rpath $lib2dir ../sub1/liba2.la' \"$flags\"" "deplib-in-subdir.at:92" +( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/libb2.la ../b2.lo -rpath $lib2dir ../sub1/liba2.la' "$flags" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:177" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:92" $at_failed && at_fn_log_failure $at_traceon; } +cd subsub { set +x -$as_echo "$at_srcdir/versioning.at:179: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la libb.lo liba.la -version-info 0:0:0 -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la libb.lo liba.la -version-info 0:0:0 -rpath $libdir" "versioning.at:179" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la libb.lo liba.la -version-info 0:0:0 -rpath $libdir +$as_echo "$at_srcdir/deplib-in-subdir.at:96: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb3.la ../../b3.lo -rpath \$lib2dir ../../sub1/liba3.la' \"\$flags\"" +at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb3.la ../../b3.lo -rpath $lib2dir ../../sub1/liba3.la' \"$flags\"" "deplib-in-subdir.at:96" +( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb3.la ../../b3.lo -rpath $lib2dir ../../sub1/liba3.la' "$flags" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:179" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:96" $at_failed && at_fn_log_failure $at_traceon; } +cd ../.. { set +x -$as_echo "$at_srcdir/versioning.at:181: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o prog1\$EXEEXT prog1.\$OBJEXT liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog1$EXEEXT prog1.$OBJEXT liba.la" "versioning.at:181" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog1$EXEEXT prog1.$OBJEXT liba.la +$as_echo "$at_srcdir/deplib-in-subdir.at:100: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o sub3/subsub/m1\$EXEEXT m.\$OBJEXT sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub3/subsub/m1$EXEEXT m.$OBJEXT sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la" "deplib-in-subdir.at:100" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o sub3/subsub/m1$EXEEXT m.$OBJEXT sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:181" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:100" $at_failed && at_fn_log_failure $at_traceon; } +cd sub3 { set +x -$as_echo "$at_srcdir/versioning.at:183: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o prog2\$EXEEXT prog2.\$OBJEXT libb.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog2$EXEEXT prog2.$OBJEXT libb.la" "versioning.at:183" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog2$EXEEXT prog2.$OBJEXT libb.la +$as_echo "$at_srcdir/deplib-in-subdir.at:104: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o subsub/m2\$EXEEXT ../m.\$OBJEXT ../sub2/subsub/libb1.la ../sub2/subsub/libb2.la ../sub2/subsub/libb3.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/m2$EXEEXT ../m.$OBJEXT ../sub2/subsub/libb1.la ../sub2/subsub/libb2.la ../sub2/subsub/libb3.la" "deplib-in-subdir.at:104" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o subsub/m2$EXEEXT ../m.$OBJEXT ../sub2/subsub/libb1.la ../sub2/subsub/libb2.la ../sub2/subsub/libb3.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:183" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:104" $at_failed && at_fn_log_failure $at_traceon; } -test_uninstalled +cd subsub { set +x -$as_echo "$at_srcdir/versioning.at:186: \$LIBTOOL --mode=install cp liba.la libb.la \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la libb.la $libdir" "versioning.at:186" -( $at_check_trace; $LIBTOOL --mode=install cp liba.la libb.la $libdir +$as_echo "$at_srcdir/deplib-in-subdir.at:108: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m3\$EXEEXT ../../m.\$OBJEXT ../../sub2/subsub/libb1.la ../../sub2/subsub/libb2.la ../../sub2/subsub/libb3.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m3$EXEEXT ../../m.$OBJEXT ../../sub2/subsub/libb1.la ../../sub2/subsub/libb2.la ../../sub2/subsub/libb3.la" "deplib-in-subdir.at:108" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m3$EXEEXT ../../m.$OBJEXT ../../sub2/subsub/libb1.la ../../sub2/subsub/libb2.la ../../sub2/subsub/libb3.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:186" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:108" $at_failed && at_fn_log_failure $at_traceon; } +cd ../.. + +for i in 1 2 3; do + lt_exe=./sub3/subsub/m$i; if test -f "./sub3/subsub/m$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/versioning.at:188: \$LIBTOOL --mode=install cp prog1\$EXEEXT prog2\$EXEEXT \$bindir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp prog1$EXEEXT prog2$EXEEXT $bindir" "versioning.at:188" -( $at_check_trace; $LIBTOOL --mode=install cp prog1$EXEEXT prog2$EXEEXT $bindir +$as_echo "$at_srcdir/deplib-in-subdir.at:114: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:114" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:188" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:114" $at_failed && at_fn_log_failure $at_traceon; } + + cd sub3 + lt_exe=./subsub/m$i; if test -f "./subsub/m$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/versioning.at:190: \$LIBTOOL --mode=clean rm -f liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:190" -( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la +$as_echo "$at_srcdir/deplib-in-subdir.at:116: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:116" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:190" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:116" $at_failed && at_fn_log_failure $at_traceon; } -test_installed + + cd subsub + lt_exe=./m$i; if test -f "./m$i$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/versioning.at:192: \$LIBTOOL --mode=uninstall rm -f \$libdir/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=uninstall rm -f $libdir/liba.la" "versioning.at:192" -( $at_check_trace; $LIBTOOL --mode=uninstall rm -f $libdir/liba.la +$as_echo "$at_srcdir/deplib-in-subdir.at:118: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:118" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:118" +$at_failed && at_fn_log_failure +$at_traceon; } + + + cd ../.. +done + +for i in 1 2 3; do + { set +x +$as_echo "$at_srcdir/deplib-in-subdir.at:123: \$LIBTOOL --mode=install cp sub1/liba\$i.la \$lib1dir/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp sub1/liba$i.la $lib1dir/liba.la" "deplib-in-subdir.at:123" +( $at_check_trace; $LIBTOOL --mode=install cp sub1/liba$i.la $lib1dir/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:192" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:123" $at_failed && at_fn_log_failure $at_traceon; } +done - -# Hypothesis: library revision updates do not require (uninstalled -# nor installed) programs or libraries to be relinked. { set +x -$as_echo "$at_srcdir/versioning.at:197: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba2.lo -version-info 0:1:0 -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba2.lo -version-info 0:1:0 -rpath $libdir" "versioning.at:197" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba2.lo -version-info 0:1:0 -rpath $libdir +$as_echo "$at_srcdir/deplib-in-subdir.at:126: \$LIBTOOL --mode=install cp sub2/subsub/libb1.la \$lib2dir/libb1.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp sub2/subsub/libb1.la $lib2dir/libb1.la" "deplib-in-subdir.at:126" +( $at_check_trace; $LIBTOOL --mode=install cp sub2/subsub/libb1.la $lib2dir/libb1.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:197" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:126" $at_failed && at_fn_log_failure $at_traceon; } -test_uninstalled +cd sub2 { set +x -$as_echo "$at_srcdir/versioning.at:200: \$LIBTOOL --mode=install cp liba.la \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "versioning.at:200" -( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir +$as_echo "$at_srcdir/deplib-in-subdir.at:128: \$LIBTOOL --mode=install cp subsub/libb2.la \$lib2dir/libb2.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp subsub/libb2.la $lib2dir/libb2.la" "deplib-in-subdir.at:128" +( $at_check_trace; $LIBTOOL --mode=install cp subsub/libb2.la $lib2dir/libb2.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:200" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:128" $at_failed && at_fn_log_failure $at_traceon; } +cd subsub { set +x -$as_echo "$at_srcdir/versioning.at:201: \$LIBTOOL --mode=clean rm -f liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:201" -( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la +$as_echo "$at_srcdir/deplib-in-subdir.at:130: \$LIBTOOL --mode=install cp libb3.la \$lib2dir/libb3.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp libb3.la $lib2dir/libb3.la" "deplib-in-subdir.at:130" +( $at_check_trace; $LIBTOOL --mode=install cp libb3.la $lib2dir/libb3.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:201" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:130" $at_failed && at_fn_log_failure $at_traceon; } -test_installed -# do not uninstall here: the library may be reused in the next test. +cd ../.. -# Hypothesis: backward compatible library updates do not require -# (uninstalled nor installed) programs or libraries to be relinked. -# This can have one of several reasons: -# - the soname is the difference between $current and $age, thus -# unchanged; in this case, the newly installed library will be used, -# - the soname is only $current, or we are linking statically, in which case -# the old installed library code will be used, -# - the numbers are not encoded at all, in which case the newly installed -# library will be used. { set +x -$as_echo "$at_srcdir/versioning.at:214: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba3.lo -version-info 1:0:1 -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba3.lo -version-info 1:0:1 -rpath $libdir" "versioning.at:214" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba3.lo -version-info 1:0:1 -rpath $libdir +$as_echo "$at_srcdir/deplib-in-subdir.at:133: \$LIBTOOL --mode=install cp sub3/subsub/m1\$EXEEXT \$bindir/m1\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp sub3/subsub/m1$EXEEXT $bindir/m1$EXEEXT" "deplib-in-subdir.at:133" +( $at_check_trace; $LIBTOOL --mode=install cp sub3/subsub/m1$EXEEXT $bindir/m1$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:214" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:133" $at_failed && at_fn_log_failure $at_traceon; } -# Do not test the uninstalled program, it may be broken (in the second case). +cd sub3 { set +x -$as_echo "$at_srcdir/versioning.at:217: \$LIBTOOL --mode=install cp liba.la \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "versioning.at:217" -( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir +$as_echo "$at_srcdir/deplib-in-subdir.at:135: \$LIBTOOL --mode=install cp subsub/m2\$EXEEXT \$bindir/m2\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp subsub/m2$EXEEXT $bindir/m2$EXEEXT" "deplib-in-subdir.at:135" +( $at_check_trace; $LIBTOOL --mode=install cp subsub/m2$EXEEXT $bindir/m2$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:217" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:135" $at_failed && at_fn_log_failure $at_traceon; } +cd subsub { set +x -$as_echo "$at_srcdir/versioning.at:218: \$LIBTOOL --mode=clean rm -f liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:218" -( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la +$as_echo "$at_srcdir/deplib-in-subdir.at:137: \$LIBTOOL --mode=install cp m3\$EXEEXT \$bindir/m3\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m3$EXEEXT $bindir/m3$EXEEXT" "deplib-in-subdir.at:137" +( $at_check_trace; $LIBTOOL --mode=install cp m3$EXEEXT $bindir/m3$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:218" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:137" $at_failed && at_fn_log_failure $at_traceon; } -test_installed -# do not uninstall here: the library may be reused in the next test. - +cd ../.. -# Hypothesis: with shared libraries, incompatible library updates -# will not cause old installed programs or libraries (linked against the old -# library version) to break. -# This can have one of several reasons: -# - the soname has changed, so the old installed library will still be -# available, -# - we are linking statically, so the old library code will still be used. -# In order to be sure we are still linking against the old library version, -# we must ensure that libb is not relinked, so we must not reinstall libb here. { set +x -$as_echo "$at_srcdir/versioning.at:232: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba4.lo -version-info 2:0:0 -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba4.lo -version-info 2:0:0 -rpath $libdir" "versioning.at:232" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba4.lo -version-info 2:0:0 -rpath $libdir +$as_echo "$at_srcdir/deplib-in-subdir.at:140: \$LIBTOOL --mode=clean rm -f sub1/liba1.la sub1/liba2.la sub1/liba3.la sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la sub3/subsub/m1\$EXEEXT sub3/subsub/m2\$EXEEXT sub3/subsub/m3\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f sub1/liba1.la sub1/liba2.la sub1/liba3.la sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la sub3/subsub/m1$EXEEXT sub3/subsub/m2$EXEEXT sub3/subsub/m3$EXEEXT" "deplib-in-subdir.at:140" +( $at_check_trace; $LIBTOOL --mode=clean rm -f sub1/liba1.la sub1/liba2.la sub1/liba3.la sub2/subsub/libb1.la sub2/subsub/libb2.la sub2/subsub/libb3.la sub3/subsub/m1$EXEEXT sub3/subsub/m2$EXEEXT sub3/subsub/m3$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:232" +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:140" $at_failed && at_fn_log_failure $at_traceon; } -# We do not guarantee that old versions of an uninstalled library are still -# available, so test_uninstalled will not necessarily work here any more. + +for i in 1 2 3; do + lt_exe=$bindir/m$i$EXEEXT; if test -f "$bindir/m$i$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/versioning.at:236: \$LIBTOOL --mode=install cp liba.la \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "versioning.at:236" -( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir +$as_echo "$at_srcdir/deplib-in-subdir.at:146: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:146" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:236" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:146" $at_failed && at_fn_log_failure $at_traceon; } + + cd $bindir + lt_exe=./m$i$EXEEXT; if test -f "./m$i$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/versioning.at:237: \$LIBTOOL --mode=clean rm -f liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:237" -( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la +$as_echo "$at_srcdir/deplib-in-subdir.at:148: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:148" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:237" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:148" $at_failed && at_fn_log_failure $at_traceon; } -test_installed + + cd $cwd +done + +PATH=$bindir${PATH_SEPARATOR-:}$PATH +for i in 1 2 3; do + lt_exe=m$i$EXEEXT; if test -f "m$i$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/deplib-in-subdir.at:154: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "deplib-in-subdir.at:154" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/deplib-in-subdir.at:154" +$at_failed && at_fn_log_failure +$at_traceon; } +done + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" #AT_STOP_56 #AT_START_57 -# 57. destdir.at:48: Simple DESTDIR install -at_setup_line='destdir.at:48' -at_fn_banner 3 -at_desc="Simple DESTDIR install" -at_desc_line=" 57: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +at_fn_group_banner 57 'infer-tag.at:30' \ + "inferred tag" " " 3 at_xfail=no - eval `$LIBTOOL --config | grep '^fast_install='` - case $fast_install in no) :;; *) false;; esac && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "57. destdir.at:48: testing ..." + $as_echo "57. $at_setup_line: testing $at_desc ..." $at_traceon -# A program that depends upon a library, both in the same package. -# DESTDIR installs do not work with relink at install time. +cat >a.c <<'_ATEOF' +int a (void) { return 0; } +_ATEOF -LDFLAGS="$LDFLAGS -no-undefined" -if test -n "$we_are_on_a_safe_system"; then # let's read shorter cmdlines. - DESTDIR=/tmp/dest - prefix=/tmp/inst - rm -rf $DESTDIR $prefix -else - DESTDIR=`pwd`/dest - prefix=`pwd`/inst -fi -libdir=$prefix/lib -bindir=$prefix/bin -$mkdir_p src $prefix $DESTDIR $DESTDIR$prefix -eval `$LIBTOOL --config | $EGREP '^(FGREP|OBJDUMP)='` -cd src -echo 'int a() { return 0; }' > a.c -$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir -echo 'extern int a(); int main() { return a(); }' > m.c -$CC $CPPFLAGS $CFLAGS -c m.c -$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT liba.la -mkdir $DESTDIR$libdir $DESTDIR$bindir { set +x -$as_echo "$at_srcdir/destdir.at:61: \$LIBTOOL --mode=install cp liba.la \$DESTDIR\$libdir/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la" "destdir.at:61" -( $at_check_trace; $LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la +$as_echo "$at_srcdir/infer-tag.at:37: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c" "infer-tag.at:37" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:61" +at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:37" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/destdir.at:63: \$LIBTOOL --mode=install cp m\$EXEEXT \$DESTDIR\$bindir/m\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT" "destdir.at:63" -( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:63" -$at_failed && at_fn_log_failure -$at_traceon; } -$LIBTOOL --mode=clean rm -f liba.la m -$mkdir_p "$libdir" -(cd "$DESTDIR$libdir" && find . -type d) | (cd "$libdir" && xargs $mkdir_p) -for file in `cd "$DESTDIR$libdir" && find . -type f -print -o -type l -print` -do - mv "$DESTDIR$libdir"/$file "$libdir"/$file -done -rm -rf "$DESTDIR$libdir" + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_57 +#AT_START_58 +at_fn_group_banner 58 'infer-tag.at:42' \ + "CXX inferred tag" " " 3 +at_xfail=no +( + $as_echo "58. $at_setup_line: testing $at_desc ..." + $at_traceon -$mkdir_p "$bindir" -(cd "$DESTDIR$bindir" && find . -type d) | (cd "$bindir" && xargs $mkdir_p) -for file in `cd "$DESTDIR$bindir" && find . -type f -print -o -type l -print` -do - mv "$DESTDIR$bindir"/$file "$bindir"/$file -done -rm -rf "$DESTDIR$bindir" -# We ignore failure on purpose here: we may not be root. { set +x -$as_echo "$at_srcdir/destdir.at:69: \$LIBTOOL --mode=finish \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=finish $libdir" "destdir.at:69" -( $at_check_trace; $LIBTOOL --mode=finish $libdir +$as_echo "$at_srcdir/infer-tag.at:43: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "infer-tag.at:43" +( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_skip $at_status "$at_srcdir/destdir.at:69" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:43" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=$bindir/m$EXEEXT; if test -f "$bindir/m$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/destdir.at:70: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "destdir.at:70" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/infer-tag.at:43: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" +at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "infer-tag.at:43" +( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:70" +at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:43" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_57 -#AT_START_58 -# 58. destdir.at:75: DESTDIR with in-package deplibs -at_setup_line='destdir.at:75' -at_fn_banner 3 -at_desc="DESTDIR with in-package deplibs" -at_desc_line=" 58: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no - eval `$LIBTOOL --config | grep '^fast_install='` - case $fast_install in no) :;; *) false;; esac && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "58. destdir.at:75: testing ..." - $at_traceon - - -# A program that depends upon a library that depends upon another -# library, all in the same package. Use two deplibs, one in $libdir -# and one in another directory. -# DESTDIR installs do not work with relink at install time. +cat >a.cpp <<'_ATEOF' +int a (void) { return 0; } +_ATEOF -LDFLAGS="$LDFLAGS -no-undefined" -if test -n "$we_are_on_a_safe_system"; then # let's read shorter cmdlines. - DESTDIR=/tmp/dest - prefix=/tmp/inst - rm -rf $DESTDIR $prefix -else - DESTDIR=`pwd`/dest - prefix=`pwd`/inst -fi -libdir=$prefix/lib -bindir=$prefix/bin -$mkdir_p src $prefix $DESTDIR $DESTDIR$prefix -eval `$LIBTOOL --config | $EGREP '^(FGREP|OBJDUMP)='` -cd src -echo 'int a1dep() { return 0; }' > a1dep.c -$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a1dep.c -$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba1dep.la a1dep.lo -rpath $libdir -echo 'int a2dep() { return 0; }' > a2dep.c -$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a2dep.c -$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba2dep.la a2dep.lo -rpath ${libdir}2 -echo 'extern int a1dep(), a2dep(); int a() { return a1dep() + a2dep(); }' > a.c -$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir liba1dep.la liba2dep.la -echo 'extern int a(); int main() { return a(); }' > m.c -$CC $CPPFLAGS $CFLAGS -c m.c -$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT liba.la -mkdir $DESTDIR$libdir $DESTDIR${libdir}2 $DESTDIR$bindir { set +x -$as_echo "$at_srcdir/destdir.at:96: \$LIBTOOL --mode=install cp liba1dep.la \$DESTDIR\$libdir/liba1dep.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba1dep.la $DESTDIR$libdir/liba1dep.la" "destdir.at:96" -( $at_check_trace; $LIBTOOL --mode=install cp liba1dep.la $DESTDIR$libdir/liba1dep.la +$as_echo "$at_srcdir/infer-tag.at:50: \$LIBTOOL --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c a.cpp" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c a.cpp" "infer-tag.at:50" +( $at_check_trace; $LIBTOOL --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c a.cpp ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:96" +at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:50" $at_failed && at_fn_log_failure $at_traceon; } + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_58 +#AT_START_59 +at_fn_group_banner 59 'infer-tag.at:55' \ + "F77 inferred tag" " " 3 +at_xfail=no +( + $as_echo "59. $at_setup_line: testing $at_desc ..." + $at_traceon + + { set +x -$as_echo "$at_srcdir/destdir.at:98: \$LIBTOOL --mode=install cp liba2dep.la \$DESTDIR\${libdir}2/liba2dep.la" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "destdir.at:98" -( $at_check_trace; $LIBTOOL --mode=install cp liba2dep.la $DESTDIR${libdir}2/liba2dep.la +$as_echo "$at_srcdir/infer-tag.at:56: { test -n \"\$F77\" && test \"X\$F77\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$F77\" && test \"X$F77\" != Xno; } || (exit 77)" "infer-tag.at:56" +( $at_check_trace; { test -n "$F77" && test "X$F77" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:98" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:56" $at_failed && at_fn_log_failure $at_traceon; } + + + + +cat >a.f <<'_ATEOF' + program main + end +_ATEOF + + { set +x -$as_echo "$at_srcdir/destdir.at:100: \$LIBTOOL --mode=install cp liba.la \$DESTDIR\$libdir/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la" "destdir.at:100" -( $at_check_trace; $LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la +$as_echo "$at_srcdir/infer-tag.at:64: \$LIBTOOL --mode=compile \$F77 \$FFLAGS -c a.f" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $F77 $FFLAGS -c a.f" "infer-tag.at:64" +( $at_check_trace; $LIBTOOL --mode=compile $F77 $FFLAGS -c a.f ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:100" +at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:64" $at_failed && at_fn_log_failure $at_traceon; } + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_59 +#AT_START_60 +at_fn_group_banner 60 'infer-tag.at:69' \ + "FC inferred tag" " " 3 +at_xfail=no +( + $as_echo "60. $at_setup_line: testing $at_desc ..." + $at_traceon + + { set +x -$as_echo "$at_srcdir/destdir.at:102: \$LIBTOOL --mode=install cp m\$EXEEXT \$DESTDIR\$bindir/m\$EXEEXT" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT" "destdir.at:102" -( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT +$as_echo "$at_srcdir/infer-tag.at:70: { test -n \"\$FC\" && test \"X\$FC\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$FC\" && test \"X$FC\" != Xno; } || (exit 77)" "infer-tag.at:70" +( $at_check_trace; { test -n "$FC" && test "X$FC" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:102" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:70" $at_failed && at_fn_log_failure $at_traceon; } -$LIBTOOL --mode=clean rm -f liba1dep.la liba2dep.la liba.la m -$mkdir_p "$libdir" -(cd "$DESTDIR$libdir" && find . -type d) | (cd "$libdir" && xargs $mkdir_p) -for file in `cd "$DESTDIR$libdir" && find . -type f -print -o -type l -print` -do - mv "$DESTDIR$libdir"/$file "$libdir"/$file -done -rm -rf "$DESTDIR$libdir" -$mkdir_p "${libdir}2" -(cd "$DESTDIR${libdir}2" && find . -type d) | (cd "${libdir}2" && xargs $mkdir_p) -for file in `cd "$DESTDIR${libdir}2" && find . -type f -print -o -type l -print` -do - mv "$DESTDIR${libdir}2"/$file "${libdir}2"/$file -done -rm -rf "$DESTDIR${libdir}2" -$mkdir_p "$bindir" -(cd "$DESTDIR$bindir" && find . -type d) | (cd "$bindir" && xargs $mkdir_p) -for file in `cd "$DESTDIR$bindir" && find . -type f -print -o -type l -print` -do - mv "$DESTDIR$bindir"/$file "$bindir"/$file -done -rm -rf "$DESTDIR$bindir" -# We ignore failure on purpose here: we may not be root. + +cat >a.f <<'_ATEOF' + program main + end +_ATEOF + + { set +x -$as_echo "$at_srcdir/destdir.at:109: \$LIBTOOL --mode=finish \$libdir \${libdir}2" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "destdir.at:109" -( $at_check_trace; $LIBTOOL --mode=finish $libdir ${libdir}2 +$as_echo "$at_srcdir/infer-tag.at:78: \$LIBTOOL --mode=compile \$FC \$FCFLAGS -c a.f" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $FC $FCFLAGS -c a.f" "infer-tag.at:78" +( $at_check_trace; $LIBTOOL --mode=compile $FC $FCFLAGS -c a.f ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_skip $at_status "$at_srcdir/destdir.at:109" +at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:78" $at_failed && at_fn_log_failure $at_traceon; } -# put false libraries in the DESTDIR paths: if the installed program -# refers to them, that is a bug. -mkdir $DESTDIR$libdir $DESTDIR${libdir}2 $DESTDIR$bindir -for lib in a1dep a2dep a; do - case $lib in - a2dep) ldir=${libdir}2;; - *) ldir=$libdir;; - esac - echo "int this_should_not_be_linked_against () { return 0; }" > $lib.c - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $lib.c - # Note the rpath argument includes $DESTDIR: the installed false libs - # should be functional (i.e., not need `libtool --mode=finish'). - $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o lib$lib.la $lib.lo -rpath $DESTDIR$ldir - $LIBTOOL --mode=install cp lib$lib.la $DESTDIR$ldir/lib$lib.la -done + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_60 +#AT_START_61 +at_fn_group_banner 61 'infer-tag.at:83' \ + "GCJ inferred tag" " " 3 +at_xfail=no +( + $as_echo "61. $at_setup_line: testing $at_desc ..." + $at_traceon + -lt_exe=$bindir/m$EXEEXT; if test -f "$bindir/m$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/destdir.at:127: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "destdir.at:127" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/infer-tag.at:84: { test -n \"\$GCJ\" && test \"X\$GCJ\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$GCJ\" && test \"X$GCJ\" != Xno; } || (exit 77)" "infer-tag.at:84" +( $at_check_trace; { test -n "$GCJ" && test "X$GCJ" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:127" +at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:84" $at_failed && at_fn_log_failure $at_traceon; } +# There are just too many broken gcj installations out there, either missing + # libgcj.spec or unable to find it. Skip the test for them. + cat >gcj_test.java <<'_ATEOF' +public class gcj_test { + public static void main(String[] argv) { } + } +_ATEOF - -# TODO: make this more portable: -if test "$OBJDUMP" != false && ($OBJDUMP -p $bindir/m$EXEEXT) >/dev/null 2>&1; then - { set +x -$as_echo "$at_srcdir/destdir.at:131: \$OBJDUMP -p \$bindir/m\$EXEEXT | \$EGREP -i \"R(UN)?PATH.*\$DESTDIR\"" -at_fn_check_prepare_dynamic "$OBJDUMP -p $bindir/m$EXEEXT | $EGREP -i \"R(UN)?PATH.*$DESTDIR\"" "destdir.at:131" -( $at_check_trace; $OBJDUMP -p $bindir/m$EXEEXT | $EGREP -i "R(UN)?PATH.*$DESTDIR" + { set +x +$as_echo "$at_srcdir/infer-tag.at:84: \$GCJ \$GCJFLAGS -c gcj_test.java || exit 77" +at_fn_check_prepare_dynamic "$GCJ $GCJFLAGS -c gcj_test.java || exit 77" "infer-tag.at:84" +( $at_check_trace; $GCJ $GCJFLAGS -c gcj_test.java || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/destdir.at:131" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:84" $at_failed && at_fn_log_failure $at_traceon; } - . $libdir/liba.la - set x $library_names - lname=$2 - if test -n "$lname"; then - { set +x -$as_echo "$at_srcdir/destdir.at:136: \$OBJDUMP -p \$libdir/\$lname | \$EGREP -i \"R(UN)?PATH.*\$DESTDIR\"" -at_fn_check_prepare_dynamic "$OBJDUMP -p $libdir/$lname | $EGREP -i \"R(UN)?PATH.*$DESTDIR\"" "destdir.at:136" -( $at_check_trace; $OBJDUMP -p $libdir/$lname | $EGREP -i "R(UN)?PATH.*$DESTDIR" + + + +cat >A.java <<'_ATEOF' +public class A { + private int a; + public A () { a = 0; } +}; +_ATEOF + + +{ set +x +$as_echo "$at_srcdir/infer-tag.at:94: \$LIBTOOL --mode=compile \$GCJ \$GCJCFLAGS -c A.java" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $GCJ $GCJCFLAGS -c A.java" "infer-tag.at:94" +( $at_check_trace; $LIBTOOL --mode=compile $GCJ $GCJCFLAGS -c A.java ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/destdir.at:136" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/infer-tag.at:94" $at_failed && at_fn_log_failure $at_traceon; } - fi -fi set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_58 -#AT_START_59 -# 59. old-m4-iface.at:40: AM_PROG_LIBTOOL -at_setup_line='old-m4-iface.at:40' -at_fn_banner 4 -at_desc="AM_PROG_LIBTOOL" -at_desc_line=" 59: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_61 +#AT_START_62 +at_fn_group_banner 62 'localization.at:24' \ + "localized compiler messages" " " 3 at_xfail=no - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "59. old-m4-iface.at:40: testing ..." + $as_echo "62. $at_setup_line: testing $at_desc ..." $at_traceon -cat >configure.in <<'_ATEOF' -AC_INIT(old.c) -AM_PROG_LIBTOOL -AC_SUBST([LIBTOOL_DEPS]) -AC_OUTPUT(Makefile) -_ATEOF - - -cat >Makefile.in <<'_ATEOF' -COMPILE = @CC@ @CPPFLAGS@ @CFLAGS@ -LINK = @CC@ @CFLAGS@ @LDFLAGS@ -o $@ -SHELL = @SHELL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ - -all: libtool old@EXEEXT@ - -old@EXEEXT@: old.@OBJEXT@ - $(LINK) old.@OBJEXT@ -.SUFFIXES: -.SUFFIXES: .c .@OBJEXT@ +# Let's try German locale. :-) -.c.@OBJEXT@: - $(COMPILE) -c $< -libtool: $(LIBTOOL_DEPS) - $(SHELL) ./config.status --recheck +cat >a.c <<'_ATEOF' +int x[-1]; _ATEOF - - -cat >old.c <<'_ATEOF' -#include - -int main (void) -{ - printf ("Hello, World!"); - return 0; -} +cat >b.c <<'_ATEOF' +int y; _ATEOF -$LIBTOOLIZE --install - - - -# This is slightly bogus, since only libtool.m4 was required in aclocal.m4 -# with libtool-1.5x... +# First see if setting a locale is accepted at all. { set +x -$as_echo "$at_srcdir/old-m4-iface.at:85: test -f aclocal.m4 || - cat \"\$tst_aclocaldir/libtool.m4\" \"\$tst_aclocaldir/ltoptions.m4\" \\ - \"\$tst_aclocaldir/ltsugar.m4\" \"\$tst_aclocaldir/ltversion.m4\" \\ - \"\$tst_aclocaldir/lt~obsolete.m4\" > aclocal.m4" -at_fn_check_prepare_notrace 'an embedded newline' "old-m4-iface.at:85" -( $at_check_trace; test -f aclocal.m4 || - cat "$tst_aclocaldir/libtool.m4" "$tst_aclocaldir/ltoptions.m4" \ - "$tst_aclocaldir/ltsugar.m4" "$tst_aclocaldir/ltversion.m4" \ - "$tst_aclocaldir/lt~obsolete.m4" > aclocal.m4 +$as_echo "$at_srcdir/localization.at:39: (LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE \$CC \$CPPFLAGS \$CFLAGS -c b.c) || exit 77" +at_fn_check_prepare_dynamic "(LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE $CC $CPPFLAGS $CFLAGS -c b.c) || exit 77" "localization.at:39" +( $at_check_trace; (LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE $CC $CPPFLAGS $CFLAGS -c b.c) || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:85" +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/localization.at:39" $at_failed && at_fn_log_failure $at_traceon; } - - - - +# Find out about expected output. { set +x -$as_echo "$at_srcdir/old-m4-iface.at:90: \$AUTOCONF --force" -at_fn_check_prepare_dynamic "$AUTOCONF --force" "old-m4-iface.at:90" -( $at_check_trace; $AUTOCONF --force +$as_echo "$at_srcdir/localization.at:43: (LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE \$CC \$CPPFLAGS \$CFLAGS -c a.c) || exit 1" +at_fn_check_prepare_dynamic "(LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE $CC $CPPFLAGS $CFLAGS -c a.c) || exit 1" "localization.at:43" +( $at_check_trace; (LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE $CC $CPPFLAGS $CFLAGS -c a.c) || exit 1 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:90" +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 1 $at_status "$at_srcdir/localization.at:43" $at_failed && at_fn_log_failure $at_traceon; } - - - +_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'` +sed "/^distcc\[[0-9]*\]/d + /^$_ltbase: compile/d + s/\(tmp\/\{1,\}cc\)\([a-zA-Z0-9_]\{1,\}\)/\1-normalized-tmpname/g" < stdout > stdout.t +case $host_os in + mingw*) + tr -d '\015' < stdout.t > expected-stdout ;; + *) + cp stdout.t expected-stdout ;; +esac +_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'` +sed "/^distcc\[[0-9]*\]/d + /^$_ltbase: compile/d + s/\(tmp\/\{1,\}cc\)\([a-zA-Z0-9_]\{1,\}\)/\1-normalized-tmpname/g" < stderr > stderr.t +case $host_os in + mingw*) + tr -d '\015' < stderr.t > expected-stderr ;; + *) + cp stderr.t expected-stderr ;; +esac { set +x -$as_echo "$at_srcdir/old-m4-iface.at:90: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "old-m4-iface.at:90" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:90" -$at_failed && at_fn_log_failure -$at_traceon; } - - -for target in all -do - { set +x -$as_echo "$at_srcdir/old-m4-iface.at:90: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "old-m4-iface.at:90" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +$as_echo "$at_srcdir/localization.at:47: (LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE \$LIBTOOL --mode=compile --tag=CC \$CC \$CPPFLAGS \$CFLAGS -c a.c) || exit 1" +at_fn_check_prepare_dynamic "(LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c) || exit 1" "localization.at:47" +( $at_check_trace; (LANG=de_DE LANGUAGE=de_DE LC_ALL=de_DE $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c) || exit 1 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:90" +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 1 $at_status "$at_srcdir/localization.at:47" $at_failed && at_fn_log_failure $at_traceon; } -done - - - -lt_exe=./old; if test -f "./old$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'` +sed "/^distcc\[[0-9]*\]/d + /^$_ltbase: compile/d + s/\(tmp\/\{1,\}cc\)\([a-zA-Z0-9_]\{1,\}\)/\1-normalized-tmpname/g" < stdout > stdout.t +case $host_os in + mingw*) + tr -d '\015' < stdout.t > libtool-stdout ;; + *) + cp stdout.t libtool-stdout ;; +esac +_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'` +sed "/^distcc\[[0-9]*\]/d + /^$_ltbase: compile/d + s/\(tmp\/\{1,\}cc\)\([a-zA-Z0-9_]\{1,\}\)/\1-normalized-tmpname/g" < stderr > stderr.t +case $host_os in + mingw*) + tr -d '\015' < stderr.t > libtool-stderr ;; + *) + cp stderr.t libtool-stderr ;; +esac +# Avoid these errors: +# GNU/Linux: +# /bin/sh: warning: setlocale: LC_ALL: cannot change locale (de_DE) +# HP-UX: +# Warning! One or more of your selected locales are not available. +# Please invoke the commands "locale" and "locale -a" to verify your +# selections and the available locales. +# +# Continuing processing using the "C" locale. { set +x -$as_echo "$at_srcdir/old-m4-iface.at:92: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "old-m4-iface.at:92" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/localization.at:60: grep locale stdout stderr && exit 77" +at_fn_check_prepare_trace "localization.at:60" +( $at_check_trace; grep locale stdout stderr && exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "Hello, World!" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:92" -$at_failed && at_fn_log_failure -$at_traceon; } - - - -# Now, test that libtoolize doesn't mistakenly think the user called -# any libtool macros if in fact she didn't. -sed '/AM_PROG_LIBTOOL/d' configure.in >configure.int -mv -f configure.int configure.in -{ set +x -$as_echo "$at_srcdir/old-m4-iface.at:98: \$LIBTOOLIZE -n" -at_fn_check_prepare_dynamic "$LIBTOOLIZE -n" "old-m4-iface.at:98" -( $at_check_trace; $LIBTOOLIZE -n -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:98" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/localization.at:60" $at_failed && at_fn_log_failure $at_traceon; } -# ensure no shell errors: { set +x -$as_echo "$at_srcdir/old-m4-iface.at:100: grep -v \"^libtoolize: \" stderr" -at_fn_check_prepare_trace "old-m4-iface.at:100" -( $at_check_trace; grep -v "^libtoolize: " stderr +$as_echo "$at_srcdir/localization.at:61: diff expected-stderr libtool-stderr" +at_fn_check_prepare_trace "localization.at:61" +( $at_check_trace; diff expected-stderr libtool-stderr ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/old-m4-iface.at:100" +at_fn_check_status 0 $at_status "$at_srcdir/localization.at:61" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/old-m4-iface.at:101: grep \"Remember to add.*LT_INIT.*to configure.in\" stdout" -at_fn_check_prepare_trace "old-m4-iface.at:101" -( $at_check_trace; grep "Remember to add.*LT_INIT.*to configure.in" stdout +$as_echo "$at_srcdir/localization.at:62: diff expected-stdout libtool-stdout" +at_fn_check_prepare_trace "localization.at:62" +( $at_check_trace; diff expected-stdout libtool-stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:101" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/localization.at:62" $at_failed && at_fn_log_failure $at_traceon; } + +# check that we get our quoting right. + { set +x -$as_echo "$at_srcdir/old-m4-iface.at:102: grep \"Consider adding.*LT_WITH_LTDL\" stdout" -at_fn_check_prepare_trace "old-m4-iface.at:102" -( $at_check_trace; grep "Consider adding.*LT_WITH_LTDL" stdout +$as_echo "$at_srcdir/localization.at:67: (LANGUAGE='a; nosuchprogram \" '\\'' & \$x /#+*(){}|,:\`\\ !%' \$LIBTOOL --mode=compile --tag=CC \$CC \$CPPFLAGS \$CFLAGS -c b.c)" +at_fn_check_prepare_notrace 'a `...` command substitution' "localization.at:67" +( $at_check_trace; (LANGUAGE='a; nosuchprogram " '\'' & $x /#+*(){}|,:`\ !%' $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c b.c) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/old-m4-iface.at:102" +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/localization.at:67" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/old-m4-iface.at:103: grep \"Remember to add.*LT_CONFIG_LTDL_DIR\" stdout" -at_fn_check_prepare_trace "old-m4-iface.at:103" -( $at_check_trace; grep "Remember to add.*LT_CONFIG_LTDL_DIR" stdout +$as_echo "$at_srcdir/localization.at:69: grep nosuchprogram stdout stderr" +at_fn_check_prepare_trace "localization.at:69" +( $at_check_trace; grep nosuchprogram stdout stderr ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/old-m4-iface.at:103" +at_fn_check_status 1 $at_status "$at_srcdir/localization.at:69" $at_failed && at_fn_log_failure $at_traceon; } + + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_59 -#AT_START_60 -# 60. old-m4-iface.at:112: AC_WITH_LTDL -at_setup_line='old-m4-iface.at:112' -at_fn_banner 4 -at_desc="AC_WITH_LTDL" -at_desc_line=" 60: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_62 +#AT_START_63 +at_fn_group_banner 63 'nocase.at:26' \ + "nocase library search" " " 3 at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "60. old-m4-iface.at:112: testing ..." + $as_echo "63. $at_setup_line: testing $at_desc ..." $at_traceon -cat >module.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" -#endif -const char * -hello (void) -{ - return "Hello!"; -} -_ATEOF - - -cat >main.c <<'_ATEOF' -#include -#include "ltdl.h" - -int -main () -{ - lt_dlhandle module; - const char *(*func) (void) = 0; - int status = 1; - - LTDL_SET_PRELOADED_SYMBOLS(); - if (lt_dlinit() != 0) { - fprintf (stderr, "error during initialisation: %s\n", lt_dlerror()); - return 1; - } - module = lt_dlopen("./module.la"); - if (!module) { - fprintf (stderr, "error dlopening ./module.la: %s\n", lt_dlerror()); - goto finish; - } +eval `$LIBTOOL --config | $EGREP '^(want_nocaseglob|file_magic_glob)='` - func = (const char *(*)(void)) lt_dlsym (module, "hello"); - if (!func) { - fprintf (stderr, "error fetching func: %s\n", lt_dlerror()); - goto finish; - } +{ set +x +$as_echo "$at_srcdir/nocase.at:31: test \"\$want_nocaseglob\" != yes && test -z \"\$file_magic_glob\" && exit 77" +at_fn_check_prepare_dynamic "test \"$want_nocaseglob\" != yes && test -z \"$file_magic_glob\" && exit 77" "nocase.at:31" +( $at_check_trace; test "$want_nocaseglob" != yes && test -z "$file_magic_glob" && exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 1 $at_status "$at_srcdir/nocase.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } - printf ("%s\n", (*func) ()); - status = 0; -finish: - if (lt_dlexit() != 0) { - fprintf (stderr, "error during finalisation: %s\n", lt_dlerror()); - status = 1; - } +mkdir foo +cat >foo/Foo.c <<'_ATEOF' - return status; -} +int Foo (void) { return 1; } _ATEOF +mkdir bar +cat >bar/bar.c <<'_ATEOF' - - - - -cat >configure.in <<'_ATEOF' -AC_PREREQ(2.50) -AC_INIT([main.c]) -AC_PROG_MAKE_SET -AC_LIBTOOL_DLOPEN -AM_PROG_LIBTOOL -AC_WITH_LTDL -AC_OUTPUT(Makefile) +extern int Foo (void); +int bar (void) { return Foo (); } _ATEOF -cat >Makefile.in <<'_ATEOF' -top_srcdir = . -top_builddir = . -COMPILE = @CC@ @INCLTDL@ @CPPFLAGS@ @CFLAGS@ -LTCOMPILE = @LIBTOOL@ --mode=compile $(COMPILE) -LTLINK = @LIBTOOL@ --mode=link @CC@ -no-undefined @CFLAGS@ @LDFLAGS@ -o $@ -SHELL = @SHELL@ -@SET_MAKE@ - -TARGETS = libltdl/libltdlc.la module.la ltdldemo@EXEEXT@ - -all: $(TARGETS) - -libltdl/libltdlc.la: - cd libltdl && $(MAKE) - -module.la: module.lo - $(LTLINK) module.lo -module -avoid-version -rpath /dev/null - -ltdldemo@EXEEXT@: main.@OBJEXT@ module.la libltdl/libltdlc.la - $(LTLINK) main.@OBJEXT@ -dlopen module.la @LIBLTDL@ @LIBS@ - -.SUFFIXES: -.SUFFIXES: .c .@OBJEXT@ .lo - -.c.@OBJEXT@: - $(COMPILE) -c $< +cat >main.c <<'_ATEOF' -.c.lo: - $(LTCOMPILE) -c -o $@ $< +extern int bar (void); +int main (void) { return bar (); } _ATEOF -# Be sure to use the in-tree libltdl, somebody might have removed -# an installed libltdl.la file. -$LIBTOOLIZE --ltdl --install - +libdir=`pwd`/inst/lib +mkdir inst inst/bin inst/lib +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo/Foo.lo foo/Foo.c { set +x -$as_echo "$at_srcdir/old-m4-iface.at:160: \$ACLOCAL -I libltdl/m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "old-m4-iface.at:160" -( $at_check_trace; $ACLOCAL -I libltdl/m4 +$as_echo "$at_srcdir/nocase.at:58: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o foo/libFoo.la foo/Foo.lo -no-undefined -version-info 1:0:0 -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o foo/libFoo.la foo/Foo.lo -no-undefined -version-info 1:0:0 -rpath $libdir" "nocase.at:58" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o foo/libFoo.la foo/Foo.lo -no-undefined -version-info 1:0:0 -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160" +at_fn_check_status 0 $at_status "$at_srcdir/nocase.at:58" $at_failed && at_fn_log_failure $at_traceon; } - - - - - { set +x -$as_echo "$at_srcdir/old-m4-iface.at:160: \$AUTOCONF --force" -at_fn_check_prepare_dynamic "$AUTOCONF --force" "old-m4-iface.at:160" -( $at_check_trace; $AUTOCONF --force +$as_echo "$at_srcdir/nocase.at:61: \$LIBTOOL --mode=install cp foo/libFoo.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp foo/libFoo.la $libdir" "nocase.at:61" +( $at_check_trace; $LIBTOOL --mode=install cp foo/libFoo.la $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160" +at_fn_check_status 0 $at_status "$at_srcdir/nocase.at:61" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/nocase.at:63: \$LIBTOOL --mode=clean rm -f foo/libFoo.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f foo/libFoo.la" "nocase.at:63" +( $at_check_trace; $LIBTOOL --mode=clean rm -f foo/libFoo.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/nocase.at:63" +$at_failed && at_fn_log_failure +$at_traceon; } +rm -f $libdir/libFoo.la +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar/bar.lo bar/bar.c { set +x -$as_echo "$at_srcdir/old-m4-iface.at:160: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --with-included-ltdl" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "old-m4-iface.at:160" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --with-included-ltdl +$as_echo "$at_srcdir/nocase.at:69: \$LIBTOOL --mode=link --tag=CC \$CC \$CFLAGS \$LDFLAGS -o bar/libbar.la bar/bar.lo -L\$libdir -lfoo -no-undefined -version-info 1:0:0 -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o bar/libbar.la bar/bar.lo -L$libdir -lfoo -no-undefined -version-info 1:0:0 -rpath $libdir" "nocase.at:69" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o bar/libbar.la bar/bar.lo -L$libdir -lfoo -no-undefined -version-info 1:0:0 -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160" +at_fn_check_status 0 $at_status "$at_srcdir/nocase.at:69" $at_failed && at_fn_log_failure $at_traceon; } - -for target in all -do - { set +x -$as_echo "$at_srcdir/old-m4-iface.at:160: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "old-m4-iface.at:160" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +{ set +x +$as_echo "$at_srcdir/nocase.at:72: \$LIBTOOL --mode=install cp bar/libbar.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp bar/libbar.la $libdir" "nocase.at:72" +( $at_check_trace; $LIBTOOL --mode=install cp bar/libbar.la $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160" +at_fn_check_status 0 $at_status "$at_srcdir/nocase.at:72" $at_failed && at_fn_log_failure $at_traceon; } -done +str=`$EGREP '^(old_library)=' < $libdir/libbar.la` +eval "$str" +libbar=$old_library +rm -f $libdir/$libbar +$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.$OBJEXT main.c -lt_exe=./ltdldemo; if test -f "./ltdldemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/old-m4-iface.at:163: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "old-m4-iface.at:163" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/nocase.at:82: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -L\$libdir -lbar" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -L$libdir -lbar" "nocase.at:82" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -L$libdir -lbar ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:163" +at_fn_check_status 0 $at_status "$at_srcdir/nocase.at:82" $at_failed && at_fn_log_failure $at_traceon; } - set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_60 -#AT_START_61 -# 61. am-subdir.at:33: C subdir-objects -at_setup_line='am-subdir.at:33' -at_fn_banner 5 -at_desc="C subdir-objects" -at_desc_line=" 61: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_63 +#AT_START_64 +at_fn_group_banner 64 'install.at:25' \ + "Install tests" " " 3 at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOMAKE" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "61. am-subdir.at:33: testing ..." + $as_echo "64. $at_setup_line: testing $at_desc ..." $at_traceon -cat >configure.ac <<'_ATEOF' -AC_INIT([subdir-demo], 2.2.10, bug-libtool@gnu.org) -AM_INIT_AUTOMAKE -LT_INIT([win32-dll]) -AC_PROG_CC -AM_PROG_CC_C_O -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -_ATEOF - - -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I m4 -AUTOMAKE_OPTIONS = subdir-objects foreign 1.6 -AM_CPPFLAGS = -I$(top_srcdir)/../.. - -lib_LTLIBRARIES = subdir/libsub.la -subdir_libsub_la_SOURCES= subdir/sub.c - -bin_PROGRAMS = subdir/subdemo -subdir_subdemo_SOURCES = subdir/main.c -subdir_subdemo_LDADD = subdir/libsub.la -_ATEOF - - -test -d subdir || { rm -f subdir && mkdir subdir; } - -cat >subdir/main.c <<'_ATEOF' -#include - -extern void sub (void); - -int main (void) -{ - printf ("Welcome to GNU Libtool subdir-objects test!\n"); - sub(); - return 0; -} -_ATEOF - - -cat >subdir/sub.c <<'_ATEOF' -#include -void sub (void) { printf ("** This is libsub **\n"); } -_ATEOF - - -$LIBTOOLIZE --copy +# Ensure that install_override_mode overrides the mode of the shared +# library (and only the shared library). { set +x -$as_echo "$at_srcdir/am-subdir.at:78: \$ACLOCAL -I m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "am-subdir.at:78" -( $at_check_trace; $ACLOCAL -I m4 +$as_echo "$at_srcdir/install.at:31: \$LIBTOOL --features | grep 'enable shared libraries' || exit 77" +at_fn_check_prepare_notrace 'a shell pipeline' "install.at:31" +( $at_check_trace; $LIBTOOL --features | grep 'enable shared libraries' || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78" +at_fn_check_status 0 $at_status "$at_srcdir/install.at:31" $at_failed && at_fn_log_failure $at_traceon; } +sed 's,^\(install_override_mode\)=.*,\1=755,' < $LIBTOOL > ./libtool +LIBTOOL=./libtool +chmod a+rx $LIBTOOL +inst=`pwd`/inst +mkdir inst - - +echo 'int a () { return 0; }' > a.c +$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c { set +x -$as_echo "$at_srcdir/am-subdir.at:78: \$AUTOMAKE --add-missing" -at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "am-subdir.at:78" -( $at_check_trace; $AUTOMAKE --add-missing +$as_echo "$at_srcdir/install.at:42: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -rpath \$inst -no-undefined" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $inst -no-undefined" "install.at:42" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $inst -no-undefined ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78" -if $at_failed; then : - { set +x -$as_echo "$at_srcdir/am-subdir.at:78: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "am-subdir.at:78" -( $at_check_trace; grep 'require .*but have' stderr && (exit 77) -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/am-subdir.at:78" -$at_failed && at_fn_log_failure -$at_traceon; } - -fi +at_fn_check_status 0 $at_status "$at_srcdir/install.at:42" $at_failed && at_fn_log_failure $at_traceon; } - - - { set +x -$as_echo "$at_srcdir/am-subdir.at:78: \$AUTOCONF " -at_fn_check_prepare_dynamic "$AUTOCONF " "am-subdir.at:78" -( $at_check_trace; $AUTOCONF +$as_echo "$at_srcdir/install.at:44: \$LIBTOOL --mode=install \$lt_INSTALL liba.la \$inst" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL liba.la $inst" "install.at:44" +( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL liba.la $inst ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/install.at:44" $at_failed && at_fn_log_failure $at_traceon; } - - - { set +x -$as_echo "$at_srcdir/am-subdir.at:78: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "am-subdir.at:78" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78" -$at_failed && at_fn_log_failure -$at_traceon; } - - -for target in all -do - { set +x -$as_echo "$at_srcdir/am-subdir.at:78: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "am-subdir.at:78" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +$as_echo "$at_srcdir/install.at:46: grep ' -m 755' stdout" +at_fn_check_prepare_trace "install.at:46" +( $at_check_trace; grep ' -m 755' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78" +at_fn_check_status 0 $at_status "$at_srcdir/install.at:46" $at_failed && at_fn_log_failure $at_traceon; } -done - - - -lt_exe=subdir/subdemo; if test -f "subdir/subdemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/am-subdir.at:80: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "am-subdir.at:80" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/install.at:47: \$LIBTOOL --mode=install \$lt_INSTALL -m 644 liba.la \$inst" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install $lt_INSTALL -m 644 liba.la $inst" "install.at:47" +( $at_check_trace; $LIBTOOL --mode=install $lt_INSTALL -m 644 liba.la $inst ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:80" +at_fn_check_status 0 $at_status "$at_srcdir/install.at:47" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/am-subdir.at:81: grep 'Welcome to GNU Libtool subdir-objects test' stdout" -at_fn_check_prepare_trace "am-subdir.at:81" -( $at_check_trace; grep 'Welcome to GNU Libtool subdir-objects test' stdout +$as_echo "$at_srcdir/install.at:49: grep ' -m 755' stdout" +at_fn_check_prepare_trace "install.at:49" +( $at_check_trace; grep ' -m 755' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:81" +at_fn_check_status 0 $at_status "$at_srcdir/install.at:49" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/am-subdir.at:83: grep 'This is libsub' stdout" -at_fn_check_prepare_trace "am-subdir.at:83" -( $at_check_trace; grep 'This is libsub' stdout +$as_echo "$at_srcdir/install.at:50: grep ' -m 644.*liba.la' stdout" +at_fn_check_prepare_trace "install.at:50" +( $at_check_trace; grep ' -m 644.*liba.la' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:83" +at_fn_check_status 0 $at_status "$at_srcdir/install.at:50" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_61 -#AT_START_62 -# 62. am-subdir.at:93: C++ subdir-objects -at_setup_line='am-subdir.at:93' -at_fn_banner 5 -at_desc="C++ subdir-objects" -at_desc_line=" 62: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_64 +#AT_START_65 +at_fn_group_banner 65 'versioning.at:24' \ + "versioning" " " 3 at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOMAKE" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "62. am-subdir.at:93: testing ..." + $as_echo "65. $at_setup_line: testing $at_desc ..." $at_traceon -{ set +x -$as_echo "$at_srcdir/am-subdir.at:94: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "am-subdir.at:94" -( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:94" -$at_failed && at_fn_log_failure -$at_traceon; } -{ set +x -$as_echo "$at_srcdir/am-subdir.at:94: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" -at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "am-subdir.at:94" -( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:94" -$at_failed && at_fn_log_failure -$at_traceon; } +eval "`$LIBTOOL --config | $EGREP '^(objdir|host_os)='`" + +# Setup some library and program sources: +# a library (a1), a new revision (a2), a compatible update (a3), +# an incompatible update (a4). +# Another library (libb) using liba, and a couple of programs, +# using liba directly and indirectly through libb. +cat >liba1.c <<'_ATEOF' +int a (void) +{ + return 0; +} +_ATEOF -cat >configure.ac <<'_ATEOF' -AC_INIT([subdir-demo], 2.2.10, bug-libtool@gnu.org) -AM_INIT_AUTOMAKE -AC_PROG_CC -AM_PROG_CC_C_O -AC_PROG_CXX -AC_PROG_CXXCPP -AC_LANG([C++]) -LT_INIT([win32-dll]) +cat >liba2.c <<'_ATEOF' -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT +/* The internal detail should be static. It isn't static in this test, + so we can later find out that it's this revision of the library. */ +int internal_detail = 42; +int a (void) +{ + return internal_detail - 42; +} _ATEOF -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I m4 -AUTOMAKE_OPTIONS = subdir-objects foreign 1.6 -AM_CPPFLAGS = -I$(top_srcdir)/../.. +cat >liba3.c <<'_ATEOF' -lib_LTLIBRARIES = subdir/libsub.la -subdir_libsub_la_SOURCES= subdir/sub.cxx subdir/sub.hxx +int a (void) +{ + return 0; +} +int aa (void) +{ + return 0; +} +_ATEOF -bin_PROGRAMS = subdir/subdemo -subdir_subdemo_SOURCES = subdir/main.cxx -subdir_subdemo_LDADD = subdir/libsub.la + +cat >liba4.c <<'_ATEOF' + +int aa (void) +{ + return 0; +} _ATEOF -test -d subdir || { rm -f subdir && mkdir subdir; } +cat >libb.c <<'_ATEOF' -cat >subdir/sub.hxx <<'_ATEOF' -class libsub { public: int sub (void); }; +extern int a (void); +int b (void) +{ + return a (); +} _ATEOF -cat >subdir/main.cxx <<'_ATEOF' -#include "sub.hxx" +cat >prog1.c <<'_ATEOF' +extern int a (void); int main (void) { - libsub SUB; - return SUB.sub() != 27; + return a (); } _ATEOF -cat >subdir/sub.cxx <<'_ATEOF' -#include "sub.hxx" +cat >prog2.c <<'_ATEOF' -int libsub::sub (void) { return 27; } +extern int b (void); +int main (void) +{ + return b (); +} _ATEOF -$LIBTOOLIZE --copy +inst=`pwd`/inst +libdir=$inst/lib +bindir=$inst/bin +LDFLAGS="$LDFLAGS -no-undefined" +mkdir $inst $libdir $bindir + +for file in liba1.c liba2.c liba3.c liba4.c libb.c; do + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file +done +for file in prog1.c prog2.c; do + $CC $CPPFLAGS $CFLAGS -c $file +done + +# Setup is finished here. +# Hypothesis: -version-info is ignored for convenience archives. { set +x -$as_echo "$at_srcdir/am-subdir.at:146: \$ACLOCAL -I m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "am-subdir.at:146" -( $at_check_trace; $ACLOCAL -I m4 +$as_echo "$at_srcdir/versioning.at:111: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info 0:0:0" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 0:0:0" "versioning.at:111" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 0:0:0 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:111" $at_failed && at_fn_log_failure $at_traceon; } - - - - { set +x -$as_echo "$at_srcdir/am-subdir.at:146: \$AUTOMAKE --add-missing" -at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "am-subdir.at:146" -( $at_check_trace; $AUTOMAKE --add-missing +$as_echo "$at_srcdir/versioning.at:113: grep 'version-info.*ignored for convenience' stderr" +at_fn_check_prepare_trace "versioning.at:113" +( $at_check_trace; grep 'version-info.*ignored for convenience' stderr ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146" -if $at_failed; then : +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:113" +$at_failed && at_fn_log_failure +$at_traceon; } + + +# Hypothesis: the deprecated -version-number works. +# Be sure not to use zero here, it's not portable. +for version_number in 1 1:1 2:1 1:1:1 3:2:1; do { set +x -$as_echo "$at_srcdir/am-subdir.at:146: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "am-subdir.at:146" -( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +$as_echo "$at_srcdir/versioning.at:118: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-number \$version_number -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-number $version_number -rpath $libdir" "versioning.at:118" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-number $version_number -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/am-subdir.at:146" -$at_failed && at_fn_log_failure -$at_traceon; } - -fi +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:118" $at_failed && at_fn_log_failure $at_traceon; } +done - - -{ set +x -$as_echo "$at_srcdir/am-subdir.at:146: \$AUTOCONF " -at_fn_check_prepare_dynamic "$AUTOCONF " "am-subdir.at:146" -( $at_check_trace; $AUTOCONF +# Hypothesis: -version-info can be passed kinds of values, esp. zero ones +# and large ones. +# TODO: check something like 1001:2419:189 after fixing issues +# for `version_type's of `irix', `nonstopux', or `osf'. +for version_info in 1 1:2 0:0:0 1:1:1 13:241:7; do + { set +x +$as_echo "$at_srcdir/versioning.at:127: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info \$version_info -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info $version_info -rpath $libdir" "versioning.at:127" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info $version_info -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:127" $at_failed && at_fn_log_failure $at_traceon; } +done - - +# Hypothesis: we diagnose when AGE is higher than CURRENT. { set +x -$as_echo "$at_srcdir/am-subdir.at:146: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "am-subdir.at:146" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +$as_echo "$at_srcdir/versioning.at:132: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info 1:3:2 -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 1:3:2 -rpath $libdir" "versioning.at:132" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 1:3:2 -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146" +at_fn_check_status 1 $at_status "$at_srcdir/versioning.at:132" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/versioning.at:134: grep 'AGE.*is greater than' stderr" +at_fn_check_prepare_trace "versioning.at:134" +( $at_check_trace; grep 'AGE.*is greater than' stderr +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:134" +$at_failed && at_fn_log_failure +$at_traceon; } -for target in all -do + +# Hypothesis: we diagnose invalid values. +for version_info in 1:2:3:4 -1 0:-1 0:0:-1; do { set +x -$as_echo "$at_srcdir/am-subdir.at:146: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "am-subdir.at:146" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +$as_echo "$at_srcdir/versioning.at:138: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info \$version_info -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info $version_info -rpath $libdir" "versioning.at:138" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info $version_info -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146" +at_fn_check_status 1 $at_status "$at_srcdir/versioning.at:138" $at_failed && at_fn_log_failure $at_traceon; } done +# Now, create an original version of the library and associated users. +# This setup will be reused for further hypotheses below, and these +# functions will be used to test working programs. -lt_exe=subdir/subdemo; if test -f "subdir/subdemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +test_uninstalled () +{ + # temporarily move installed libraries out of the way in order to avoid + # skewing test results: + mv $libdir temp-lib + mv $bindir temp-bin + lt_exe=./prog1; if test -f "./prog1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/am-subdir.at:148: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "am-subdir.at:148" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/versioning.at:153: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "versioning.at:153" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:148" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:153" $at_failed && at_fn_log_failure $at_traceon; } + lt_exe=./prog2; if test -f "./prog2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/versioning.at:154: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "versioning.at:154" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:154" +$at_failed && at_fn_log_failure +$at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_62 -#AT_START_63 -# 63. lt_dlexit.at:30: lt_dlexit unloading libs -at_setup_line='lt_dlexit.at:30' -at_fn_banner 6 -at_desc="lt_dlexit unloading libs" -at_desc_line=" 63: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "63. lt_dlexit.at:30: testing ..." - $at_traceon - - - -# Test for -# http://lists.gnu.org/archive/html/bug-libtool/2007-01/msg00014.html -# http://lists.gnu.org/archive/html/bug-libtool/2008-03/msg00013.html - -cat >main.c <<'_ATEOF' -#include -#include -#include - -typedef int (*pfun_T) (int); -typedef int *pvar_T; - -/* lt_dlopen wrapper */ -static lt_dlhandle -xdlopen (const char *filename) -{ - lt_dlhandle handle = lt_dlopen (filename); - if (!handle) { - fprintf (stderr, "can't open the module %s!\n", filename); - fprintf (stderr, "error was: %s\n", lt_dlerror()); - } - return handle; -} -/* lt_dlsym wrapper: try one function and one variable */ -static int -xdlsymtest (lt_dlhandle handle, const char *func, const char *var) -{ - pfun_T pf = (pfun_T) lt_dlsym (handle, func); - pvar_T pv = (pvar_T) lt_dlsym (handle, var); - if (pf == NULL) { - fprintf (stderr, "function `%s' not found\n", func); - return 1; - } - if (pv == NULL) { - fprintf (stderr, "variable `%s' not found\n", var); - return 1; - } - return (*pf) (*pv); + mv temp-lib $libdir + mv temp-bin $bindir } -int -main (void) +test_installed () { - lt_dlhandle b1; - - LTDL_SET_PRELOADED_SYMBOLS(); - if (lt_dlinit() != 0) { - fprintf (stderr, "error during initialization: %s\n", lt_dlerror()); - return 1; - } - if (lt_dlexit() != 0) { - fprintf (stderr, "error during first lt_dlexit: %s\n", lt_dlerror()); - return 1; - } - if (lt_dlinit() != 0) { - fprintf (stderr, "error during second initialization: %s\n", lt_dlerror()); - return 1; - } - if (!(b1 = xdlopen ("modb1.la"))) return 1; - if (xdlsymtest (b1, "fb1", "vb1")) return 1; - /* do not lt_dlclose here on purpose. */ - - if (lt_dlexit() != 0) { - fprintf (stderr, "error during exit: %s\n", lt_dlerror()); - return 1; - } - return 0; -} -_ATEOF - + # temporarily move uninstalled libraries out of the way in order to avoid + # skewing test results: + mv $objdir temp + lt_exe=$bindir/prog1; if test -f "$bindir/prog1$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/versioning.at:164: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "versioning.at:164" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:164" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >a1.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" { -#endif -int f1 (int x) { return x - 1; } -int v1 = 1; -#ifdef __cplusplus -} -#endif -_ATEOF + lt_exe=$bindir/prog2; if test -f "$bindir/prog2$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/versioning.at:165: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "versioning.at:165" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:165" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >b1.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" { -#endif -extern int f1 (int), v1; -int fb1 (int x) { return f1 (v1) + x - 3; } -int vb1 = 3; -#ifdef __cplusplus + mv temp $objdir } -#endif -_ATEOF - - - -: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} -: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} -# Skip this test when called from: -# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install { set +x -$as_echo "$at_srcdir/lt_dlexit.at:134: case \$LIBLTDL in #( - */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; -esac" -at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:134" -( $at_check_trace; case $LIBLTDL in #( - */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; -esac +$as_echo "$at_srcdir/versioning.at:169: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba1.lo -version-info 0:0:0 -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 0:0:0 -rpath $libdir" "versioning.at:169" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba1.lo -version-info 0:0:0 -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:134" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:169" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/versioning.at:171: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la libb.lo liba.la -version-info 0:0:0 -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la libb.lo liba.la -version-info 0:0:0 -rpath $libdir" "versioning.at:171" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la libb.lo liba.la -version-info 0:0:0 -rpath $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:171" +$at_failed && at_fn_log_failure +$at_traceon; } -CPPFLAGS="$LTDLINCL $CPPFLAGS" -LDFLAGS="$LDFLAGS -no-undefined" - -for file in a1 b1; do - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c -done -$CC $CPPFLAGS $CFLAGS -c main.c { set +x -$as_echo "$at_srcdir/lt_dlexit.at:145: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba1.la a1.lo \\ - -rpath /foo -avoid-version" -at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:145" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba1.la a1.lo \ - -rpath /foo -avoid-version +$as_echo "$at_srcdir/versioning.at:173: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o prog1\$EXEEXT prog1.\$OBJEXT liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog1$EXEEXT prog1.$OBJEXT liba.la" "versioning.at:173" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog1$EXEEXT prog1.$OBJEXT liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:145" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:173" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/lt_dlexit.at:147: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o modb1.la b1.lo \\ - -rpath /foo -module -avoid-version liba1.la" -at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:147" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o modb1.la b1.lo \ - -rpath /foo -module -avoid-version liba1.la +$as_echo "$at_srcdir/versioning.at:175: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o prog2\$EXEEXT prog2.\$OBJEXT libb.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog2$EXEEXT prog2.$OBJEXT libb.la" "versioning.at:175" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o prog2$EXEEXT prog2.$OBJEXT libb.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:147" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:175" $at_failed && at_fn_log_failure $at_traceon; } +test_uninstalled +{ set +x +$as_echo "$at_srcdir/versioning.at:178: \$LIBTOOL --mode=install cp liba.la libb.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la libb.la $libdir" "versioning.at:178" +( $at_check_trace; $LIBTOOL --mode=install cp liba.la libb.la $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:178" +$at_failed && at_fn_log_failure +$at_traceon; } -# TODO: test -dlpreopen -for dlopen in -dlopen; do - { set +x -$as_echo "$at_srcdir/lt_dlexit.at:152: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT \\ - \$dlopen modb1.la \$LIBLTDL" -at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:152" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT \ - $dlopen modb1.la $LIBLTDL +{ set +x +$as_echo "$at_srcdir/versioning.at:180: \$LIBTOOL --mode=install cp prog1\$EXEEXT prog2\$EXEEXT \$bindir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp prog1$EXEEXT prog2$EXEEXT $bindir" "versioning.at:180" +( $at_check_trace; $LIBTOOL --mode=install cp prog1$EXEEXT prog2$EXEEXT $bindir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:152" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:180" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/lt_dlexit.at:154: if \$LIBTOOL --mode=execute -dlopen modb1.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen modb1.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlexit.at:154" -( $at_check_trace; if $LIBTOOL --mode=execute -dlopen modb1.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/versioning.at:182: \$LIBTOOL --mode=clean rm -f liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:182" +( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:154" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:182" $at_failed && at_fn_log_failure $at_traceon; } +test_installed +{ set +x +$as_echo "$at_srcdir/versioning.at:184: \$LIBTOOL --mode=uninstall rm -f \$libdir/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=uninstall rm -f $libdir/liba.la" "versioning.at:184" +( $at_check_trace; $LIBTOOL --mode=uninstall rm -f $libdir/liba.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:184" +$at_failed && at_fn_log_failure +$at_traceon; } -done - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_63 -#AT_START_64 -# 64. lt_dladvise.at:28: lt_dlopenadvise library loading -at_setup_line='lt_dladvise.at:28' -at_fn_banner 6 -at_desc="lt_dlopenadvise library loading" -at_desc_line=" 64: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "64. lt_dladvise.at:28: testing ..." - $at_traceon +# Hypothesis: library revision updates do not require (uninstalled +# nor installed) programs or libraries to be relinked. +{ set +x +$as_echo "$at_srcdir/versioning.at:189: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba2.lo -version-info 0:1:0 -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba2.lo -version-info 0:1:0 -rpath $libdir" "versioning.at:189" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba2.lo -version-info 0:1:0 -rpath $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:189" +$at_failed && at_fn_log_failure +$at_traceon; } + +test_uninstalled +{ set +x +$as_echo "$at_srcdir/versioning.at:192: \$LIBTOOL --mode=install cp liba.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "versioning.at:192" +( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:192" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/versioning.at:193: \$LIBTOOL --mode=clean rm -f liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:193" +( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:193" +$at_failed && at_fn_log_failure +$at_traceon; } + +test_installed +# do not uninstall here: the library may be reused in the next test. + +# Hypothesis: backward compatible library updates do not require +# (uninstalled nor installed) programs or libraries to be relinked. +# This can have one of several reasons: +# - the soname is the difference between $current and $age, thus +# unchanged; in this case, the newly installed library will be used, +# - the soname is only $current, or we are linking statically, in which case +# the old installed library code will be used, +# - the numbers are not encoded at all, in which case the newly installed +# library will be used. +{ set +x +$as_echo "$at_srcdir/versioning.at:206: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba3.lo -version-info 1:0:1 -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba3.lo -version-info 1:0:1 -rpath $libdir" "versioning.at:206" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba3.lo -version-info 1:0:1 -rpath $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:206" +$at_failed && at_fn_log_failure +$at_traceon; } + +# Do not test the uninstalled program, it may be broken (in the second case). +{ set +x +$as_echo "$at_srcdir/versioning.at:209: \$LIBTOOL --mode=install cp liba.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "versioning.at:209" +( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:209" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/versioning.at:210: \$LIBTOOL --mode=clean rm -f liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:210" +( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:210" +$at_failed && at_fn_log_failure +$at_traceon; } + +test_installed +# do not uninstall here: the library may be reused in the next test. + + +# Hypothesis: with shared libraries, incompatible library updates +# will not cause old installed programs or libraries (linked against the old +# library version) to break. +# This can have one of several reasons: +# - the soname has changed, so the old installed library will still be +# available, +# - we are linking statically, so the old library code will still be used. +# In order to be sure we are still linking against the old library version, +# we must ensure that libb is not relinked, so we must not reinstall libb here. +{ set +x +$as_echo "$at_srcdir/versioning.at:224: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la liba4.lo -version-info 2:0:0 -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba4.lo -version-info 2:0:0 -rpath $libdir" "versioning.at:224" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la liba4.lo -version-info 2:0:0 -rpath $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:224" +$at_failed && at_fn_log_failure +$at_traceon; } + +# We do not guarantee that old versions of an uninstalled library are still +# available, so test_uninstalled will not necessarily work here any more. +{ set +x +$as_echo "$at_srcdir/versioning.at:228: \$LIBTOOL --mode=install cp liba.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "versioning.at:228" +( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:228" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/versioning.at:229: \$LIBTOOL --mode=clean rm -f liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "versioning.at:229" +( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:229" +$at_failed && at_fn_log_failure +$at_traceon; } + + +# This test does not work on AIX, not even with runtimelinking, because +# the linker always records the unversioned name as dependency. +{ set +x +$as_echo "$at_srcdir/versioning.at:233: :; case \$host_os in aix*) exit 77;; esac" +at_fn_check_prepare_dynamic ":; case $host_os in aix*) exit 77;; esac" "versioning.at:233" +( $at_check_trace; :; case $host_os in aix*) exit 77;; esac +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/versioning.at:233" +$at_failed && at_fn_log_failure +$at_traceon; } + + +test_installed + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_65 +#AT_START_66 +at_fn_group_banner 66 'destdir.at:48' \ + "Simple DESTDIR install" " " 4 +at_xfail=no + eval `$LIBTOOL --config | grep '^fast_install='` + case $fast_install in no) :;; *) false;; esac && at_xfail=yes +( + $as_echo "66. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +# A program that depends upon a library, both in the same package. +# DESTDIR installs do not work with relink at install time. + +LDFLAGS="$LDFLAGS -no-undefined" +if test -n "$we_are_on_a_safe_system"; then # let's read shorter cmdlines. + DESTDIR=/tmp/dest + prefix=/tmp/inst + rm -rf $DESTDIR $prefix +else + DESTDIR=`pwd`/dest + prefix=`pwd`/inst +fi +libdir=$prefix/lib +bindir=$prefix/bin +$mkdir_p src $prefix $DESTDIR $DESTDIR$prefix +eval `$LIBTOOL --config | $EGREP '^(FGREP|OBJDUMP)='` + +cd src +echo 'int a() { return 0; }' > a.c +$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c +$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir +echo 'extern int a(); int main() { return a(); }' > m.c +$CC $CPPFLAGS $CFLAGS -c m.c +$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT liba.la +mkdir $DESTDIR$libdir $DESTDIR$bindir +{ set +x +$as_echo "$at_srcdir/destdir.at:61: \$LIBTOOL --mode=install cp liba.la \$DESTDIR\$libdir/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la" "destdir.at:61" +( $at_check_trace; $LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:61" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/destdir.at:63: \$LIBTOOL --mode=install cp m\$EXEEXT \$DESTDIR\$bindir/m\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT" "destdir.at:63" +( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:63" +$at_failed && at_fn_log_failure +$at_traceon; } + +$LIBTOOL --mode=clean rm -f liba.la m +$mkdir_p "$libdir" +(cd "$DESTDIR$libdir" && find . -type d) | (cd "$libdir" && xargs $mkdir_p) +for file in `cd "$DESTDIR$libdir" && find . -type f -print -o -type l -print` +do + mv "$DESTDIR$libdir"/$file "$libdir"/$file +done +rm -rf "$DESTDIR$libdir" + +$mkdir_p "$bindir" +(cd "$DESTDIR$bindir" && find . -type d) | (cd "$bindir" && xargs $mkdir_p) +for file in `cd "$DESTDIR$bindir" && find . -type f -print -o -type l -print` +do + mv "$DESTDIR$bindir"/$file "$bindir"/$file +done +rm -rf "$DESTDIR$bindir" + +# We ignore failure on purpose here: we may not be root. +{ set +x +$as_echo "$at_srcdir/destdir.at:69: \$LIBTOOL --mode=finish \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=finish $libdir" "destdir.at:69" +( $at_check_trace; $LIBTOOL --mode=finish $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_skip $at_status "$at_srcdir/destdir.at:69" +$at_failed && at_fn_log_failure +$at_traceon; } + +lt_exe=$bindir/m$EXEEXT; if test -f "$bindir/m$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/destdir.at:70: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "destdir.at:70" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:70" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_66 +#AT_START_67 +at_fn_group_banner 67 'destdir.at:75' \ + "DESTDIR with in-package deplibs" " " 4 +at_xfail=no + eval `$LIBTOOL --config | grep '^fast_install='` + case $fast_install in no) :;; *) false;; esac && at_xfail=yes +( + $as_echo "67. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +# A program that depends upon a library that depends upon another +# library, all in the same package. Use two deplibs, one in $libdir +# and one in another directory. +# DESTDIR installs do not work with relink at install time. + +LDFLAGS="$LDFLAGS -no-undefined" +if test -n "$we_are_on_a_safe_system"; then # let's read shorter cmdlines. + DESTDIR=/tmp/dest + prefix=/tmp/inst + rm -rf $DESTDIR $prefix +else + DESTDIR=`pwd`/dest + prefix=`pwd`/inst +fi +libdir=$prefix/lib +bindir=$prefix/bin +$mkdir_p src $prefix $DESTDIR $DESTDIR$prefix +eval `$LIBTOOL --config | $EGREP '^(FGREP|OBJDUMP)='` + +cd src +echo 'int a1dep() { return 0; }' > a1dep.c +$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a1dep.c +$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba1dep.la a1dep.lo -rpath $libdir +echo 'int a2dep() { return 0; }' > a2dep.c +$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a2dep.c +$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba2dep.la a2dep.lo -rpath ${libdir}2 +echo 'extern int a1dep(), a2dep(); int a() { return a1dep() + a2dep(); }' > a.c +$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c +$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir liba1dep.la liba2dep.la +echo 'extern int a(); int main() { return a(); }' > m.c +$CC $CPPFLAGS $CFLAGS -c m.c +$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT liba.la +mkdir $DESTDIR$libdir $DESTDIR${libdir}2 $DESTDIR$bindir +{ set +x +$as_echo "$at_srcdir/destdir.at:96: \$LIBTOOL --mode=install cp liba1dep.la \$DESTDIR\$libdir/liba1dep.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba1dep.la $DESTDIR$libdir/liba1dep.la" "destdir.at:96" +( $at_check_trace; $LIBTOOL --mode=install cp liba1dep.la $DESTDIR$libdir/liba1dep.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:96" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/destdir.at:98: \$LIBTOOL --mode=install cp liba2dep.la \$DESTDIR\${libdir}2/liba2dep.la" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "destdir.at:98" +( $at_check_trace; $LIBTOOL --mode=install cp liba2dep.la $DESTDIR${libdir}2/liba2dep.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:98" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/destdir.at:100: \$LIBTOOL --mode=install cp liba.la \$DESTDIR\$libdir/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la" "destdir.at:100" +( $at_check_trace; $LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:100" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/destdir.at:102: \$LIBTOOL --mode=install cp m\$EXEEXT \$DESTDIR\$bindir/m\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT" "destdir.at:102" +( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $DESTDIR$bindir/m$EXEEXT +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:102" +$at_failed && at_fn_log_failure +$at_traceon; } + +$LIBTOOL --mode=clean rm -f liba1dep.la liba2dep.la liba.la m +$mkdir_p "$libdir" +(cd "$DESTDIR$libdir" && find . -type d) | (cd "$libdir" && xargs $mkdir_p) +for file in `cd "$DESTDIR$libdir" && find . -type f -print -o -type l -print` +do + mv "$DESTDIR$libdir"/$file "$libdir"/$file +done +rm -rf "$DESTDIR$libdir" + +$mkdir_p "${libdir}2" +(cd "$DESTDIR${libdir}2" && find . -type d) | (cd "${libdir}2" && xargs $mkdir_p) +for file in `cd "$DESTDIR${libdir}2" && find . -type f -print -o -type l -print` +do + mv "$DESTDIR${libdir}2"/$file "${libdir}2"/$file +done +rm -rf "$DESTDIR${libdir}2" + +$mkdir_p "$bindir" +(cd "$DESTDIR$bindir" && find . -type d) | (cd "$bindir" && xargs $mkdir_p) +for file in `cd "$DESTDIR$bindir" && find . -type f -print -o -type l -print` +do + mv "$DESTDIR$bindir"/$file "$bindir"/$file +done +rm -rf "$DESTDIR$bindir" + +# We ignore failure on purpose here: we may not be root. +{ set +x +$as_echo "$at_srcdir/destdir.at:109: \$LIBTOOL --mode=finish \$libdir \${libdir}2" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "destdir.at:109" +( $at_check_trace; $LIBTOOL --mode=finish $libdir ${libdir}2 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_skip $at_status "$at_srcdir/destdir.at:109" +$at_failed && at_fn_log_failure +$at_traceon; } + + +# put false libraries in the DESTDIR paths: if the installed program +# refers to them, that is a bug. +mkdir $DESTDIR$libdir $DESTDIR${libdir}2 $DESTDIR$bindir +for lib in a1dep a2dep a; do + case $lib in + a2dep) ldir=${libdir}2;; + *) ldir=$libdir;; + esac + echo "int this_should_not_be_linked_against () { return 0; }" > $lib.c + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $lib.c + # Note the rpath argument includes $DESTDIR: the installed false libs + # should be functional (i.e., not need `libtool --mode=finish'). + $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o lib$lib.la $lib.lo -rpath $DESTDIR$ldir + $LIBTOOL --mode=install cp lib$lib.la $DESTDIR$ldir/lib$lib.la +done + +lt_exe=$bindir/m$EXEEXT; if test -f "$bindir/m$EXEEXT$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/destdir.at:127: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "destdir.at:127" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/destdir.at:127" +$at_failed && at_fn_log_failure +$at_traceon; } + + + +# TODO: make this more portable: +if test "$OBJDUMP" != false && ($OBJDUMP -p $bindir/m$EXEEXT) >/dev/null 2>&1; then + { set +x +$as_echo "$at_srcdir/destdir.at:131: \$OBJDUMP -p \$bindir/m\$EXEEXT | \$EGREP -i \"R(UN)?PATH.*\$DESTDIR\"" +at_fn_check_prepare_notrace 'a shell pipeline' "destdir.at:131" +( $at_check_trace; $OBJDUMP -p $bindir/m$EXEEXT | $EGREP -i "R(UN)?PATH.*$DESTDIR" +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/destdir.at:131" +$at_failed && at_fn_log_failure +$at_traceon; } + + . $libdir/liba.la + set x $library_names + lname=$2 + if test -n "$lname"; then + { set +x +$as_echo "$at_srcdir/destdir.at:136: \$OBJDUMP -p \$libdir/\$lname | \$EGREP -i \"R(UN)?PATH.*\$DESTDIR\"" +at_fn_check_prepare_notrace 'a shell pipeline' "destdir.at:136" +( $at_check_trace; $OBJDUMP -p $libdir/$lname | $EGREP -i "R(UN)?PATH.*$DESTDIR" +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/destdir.at:136" +$at_failed && at_fn_log_failure +$at_traceon; } + + fi +fi + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_67 +#AT_START_68 +at_fn_group_banner 68 'old-m4-iface.at:40' \ + "AM_PROG_LIBTOOL" " " 5 +at_xfail=no + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "68. $at_setup_line: testing $at_desc ..." + $at_traceon + + +cat >configure.in <<'_ATEOF' +AC_INIT(old.c) +AM_PROG_LIBTOOL +AC_SUBST([LIBTOOL_DEPS]) +AC_OUTPUT(Makefile) +_ATEOF + + +cat >Makefile.in <<'_ATEOF' +COMPILE = @CC@ @CPPFLAGS@ @CFLAGS@ +LINK = @CC@ @CFLAGS@ @LDFLAGS@ -o $@ +SHELL = @SHELL@ +LIBTOOL_DEPS = @LIBTOOL_DEPS@ + +all: libtool old@EXEEXT@ + +old@EXEEXT@: old.@OBJEXT@ + $(LINK) old.@OBJEXT@ + +.SUFFIXES: +.SUFFIXES: .c .@OBJEXT@ + +.c.@OBJEXT@: + $(COMPILE) -c $< + +libtool: $(LIBTOOL_DEPS) + $(SHELL) ./config.status --recheck +_ATEOF + + + +cat >old.c <<'_ATEOF' +#include + +int main (void) +{ + printf ("Hello, World!"); + return 0; +} +_ATEOF + + +$LIBTOOLIZE --install + + + +# This is slightly bogus, since only libtool.m4 was required in aclocal.m4 +# with libtool-1.5x... +{ set +x +$as_echo "$at_srcdir/old-m4-iface.at:85: test -f aclocal.m4 || + cat \"\$tst_aclocaldir/libtool.m4\" \"\$tst_aclocaldir/ltoptions.m4\" \\ + \"\$tst_aclocaldir/ltsugar.m4\" \"\$tst_aclocaldir/ltversion.m4\" \\ + \"\$tst_aclocaldir/lt~obsolete.m4\" > aclocal.m4" +at_fn_check_prepare_notrace 'an embedded newline' "old-m4-iface.at:85" +( $at_check_trace; test -f aclocal.m4 || + cat "$tst_aclocaldir/libtool.m4" "$tst_aclocaldir/ltoptions.m4" \ + "$tst_aclocaldir/ltsugar.m4" "$tst_aclocaldir/ltversion.m4" \ + "$tst_aclocaldir/lt~obsolete.m4" > aclocal.m4 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:85" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + + +{ set +x +$as_echo "$at_srcdir/old-m4-iface.at:90: \$AUTOCONF --force" +at_fn_check_prepare_dynamic "$AUTOCONF --force" "old-m4-iface.at:90" +( $at_check_trace; $AUTOCONF --force +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:90" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +{ set +x +$as_echo "$at_srcdir/old-m4-iface.at:90: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "old-m4-iface.at:90" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:90" +$at_failed && at_fn_log_failure +$at_traceon; } + + +for target in all +do + { set +x +$as_echo "$at_srcdir/old-m4-iface.at:90: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "old-m4-iface.at:90" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:90" +$at_failed && at_fn_log_failure +$at_traceon; } + +done + + + +lt_exe=./old; if test -f "./old$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/old-m4-iface.at:92: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "old-m4-iface.at:92" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Hello, World!" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:92" +$at_failed && at_fn_log_failure +$at_traceon; } + + + +# Now, test that libtoolize doesn't mistakenly think the user called +# any libtool macros if in fact she didn't. +sed '/AM_PROG_LIBTOOL/d' configure.in >configure.int +mv -f configure.int configure.in +{ set +x +$as_echo "$at_srcdir/old-m4-iface.at:98: \$LIBTOOLIZE -n" +at_fn_check_prepare_dynamic "$LIBTOOLIZE -n" "old-m4-iface.at:98" +( $at_check_trace; $LIBTOOLIZE -n +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:98" +$at_failed && at_fn_log_failure +$at_traceon; } + +# ensure no shell errors: +{ set +x +$as_echo "$at_srcdir/old-m4-iface.at:100: grep -v \"^libtoolize: \" stderr" +at_fn_check_prepare_trace "old-m4-iface.at:100" +( $at_check_trace; grep -v "^libtoolize: " stderr +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/old-m4-iface.at:100" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/old-m4-iface.at:101: grep \"Remember to add.*LT_INIT.*to configure.in\" stdout" +at_fn_check_prepare_trace "old-m4-iface.at:101" +( $at_check_trace; grep "Remember to add.*LT_INIT.*to configure.in" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:101" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/old-m4-iface.at:102: grep \"Consider adding.*LT_WITH_LTDL\" stdout" +at_fn_check_prepare_trace "old-m4-iface.at:102" +( $at_check_trace; grep "Consider adding.*LT_WITH_LTDL" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/old-m4-iface.at:102" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/old-m4-iface.at:103: grep \"Remember to add.*LT_CONFIG_LTDL_DIR\" stdout" +at_fn_check_prepare_trace "old-m4-iface.at:103" +( $at_check_trace; grep "Remember to add.*LT_CONFIG_LTDL_DIR" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/old-m4-iface.at:103" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_68 +#AT_START_69 +at_fn_group_banner 69 'old-m4-iface.at:112' \ + "AC_WITH_LTDL" " " 5 +at_xfail=no + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "69. $at_setup_line: testing $at_desc ..." + $at_traceon + + +cat >module.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" +#endif +const char * +hello (void) +{ + return "Hello!"; +} +_ATEOF + + +cat >main.c <<'_ATEOF' +#include +#include "ltdl.h" + +int +main () +{ + lt_dlhandle module; + const char *(*func) (void) = 0; + int status = 1; + + LTDL_SET_PRELOADED_SYMBOLS(); + if (lt_dlinit() != 0) { + fprintf (stderr, "error during initialisation: %s\n", lt_dlerror()); + return 1; + } + + module = lt_dlopen("./module.la"); + if (!module) { + fprintf (stderr, "error dlopening ./module.la: %s\n", lt_dlerror()); + goto finish; + } + + func = (const char *(*)(void)) lt_dlsym (module, "hello"); + if (!func) { + fprintf (stderr, "error fetching func: %s\n", lt_dlerror()); + goto finish; + } + + printf ("%s\n", (*func) ()); + status = 0; + +finish: + if (lt_dlexit() != 0) { + fprintf (stderr, "error during finalisation: %s\n", lt_dlerror()); + status = 1; + } + + return status; +} +_ATEOF + + + + + + + +cat >configure.in <<'_ATEOF' +AC_PREREQ(2.50) +AC_INIT([main.c]) +AC_PROG_MAKE_SET +AC_LIBTOOL_DLOPEN +AM_PROG_LIBTOOL +AC_WITH_LTDL +AC_OUTPUT(Makefile) +_ATEOF + + +cat >Makefile.in <<'_ATEOF' +top_srcdir = . +top_builddir = . +COMPILE = @CC@ @INCLTDL@ @CPPFLAGS@ @CFLAGS@ +LTCOMPILE = @LIBTOOL@ --mode=compile $(COMPILE) +LTLINK = @LIBTOOL@ --mode=link @CC@ -no-undefined @CFLAGS@ @LDFLAGS@ -o $@ +SHELL = @SHELL@ +@SET_MAKE@ + +TARGETS = libltdl/libltdlc.la module.la ltdldemo@EXEEXT@ + +all: $(TARGETS) + +libltdl/libltdlc.la: + cd libltdl && $(MAKE) + +module.la: module.lo + $(LTLINK) module.lo -module -avoid-version -rpath /dev/null + +ltdldemo@EXEEXT@: main.@OBJEXT@ module.la libltdl/libltdlc.la + $(LTLINK) main.@OBJEXT@ -dlopen module.la @LIBLTDL@ @LIBS@ + +.SUFFIXES: +.SUFFIXES: .c .@OBJEXT@ .lo + +.c.@OBJEXT@: + $(COMPILE) -c $< + +.c.lo: + $(LTCOMPILE) -c -o $@ $< +_ATEOF + + +# Be sure to use the in-tree libltdl, somebody might have removed +# an installed libltdl.la file. +$LIBTOOLIZE --ltdl --install + + +{ set +x +$as_echo "$at_srcdir/old-m4-iface.at:160: \$ACLOCAL -I libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "old-m4-iface.at:160" +( $at_check_trace; $ACLOCAL -I libltdl/m4 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + + +{ set +x +$as_echo "$at_srcdir/old-m4-iface.at:160: \$AUTOCONF --force" +at_fn_check_prepare_dynamic "$AUTOCONF --force" "old-m4-iface.at:160" +( $at_check_trace; $AUTOCONF --force +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +{ set +x +$as_echo "$at_srcdir/old-m4-iface.at:160: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --with-included-ltdl" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "old-m4-iface.at:160" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --with-included-ltdl +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160" +$at_failed && at_fn_log_failure +$at_traceon; } + + +for target in all +do + { set +x +$as_echo "$at_srcdir/old-m4-iface.at:160: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "old-m4-iface.at:160" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:160" +$at_failed && at_fn_log_failure +$at_traceon; } + +done + + + +lt_exe=./ltdldemo; if test -f "./ltdldemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/old-m4-iface.at:163: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "old-m4-iface.at:163" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/old-m4-iface.at:163" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_69 +#AT_START_70 +at_fn_group_banner 70 'am-subdir.at:33' \ + "C subdir-objects" " " 6 +at_xfail=no + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "70. $at_setup_line: testing $at_desc ..." + $at_traceon + + +cat >configure.ac <<'_ATEOF' +AC_INIT([subdir-demo], 2.4, bug-libtool@gnu.org) +AM_INIT_AUTOMAKE +LT_INIT([win32-dll]) +AC_PROG_CC +AM_PROG_CC_C_O +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +_ATEOF + + +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I m4 +AUTOMAKE_OPTIONS = subdir-objects foreign 1.6 +AM_CPPFLAGS = -I$(top_srcdir)/../.. + +lib_LTLIBRARIES = subdir/libsub.la +subdir_libsub_la_SOURCES= subdir/sub.c + +bin_PROGRAMS = subdir/subdemo +subdir_subdemo_SOURCES = subdir/main.c +subdir_subdemo_LDADD = subdir/libsub.la +_ATEOF + + +test -d subdir || { rm -f subdir && mkdir subdir; } + +cat >subdir/main.c <<'_ATEOF' +#include + +extern void sub (void); + +int main (void) +{ + printf ("Welcome to GNU Libtool subdir-objects test!\n"); + sub(); + return 0; +} +_ATEOF + + +cat >subdir/sub.c <<'_ATEOF' +#include +void sub (void) { printf ("** This is libsub **\n"); } +_ATEOF + + +$LIBTOOLIZE --copy + + +{ set +x +$as_echo "$at_srcdir/am-subdir.at:78: \$ACLOCAL -I m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "am-subdir.at:78" +( $at_check_trace; $ACLOCAL -I m4 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + +{ set +x +$as_echo "$at_srcdir/am-subdir.at:78: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "am-subdir.at:78" +( $at_check_trace; $AUTOMAKE --add-missing +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/am-subdir.at:78: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "am-subdir.at:78" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/am-subdir.at:78" +$at_failed && at_fn_log_failure +$at_traceon; } + +fi +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +{ set +x +$as_echo "$at_srcdir/am-subdir.at:78: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "am-subdir.at:78" +( $at_check_trace; $AUTOCONF +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +{ set +x +$as_echo "$at_srcdir/am-subdir.at:78: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "am-subdir.at:78" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78" +$at_failed && at_fn_log_failure +$at_traceon; } + + +for target in all +do + { set +x +$as_echo "$at_srcdir/am-subdir.at:78: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "am-subdir.at:78" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:78" +$at_failed && at_fn_log_failure +$at_traceon; } + +done + + + +lt_exe=subdir/subdemo; if test -f "subdir/subdemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/am-subdir.at:80: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "am-subdir.at:80" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:80" +$at_failed && at_fn_log_failure +$at_traceon; } + + +{ set +x +$as_echo "$at_srcdir/am-subdir.at:81: grep 'Welcome to GNU Libtool subdir-objects test' stdout" +at_fn_check_prepare_trace "am-subdir.at:81" +( $at_check_trace; grep 'Welcome to GNU Libtool subdir-objects test' stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:81" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/am-subdir.at:83: grep 'This is libsub' stdout" +at_fn_check_prepare_trace "am-subdir.at:83" +( $at_check_trace; grep 'This is libsub' stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:83" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_70 +#AT_START_71 +at_fn_group_banner 71 'am-subdir.at:93' \ + "C++ subdir-objects" " " 6 +at_xfail=no + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "71. $at_setup_line: testing $at_desc ..." + $at_traceon + + +{ set +x +$as_echo "$at_srcdir/am-subdir.at:94: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "am-subdir.at:94" +( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:94" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/am-subdir.at:94: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" +at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "am-subdir.at:94" +( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:94" +$at_failed && at_fn_log_failure +$at_traceon; } + + + +cat >configure.ac <<'_ATEOF' +AC_INIT([subdir-demo], 2.4, bug-libtool@gnu.org) +AM_INIT_AUTOMAKE +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_CXX +AC_PROG_CXXCPP + +AC_LANG([C++]) +LT_INIT([win32-dll]) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +_ATEOF + + +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I m4 +AUTOMAKE_OPTIONS = subdir-objects foreign 1.6 +AM_CPPFLAGS = -I$(top_srcdir)/../.. + +lib_LTLIBRARIES = subdir/libsub.la +subdir_libsub_la_SOURCES= subdir/sub.cxx subdir/sub.hxx + +bin_PROGRAMS = subdir/subdemo +subdir_subdemo_SOURCES = subdir/main.cxx +subdir_subdemo_LDADD = subdir/libsub.la +_ATEOF + + +test -d subdir || { rm -f subdir && mkdir subdir; } + +cat >subdir/sub.hxx <<'_ATEOF' +class libsub { public: int sub (void); }; +_ATEOF + + +cat >subdir/main.cxx <<'_ATEOF' +#include "sub.hxx" + +int main (void) +{ + libsub SUB; + return SUB.sub() != 27; +} +_ATEOF + + +cat >subdir/sub.cxx <<'_ATEOF' +#include "sub.hxx" + +int libsub::sub (void) { return 27; } +_ATEOF + + +$LIBTOOLIZE --copy + + +{ set +x +$as_echo "$at_srcdir/am-subdir.at:146: \$ACLOCAL -I m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "am-subdir.at:146" +( $at_check_trace; $ACLOCAL -I m4 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + +{ set +x +$as_echo "$at_srcdir/am-subdir.at:146: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "am-subdir.at:146" +( $at_check_trace; $AUTOMAKE --add-missing +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/am-subdir.at:146: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "am-subdir.at:146" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/am-subdir.at:146" +$at_failed && at_fn_log_failure +$at_traceon; } + +fi +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +{ set +x +$as_echo "$at_srcdir/am-subdir.at:146: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "am-subdir.at:146" +( $at_check_trace; $AUTOCONF +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +{ set +x +$as_echo "$at_srcdir/am-subdir.at:146: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "am-subdir.at:146" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146" +$at_failed && at_fn_log_failure +$at_traceon; } + + +for target in all +do + { set +x +$as_echo "$at_srcdir/am-subdir.at:146: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "am-subdir.at:146" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:146" +$at_failed && at_fn_log_failure +$at_traceon; } + +done + + + +lt_exe=subdir/subdemo; if test -f "subdir/subdemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/am-subdir.at:148: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "am-subdir.at:148" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/am-subdir.at:148" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_71 +#AT_START_72 +at_fn_group_banner 72 'lt_dlexit.at:30' \ + "lt_dlexit unloading libs" " " 7 +at_xfail=no +( + $as_echo "72. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +# Test for +# http://lists.gnu.org/archive/html/bug-libtool/2007-01/msg00014.html +# http://lists.gnu.org/archive/html/bug-libtool/2008-03/msg00013.html + +cat >main.c <<'_ATEOF' +#include +#include +#include + +typedef int (*pfun_T) (int); +typedef int *pvar_T; + +/* lt_dlopen wrapper */ +static lt_dlhandle +xdlopen (const char *filename) +{ + lt_dlhandle handle = lt_dlopen (filename); + if (!handle) { + fprintf (stderr, "can't open the module %s!\n", filename); + fprintf (stderr, "error was: %s\n", lt_dlerror()); + } + return handle; +} + +/* lt_dlsym wrapper: try one function and one variable */ +static int +xdlsymtest (lt_dlhandle handle, const char *func, const char *var) +{ + pfun_T pf = (pfun_T) lt_dlsym (handle, func); + pvar_T pv = (pvar_T) lt_dlsym (handle, var); + if (pf == NULL) { + fprintf (stderr, "function `%s' not found\n", func); + return 1; + } + if (pv == NULL) { + fprintf (stderr, "variable `%s' not found\n", var); + return 1; + } + return (*pf) (*pv); +} + +int +main (void) +{ + lt_dlhandle b1; + + LTDL_SET_PRELOADED_SYMBOLS(); + if (lt_dlinit() != 0) { + fprintf (stderr, "error during initialization: %s\n", lt_dlerror()); + return 1; + } + if (lt_dlexit() != 0) { + fprintf (stderr, "error during first lt_dlexit: %s\n", lt_dlerror()); + return 1; + } + if (lt_dlinit() != 0) { + fprintf (stderr, "error during second initialization: %s\n", lt_dlerror()); + return 1; + } + if (!(b1 = xdlopen ("modb1.la"))) return 1; + if (xdlsymtest (b1, "fb1", "vb1")) return 1; + /* do not lt_dlclose here on purpose. */ + + if (lt_dlexit() != 0) { + fprintf (stderr, "error during exit: %s\n", lt_dlerror()); + return 1; + } + return 0; +} +_ATEOF + + + +cat >a1.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" { +#endif +int f1 (int x) { return x - 1; } +int v1 = 1; +#ifdef __cplusplus +} +#endif +_ATEOF + + +cat >b1.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" { +#endif +#if defined DLL_EXPORT && defined _WIN32 && defined _MSC_VER +# define LIBA1_SCOPE extern __declspec (dllimport) +#endif +#if !defined LIBA1_SCOPE +# define LIBA1_SCOPE extern +#endif +LIBA1_SCOPE int f1 (int); +LIBA1_SCOPE int v1; +int fb1 (int x) { return f1 (v1) + x - 3; } +int vb1 = 3; +#ifdef __cplusplus +} +#endif +_ATEOF + + + +: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} +: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} + +# Skip this test when called from: +# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install +{ set +x +$as_echo "$at_srcdir/lt_dlexit.at:141: case \$LIBLTDL in #( + */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; +esac" +at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:141" +( $at_check_trace; case $LIBLTDL in #( + */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; +esac +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:141" +$at_failed && at_fn_log_failure +$at_traceon; } + + +CPPFLAGS="$LTDLINCL $CPPFLAGS" +LDFLAGS="$LDFLAGS -no-undefined" + +for file in a1 b1; do + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c +done +$CC $CPPFLAGS $CFLAGS -c main.c +{ set +x +$as_echo "$at_srcdir/lt_dlexit.at:152: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba1.la a1.lo \\ + -rpath /foo -avoid-version" +at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:152" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba1.la a1.lo \ + -rpath /foo -avoid-version +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:152" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/lt_dlexit.at:154: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o modb1.la b1.lo \\ + -rpath /foo -module -avoid-version liba1.la" +at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:154" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o modb1.la b1.lo \ + -rpath /foo -module -avoid-version liba1.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:154" +$at_failed && at_fn_log_failure +$at_traceon; } + + +# TODO: test -dlpreopen +for dlopen in -dlopen; do + { set +x +$as_echo "$at_srcdir/lt_dlexit.at:159: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT \\ + \$dlopen modb1.la \$LIBLTDL" +at_fn_check_prepare_notrace 'an embedded newline' "lt_dlexit.at:159" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT \ + $dlopen modb1.la $LIBLTDL +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:159" +$at_failed && at_fn_log_failure +$at_traceon; } + + lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/lt_dlexit.at:161: if \$LIBTOOL --mode=execute -dlopen modb1.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen modb1.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlexit.at:161" +( $at_check_trace; if $LIBTOOL --mode=execute -dlopen modb1.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlexit.at:161" +$at_failed && at_fn_log_failure +$at_traceon; } + + +done + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_72 +#AT_START_73 +at_fn_group_banner 73 'lt_dladvise.at:28' \ + "lt_dlopenadvise library loading" " " 7 +at_xfail=no +( + $as_echo "73. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +cat >main.c <<'_ATEOF' +#include +#include + +typedef int funcp (int); + +static int errors = 0; + +static void +complain (const char *msg) +{ + const char *errmsg = lt_dlerror (); + fprintf (stderr, "%s", msg); + if (errmsg) + fprintf (stderr, ": %s\n", errmsg); + else + fprintf (stderr, ".\n"); + ++errors; +} + +static lt_dlhandle +moduleopen (const char *filename, lt_dladvise advise) +{ + lt_dlhandle handle; + + handle = lt_dlopenadvise (filename, advise); + if (!handle) + { + fprintf (stderr, "can't open the module %s!\n", filename); + complain ("error was"); + } + + return handle; +} + +static int +moduletest (lt_dlhandle handle, const char *fname, const char *vname) +{ + funcp *f = (funcp *) lt_dlsym (handle, fname); + int *v = (int *) lt_dlsym (handle, vname); + + if (!f) + { + fprintf (stderr, "function `%s' not found\n", fname); + ++errors; + return -1; + } + if (!v) + { + fprintf (stderr, "variable `%s' not found\n", vname); + ++errors; + return -1; + } + return f (*v); +} + +void +hint_ext (void) +{ + lt_dlhandle handle; + lt_dladvise advise; + + if (lt_dladvise_init (&advise) || lt_dladvise_ext (&advise)) + complain ("error setting advise ext"); + + handle = moduleopen ("libdepend", advise); + + if (handle) + printf ("depend: %d\n", moduletest (handle, "g", "j")); + + lt_dladvise_destroy (&advise); +} + +void +hint_resident (void) +{ + const lt_dlinfo *info; + lt_dlhandle handle; + lt_dladvise advise; + + if (lt_dladvise_init (&advise) || lt_dladvise_resident (&advise)) + complain ("error setting advise resident"); + + handle = moduleopen ("libresident.la", advise); + + if (handle) + { + info = lt_dlgetinfo (handle); + if (!info->is_resident) + complain ("error taking advise resident"); + + /* cannot close resident modules */ + if (lt_dlclose (handle) == 0) + complain ("successfully unloaded resident module"); + + printf ("resident: %d\n", moduletest (handle, "func", "numb")); + } + + lt_dladvise_destroy (&advise); +} + +void +hint_local (void) +{ + const lt_dlinfo *info; + lt_dlhandle handle; + lt_dladvise advise; + + if (lt_dladvise_init (&advise) || lt_dladvise_local (&advise)) + complain ("error setting advise local"); + + handle = moduleopen ("liblocal.la", advise); + + if (handle) + { + info = lt_dlgetinfo (handle); + printf ("local: %d\n", moduletest (handle, "f", "i")); + + /* If the symlocal hint was taken, don't unload this module + and test that our local symbolnames won't clash with modglobal. */ + if (!info->is_symlocal && lt_dlclose (handle)) + complain ("error unloading modlocal"); + } + + lt_dladvise_destroy (&advise); +} + +void +hint_global (void) +{ + const lt_dlinfo *info; + lt_dlhandle handle; + lt_dladvise advise; + + if (lt_dladvise_init (&advise) || lt_dladvise_global (&advise)) + complain ("error setting advise global"); + + handle = moduleopen ("libglobal.la", advise); + + if (handle) + { + info = lt_dlgetinfo (handle); + printf ("global: %d\n", moduletest (handle, "f", "i")); + + /* Don't attempt to load moddepend unless modglobal was successfully + loaded and the symglobal hint was taken, and the system allows to + to have undefined symbols. */ + if (info && info->is_symglobal && HAVE_UNDEFINED_SYMBOLS) + { + hint_ext (); + } + else + { + /* Fake the output so the test won't fail when using a dlloader + unable to take symglobal hints. */ + printf ("depend: 5\n"); + } + } + + lt_dladvise_destroy (&advise); +} + +void +hint_preload (void) +{ + lt_dlhandle handle; + lt_dladvise advise; + + if (lt_dladvise_init (&advise) || lt_dladvise_preload (&advise)) + complain ("error setting advise preload"); + + handle = moduleopen ("libpreload.la", advise); + + if (handle) + { + printf("preload: %d\n", moduletest (handle, "h", "k")); + } + + lt_dladvise_destroy (&advise); +} + +int +main (void) +{ + + LTDL_SET_PRELOADED_SYMBOLS(); + + if (lt_dlinit() != 0) + { + fprintf (stderr, "error during initialization: %s\n", lt_dlerror()); + return 1; + } + + hint_resident (); + hint_local (); +#ifdef HAVE_SHARED + hint_global (); +#else + /* This ugly hack is because we have symbols with the same name in both the + global module and the local one, we can't lt_dlopen the local module + locally and then later load the global module globally because of this. + Instead of skipping the test entirely, we test what we can and + have this hack. */ + printf ("global: 4\n"); + printf ("depend: 5\n"); +#endif + hint_preload (); + + if (lt_dlexit () != 0) + complain ("error during exit"); + + return (errors != 0); +} +_ATEOF + + +cat >modresident.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" { +#endif +int func (int x) { return x / 3; } +int numb = 7; +#ifdef __cplusplus +} +#endif +_ATEOF + + +cat >modlocal.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" { +#endif +int f (int x) { return (x * x) / 10; } +int i = 6; +#ifdef __cplusplus +} +#endif +_ATEOF + + +cat >modglobal.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" { +#endif +int f (int x) { return x - 1; } +int i = 5; +#ifdef __cplusplus +} +#endif +_ATEOF + + +cat >moddepend.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" { +#endif +extern int f (int), i; +int g (int x) { return f (i) + x - 3; } +int j = 4; +#ifdef __cplusplus +} +#endif +_ATEOF + + +cat >modpreload.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" { +#endif +int h (int x) { return 2 * x; } +int k = 3; +#ifdef __cplusplus +} +#endif +_ATEOF + + +cat >expout <<'_ATEOF' +resident: 2 +local: 3 +global: 4 +depend: 5 +preload: 6 +_ATEOF + +case $host_os in mingw*) + while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t + mv -f expout.t expout ;; +esac + +: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} +: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} + +# Skip this test when called from: +# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install +{ set +x +$as_echo "$at_srcdir/lt_dladvise.at:315: case \$LIBLTDL in #( + */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; +esac" +at_fn_check_prepare_notrace 'an embedded newline' "lt_dladvise.at:315" +( $at_check_trace; case $LIBLTDL in #( + */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; +esac +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:315" +$at_failed && at_fn_log_failure +$at_traceon; } + + +CPPFLAGS="$LTDLINCL $CPPFLAGS" + +dlopenable='resident local global' +dlpreloadable='preload' + +# ------------------------------------------------------------------------- # +# The depend test makes no sense unless compiled without -no-undefined. By # +# not building the depend module in that case, when this test passes we can # +# be sure that hint_global() above, is being correctly informed those hosts # +# are reporting not able to accept the global hint to lt_dlopenadvise(). # +# ------------------------------------------------------------------------- # + +have_shared=false +$LIBTOOL --features | grep 'enable shared libraries' >/dev/null && have_shared=: + +case $host_os,$have_shared in +cygwin* | mingw* | cegcc* | *,false) + # These hosts do not support linking without -no-undefined + CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0" + ;; +*) + CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=1" + dlopenable="$dlopen depend" + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c moddepend.c + { set +x +$as_echo "$at_srcdir/lt_dladvise.at:343: \$LIBTOOL --mode=link \$CC -module \$CFLAGS \$LDFLAGS -o libdepend.la moddepend.lo -rpath /foo -avoid-version" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la moddepend.lo -rpath /foo -avoid-version" "lt_dladvise.at:343" +( $at_check_trace; $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la moddepend.lo -rpath /foo -avoid-version +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:343" +$at_failed && at_fn_log_failure +$at_traceon; } + + ;; +esac + +$have_shared && CPPFLAGS="$CPPFLAGS -DHAVE_SHARED" + +# ------------------------------------------------------------------------- # +# Other modules can be tested correctly even when built with -no-undefined. # +# ------------------------------------------------------------------------- # + +LDFLAGS="$LDFLAGS -no-undefined" + +$CC $CPPFLAGS $CFLAGS -c main.c +for name in resident local global preload; do + # FIXME: adding -static to libpreload shouldn't be necessary. + # Fix this properly in ltmain, then remove this workaround. + if test $name = preload; then + st=-static + else + st= + fi + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c mod$name.c + { set +x +$as_echo "$at_srcdir/lt_dladvise.at:366: \$LIBTOOL --mode=link \$CC -module \$CFLAGS \$LDFLAGS -o lib\$name.la mod\$name.lo \$st -rpath /foo -avoid-version" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la mod$name.lo $st -rpath /foo -avoid-version" "lt_dladvise.at:366" +( $at_check_trace; $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la mod$name.lo $st -rpath /foo -avoid-version +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:366" +$at_failed && at_fn_log_failure +$at_traceon; } + +done + +preloaded= +for module in $dlpreloadable; do + preloaded="${preloaded+$preloaded }-dlpreopen lib$module.la" +done + +modules= +for module in $dlopenable; do + modules="${modules+$modules }-dlopen lib$module.la" +done + +{ set +x +$as_echo "$at_srcdir/lt_dladvise.at:380: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT \$preloaded \$modules \$LIBLTDL" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $preloaded $modules $LIBLTDL" "lt_dladvise.at:380" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $preloaded $modules $LIBLTDL +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:380" +$at_failed && at_fn_log_failure +$at_traceon; } + + +# Remove loadable libpreload module, so we know it is the preloaded module +# that is being executed by a successful test invocation: +{ set +x +$as_echo "$at_srcdir/lt_dladvise.at:385: \$LIBTOOL --mode=clean rm -f libpreload.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f libpreload.la" "lt_dladvise.at:385" +( $at_check_trace; $LIBTOOL --mode=clean rm -f libpreload.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:385" +$at_failed && at_fn_log_failure +$at_traceon; } + + +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/lt_dladvise.at:387: if \$LIBTOOL --mode=execute \$modules \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute $modules \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dladvise.at:387" +( $at_check_trace; if $LIBTOOL --mode=execute $modules "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:387" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_73 +#AT_START_74 +at_fn_group_banner 74 'lt_dlopen.at:23' \ + "lt_dlopen error messages" " " 7 +at_xfail=yes +( + $as_echo "74. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +# The bug is not fixed: + + +# This test only works if the system allows undefined symbols. +eval `$LIBTOOL --config | grep '^allow_undefined_flag='` +{ set +x +$as_echo "$at_srcdir/lt_dlopen.at:31: test unsupported != \"\$allow_undefined_flag\" || exit 77" +at_fn_check_prepare_dynamic "test unsupported != \"$allow_undefined_flag\" || exit 77" "lt_dlopen.at:31" +( $at_check_trace; test unsupported != "$allow_undefined_flag" || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } + + +cat >main.c <<'_ATEOF' +#include +#include + +int +main (int argc, char* argv[]) +{ + int err = 0; + lt_dlhandle plugin_handle; + + if (argc < 2) + { + fprintf (stderr, "usage: %s plugin\n", argv[0]); + return 1; + } + + lt_dlinit (); + plugin_handle = lt_dlopenext (argv[1]); + if (NULL != plugin_handle) + { + printf ("plugin opened successfully!\n"); + lt_dlclose (plugin_handle); + } + else + { + printf ("plugin failed to open: %s\n", lt_dlerror()); + err = 1; + } + lt_dlexit (); + return err; +} +_ATEOF + + +cat >good-plugin.c <<'_ATEOF' +int foo; +int *i = &foo; +_ATEOF + + +cat >missing-symbol-plugin.c <<'_ATEOF' +/* On systems that allow undefined symbols, this will compile, + but the symbol "foo" won't be found at runtime */ +extern int foo; +int *i = &foo; +_ATEOF + + +: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} +: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} + +CPPFLAGS="$LTDLINCL $CPPFLAGS" +inst=`pwd`/inst +libdir=$inst/lib + +{ set +x +$as_echo "$at_srcdir/lt_dlopen.at:85: \$CC \$CPPFLAGS \$CFLAGS -c main.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "lt_dlopen.at:85" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:85" +$at_failed && at_fn_log_failure +$at_traceon; } + +for file in good-plugin.c missing-symbol-plugin.c; do + { set +x +$as_echo "$at_srcdir/lt_dlopen.at:87: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c \$file" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file" "lt_dlopen.at:87" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:87" +$at_failed && at_fn_log_failure +$at_traceon; } + +done +{ set +x +$as_echo "$at_srcdir/lt_dlopen.at:90: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o good-plugin.la -rpath \$libdir -module -avoid-version good-plugin.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o good-plugin.la -rpath $libdir -module -avoid-version good-plugin.lo" "lt_dlopen.at:90" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o good-plugin.la -rpath $libdir -module -avoid-version good-plugin.lo +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:90" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/lt_dlopen.at:92: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o missing-symbol-plugin.la -rpath \$libdir -module -avoid-version missing-symbol-plugin.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o missing-symbol-plugin.la -rpath $libdir -module -avoid-version missing-symbol-plugin.lo" "lt_dlopen.at:92" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o missing-symbol-plugin.la -rpath $libdir -module -avoid-version missing-symbol-plugin.lo +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:92" +$at_failed && at_fn_log_failure +$at_traceon; } + + +{ set +x +$as_echo "$at_srcdir/lt_dlopen.at:95: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlopen good-plugin.la -dlopen missing-symbol-plugin.la \$LIBLTDL" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen good-plugin.la -dlopen missing-symbol-plugin.la $LIBLTDL" "lt_dlopen.at:95" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen good-plugin.la -dlopen missing-symbol-plugin.la $LIBLTDL +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:95" +$at_failed && at_fn_log_failure +$at_traceon; } + + +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/lt_dlopen.at:99: if \"\$lt_exe\" ./good-plugin.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ./good-plugin.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopen.at:99" +( $at_check_trace; if "$lt_exe" ./good-plugin.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:99" +$at_failed && at_fn_log_failure +$at_traceon; } + + +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/lt_dlopen.at:100: if \"\$lt_exe\" ./missing-symbol-plugin.la; then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ./missing-symbol-plugin.la; then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopen.at:100" +( $at_check_trace; if "$lt_exe" ./missing-symbol-plugin.la; then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 1 $at_status "$at_srcdir/lt_dlopen.at:100" +$at_failed && at_fn_log_failure +$at_traceon; } + + +{ set +x +$as_echo "$at_srcdir/lt_dlopen.at:101: grep 'missing symbol' stderr" +at_fn_check_prepare_trace "lt_dlopen.at:101" +( $at_check_trace; grep 'missing symbol' stderr +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:101" +$at_failed && at_fn_log_failure +$at_traceon; } + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_74 +#AT_START_75 +at_fn_group_banner 75 'lt_dlopen_a.at:23' \ + "lt_dlopen archive" " " 7 +at_xfail=no +( + $as_echo "75. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +cat >main.c <<'_ATEOF' +#include +#include + +/* This dlopen() in the main executable should override any dlopen()s in + shared libraries etc. + + If that is not the case (or the platform does not use dlopen()) then this + test should exit 77, causing the test to SKIP. +*/ +static int retcde = 77; + +void * dlopen(const char *path, int mode) { + if (!(strcmp(path,"plugin.a") && strcmp(path,"plugin.lib"))) + { + fprintf(stderr,"Tried to open archive %s\n",path); + retcde = 1; + } + else + { + fprintf(stderr,"Opening ... %s\n", path); + if (retcde == 77) retcde = 0; + } + return NULL; +} + +int +main (int argc, char* argv[]) +{ + int err = 0; + lt_dlhandle plugin_handle; + + lt_dlinit (); + plugin_handle = lt_dlopenext (argv[1]); + lt_dlexit (); + return retcde; +} +_ATEOF + + +cat >plugin.c <<'_ATEOF' + +int i = 1; +_ATEOF + + +: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} +: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} + +CPPFLAGS="$LTDLINCL $CPPFLAGS" +inst=`pwd`/inst +libdir=$inst/lib +bindir=$inst/bin + +{ set +x +$as_echo "$at_srcdir/lt_dlopen_a.at:78: \$CC \$CPPFLAGS \$CFLAGS -c main.c || exit 77" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c || exit 77" "lt_dlopen_a.at:78" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:78" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/lt_dlopen_a.at:79: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c plugin.c || exit 77" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c || exit 77" "lt_dlopen_a.at:79" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:79" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/lt_dlopen_a.at:81: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o plugin.la -rpath \$libdir -module -no-undefined -avoid-version plugin.lo || exit 77" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir -module -no-undefined -avoid-version plugin.lo || exit 77" "lt_dlopen_a.at:81" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir -module -no-undefined -avoid-version plugin.lo || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:81" +$at_failed && at_fn_log_failure +$at_traceon; } + + +{ set +x +$as_echo "$at_srcdir/lt_dlopen_a.at:85: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlopen plugin.la \$LIBLTDL || exit 77" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen plugin.la $LIBLTDL || exit 77" "lt_dlopen_a.at:85" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen plugin.la $LIBLTDL || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:85" +$at_failed && at_fn_log_failure +$at_traceon; } + + +mkdir -p $libdir +mkdir -p $bindir + +{ set +x +$as_echo "$at_srcdir/lt_dlopen_a.at:92: \$LIBTOOL --mode=install cp plugin.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp plugin.la $libdir" "lt_dlopen_a.at:92" +( $at_check_trace; $LIBTOOL --mode=install cp plugin.la $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:92" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/lt_dlopen_a.at:93: \$LIBTOOL --mode=install cp main\$EXEEXT \$bindir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp main$EXEEXT $bindir" "lt_dlopen_a.at:93" +( $at_check_trace; $LIBTOOL --mode=install cp main$EXEEXT $bindir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:93" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/lt_dlopen_a.at:94: test -f \$libdir/plugin.a || exit 77" +at_fn_check_prepare_dynamic "test -f $libdir/plugin.a || exit 77" "lt_dlopen_a.at:94" +( $at_check_trace; test -f $libdir/plugin.a || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:94" +$at_failed && at_fn_log_failure +$at_traceon; } + +lt_exe=$bindir/main; if test -f "$bindir/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/lt_dlopen_a.at:95: if \"\$lt_exe\" \$libdir/plugin.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" $libdir/plugin.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopen_a.at:95" +( $at_check_trace; if "$lt_exe" $libdir/plugin.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:95" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_75 +#AT_START_76 +at_fn_group_banner 76 'lt_dlopenext.at:23' \ + "lt_dlopenext error messages" " " 7 +at_xfail=no +( + $as_echo "76. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +# This test requires shared library support. +{ set +x +$as_echo "$at_srcdir/lt_dlopenext.at:27: \$LIBTOOL --features | grep 'enable shared libraries' || exit 77" +at_fn_check_prepare_notrace 'a shell pipeline' "lt_dlopenext.at:27" +( $at_check_trace; $LIBTOOL --features | grep 'enable shared libraries' || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + +prefix=`pwd`/inst +libdir=$prefix/lib +bindir=$prefix/bin +mkdir $prefix $libdir $bindir + +# This code is copied from the Autobook: +# +# so if it needs changes, be sure to notify the Autobook authors +# about them. + +cat >simple-module.c <<'_ATEOF' + +#include + +#ifdef __cplusplus +extern "C" +#endif +int +run (const char *argument) +{ + printf ("Hello, %s!\n", argument); + return 0; +} +_ATEOF + + +cat >ltdl-loader.c <<'_ATEOF' + +#include +#include +#ifndef EXIT_FAILURE +# define EXIT_FAILURE 1 +# define EXIT_SUCCESS 0 +#endif + +#include +#ifndef PATH_MAX +# define PATH_MAX 255 +#endif + +#include +#include + +#ifndef MODULE_PATH_ENV +# define MODULE_PATH_ENV "MODULE_PATH" +#endif + +typedef int entrypoint (const char *argument); + +/* Save and return a copy of the dlerror() error message, + since the next API call may overwrite the original. */ +static char *dlerrordup (char *errormsg); + +int +main (int argc, const char *argv[]) +{ + char *errormsg = NULL; + lt_dlhandle module = NULL; + entrypoint *run = NULL; + int errors = 0; + + if (argc != 3) + { + fprintf (stderr, "USAGE: main MODULENAME ARGUMENT\n"); + exit (EXIT_FAILURE); + } + + /* Initialise libltdl. */ + errors = lt_dlinit (); + + /* Set the module search path. */ + if (!errors) + { + const char *path = getenv (MODULE_PATH_ENV); + + if (path != NULL) + errors = lt_dlsetsearchpath (path); + } + + /* Load the module. */ + if (!errors) + module = lt_dlopenext (argv[1]); + + /* Find the entry point. */ + if (module) + { + run = (entrypoint *) lt_dlsym (module, "run"); + + /* In principle, run might legitimately be NULL, so + I don't use run == NULL as an error indicator + in general. */ + errormsg = dlerrordup (errormsg); + if (errormsg != NULL) + { + errors = lt_dlclose (module); + module = NULL; + } + } + else + errors = 1; + + /* Call the entry point function. */ + if (!errors) + { + int result = (*run) (argv[2]); + if (result < 0) + errormsg = strdup ("module entry point execution failed"); + else + printf ("\t=> %d\n", result); + } + + /* Unload the module, now that we are done with it. */ + if (!errors) + errors = lt_dlclose (module); + + if (errors) + { + /* Diagnose the encountered error. */ + errormsg = dlerrordup (errormsg); + + if (!errormsg) + { + fprintf (stderr, "%s: dlerror() failed.\n", argv[0]); + return EXIT_FAILURE; + } + } + + /* Finished with ltdl now. */ + if (!errors) + if (lt_dlexit () != 0) + errormsg = dlerrordup (errormsg); + + if (errormsg) + { + fprintf (stderr, "%s: %s.\n", argv[0], errormsg); + free (errormsg); + exit (EXIT_FAILURE); + } + + return EXIT_SUCCESS; +} + +/* Be careful to save a copy of the error message, + since the next API call may overwrite the original. */ +static char * +dlerrordup (char *errormsg) +{ + char *error = (char *) lt_dlerror (); + if (error && !errormsg) + errormsg = strdup (error); + return errormsg; +} +_ATEOF + + +: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} +: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} + +# Skip this test when called from: +# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install +{ set +x +$as_echo "$at_srcdir/lt_dlopenext.at:188: case \$LIBLTDL in #( + */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; +esac" +at_fn_check_prepare_notrace 'an embedded newline' "lt_dlopenext.at:188" +( $at_check_trace; case $LIBLTDL in #( + */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; +esac +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:188" +$at_failed && at_fn_log_failure +$at_traceon; } + + +CPPFLAGS="$LTDLINCL $CPPFLAGS" +LDFLAGS="$LDFLAGS -no-undefined" + +{ set +x +$as_echo "$at_srcdir/lt_dlopenext.at:195: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c simple-module.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c simple-module.c" "lt_dlopenext.at:195" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c simple-module.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:195" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/lt_dlopenext.at:197: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o simple-module.la simple-module.lo -rpath \$libdir -module -avoid-version" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o simple-module.la simple-module.lo -rpath $libdir -module -avoid-version" "lt_dlopenext.at:197" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o simple-module.la simple-module.lo -rpath $libdir -module -avoid-version +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:197" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/lt_dlopenext.at:200: \$CC \$CPPFLAGS \$CFLAGS -c ltdl-loader.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c ltdl-loader.c" "lt_dlopenext.at:200" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c ltdl-loader.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:200" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/lt_dlopenext.at:202: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o ltdl-loader\$EXEEXT ltdl-loader.\$OBJEXT -dlopen self \$LIBLTDL" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o ltdl-loader$EXEEXT ltdl-loader.$OBJEXT -dlopen self $LIBLTDL" "lt_dlopenext.at:202" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o ltdl-loader$EXEEXT ltdl-loader.$OBJEXT -dlopen self $LIBLTDL +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:202" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/lt_dlopenext.at:205: \$LIBTOOL --mode=install cp simple-module.la \$libdir/simple-module.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp simple-module.la $libdir/simple-module.la" "lt_dlopenext.at:205" +( $at_check_trace; $LIBTOOL --mode=install cp simple-module.la $libdir/simple-module.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:205" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/lt_dlopenext.at:206: \$LIBTOOL --mode=clean rm -f simple-module.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f simple-module.la" "lt_dlopenext.at:206" +( $at_check_trace; $LIBTOOL --mode=clean rm -f simple-module.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:206" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >main.c <<'_ATEOF' -#include -#include +# Try finding the module with and without the .la file, with absolute +# path, relative path, or one of the path variables. Do not override +# $PATH for w32, see shlibpath.at for the hacks this requires. +# +# Finding the module without the .la file will not work if MODULE_EXT +# aka. shared_ext is empty. -typedef int funcp (int); +eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|shrext_cmds)='` -static int errors = 0; +module=no +eval shared_ext=\"$shrext_cmds\" +if test -n "$shared_ext"; then + have_lafile="with without" +else + have="with" +fi -static void -complain (const char *msg) +if test "$shlibpath_var" = PATH; then + $unset shlibpath_var || shlibpath_var= +fi + +for lafile in $have_lafile; do + if test $lafile = without; then + rm $libdir/simple-module.la + fi + + for dir in inst/lib "$libdir"; do + lt_exe=./ltdl-loader; if test -f "./ltdl-loader$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/lt_dlopenext.at:235: if \"\$lt_exe\" \$dir/simple-module World; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" $dir/simple-module World; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopenext.at:235" +( $at_check_trace; if "$lt_exe" $dir/simple-module World; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:235" +$at_failed && at_fn_log_failure +$at_traceon; } + + + { set +x +$as_echo "$at_srcdir/lt_dlopenext.at:237: grep \"Hello, World\" stdout" +at_fn_check_prepare_trace "lt_dlopenext.at:237" +( $at_check_trace; grep "Hello, World" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:237" +$at_failed && at_fn_log_failure +$at_traceon; } + + + for var in MODULE_PATH LTDL_LIBRARY_PATH $shlibpath_var + do + eval $var=\$dir + export $var + lt_exe=./ltdl-loader; if test -f "./ltdl-loader$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/lt_dlopenext.at:243: if \"\$lt_exe\" simple-module World; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" simple-module World; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopenext.at:243" +( $at_check_trace; if "$lt_exe" simple-module World; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:243" +$at_failed && at_fn_log_failure +$at_traceon; } + + + { set +x +$as_echo "$at_srcdir/lt_dlopenext.at:245: grep \"Hello, World\" stdout" +at_fn_check_prepare_trace "lt_dlopenext.at:245" +( $at_check_trace; grep "Hello, World" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:245" +$at_failed && at_fn_log_failure +$at_traceon; } + + $unset $var || eval $var= + done + done +done + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_76 +#AT_START_77 +at_fn_group_banner 77 'ltdl-libdir.at:23' \ + "libdir of installed modules" " " 7 +at_xfail=no +( + $as_echo "77. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +# This test requires shared library support. +{ set +x +$as_echo "$at_srcdir/ltdl-libdir.at:27: \$LIBTOOL --features | grep 'enable shared libraries' || exit 77" +at_fn_check_prepare_notrace 'a shell pipeline' "ltdl-libdir.at:27" +( $at_check_trace; $LIBTOOL --features | grep 'enable shared libraries' || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:27" +$at_failed && at_fn_log_failure +$at_traceon; } + + +# With MinGW, try Windows-style paths only. +if pwd -W >/dev/null 2>&1; then + prefix=`pwd -W`/inst +else + prefix=`pwd`/inst +fi +libdir=$prefix/lib +bindir=$prefix/bin +mkdir $prefix $libdir $bindir + +cat >a.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" +#endif +int f (void) { - const char *errmsg = lt_dlerror (); - fprintf (stderr, "%s", msg); - if (errmsg) - fprintf (stderr, ": %s\n", errmsg); - else - fprintf (stderr, ".\n"); - ++errors; + return 42; +} +_ATEOF + + +cat >m.c <<'_ATEOF' + +#include +#include + +typedef int func_f(void); + +int +main (int argc, const char *argv[]) +{ + lt_dlhandle module = NULL; + func_f *f = NULL; + + if (lt_dlinit()) { + fprintf(stderr, "lt_dlinit failed '%s'\n", lt_dlerror()); + return 1; + } + + module = lt_dlopen("./a.la"); + + if (!module) { + fprintf(stderr, "lt_dlopen failed '%s'\n", lt_dlerror()); + return 1; + } + + f = (func_f *)lt_dlsym(module, "f"); + + if (!f) { + fprintf(stderr, "lt_dlsym failed '%s'\n", lt_dlerror()); + return 1; + } + + if (f() != 42) { + fprintf(stderr, "f did not return 42\n"); + return 1; + } + + lt_dlclose(module); + lt_dlexit(); + return 0; } +_ATEOF + + +: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} +: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} + +# Skip installcheck if --disable-ltdl-install was used. +{ set +x +$as_echo "$at_srcdir/ltdl-libdir.at:97: test -f \"\$LIBLTDL\" || exit 77" +at_fn_check_prepare_dynamic "test -f \"$LIBLTDL\" || exit 77" "ltdl-libdir.at:97" +( $at_check_trace; test -f "$LIBLTDL" || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:97" +$at_failed && at_fn_log_failure +$at_traceon; } + + +CPPFLAGS="$LTDLINCL $CPPFLAGS" +LDFLAGS="$LDFLAGS -no-undefined" + +{ set +x +$as_echo "$at_srcdir/ltdl-libdir.at:102: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c" "ltdl-libdir.at:102" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:102" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/ltdl-libdir.at:104: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o a.la a.lo -rpath \$libdir -module -shared -avoid-version" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a.la a.lo -rpath $libdir -module -shared -avoid-version" "ltdl-libdir.at:104" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o a.la a.lo -rpath $libdir -module -shared -avoid-version +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:104" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/ltdl-libdir.at:107: \$CC \$CPPFLAGS \$CFLAGS -c m.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c m.c" "ltdl-libdir.at:107" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c m.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:107" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/ltdl-libdir.at:109: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o m\$EXEEXT m.\$OBJEXT \$LIBLTDL" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT $LIBLTDL" "ltdl-libdir.at:109" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m$EXEEXT m.$OBJEXT $LIBLTDL +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:109" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/ltdl-libdir.at:112: \$LIBTOOL --mode=install cp a.la \$libdir/a.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp a.la $libdir/a.la" "ltdl-libdir.at:112" +( $at_check_trace; $LIBTOOL --mode=install cp a.la $libdir/a.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:112" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/ltdl-libdir.at:114: \$LIBTOOL --mode=install cp m\$EXEEXT \$bindir/m\$EXEEXT" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m$EXEEXT $bindir/m$EXEEXT" "ltdl-libdir.at:114" +( $at_check_trace; $LIBTOOL --mode=install cp m$EXEEXT $bindir/m$EXEEXT +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:114" +$at_failed && at_fn_log_failure +$at_traceon; } + + +# Try finding the module via the libdir entry in a misplaced .la file. + +mv $libdir/a.la $bindir/a.la +cd $bindir +lt_exe=./m; if test -f "./m$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/ltdl-libdir.at:121: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "ltdl-libdir.at:121" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/ltdl-libdir.at:121" +$at_failed && at_fn_log_failure +$at_traceon; } -static lt_dlhandle -moduleopen (const char *filename, lt_dladvise advise) -{ - lt_dlhandle handle; - handle = lt_dlopenadvise (filename, advise); - if (!handle) - { - fprintf (stderr, "can't open the module %s!\n", filename); - complain ("error was"); - } - return handle; -} + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_77 +#AT_START_78 +at_fn_group_banner 78 'ltdl-api.at:25' \ + "ltdl API" " " 7 +at_xfail=no +( + $as_echo "78. $at_setup_line: testing $at_desc ..." + $at_traceon -static int -moduletest (lt_dlhandle handle, const char *fname, const char *vname) -{ - funcp *f = (funcp *) lt_dlsym (handle, fname); - int *v = (int *) lt_dlsym (handle, vname); - if (!f) - { - fprintf (stderr, "function `%s' not found\n", fname); - ++errors; - return -1; - } - if (!v) - { - fprintf (stderr, "variable `%s' not found\n", vname); - ++errors; - return -1; - } - return f (*v); -} -void -hint_ext (void) -{ - lt_dlhandle handle; - lt_dladvise advise; +# Ensure that no symbols from argz are unrenamed. +eval `$LIBTOOL --config | $EGREP '^(NM|global_symbol_pipe|objext)='` +argz_o=$abs_top_builddir/libltdl/argz.$objext +{ set +x +$as_echo "$at_srcdir/ltdl-api.at:31: test -f \"\$argz_o\" || exit 77" +at_fn_check_prepare_dynamic "test -f \"$argz_o\" || exit 77" "ltdl-api.at:31" +( $at_check_trace; test -f "$argz_o" || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ltdl-api.at:31" +$at_failed && at_fn_log_failure +$at_traceon; } - if (lt_dladvise_init (&advise) || lt_dladvise_ext (&advise)) - complain ("error setting advise ext"); +{ set +x +$as_echo "$at_srcdir/ltdl-api.at:32: eval \"\$NM \\\"\\\$argz_o\\\" | \$global_symbol_pipe\"" +at_fn_check_prepare_notrace 'a shell pipeline' "ltdl-api.at:32" +( $at_check_trace; eval "$NM \"\$argz_o\" | $global_symbol_pipe" +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/ltdl-api.at:32" +$at_failed && at_fn_log_failure +$at_traceon; } - handle = moduleopen ("libdepend", advise); +# Check for global symbols beginning with "argz_" +{ set +x +$as_echo "$at_srcdir/ltdl-api.at:35: grep \"^T argz_\" stdout" +at_fn_check_prepare_trace "ltdl-api.at:35" +( $at_check_trace; grep "^T argz_" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/ltdl-api.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } - if (handle) - printf ("depend: %d\n", moduletest (handle, "g", "j")); +# and also for the _ prefixed version "_argz_" +{ set +x +$as_echo "$at_srcdir/ltdl-api.at:37: grep \"^T _argz_\" stdout" +at_fn_check_prepare_trace "ltdl-api.at:37" +( $at_check_trace; grep "^T _argz_" stdout +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/ltdl-api.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } - lt_dladvise_destroy (&advise); -} -void -hint_resident (void) -{ - const lt_dlinfo *info; - lt_dlhandle handle; - lt_dladvise advise; + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_78 +#AT_START_79 +at_fn_group_banner 79 'dlloader-api.at:23' \ + "dlloader API" " " 7 +at_xfail=no +( + $as_echo "79. $at_setup_line: testing $at_desc ..." + $at_traceon - if (lt_dladvise_init (&advise) || lt_dladvise_resident (&advise)) - complain ("error setting advise resident"); - handle = moduleopen ("libresident.la", advise); - if (handle) - { - info = lt_dlgetinfo (handle); - if (!info->is_resident) - complain ("error taking advise resident"); +cat >main.c <<'_ATEOF' +#include +#include +#include +#include - /* cannot close resident modules */ - if (lt_dlclose (handle) == 0) - complain ("successfully unloaded resident module"); +static int +first_init (lt_user_data data) +{ + const char *ctx = (const char *) data; - printf ("resident: %d\n", moduletest (handle, "func", "numb")); - } + printf ("first_init: %s\n", ctx); - lt_dladvise_destroy (&advise); + return 0; } -void -hint_local (void) +static lt_module +first_open (lt_user_data data, const char *filename, lt_dladvise advise) { - const lt_dlinfo *info; - lt_dlhandle handle; - lt_dladvise advise; - - if (lt_dladvise_init (&advise) || lt_dladvise_local (&advise)) - complain ("error setting advise local"); - - handle = moduleopen ("liblocal.la", advise); + static const char *first_module = "first"; + const char *ctx = (const char *) data; - if (handle) + /* Use a magic string to avoid possible interactions with filesystem + * objects. Prepend '/' to short-circuit libltdl's search of + * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar). + */ + if (!filename || strcmp (filename, "/libltdl_dlloader_api_test_first")) { - info = lt_dlgetinfo (handle); - printf ("local: %d\n", moduletest (handle, "f", "i")); - - /* If the symlocal hint was taken, don't unload this module - and test that our local symbolnames won't clash with modglobal. */ - if (!info->is_symlocal && lt_dlclose (handle)) - complain ("error unloading modlocal"); + printf ("first_open denies a request\n"); + lt_dlseterror (LT_ERROR_FILE_NOT_FOUND); + return NULL; } - lt_dladvise_destroy (&advise); + printf ("first_open (\"%s\"): %s\n", filename, ctx); + + return (lt_module) first_module; } -void -hint_global (void) +static const char * +first_symbol (void) { - const lt_dlinfo *info; - lt_dlhandle handle; - lt_dladvise advise; - - if (lt_dladvise_init (&advise) || lt_dladvise_global (&advise)) - complain ("error setting advise global"); - - handle = moduleopen ("libglobal.la", advise); + return "first_symbol"; +} - if (handle) - { - info = lt_dlgetinfo (handle); - printf ("global: %d\n", moduletest (handle, "f", "i")); +static void * +first_sym (lt_user_data data, lt_module module, const char *symbolname) +{ + const char *ctx = (const char *) data; + const char *filename = (const char *) module; - /* Don't attempt to load moddepend unless modglobal was successfully - loaded and the symglobal hint was taken, and the system allows to - to have undefined symbols. */ - if (info && info->is_symglobal && HAVE_UNDEFINED_SYMBOLS) - { - hint_ext (); - } - else - { - /* Fake the output so the test won't fail when using a dlloader - unable to take symglobal hints. */ - printf ("depend: 5\n"); - } - } + printf ("first_sym (%s): %s\n", filename, ctx); - lt_dladvise_destroy (&advise); + return (void *) first_symbol; } -void -hint_preload (void) +static int +first_close (lt_user_data data, lt_module module) { - lt_dlhandle handle; - lt_dladvise advise; - - if (lt_dladvise_init (&advise) || lt_dladvise_preload (&advise)) - complain ("error setting advise preload"); - - handle = moduleopen ("libpreload.la", advise); + const char *ctx = (const char *) data; + const char *filename = (const char *) module; - if (handle) - { - printf("preload: %d\n", moduletest (handle, "h", "k")); - } + printf ("first_close (%s): %s\n", filename, ctx); - lt_dladvise_destroy (&advise); + return 0; } -int -main (void) +static int +first_exit (lt_user_data data) { + const char *ctx = (const char *) data; - LTDL_SET_PRELOADED_SYMBOLS(); + printf ("first_exit: %s\n", ctx); - if (lt_dlinit() != 0) - { - fprintf (stderr, "error during initialization: %s\n", lt_dlerror()); - return 1; - } + return 0; +} - hint_resident (); - hint_local (); - hint_global (); - hint_preload (); +static int +last_init (lt_user_data data) +{ + const char *ctx = (const char *) data; - if (lt_dlexit () != 0) - complain ("error during exit"); + printf ("last_init: %s\n", ctx); - return (errors != 0); + return 0; } -_ATEOF +static lt_module +last_open (lt_user_data data, const char *filename, lt_dladvise advise) +{ + static const char *last_module = "last"; + const char *ctx = (const char *) data; -cat >modresident.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" { -#endif -int func (int x) { return x / 3; } -int numb = 7; -#ifdef __cplusplus -} -#endif -_ATEOF + /* Use a magic string to avoid possible interactions with filesystem + * objects. Prepend '/' to short-circuit libltdl's search of + * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar). + */ + if (!filename || strcmp (filename, "/libltdl_dlloader_api_test_last")) + { + printf ("last_open denies a request\n"); + lt_dlseterror (LT_ERROR_FILE_NOT_FOUND); + return NULL; + } + printf ("last_open (\"%s\"): %s\n", filename, ctx); -cat >modlocal.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" { -#endif -int f (int x) { return (x * x) / 10; } -int i = 6; -#ifdef __cplusplus + return (lt_module) last_module; } -#endif -_ATEOF - -cat >modglobal.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" { -#endif -int f (int x) { return x - 1; } -int i = 5; -#ifdef __cplusplus +static const char * +last_symbol (void) +{ + return "last_symbol"; } -#endif -_ATEOF +static void * +last_sym (lt_user_data data, lt_module module, const char *symbolname) +{ + const char *ctx = (const char *) data; + const char *filename = (const char *) module; -cat >moddepend.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" { -#endif -extern int f (int), i; -int g (int x) { return f (i) + x - 3; } -int j = 4; -#ifdef __cplusplus + printf ("last_sym (%s): %s\n", filename, ctx); + + return (void *) last_symbol; } -#endif -_ATEOF +static int +last_close (lt_user_data data, lt_module module) +{ + const char *ctx = (const char *) data; + const char *filename = (const char *) module; -cat >modpreload.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" { -#endif -int h (int x) { return 2 * x; } -int k = 3; -#ifdef __cplusplus + printf ("last_close (%s): %s\n", filename, ctx); + + return 0; } -#endif -_ATEOF +static int +last_exit (lt_user_data data) +{ + const char *ctx = (const char *) data; -cat >expout <<'_ATEOF' -resident: 2 -local: 3 -global: 4 -depend: 5 -preload: 6 -_ATEOF + printf ("last_exit: %s\n", ctx); -case $host_os in mingw*) - while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t - mv -f expout.t expout ;; -esac + return 0; +} -: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} -: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} +typedef const char *module_func (void); -# Skip this test when called from: -# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install -{ set +x -$as_echo "$at_srcdir/lt_dladvise.at:305: case \$LIBLTDL in #( - */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; -esac" -at_fn_check_prepare_notrace 'an embedded newline' "lt_dladvise.at:305" -( $at_check_trace; case $LIBLTDL in #( - */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; -esac -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:305" -$at_failed && at_fn_log_failure -$at_traceon; } +int +main (int argc, char* argv[]) +{ + int err = 0; + lt_dlvtable *first; + lt_dlvtable *last; + lt_dlhandle module = NULL; + module_func *symbol; + const char *first_ctx = "first_ctx"; + const char *last_ctx = "last_ctx"; + const lt_dlvtable *finder; + LTDL_SET_PRELOADED_SYMBOLS (); -CPPFLAGS="$LTDLINCL $CPPFLAGS" + if (lt_dlinit ()) + { + printf ("lt_dlinit failed\n"); + return 1; + } -dlopenable='resident local global' -dlpreloadable='preload' + first = (lt_dlvtable *) malloc (sizeof (*first)); + if (!first) + { + printf ("malloc failed\n"); + err = 1; + goto cleanup; + } -# ------------------------------------------------------------------------- # -# The depend test makes no sense unless compiled without -no-undefined. By # -# not building the depend module in that case, when this test passes we can # -# be sure that hint_global() above, is being correctly informed those hosts # -# are reporting not able to accept the global hint to lt_dlopenadvise(). # -# ------------------------------------------------------------------------- # + first->name = "first"; + first->sym_prefix = NULL; + first->module_open = first_open; + first->module_close = first_close; + first->find_sym = first_sym; + first->dlloader_init = first_init; /* test that it isn't called twice */ + first->dlloader_exit = first_exit; + first->dlloader_data = (lt_user_data) first_ctx; + first->priority = LT_DLLOADER_PREPEND; -have_shared=false -$LIBTOOL --features | grep 'enable shared libraries' >/dev/null && have_shared=: + if (first_init (first->dlloader_data)) + { + printf ("first_init failed\n"); + err = 1; + goto cleanup; + } -case $host_os,$have_shared in -cygwin* | mingw* | cegcc* | *,false) - # These hosts do not support linking without -no-undefined - CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0" - ;; -*) - CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=1" - dlopenable="$dlopen depend" - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c moddepend.c - { set +x -$as_echo "$at_srcdir/lt_dladvise.at:333: \$LIBTOOL --mode=link \$CC -module \$CFLAGS \$LDFLAGS -o libdepend.la moddepend.lo -rpath /foo -avoid-version" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la moddepend.lo -rpath /foo -avoid-version" "lt_dladvise.at:333" -( $at_check_trace; $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o libdepend.la moddepend.lo -rpath /foo -avoid-version -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:333" -$at_failed && at_fn_log_failure -$at_traceon; } + if (lt_dlloader_add (first)) + { + printf ("lt_dlloader_add failed: %s\n", lt_dlerror ()); + err = 1; + goto cleanup; + } - ;; -esac + finder = lt_dlloader_find ("first"); -# ------------------------------------------------------------------------- # -# Other modules can be tested correctly even when built with -no-undefined. # -# ------------------------------------------------------------------------- # + if (!finder) + { + printf ("lt_dlloader_find failed: %s\n", lt_dlerror ()); + err = 1; + goto cleanup; + } -LDFLAGS="$LDFLAGS -no-undefined" + printf ("Found loader \"%s\"\n", finder->name); -$CC $CPPFLAGS $CFLAGS -c main.c -for name in resident local global preload; do - # FIXME: adding -static to libpreload shouldn't be necessary. - # Fix this properly in ltmain, then remove this workaround. - if test $name = preload; then - st=-static - else - st= - fi - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c mod$name.c - { set +x -$as_echo "$at_srcdir/lt_dladvise.at:354: \$LIBTOOL --mode=link \$CC -module \$CFLAGS \$LDFLAGS -o lib\$name.la mod\$name.lo \$st -rpath /foo -avoid-version" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la mod$name.lo $st -rpath /foo -avoid-version" "lt_dladvise.at:354" -( $at_check_trace; $LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o lib$name.la mod$name.lo $st -rpath /foo -avoid-version -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:354" -$at_failed && at_fn_log_failure -$at_traceon; } + last = (lt_dlvtable *) malloc (sizeof (*last)); + if (!last) + { + printf ("malloc failed\n"); + err = 1; + goto cleanup; + } -done + last->name = "last"; + last->sym_prefix = NULL; + last->module_open = last_open; + last->module_close = last_close; + last->find_sym = last_sym; + last->dlloader_init = last_init; /* test that it isn't called twice */ + last->dlloader_exit = last_exit; + last->dlloader_data = (lt_user_data) last_ctx; + last->priority = LT_DLLOADER_APPEND; + + if (last_init (last->dlloader_data)) + { + printf ("last_init failed\n"); + err = 1; + goto cleanup; + } -preloaded= -for module in $dlpreloadable; do - preloaded="${preloaded+$preloaded }-dlpreopen lib$module.la" -done + if (lt_dlloader_add (last)) + { + printf ("lt_dlloader_add failed: %s\n", lt_dlerror ()); + err = 1; + goto cleanup; + } -modules= -for module in $dlopenable; do - modules="${modules+$modules }-dlopen lib$module.la" -done + finder = lt_dlloader_find ("last"); -{ set +x -$as_echo "$at_srcdir/lt_dladvise.at:368: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT \$preloaded \$modules \$LIBLTDL" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $preloaded $modules $LIBLTDL" "lt_dladvise.at:368" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $preloaded $modules $LIBLTDL -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:368" -$at_failed && at_fn_log_failure -$at_traceon; } + if (!finder) + { + printf ("lt_dlloader_find failed: %s\n", lt_dlerror ()); + err = 1; + goto cleanup; + } + printf ("Found loader \"%s\"\n", finder->name); -# Remove loadable libpreload module, so we know it is the preloaded module -# that is being executed by a successful test invocation: -{ set +x -$as_echo "$at_srcdir/lt_dladvise.at:373: \$LIBTOOL --mode=clean rm -f libpreload.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f libpreload.la" "lt_dladvise.at:373" -( $at_check_trace; $LIBTOOL --mode=clean rm -f libpreload.la -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:373" -$at_failed && at_fn_log_failure -$at_traceon; } + /* Use a magic string to avoid possible interactions with filesystem + * objects. Prepend '/' to short-circuit libltdl's search of + * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar). + */ + module = lt_dlopen ("/libltdl_dlloader_api_test_first"); + if (!module) + { + printf ("lt_dlopen failed: %s\n", lt_dlerror ()); + err = 1; + goto cleanup; + } -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/lt_dladvise.at:375: if \$LIBTOOL --mode=execute \$modules \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute $modules \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dladvise.at:375" -( $at_check_trace; if $LIBTOOL --mode=execute $modules "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/lt_dladvise.at:375" -$at_failed && at_fn_log_failure -$at_traceon; } + symbol = (module_func *) lt_dlsym (module, "symbol"); + if (!symbol) + { + printf ("lt_dlsym failed: %s\n", lt_dlerror ()); + err = 1; + goto cleanup; + } + printf ("result: %s\n", symbol ()); - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_64 -#AT_START_65 -# 65. lt_dlopen.at:23: lt_dlopen error messages -at_setup_line='lt_dlopen.at:23' -at_fn_banner 6 -at_desc="lt_dlopen error messages" -at_desc_line=" 65: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "65. lt_dlopen.at:23: testing ..." - $at_traceon + lt_dlclose (module); + module = lt_dlopen ("./module.la"); + if (!module) + { + printf ("lt_dlopen failed: %s\n", lt_dlerror ()); + err = 1; + goto cleanup; + } + symbol = (module_func *) lt_dlsym (module, "symbol"); -# The bug is not fixed: + if (!symbol) + { + printf ("lt_dlsym failed: %s\n", lt_dlerror ()); + err = 1; + goto cleanup; + } + printf ("result: %s\n", symbol ()); -# This test only works if the system allows undefined symbols. -eval `$LIBTOOL --config | grep '^allow_undefined_flag='` -{ set +x -$as_echo "$at_srcdir/lt_dlopen.at:31: test unsupported != \"\$allow_undefined_flag\" || exit 77" -at_fn_check_prepare_dynamic "test unsupported != \"$allow_undefined_flag\" || exit 77" "lt_dlopen.at:31" -( $at_check_trace; test unsupported != "$allow_undefined_flag" || exit 77 -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:31" -$at_failed && at_fn_log_failure -$at_traceon; } + lt_dlclose (module); + /* Use a magic string to avoid possible interactions with filesystem + * objects. Prepend '/' to short-circuit libltdl's search of + * $shlibpath_var (e.g. PATH, LD_LIBRARY_PATH, or similar). + */ + module = lt_dlopen ("/libltdl_dlloader_api_test_last"); -cat >main.c <<'_ATEOF' -#include -#include + if (!module) + { + printf ("lt_dlopen failed: %s\n", lt_dlerror ()); + err = 1; + goto cleanup; + } -int -main (int argc, char* argv[]) -{ - int err = 0; - lt_dlhandle plugin_handle; + symbol = (module_func *) lt_dlsym (module, "symbol"); - if (argc < 2) + if (!symbol) { - fprintf (stderr, "usage: %s plugin\n", argv[0]); - return 1; + printf ("lt_dlsym failed: %s\n", lt_dlerror ()); + err = 1; + goto cleanup; } - lt_dlinit (); - plugin_handle = lt_dlopenext (argv[1]); - if (NULL != plugin_handle) + printf ("result: %s\n", symbol ()); + + if (lt_dlopen ("no-module")) { - printf ("plugin opened successfully!\n"); - lt_dlclose (plugin_handle); + printf ("lt_dlopen unexpectedly opened \"no-module\"\n"); + err = 1; + goto cleanup; } - else + + if (lt_dlloader_remove ("first") != first) { - printf ("plugin failed to open: %s\n", lt_dlerror()); + printf ("vtable of first loader has changed\n"); err = 1; + goto cleanup; + } + + free (first); + +cleanup: + if (module) + { + lt_dlclose (module); } lt_dlexit (); return err; @@ -14344,513 +17125,613 @@ main (int argc, char* argv[]) _ATEOF -cat >good-plugin.c <<'_ATEOF' -int foo; -int *i = &foo; +cat >module.c <<'_ATEOF' + +#ifdef __cplusplus +extern "C" +#endif +const char *symbol (void); +const char * +symbol (void) +{ + return "module_symbol"; +} _ATEOF -cat >missing-symbol-plugin.c <<'_ATEOF' -/* On systems that allow undefined symbols, this will compile, - but the symbol "foo" won't be found at runtime */ -extern int foo; -int *i = &foo; +cat >expout <<'_ATEOF' +first_init: first_ctx +Found loader "first" +last_init: last_ctx +Found loader "last" +first_open ("/libltdl_dlloader_api_test_first"): first_ctx +first_sym (first): first_ctx +result: first_symbol +first_close (first): first_ctx +first_open denies a request +result: module_symbol +first_open denies a request +last_open ("/libltdl_dlloader_api_test_last"): last_ctx +last_sym (last): last_ctx +result: last_symbol +first_open denies a request +last_open denies a request +first_exit: first_ctx +last_close (last): last_ctx +last_exit: last_ctx _ATEOF +case $host_os in mingw*) + while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t + mv -f expout.t expout ;; +esac : ${LTDLINCL="-I$abs_top_srcdir/libltdl"} : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} -CPPFLAGS="$LTDLINCL $CPPFLAGS" -inst=`pwd`/inst -libdir=$inst/lib - +# Skip this test when called from: +# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install { set +x -$as_echo "$at_srcdir/lt_dlopen.at:85: \$CC \$CPPFLAGS \$CFLAGS -c main.c" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "lt_dlopen.at:85" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c +$as_echo "$at_srcdir/dlloader-api.at:417: case \$LIBLTDL in #( + */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; +esac" +at_fn_check_prepare_notrace 'an embedded newline' "dlloader-api.at:417" +( $at_check_trace; case $LIBLTDL in #( + */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; +esac ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:85" +at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:417" $at_failed && at_fn_log_failure $at_traceon; } -for file in good-plugin.c missing-symbol-plugin.c; do - { set +x -$as_echo "$at_srcdir/lt_dlopen.at:87: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c \$file" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file" "lt_dlopen.at:87" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:87" -$at_failed && at_fn_log_failure -$at_traceon; } -done +CPPFLAGS="$LTDLINCL $CPPFLAGS" + { set +x -$as_echo "$at_srcdir/lt_dlopen.at:90: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o good-plugin.la -rpath \$libdir -module -avoid-version good-plugin.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o good-plugin.la -rpath $libdir -module -avoid-version good-plugin.lo" "lt_dlopen.at:90" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o good-plugin.la -rpath $libdir -module -avoid-version good-plugin.lo +$as_echo "$at_srcdir/dlloader-api.at:423: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c module.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c" "dlloader-api.at:423" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:90" +at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:423" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/lt_dlopen.at:92: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o missing-symbol-plugin.la -rpath \$libdir -module -avoid-version missing-symbol-plugin.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o missing-symbol-plugin.la -rpath $libdir -module -avoid-version missing-symbol-plugin.lo" "lt_dlopen.at:92" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o missing-symbol-plugin.la -rpath $libdir -module -avoid-version missing-symbol-plugin.lo +$as_echo "$at_srcdir/dlloader-api.at:425: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o module.la -rpath /nowhere -module -avoid-version -no-undefined module.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la -rpath /nowhere -module -avoid-version -no-undefined module.lo" "dlloader-api.at:425" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la -rpath /nowhere -module -avoid-version -no-undefined module.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:92" +at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:425" $at_failed && at_fn_log_failure $at_traceon; } +. ./module.la { set +x -$as_echo "$at_srcdir/lt_dlopen.at:95: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlopen good-plugin.la -dlopen missing-symbol-plugin.la \$LIBLTDL" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen good-plugin.la -dlopen missing-symbol-plugin.la $LIBLTDL" "lt_dlopen.at:95" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen good-plugin.la -dlopen missing-symbol-plugin.la $LIBLTDL +$as_echo "$at_srcdir/dlloader-api.at:432: test -n \"\$dlname\" || (exit 77)" +at_fn_check_prepare_dynamic "test -n \"$dlname\" || (exit 77)" "dlloader-api.at:432" +( $at_check_trace; test -n "$dlname" || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:95" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:432" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/lt_dlopen.at:99: if \"\$lt_exe\" ./good-plugin.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ./good-plugin.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopen.at:99" -( $at_check_trace; if "$lt_exe" ./good-plugin.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/dlloader-api.at:434: \$CC \$CPPFLAGS \$CFLAGS -c main.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "dlloader-api.at:434" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:99" +at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:434" $at_failed && at_fn_log_failure $at_traceon; } - -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/lt_dlopen.at:100: if \"\$lt_exe\" ./missing-symbol-plugin.la; then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ./missing-symbol-plugin.la; then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopen.at:100" -( $at_check_trace; if "$lt_exe" ./missing-symbol-plugin.la; then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/dlloader-api.at:435: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlopen module.la \$LIBLTDL" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen module.la $LIBLTDL" "dlloader-api.at:435" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen module.la $LIBLTDL ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/lt_dlopen.at:100" +at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:435" $at_failed && at_fn_log_failure $at_traceon; } +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/lt_dlopen.at:101: grep 'missing symbol' stderr" -at_fn_check_prepare_trace "lt_dlopen.at:101" -( $at_check_trace; grep 'missing symbol' stderr +$as_echo "$at_srcdir/dlloader-api.at:439: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "dlloader-api.at:439" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen.at:101" +echo stderr:; cat "$at_stderr" +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:439" $at_failed && at_fn_log_failure $at_traceon; } + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_65 -#AT_START_66 -# 66. lt_dlopen_a.at:23: lt_dlopen archive -at_setup_line='lt_dlopen_a.at:23' -at_fn_banner 6 -at_desc="lt_dlopen archive" -at_desc_line=" 66: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_79 +#AT_START_80 +at_fn_group_banner 80 'loadlibrary.at:23' \ + "loadlibrary error messages" " " 7 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "66. lt_dlopen_a.at:23: testing ..." + $as_echo "80. $at_setup_line: testing $at_desc ..." $at_traceon +eval "`$LIBTOOL --config | $EGREP '^(objdir)='`" + cat >main.c <<'_ATEOF' #include #include -/* This dlopen() in the main executable should override any dlopen()s in - shared libraries etc. - - If that is not the case (or the platform does not use dlopen()) then this - test should exit 77, causing the test to SKIP. -*/ -static int retcde = 77; +static int +standard_error_message(const char *error) +{ + int error_number; -void * dlopen(const char *path, int mode) { - if (!(strcmp(path,"plugin.a") && strcmp(path,"plugin.lib"))) - { - fprintf(stderr,"Tried to open archive %s\n",path); - retcde = 1; - } - else + for (error_number = 0; error_number < LT_ERROR_MAX; ++error_number) { - fprintf(stderr,"Opening ... %s\n", path); - if (retcde == 77) retcde = 0; + lt_dlseterror (error_number); + if (error == lt_dlerror ()) + { + return 1; + } } - return NULL; + + lt_dlseterror (LT_ERROR_UNKNOWN); + return 0; } int main (int argc, char* argv[]) { int err = 0; - lt_dlhandle plugin_handle; + lt_dlhandle module = NULL; + const lt_dlvtable *loadlibrary; + const lt_dlvtable *preopen; + lt_dlloader loader = NULL; + lt_dlloader next; + const lt_dlvtable *vtable; + void *symbol; + const char *error; + + if (argc < 2) + { + fprintf (stderr, "usage: %s plugin [symbol]\n", argv[0]); + return 1; + } lt_dlinit (); - plugin_handle = lt_dlopenext (argv[1]); + + loadlibrary = lt_dlloader_find ("lt_loadlibrary"); + if (!loadlibrary) + { + /* Skip if the loadlibrary loader isn't supported */ + printf ("loadlibrary loader not found\n"); + err = 77; + goto cleanup; + } + + preopen = lt_dlloader_find ("lt_preopen"); + if (!loadlibrary) + { + printf ("preopen loader not found\n"); + err = 2; + goto cleanup; + } + + /* Remove all loaders except the preopen and loadlibrary loaders. */ + while (next = lt_dlloader_next (loader)) + { + if (lt_dlloader_get (next) == loadlibrary) + { + loader = next; + continue; + } + + if (lt_dlloader_get (next) == preopen) + { + loader = next; + continue; + } + + lt_dlloader_remove (lt_dlloader_get (next)->name); + } + + module = lt_dlopen (argv[1]); + error = lt_dlerror (); + + if (module) + { + printf ("lt_dlopen: success!\n"); + + if (argc == 2) + { + /* But failure was the desired result... */ + printf ("expected failure\n"); + err = 2; + goto cleanup; + } + } + else if (argc > 2) + { + /* Didn't expect failure... */ + printf ("lt_dlopen: failure: %s\n", error); + err = 2; + goto cleanup; + } + else if (standard_error_message (error)) + { + /* Expected custom error message... */ + printf ("lt_dlopen: standard error (bad): %s\n", error); + err = 1; + goto cleanup; + } + else + { + printf ("lt_dlopen: custom error (good): %s\n", error); + goto cleanup; + } + + symbol = lt_dlsym (module, argv[2]); + error = lt_dlerror (); + + if (symbol) + { + printf ("lt_dlsym: success!\n"); + } + else if (standard_error_message (error)) + { + /* Expected custom failure message... */ + printf ("lt_dlsym: standard error (bad): %s\n", error); + err = 1; + } + else + { + printf ("lt_dlsym: custom error (good): %s\n", error); + } + +cleanup: + if (module) + { + lt_dlclose (module); + } lt_dlexit (); - return retcde; + return err; } _ATEOF -cat >plugin.c <<'_ATEOF' +cat >foomod.c <<'_ATEOF' -int i = 1; +#ifdef __cplusplus +extern "C" +#endif +int foosym (void); +int +foosym (void) +{ + return 0; +} +_ATEOF + + +cat >bardep.c <<'_ATEOF' + +#ifdef __cplusplus +extern "C" +#endif +int bardep (void); +int +bardep (void) +{ + return 0; +} +_ATEOF + + +cat >barmod.c <<'_ATEOF' + +#ifdef __cplusplus +extern "C" { +#endif +int bardep (void); +int barsym (void); +#ifdef __cplusplus +} +#endif +int +barsym (void) +{ + return bardep (); +} _ATEOF : ${LTDLINCL="-I$abs_top_srcdir/libltdl"} : ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} +# Skip this test when called from: +# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install +{ set +x +$as_echo "$at_srcdir/loadlibrary.at:217: case \$LIBLTDL in #( + */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; +esac" +at_fn_check_prepare_notrace 'an embedded newline' "loadlibrary.at:217" +( $at_check_trace; case $LIBLTDL in #( + */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; +esac +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:217" +$at_failed && at_fn_log_failure +$at_traceon; } + + CPPFLAGS="$LTDLINCL $CPPFLAGS" inst=`pwd`/inst libdir=$inst/lib -bindir=$inst/bin { set +x -$as_echo "$at_srcdir/lt_dlopen_a.at:78: \$CC \$CPPFLAGS \$CFLAGS -c main.c || exit 77" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c || exit 77" "lt_dlopen_a.at:78" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c || exit 77 +$as_echo "$at_srcdir/loadlibrary.at:225: \$CC \$CPPFLAGS \$CFLAGS -c main.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "loadlibrary.at:225" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:225" +$at_failed && at_fn_log_failure +$at_traceon; } + +for file in foomod.c bardep.c barmod.c; do + { set +x +$as_echo "$at_srcdir/loadlibrary.at:227: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c \$file" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file" "loadlibrary.at:227" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:227" +$at_failed && at_fn_log_failure +$at_traceon; } + +done +{ set +x +$as_echo "$at_srcdir/loadlibrary.at:230: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o foomod.la -rpath \$libdir -module -avoid-version -no-undefined foomod.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o foomod.la -rpath $libdir -module -avoid-version -no-undefined foomod.lo" "loadlibrary.at:230" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o foomod.la -rpath $libdir -module -avoid-version -no-undefined foomod.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:78" +at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:230" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/lt_dlopen_a.at:79: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c plugin.c || exit 77" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c || exit 77" "lt_dlopen_a.at:79" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c || exit 77 +$as_echo "$at_srcdir/loadlibrary.at:234: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbardep.la -rpath \$libdir -avoid-version -no-undefined bardep.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbardep.la -rpath $libdir -avoid-version -no-undefined bardep.lo" "loadlibrary.at:234" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbardep.la -rpath $libdir -avoid-version -no-undefined bardep.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:79" +at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:234" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/lt_dlopen_a.at:81: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o plugin.la -rpath \$libdir -module -no-undefined -avoid-version plugin.lo || exit 77" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir -module -no-undefined -avoid-version plugin.lo || exit 77" "lt_dlopen_a.at:81" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir -module -no-undefined -avoid-version plugin.lo || exit 77 +$as_echo "$at_srcdir/loadlibrary.at:238: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o barmod.la -rpath \$libdir -module -avoid-version -no-undefined barmod.lo ./libbardep.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o barmod.la -rpath $libdir -module -avoid-version -no-undefined barmod.lo ./libbardep.la" "loadlibrary.at:238" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o barmod.la -rpath $libdir -module -avoid-version -no-undefined barmod.lo ./libbardep.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:81" +at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:238" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/lt_dlopen_a.at:85: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlopen plugin.la \$LIBLTDL || exit 77" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen plugin.la $LIBLTDL || exit 77" "lt_dlopen_a.at:85" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen plugin.la $LIBLTDL || exit 77 +$as_echo "$at_srcdir/loadlibrary.at:243: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT \$LIBLTDL" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $LIBLTDL" "loadlibrary.at:243" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $LIBLTDL ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:85" +at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:243" $at_failed && at_fn_log_failure $at_traceon; } -mkdir -p $libdir -mkdir -p $bindir - +. ./foomod.la { set +x -$as_echo "$at_srcdir/lt_dlopen_a.at:92: \$LIBTOOL --mode=install cp plugin.la \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp plugin.la $libdir" "lt_dlopen_a.at:92" -( $at_check_trace; $LIBTOOL --mode=install cp plugin.la $libdir +$as_echo "$at_srcdir/loadlibrary.at:248: test -n \"\$dlname\" || (exit 77)" +at_fn_check_prepare_dynamic "test -n \"$dlname\" || (exit 77)" "loadlibrary.at:248" +( $at_check_trace; test -n "$dlname" || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:92" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:248" $at_failed && at_fn_log_failure $at_traceon; } + +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/lt_dlopen_a.at:93: \$LIBTOOL --mode=install cp main\$EXEEXT \$bindir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp main$EXEEXT $bindir" "lt_dlopen_a.at:93" -( $at_check_trace; $LIBTOOL --mode=install cp main$EXEEXT $bindir +$as_echo "$at_srcdir/loadlibrary.at:250: if \"\$lt_exe\" ./foomod.la no_symbol; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ./foomod.la no_symbol; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "loadlibrary.at:250" +( $at_check_trace; if "$lt_exe" ./foomod.la no_symbol; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:93" +at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:250" $at_failed && at_fn_log_failure $at_traceon; } + + +# chmod -x doesn't appear to work in MSYS, and Wine can load no-exec dlls. + +rm -f $objdir/$dlname +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/lt_dlopen_a.at:94: test -f \$libdir/plugin.a || exit 77" -at_fn_check_prepare_dynamic "test -f $libdir/plugin.a || exit 77" "lt_dlopen_a.at:94" -( $at_check_trace; test -f $libdir/plugin.a || exit 77 +$as_echo "$at_srcdir/loadlibrary.at:257: if \"\$lt_exe\" ./foomod.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ./foomod.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "loadlibrary.at:257" +( $at_check_trace; if "$lt_exe" ./foomod.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:94" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:257" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=$bindir/main; if test -f "$bindir/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi + + +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/lt_dlopen_a.at:95: if \"\$lt_exe\" \$libdir/plugin.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" $libdir/plugin.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopen_a.at:95" -( $at_check_trace; if "$lt_exe" $libdir/plugin.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/loadlibrary.at:259: if \"\$lt_exe\" ./barmod.la no_symbol; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ./barmod.la no_symbol; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "loadlibrary.at:259" +( $at_check_trace; if "$lt_exe" ./barmod.la no_symbol; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopen_a.at:95" +at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:259" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_66 -#AT_START_67 -# 67. lt_dlopenext.at:23: lt_dlopenext error messages -at_setup_line='lt_dlopenext.at:23' -at_fn_banner 6 -at_desc="lt_dlopenext error messages" -at_desc_line=" 67: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "67. lt_dlopenext.at:23: testing ..." - $at_traceon - - +. ./libbardep.la +# chmod -x doesn't appear to work in MSYS, and Wine can load no-exec dlls. -# This test requires shared library support. +rm -f $objdir/$dlname +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/lt_dlopenext.at:27: \$LIBTOOL --features | grep 'enable shared libraries' || exit 77" -at_fn_check_prepare_dynamic "$LIBTOOL --features | grep 'enable shared libraries' || exit 77" "lt_dlopenext.at:27" -( $at_check_trace; $LIBTOOL --features | grep 'enable shared libraries' || exit 77 +$as_echo "$at_srcdir/loadlibrary.at:267: if \"\$lt_exe\" ./barmod.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ./barmod.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "loadlibrary.at:267" +( $at_check_trace; if "$lt_exe" ./barmod.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:27" +at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:267" $at_failed && at_fn_log_failure $at_traceon; } -prefix=`pwd`/inst -libdir=$prefix/lib -bindir=$prefix/bin -mkdir $prefix $libdir $bindir - -# This code is copied from the Autobook: -# -# so if it needs changes, be sure to notify the Autobook authors -# about them. - -cat >simple-module.c <<'_ATEOF' - -#include -#ifdef __cplusplus -extern "C" -#endif -int -run (const char *argument) -{ - printf ("Hello, %s!\n", argument); - return 0; -} -_ATEOF + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_80 +#AT_START_81 +at_fn_group_banner 81 'lalib-syntax.at:24' \ + "syntax of .la files" " " 7 +at_xfail=yes +( + $as_echo "81. $at_setup_line: testing $at_desc ..." + $at_traceon -cat >ltdl-loader.c <<'_ATEOF' -#include -#include -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -# define EXIT_SUCCESS 0 -#endif -#include -#ifndef PATH_MAX -# define PATH_MAX 255 -#endif -#include +cat >main.c <<'_ATEOF' #include - -#ifndef MODULE_PATH_ENV -# define MODULE_PATH_ENV "MODULE_PATH" -#endif - -typedef int entrypoint (const char *argument); - -/* Save and return a copy of the dlerror() error message, - since the next API call may overwrite the original. */ -static char *dlerrordup (char *errormsg); +#include +#include int -main (int argc, const char *argv[]) +main (int argc, char* argv[]) { - char *errormsg = NULL; - lt_dlhandle module = NULL; - entrypoint *run = NULL; - int errors = 0; - - if (argc != 3) - { - fprintf (stderr, "USAGE: main MODULENAME ARGUMENT\n"); - exit (EXIT_FAILURE); - } - - /* Initialise libltdl. */ - errors = lt_dlinit (); + int err = 0; + lt_dlhandle plugin_handle; - /* Set the module search path. */ - if (!errors) + if (argc < 2) { - const char *path = getenv (MODULE_PATH_ENV); - - if (path != NULL) - errors = lt_dlsetsearchpath (path); + fprintf (stderr, "usage: %s plugin\n", argv[0]); + return 1; } - /* Load the module. */ - if (!errors) - module = lt_dlopenext (argv[1]); - - /* Find the entry point. */ - if (module) + lt_dlinit (); + plugin_handle = lt_dlopenext (argv[1]); + if (NULL != plugin_handle) { - run = (entrypoint *) lt_dlsym (module, "run"); - - /* In principle, run might legitimately be NULL, so - I don't use run == NULL as an error indicator - in general. */ - errormsg = dlerrordup (errormsg); - if (errormsg != NULL) - { - errors = lt_dlclose (module); - module = NULL; - } + printf ("plugin opened successfully!\n"); + lt_dlclose (plugin_handle); } else - errors = 1; - - /* Call the entry point function. */ - if (!errors) - { - int result = (*run) (argv[2]); - if (result < 0) - errormsg = strdup ("module entry point execution failed"); - else - printf ("\t=> %d\n", result); - } - - /* Unload the module, now that we are done with it. */ - if (!errors) - errors = lt_dlclose (module); - - if (errors) - { - /* Diagnose the encountered error. */ - errormsg = dlerrordup (errormsg); - - if (!errormsg) - { - fprintf (stderr, "%s: dlerror() failed.\n", argv[0]); - return EXIT_FAILURE; - } - } - - /* Finished with ltdl now. */ - if (!errors) - if (lt_dlexit () != 0) - errormsg = dlerrordup (errormsg); - - if (errormsg) { - fprintf (stderr, "%s: %s.\n", argv[0], errormsg); - free (errormsg); - exit (EXIT_FAILURE); + const char *error = lt_dlerror (); + assert (error != NULL); + printf ("plugin failed to open: %s\n", error); + err = 1; } - - return EXIT_SUCCESS; + lt_dlexit (); + return err; } +_ATEOF -/* Be careful to save a copy of the error message, - since the next API call may overwrite the original. */ -static char * -dlerrordup (char *errormsg) -{ - char *error = (char *) lt_dlerror (); - if (error && !errormsg) - errormsg = strdup (error); - return errormsg; -} + +cat >module.c <<'_ATEOF' +int foo (void) { return 0; } _ATEOF @@ -14860,10 +17741,10 @@ _ATEOF # Skip this test when called from: # make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install { set +x -$as_echo "$at_srcdir/lt_dlopenext.at:188: case \$LIBLTDL in #( +$as_echo "$at_srcdir/lalib-syntax.at:75: case \$LIBLTDL in #( */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; esac" -at_fn_check_prepare_notrace 'an embedded newline' "lt_dlopenext.at:188" +at_fn_check_prepare_notrace 'an embedded newline' "lalib-syntax.at:75" ( $at_check_trace; case $LIBLTDL in #( */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; esac @@ -14872,280 +17753,579 @@ at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:188" +at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:75" $at_failed && at_fn_log_failure $at_traceon; } -CPPFLAGS="$LTDLINCL $CPPFLAGS" -LDFLAGS="$LDFLAGS -no-undefined" +CPPFLAGS="$CPPFLAGS $LTDLINCL" { set +x -$as_echo "$at_srcdir/lt_dlopenext.at:195: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c simple-module.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c simple-module.c" "lt_dlopenext.at:195" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c simple-module.c +$as_echo "$at_srcdir/lalib-syntax.at:81: \$CC \$CPPFLAGS \$CFLAGS -c main.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "lalib-syntax.at:81" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:195" +at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:81" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/lt_dlopenext.at:197: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o simple-module.la simple-module.lo -rpath \$libdir -module -avoid-version" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o simple-module.la simple-module.lo -rpath $libdir -module -avoid-version" "lt_dlopenext.at:197" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o simple-module.la simple-module.lo -rpath $libdir -module -avoid-version +$as_echo "$at_srcdir/lalib-syntax.at:82: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c module.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c" "lalib-syntax.at:82" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:197" +at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:82" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/lt_dlopenext.at:200: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c ltdl-loader.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c ltdl-loader.c" "lt_dlopenext.at:200" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c ltdl-loader.c +$as_echo "$at_srcdir/lalib-syntax.at:84: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o module.la module.lo -module -avoid-version -rpath /somewhere" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la module.lo -module -avoid-version -rpath /somewhere" "lalib-syntax.at:84" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la module.lo -module -avoid-version -rpath /somewhere ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:200" +at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:84" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/lt_dlopenext.at:202: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o ltdl-loader\$EXEEXT ltdl-loader.\$OBJEXT -dlopen self \$LIBLTDL" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o ltdl-loader$EXEEXT ltdl-loader.$OBJEXT -dlopen self $LIBLTDL" "lt_dlopenext.at:202" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o ltdl-loader$EXEEXT ltdl-loader.$OBJEXT -dlopen self $LIBLTDL +$as_echo "$at_srcdir/lalib-syntax.at:86: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT \$LIBLTDL" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT $LIBLTDL" "lalib-syntax.at:86" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT $LIBLTDL ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:202" +at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:86" $at_failed && at_fn_log_failure $at_traceon; } + + +# Several bogus test cases. + +cat >missing-closing-quote.la <<'_ATEOF' +# missing-closing-quote.la - a libtool library file +# Generated by libtool +dlname='module.so +library_names='module.so module.so module.so' +old_library='module.a' +installed=no +shouldnotlink=yes +libdir='/somewhere' +_ATEOF + + +cat >wrong-quotes.la <<'_ATEOF' +# wrong-quotes.la - a libtool library file +# Generated by libtool +dlname="module.so" +library_names='module.so module.so module.so' +old_library='module.a' +installed=no +shouldnotlink=yes +libdir='/somewhere' +_ATEOF + + +cat >no-dlname.la <<'_ATEOF' +# no-dlname.la - a libtool library file +# Generated by libtool +installed=no +shouldnotlink=yes +libdir='/somewhere' +_ATEOF + + +cat >nonexistent-dlname.la <<'_ATEOF' +# nonexistent-dlname.la - a libtool library file +# Generated by libtool +dlname='does-not-exist.so' +installed=no +shouldnotlink=yes +libdir='/somewhere' +_ATEOF + + +for file in ./missing-closing-quote.la ./wrong-quotes.la \ + ./no-dlname.la ./nonexistent-dlname.la; do + lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/lt_dlopenext.at:205: \$LIBTOOL --mode=install cp simple-module.la \$libdir/simple-module.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp simple-module.la $libdir/simple-module.la" "lt_dlopenext.at:205" -( $at_check_trace; $LIBTOOL --mode=install cp simple-module.la $libdir/simple-module.la +$as_echo "$at_srcdir/lalib-syntax.at:133: if \"\$lt_exe\" \$file; then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" $file; then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lalib-syntax.at:133" +( $at_check_trace; if "$lt_exe" $file; then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:205" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 1 $at_status "$at_srcdir/lalib-syntax.at:133" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/lt_dlopenext.at:206: \$LIBTOOL --mode=clean rm -f simple-module.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f simple-module.la" "lt_dlopenext.at:206" -( $at_check_trace; $LIBTOOL --mode=clean rm -f simple-module.la + + { set +x +$as_echo "$at_srcdir/lalib-syntax.at:134: grep 'plugin failed to open' stdout" +at_fn_check_prepare_trace "lalib-syntax.at:134" +( $at_check_trace; grep 'plugin failed to open' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:206" +at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:134" $at_failed && at_fn_log_failure $at_traceon; } +done -# Try finding the module with and without the .la file, with absolute -# path, relative path, or one of the path variables. Do not override -# $PATH for w32, see shlibpath.at for the hacks this requires. -# -# Finding the module without the .la file will not work if MODULE_EXT -# aka. shared_ext is empty. + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_81 +#AT_START_82 +at_fn_group_banner 82 'resident.at:27' \ + "resident modules" " " 7 +at_xfail=no +( + $as_echo "82. $at_setup_line: testing $at_desc ..." + $at_traceon -eval `$LIBTOOL --config | $EGREP '^(shlibpath_var|shrext_cmds)='` -module=no -eval shared_ext=\"$shrext_cmds\" -if test -n "$shared_ext"; then - have_lafile="with without" -else - have="with" -fi -if test "$shlibpath_var" = PATH; then - $unset shlibpath_var || shlibpath_var= -fi +cat >main.c <<'_ATEOF' +#include +#include -for lafile in $have_lafile; do - if test $lafile = without; then - rm $libdir/simple-module.la - fi +int +main (int argc, char* argv[]) +{ + int err = 0; + lt_dlhandle plugin_handle; + lt_dladvise advise; + + LTDL_SET_PRELOADED_SYMBOLS(); + + if (argc < 2) + { + fprintf (stderr, "usage: %s plugin\n", argv[0]); + return 1; + } + + lt_dlinit (); + if (lt_dladvise_init (&advise) != 0 + || lt_dladvise_ext (&advise) != 0 + || lt_dladvise_resident (&advise) != 0) + { + printf ("advise failure: %s\n", lt_dlerror ()); + err = 1; + } + else + { + plugin_handle = lt_dlopenadvise (argv[1], advise); + if (NULL != plugin_handle) + { + int (*pf) (void); + printf ("plugin opened successfully!\n"); + pf = (int (*) (void)) lt_dlsym (plugin_handle, "setup_plugin"); + if (pf) + pf (); + else + { + printf ("dlsym failure: %s\n", lt_dlerror ()); + err = 1; + } + if (!lt_dlisresident (plugin_handle)) + { + printf ("module wrongly not marked resident\n"); + err = 1; + } + if (lt_dlclose (plugin_handle) != 0) + { + printf ("close failure (expected): %s\n", lt_dlerror ()); + } + else + { + printf ("wrongly closed resident module\n"); + err = 1; + } + } + else + { + printf ("plugin failed to open: %s\n", lt_dlerror ()); + err = 1; + } + if (lt_dladvise_destroy (&advise) != 0) + { + printf ("advise destroy failure: %s\n", lt_dlerror ()); + err = 1; + } + } + lt_dlexit (); + return err; +} +_ATEOF + + +cat >plugin.c <<'_ATEOF' +#include +#include + +void +bye (void) +{ + puts ("called from atexit handler"); +} + +#ifdef __cplusplus +extern "C" +#endif +int +setup_plugin (void) +{ + atexit (bye); +} +_ATEOF + + +: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} +: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} + +# Skip this test when called from: +# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install +{ set +x +$as_echo "$at_srcdir/resident.at:128: case \$LIBLTDL in #( + */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; +esac" +at_fn_check_prepare_notrace 'an embedded newline' "resident.at:128" +( $at_check_trace; case $LIBLTDL in #( + */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; +esac +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/resident.at:128" +$at_failed && at_fn_log_failure +$at_traceon; } + + +CPPFLAGS="$LTDLINCL $CPPFLAGS" +LDFLAGS="$LDFLAGS -no-undefined" +inst=`pwd`/inst +libdir=$inst/lib - for dir in inst/lib "$libdir"; do - lt_exe=./ltdl-loader; if test -f "./ltdl-loader$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/lt_dlopenext.at:235: if \"\$lt_exe\" \$dir/simple-module World; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" $dir/simple-module World; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopenext.at:235" -( $at_check_trace; if "$lt_exe" $dir/simple-module World; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/resident.at:137: \$CC \$CPPFLAGS \$CFLAGS -c main.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "resident.at:137" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:235" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/resident.at:137" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/resident.at:138: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c plugin.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c" "resident.at:138" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/resident.at:138" +$at_failed && at_fn_log_failure +$at_traceon; } - { set +x -$as_echo "$at_srcdir/lt_dlopenext.at:237: grep \"Hello, World\" stdout" -at_fn_check_prepare_trace "lt_dlopenext.at:237" -( $at_check_trace; grep "Hello, World" stdout +{ set +x +$as_echo "$at_srcdir/resident.at:140: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o plugin.la -rpath \$libdir -module -avoid-version plugin.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir -module -avoid-version plugin.lo" "resident.at:140" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir -module -avoid-version plugin.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:237" +at_fn_check_status 0 $at_status "$at_srcdir/resident.at:140" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/resident.at:142: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlopen plugin.la \$LIBLTDL" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen plugin.la $LIBLTDL" "resident.at:142" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen plugin.la $LIBLTDL +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/resident.at:142" +$at_failed && at_fn_log_failure +$at_traceon; } - for var in MODULE_PATH LTDL_LIBRARY_PATH $shlibpath_var - do - eval $var=\$dir - export $var - lt_exe=./ltdl-loader; if test -f "./ltdl-loader$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/lt_dlopenext.at:243: if \"\$lt_exe\" simple-module World; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" simple-module World; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lt_dlopenext.at:243" -( $at_check_trace; if "$lt_exe" simple-module World; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/resident.at:145: if \"\$lt_exe\" ./plugin.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ./plugin.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "resident.at:145" +( $at_check_trace; if "$lt_exe" ./plugin.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:243" +at_fn_check_status 0 $at_status "$at_srcdir/resident.at:145" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/lt_dlopenext.at:245: grep \"Hello, World\" stdout" -at_fn_check_prepare_trace "lt_dlopenext.at:245" -( $at_check_trace; grep "Hello, World" stdout +{ set +x +$as_echo "$at_srcdir/resident.at:146: grep 'called from atexit handler' stdout" +at_fn_check_prepare_trace "resident.at:146" +( $at_check_trace; grep 'called from atexit handler' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lt_dlopenext.at:245" +at_fn_check_status 0 $at_status "$at_srcdir/resident.at:146" $at_failed && at_fn_log_failure $at_traceon; } - $unset $var || eval $var= - done - done -done set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_67 -#AT_START_68 -# 68. ltdl-api.at:25: ltdl API -at_setup_line='ltdl-api.at:25' -at_fn_banner 6 -at_desc="ltdl API" -at_desc_line=" 68: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_82 +#AT_START_83 +at_fn_group_banner 83 'slist.at:24' \ + "SList functionality" " " 7 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "68. ltdl-api.at:25: testing ..." + $as_echo "83. $at_setup_line: testing $at_desc ..." $at_traceon +cat >test-slist.c <<'_ATEOF' -# Ensure that no symbols from argz are unrenamed. -eval `$LIBTOOL --config | $EGREP '^(NM|global_symbol_pipe|objext)='` -argz_o=$abs_top_builddir/libltdl/argz.$objext +#include +#include +#include +#include +#include +#include "slist.h" + +void *find_string (SList *item, void *data) +{ + if (data != NULL && !strcmp ((const char *) item->userdata, (const char *)data)) + return item; + else + return NULL; +} + +void boxed_delete (void *item) +{ + free (slist_unbox ((SList *) item)); +} + +void *print_item (SList *item, void *userdata) +{ + userdata = userdata; /* unused */ + printf ("%s\n", (const char*)item->userdata); + return NULL; +} + +int list_compare (const SList *item1, const SList *item2, void *userdata) +{ + userdata = userdata; + return strcmp ((const char *) item1->userdata, (const char *)item2->userdata); +} + +int main () +{ + int i; + SList *empty_list = NULL, *list = NULL, *item, *list_save; + char *data = NULL; + + /* slist_cons */ + list = slist_cons (NULL, NULL); + + for (i=0; i < 10; ++i) { + data = (char *) malloc (42); + assert (data); + sprintf (data, "foo%d", i); + list = slist_cons (slist_box (data), list); + } + list_save = list; + list = slist_cons (NULL, list); + assert (list == list_save); + + + /* slist_find */ + assert (slist_find (NULL, find_string, (void *) "whatever") == NULL); + assert (slist_find (empty_list, find_string, (void *) "whatever") == NULL); + assert (slist_find (list, find_string, (void *) "foo10") == NULL); + item = (SList *) slist_find (list, find_string, (void *) "foo1"); + assert (item != NULL); + assert (!strcmp ((const char *) item->userdata, "foo1")); + + item = slist_nth (list, 10); + assert (item != NULL && !strcmp ((const char *) item->userdata, "foo0")); + + puts ("list as inserted:"); + slist_foreach (list, print_item, NULL); + puts ("reversed list:"); + list = slist_reverse (list); + slist_foreach (list, print_item, NULL); + + item = slist_nth (list, 1); + assert (item != NULL && !strcmp ((const char *) item->userdata, "foo0")); + + assert (10 == slist_length (list)); + + /* slist_tail is the second item, not the last one */ + item = slist_tail (list); + assert (item != NULL && !strcmp ((const char *) item->userdata, "foo1")); + + assert (slist_tail (slist_nth (list, 10)) == NULL); + + /* slist_sort and implicitly, slist_sort_merge */ + assert (slist_sort (NULL, list_compare, NULL) == NULL); + list = slist_sort (list, list_compare, NULL); + puts ("list after no-op sort:"); + slist_foreach (list, print_item, NULL); + + list = slist_reverse (list); + puts ("reversed list:"); + slist_foreach (list, print_item, NULL); + puts ("sorting reversed list:"); + list = slist_sort (list, list_compare, NULL); + slist_foreach (list, print_item, NULL); + + /* slist_remove */ + assert (slist_remove (NULL, find_string, NULL) == NULL); + assert (slist_remove (&empty_list, find_string, NULL) == NULL); + + list_save = list; + assert (slist_remove (&list, find_string, NULL) == NULL); + assert (list_save == list); + + /* remove entries: middle, last, first, not present */ + /* slist_reverse above has left us with increasing order */ + list_save = list; + item = slist_remove (&list, find_string, (void *) "foo5"); + assert (list_save == list); + assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), "foo5")); + free (data); + + list_save = list; + item = slist_remove (&list, find_string, (void *) "foo9"); + assert (list_save == list); + assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), "foo9")); + free (data); + + list_save = list; + item = slist_remove (&list, find_string, (void *) "foo0"); + assert (list_save != list); + assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), "foo0")); + free (data); + + list_save = list; + item = slist_remove (&list, find_string, (void *) "foo5"); + assert (list_save == list); + assert (item == NULL); + + assert (slist_delete (list, boxed_delete) == NULL); + return 0; +} +_ATEOF + + +CPPFLAGS="-I$top_srcdir/libltdl -I$top_srcdir/libltdl/libltdl -I$abs_top_builddir" { set +x -$as_echo "$at_srcdir/ltdl-api.at:31: test -f \"\$argz_o\" || exit 77" -at_fn_check_prepare_dynamic "test -f \"$argz_o\" || exit 77" "ltdl-api.at:31" -( $at_check_trace; test -f "$argz_o" || exit 77 +$as_echo "$at_srcdir/slist.at:160: \$CC \$CPPFLAGS \$CFLAGS -c test-slist.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c test-slist.c" "slist.at:160" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c test-slist.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/ltdl-api.at:31" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/slist.at:160" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/ltdl-api.at:32: eval \"\$NM \\\"\\\$argz_o\\\" | \$global_symbol_pipe\"" -at_fn_check_prepare_dynamic "eval \"$NM \\\"\\$argz_o\\\" | $global_symbol_pipe\"" "ltdl-api.at:32" -( $at_check_trace; eval "$NM \"\$argz_o\" | $global_symbol_pipe" +$as_echo "$at_srcdir/slist.at:162: \$CC \$CPPFLAGS \$CFLAGS -c \$top_srcdir/libltdl/slist.c" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c $top_srcdir/libltdl/slist.c" "slist.at:162" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c $top_srcdir/libltdl/slist.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/ltdl-api.at:32" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/slist.at:162" $at_failed && at_fn_log_failure $at_traceon; } -# Check for global symbols beginning with "argz_" { set +x -$as_echo "$at_srcdir/ltdl-api.at:35: grep \"^T argz_\" stdout" -at_fn_check_prepare_trace "ltdl-api.at:35" -( $at_check_trace; grep "^T argz_" stdout +$as_echo "$at_srcdir/slist.at:164: \$CC \$CFLAGS \$LDFLAGS -o test-slist test-slist.\$OBJEXT slist.\$OBJEXT" +at_fn_check_prepare_dynamic "$CC $CFLAGS $LDFLAGS -o test-slist test-slist.$OBJEXT slist.$OBJEXT" "slist.at:164" +( $at_check_trace; $CC $CFLAGS $LDFLAGS -o test-slist test-slist.$OBJEXT slist.$OBJEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/ltdl-api.at:35" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/slist.at:164" $at_failed && at_fn_log_failure $at_traceon; } -# and also for the _ prefixed version "_argz_" +lt_exe=./test-slist; if test -f "./test-slist$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/ltdl-api.at:37: grep \"^T _argz_\" stdout" -at_fn_check_prepare_trace "ltdl-api.at:37" -( $at_check_trace; grep "^T _argz_" stdout +$as_echo "$at_srcdir/slist.at:166: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "slist.at:166" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/ltdl-api.at:37" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/slist.at:166" $at_failed && at_fn_log_failure $at_traceon; } + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_68 -#AT_START_69 -# 69. dlloader-api.at:23: dlloader API -at_setup_line='dlloader-api.at:23' -at_fn_banner 6 -at_desc="dlloader API" -at_desc_line=" 69: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_83 +#AT_START_84 +at_fn_group_banner 84 'need_lib_prefix.at:25' \ + "enforced lib prefix" " " 7 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "69. dlloader-api.at:23: testing ..." + $as_echo "84. $at_setup_line: testing $at_desc ..." $at_traceon @@ -15153,484 +18333,653 @@ echo "# -*- cat >main.c <<'_ATEOF' #include #include -#include -#include -static int -first_init (lt_user_data data) -{ - const char *ctx = (const char *) data; +typedef int fun (int); - printf ("first_init: %s\n", ctx); +static int errors = 0; - return 0; +static void +complain (const char *msg) +{ + const char *errmsg = lt_dlerror (); + fprintf (stderr, "%s", msg); + if (errmsg) + fprintf (stderr, ": %s\n", errmsg); + else + fprintf (stderr, ".\n"); + ++errors; } -static lt_module -first_open (lt_user_data data, const char *filename, lt_dladvise advise) +static lt_dlhandle +moduleopen (const char *filename) { - static const char *first_module = "first"; - const char *ctx = (const char *) data; + lt_dlhandle handle; - if (!filename || strcmp (filename, "first")) + handle = lt_dlopen (filename); + if (!handle) { - printf ("first_open denies a request\n"); - lt_dlseterror (LT_ERROR_FILE_NOT_FOUND); - return NULL; + fprintf (stderr, "can't open the module %s!\n", filename); + complain ("error was"); } - printf ("first_open (\"%s\"): %s\n", filename, ctx); - - return (lt_module) first_module; -} - -static const char * -first_symbol (void) -{ - return "first_symbol"; -} - -static void * -first_sym (lt_user_data data, lt_module module, const char *symbolname) -{ - const char *ctx = (const char *) data; - const char *filename = (const char *) module; - - printf ("first_sym (%s): %s\n", filename, ctx); - - return (void *) first_symbol; + return handle; } static int -first_close (lt_user_data data, lt_module module) +moduletest (lt_dlhandle handle) { - const char *ctx = (const char *) data; - const char *filename = (const char *) module; + const lt_dlinfo *info = lt_dlgetinfo (handle); + fun *f = (fun *) lt_dlsym (handle, "f"); + int *v = (int *) lt_dlsym (handle, "i"); - printf ("first_close (%s): %s\n", filename, ctx); + if (!f) + { + complain ("function `f' not found"); + return 1; + } + if (!v) + { + complain ("variable `i' not found"); + return 1; + } + printf ("%s: %d\n", info->name, f (*v)); return 0; } -static int -first_exit (lt_user_data data) +int +main (int argc, char **argv) { - const char *ctx = (const char *) data; + lt_dlhandle handle; - printf ("first_exit: %s\n", ctx); + LTDL_SET_PRELOADED_SYMBOLS(); - return 0; -} + if (lt_dlinit() != 0) + { + fprintf (stderr, "error during initialization: %s\n", lt_dlerror()); + return 1; + } -static int -last_init (lt_user_data data) -{ - const char *ctx = (const char *) data; + if (lt_dlpreload_open (0, moduletest) != 0) + complain ("error during preloading"); - printf ("last_init: %s\n", ctx); + if (lt_dlexit () != 0) + complain ("error during exit"); - return 0; + return (errors != 0); } +_ATEOF -static lt_module -last_open (lt_user_data data, const char *filename, lt_dladvise advise) -{ - static const char *last_module = "last"; - const char *ctx = (const char *) data; - - if (!filename || strcmp (filename, "last")) - { - printf ("last_open denies a request\n"); - lt_dlseterror (LT_ERROR_FILE_NOT_FOUND); - return NULL; - } - - printf ("last_open (\"%s\"): %s\n", filename, ctx); - return (lt_module) last_module; +cat >foo1.c <<'_ATEOF' +#define f foo1_LTX_f +#define i foo1_LTX_i +#ifdef __cplusplus +extern "C" { +#endif +int f (int x) { return x / 3; } +int i = 7; +#ifdef __cplusplus } +#endif +_ATEOF -static const char * -last_symbol (void) -{ - return "last_symbol"; + +cat >foo2.c <<'_ATEOF' +#define f libfoo2_LTX_f +#define i libfoo2_LTX_i +#ifdef __cplusplus +extern "C" { +#endif +int f (int x) { return (x * x) / 10; } +int i = 6; +#ifdef __cplusplus } +#endif +_ATEOF -static void * -last_sym (lt_user_data data, lt_module module, const char *symbolname) -{ - const char *ctx = (const char *) data; - const char *filename = (const char *) module; - printf ("last_sym (%s): %s\n", filename, ctx); +cat >expout <<'_ATEOF' +libfoo1: 2 +libfoo2: 3 +_ATEOF - return (void *) last_symbol; -} +case $host_os in mingw*) + while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t + mv -f expout.t expout ;; +esac -static int -last_close (lt_user_data data, lt_module module) -{ - const char *ctx = (const char *) data; - const char *filename = (const char *) module; +: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} +: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} - printf ("last_close (%s): %s\n", filename, ctx); +# Skip this test when called from: +# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install +{ set +x +$as_echo "$at_srcdir/need_lib_prefix.at:144: case \$LIBLTDL in #( + */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; +esac" +at_fn_check_prepare_notrace 'an embedded newline' "need_lib_prefix.at:144" +( $at_check_trace; case $LIBLTDL in #( + */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; +esac +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:144" +$at_failed && at_fn_log_failure +$at_traceon; } - return 0; -} -static int -last_exit (lt_user_data data) -{ - const char *ctx = (const char *) data; +CPPFLAGS="$LTDLINCL $CPPFLAGS" +LDFLAGS="$LDFLAGS" - printf ("last_exit: %s\n", ctx); +# Create our own libtool, forcing need_lib_prefix setting +sed 's,^\(need_lib_prefix\)=.*$,\1=unknown,' $LIBTOOL > ./libtool +LIBTOOL="$SHELL ./libtool" - return 0; -} +# Installation directory: +instdir=`pwd`/_inst -typedef const char *module_func (void); +$CC $CPPFLAGS $CFLAGS -c main.c +for file in foo1 foo2; do + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c +done -int -main (int argc, char* argv[]) -{ - int err = 0; - lt_dlvtable *first; - lt_dlvtable *last; - lt_dlhandle module = NULL; - module_func *symbol; - const char *first_ctx = "first_ctx"; - const char *last_ctx = "last_ctx"; - const lt_dlvtable *finder; +{ set +x +$as_echo "$at_srcdir/need_lib_prefix.at:163: \$LIBTOOL --mode=link \$CC -module -avoid-version \$CFLAGS \$LDFLAGS -o foo1.la foo1.lo -rpath \$instdir/lib" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o foo1.la foo1.lo -rpath $instdir/lib" "need_lib_prefix.at:163" +( $at_check_trace; $LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o foo1.la foo1.lo -rpath $instdir/lib +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:163" +$at_failed && at_fn_log_failure +$at_traceon; } - LTDL_SET_PRELOADED_SYMBOLS (); +{ set +x +$as_echo "$at_srcdir/need_lib_prefix.at:165: \$LIBTOOL --mode=link \$CC -module -avoid-version \$CFLAGS \$LDFLAGS -o libfoo2.la foo2.lo -rpath \$instdir/lib" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o libfoo2.la foo2.lo -rpath $instdir/lib" "need_lib_prefix.at:165" +( $at_check_trace; $LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o libfoo2.la foo2.lo -rpath $instdir/lib +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:165" +$at_failed && at_fn_log_failure +$at_traceon; } - if (lt_dlinit ()) - { - printf ("lt_dlinit failed\n"); - return 1; - } +{ set +x +$as_echo "$at_srcdir/need_lib_prefix.at:167: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la \$LIBLTDL" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la $LIBLTDL" "need_lib_prefix.at:167" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la $LIBLTDL +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:167" +$at_failed && at_fn_log_failure +$at_traceon; } - first = (lt_dlvtable *) malloc (sizeof (*first)); - if (!first) - { - printf ("malloc failed\n"); - err = 1; - goto cleanup; - } - first->name = "first"; - first->sym_prefix = NULL; - first->module_open = first_open; - first->module_close = first_close; - first->find_sym = first_sym; - first->dlloader_init = first_init; /* test that it isn't called twice */ - first->dlloader_exit = first_exit; - first->dlloader_data = (lt_user_data) first_ctx; - first->priority = LT_DLLOADER_PREPEND; +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/need_lib_prefix.at:170: if \$LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "need_lib_prefix.at:170" +( $at_check_trace; if $LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:170" +$at_failed && at_fn_log_failure +$at_traceon; } - if (first_init (first->dlloader_data)) - { - printf ("first_init failed\n"); - err = 1; - goto cleanup; - } - if (lt_dlloader_add (first)) - { - printf ("lt_dlloader_add failed: %s\n", lt_dlerror ()); - err = 1; - goto cleanup; - } - finder = lt_dlloader_find ("first"); +# Install the libraries. +mkdir $instdir +mkdir $instdir/lib +$LIBTOOL --mode=install cp foo1.la $instdir/lib/foo1.la +$LIBTOOL --mode=install cp libfoo2.la $instdir/lib/libfoo2.la - if (!finder) - { - printf ("lt_dlloader_find failed: %s\n", lt_dlerror ()); - err = 1; - goto cleanup; - } +# Install the binary +mkdir $instdir/bin +$LIBTOOL --mode=install cp main$EXEEXT $instdir/bin/main$EXEEXT - printf ("Found loader \"%s\"\n", finder->name); +lt_exe=$instdir/bin/main; if test -f "$instdir/bin/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/need_lib_prefix.at:183: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "need_lib_prefix.at:183" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:183" +$at_failed && at_fn_log_failure +$at_traceon; } - last = (lt_dlvtable *) malloc (sizeof (*last)); - if (!last) - { - printf ("malloc failed\n"); - err = 1; - goto cleanup; - } - last->name = "last"; - last->sym_prefix = NULL; - last->module_open = last_open; - last->module_close = last_close; - last->find_sym = last_sym; - last->dlloader_init = last_init; /* test that it isn't called twice */ - last->dlloader_exit = last_exit; - last->dlloader_data = (lt_user_data) last_ctx; - last->priority = LT_DLLOADER_APPEND; - if (last_init (last->dlloader_data)) - { - printf ("last_init failed\n"); - err = 1; - goto cleanup; - } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_84 +#AT_START_85 +at_fn_group_banner 85 'standalone.at:31' \ + "compiling softlinked libltdl" " " 8 +at_xfail=no +( + $as_echo "85. $at_setup_line: testing $at_desc ..." + $at_traceon - if (lt_dlloader_add (last)) - { - printf ("lt_dlloader_add failed: %s\n", lt_dlerror ()); - err = 1; - goto cleanup; - } - finder = lt_dlloader_find ("last"); +{ set +x +$as_echo "$at_srcdir/standalone.at:33: \$LIBTOOLIZE --ltdl=. - if (!finder) - { - printf ("lt_dlloader_find failed: %s\n", lt_dlerror ()); - err = 1; - goto cleanup; - } +" +at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:33" +( $at_check_trace; $LIBTOOLIZE --ltdl=. - printf ("Found loader \"%s\"\n", finder->name); - module = lt_dlopen ("first"); +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } - if (!module) - { - printf ("lt_dlopen failed: %s\n", lt_dlerror ()); - err = 1; - goto cleanup; - } - symbol = (module_func *) lt_dlsym (module, "symbol"); +{ set +x +$as_echo "$at_srcdir/standalone.at:34: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "standalone.at:34" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:34" +$at_failed && at_fn_log_failure +$at_traceon; } - if (!symbol) - { - printf ("lt_dlsym failed: %s\n", lt_dlerror ()); - err = 1; - goto cleanup; - } - printf ("result: %s\n", symbol ()); +for target in all $tst_dist +do + { set +x +$as_echo "$at_srcdir/standalone.at:35: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "standalone.at:35" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:35" +$at_failed && at_fn_log_failure +$at_traceon; } - lt_dlclose (module); - module = lt_dlopen ("./module.la"); +done - if (!module) - { - printf ("lt_dlopen failed: %s\n", lt_dlerror ()); - err = 1; - goto cleanup; - } - symbol = (module_func *) lt_dlsym (module, "symbol"); +{ set +x +$as_echo "$at_srcdir/standalone.at:37: test -f libltdlc.la" +at_fn_check_prepare_trace "standalone.at:37" +( $at_check_trace; test -f libltdlc.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:37" +$at_failed && at_fn_log_failure +$at_traceon; } - if (!symbol) - { - printf ("lt_dlsym failed: %s\n", lt_dlerror ()); - err = 1; - goto cleanup; - } - printf ("result: %s\n", symbol ()); + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_85 +#AT_START_86 +at_fn_group_banner 86 'standalone.at:46' \ + "compiling copied libltdl" " " 8 +at_xfail=no +( + $as_echo "86. $at_setup_line: testing $at_desc ..." + $at_traceon - lt_dlclose (module); - module = lt_dlopen ("last"); - if (!module) - { - printf ("lt_dlopen failed: %s\n", lt_dlerror ()); - err = 1; - goto cleanup; - } +{ set +x +$as_echo "$at_srcdir/standalone.at:48: \$LIBTOOLIZE --copy --ltdl=. - symbol = (module_func *) lt_dlsym (module, "symbol"); +" +at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:48" +( $at_check_trace; $LIBTOOLIZE --copy --ltdl=. - if (!symbol) - { - printf ("lt_dlsym failed: %s\n", lt_dlerror ()); - err = 1; - goto cleanup; - } - printf ("result: %s\n", symbol ()); +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:48" +$at_failed && at_fn_log_failure +$at_traceon; } - if (lt_dlopen ("no-module")) - { - printf ("lt_dlopen unexpectedly opened \"no-module\"\n"); - err = 1; - goto cleanup; - } - if (lt_dlloader_remove ("first") != first) - { - printf ("vtable of first loader has changed\n"); - err = 1; - goto cleanup; - } +{ set +x +$as_echo "$at_srcdir/standalone.at:49: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "standalone.at:49" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:49" +$at_failed && at_fn_log_failure +$at_traceon; } - free (first); -cleanup: - if (module) - { - lt_dlclose (module); - } - lt_dlexit (); - return err; -} -_ATEOF +for target in all $tst_dist +do + { set +x +$as_echo "$at_srcdir/standalone.at:50: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "standalone.at:50" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:50" +$at_failed && at_fn_log_failure +$at_traceon; } +done -cat >module.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" -#endif -const char *symbol (void); -const char * -symbol (void) -{ - return "module_symbol"; -} -_ATEOF +{ set +x +$as_echo "$at_srcdir/standalone.at:52: test -f libltdlc.la" +at_fn_check_prepare_trace "standalone.at:52" +( $at_check_trace; test -f libltdlc.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:52" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >expout <<'_ATEOF' -first_init: first_ctx -Found loader "first" -last_init: last_ctx -Found loader "last" -first_open ("first"): first_ctx -first_sym (first): first_ctx -result: first_symbol -first_close (first): first_ctx -first_open denies a request -result: module_symbol -first_open denies a request -last_open ("last"): last_ctx -last_sym (last): last_ctx -result: last_symbol -first_open denies a request -last_open denies a request -first_exit: first_ctx -last_close (last): last_ctx -last_exit: last_ctx -_ATEOF + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_86 +#AT_START_87 +at_fn_group_banner 87 'standalone.at:61' \ + "installable libltdl" " " 8 +at_xfail=no +( + $as_echo "87. $at_setup_line: testing $at_desc ..." + $at_traceon -case $host_os in mingw*) - while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t - mv -f expout.t expout ;; -esac -: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} -: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} +prefix=`pwd`/_inst -# Skip this test when called from: -# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install { set +x -$as_echo "$at_srcdir/dlloader-api.at:400: case \$LIBLTDL in #( - */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; -esac" -at_fn_check_prepare_notrace 'an embedded newline' "dlloader-api.at:400" -( $at_check_trace; case $LIBLTDL in #( - */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; -esac +$as_echo "$at_srcdir/standalone.at:65: \$LIBTOOLIZE --copy --ltdl=. + +" +at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:65" +( $at_check_trace; $LIBTOOLIZE --copy --ltdl=. + + ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:400" +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:65" $at_failed && at_fn_log_failure $at_traceon; } -CPPFLAGS="$LTDLINCL $CPPFLAGS" - { set +x -$as_echo "$at_srcdir/dlloader-api.at:406: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c module.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c" "dlloader-api.at:406" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c +$as_echo "$at_srcdir/standalone.at:66: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "standalone.at:66" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:406" +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:66" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/dlloader-api.at:408: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o module.la -rpath /nowhere -module -avoid-version -no-undefined module.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la -rpath /nowhere -module -avoid-version -no-undefined module.lo" "dlloader-api.at:408" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la -rpath /nowhere -module -avoid-version -no-undefined module.lo + +for target in all install $tst_dist +do + { set +x +$as_echo "$at_srcdir/standalone.at:67: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "standalone.at:67" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:408" +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:67" $at_failed && at_fn_log_failure $at_traceon; } +done + -. ./module.la { set +x -$as_echo "$at_srcdir/dlloader-api.at:415: test -n \"\$dlname\" || (exit 77)" -at_fn_check_prepare_dynamic "test -n \"$dlname\" || (exit 77)" "dlloader-api.at:415" -( $at_check_trace; test -n "$dlname" || (exit 77) +$as_echo "$at_srcdir/standalone.at:69: test -f \$prefix/lib/libltdl.la" +at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "standalone.at:69" +( $at_check_trace; test -f $prefix/lib/libltdl.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:69" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/standalone.at:70: test -f \$prefix/include/ltdl.h" +at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "standalone.at:70" +( $at_check_trace; test -f $prefix/include/ltdl.h ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:415" +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:70" $at_failed && at_fn_log_failure $at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_87 +#AT_START_88 +at_fn_group_banner 88 'standalone.at:79' \ + "linking libltdl without autotools" " " 8 +at_xfail=no +( + $as_echo "88. $at_setup_line: testing $at_desc ..." + $at_traceon + + +cat >module.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" +#endif +const char * +hello (void) +{ + return "Hello!"; +} +_ATEOF + + +cat >main.c <<'_ATEOF' +#include +#include "ltdl.h" + +int +main () +{ + lt_dlhandle module; + const char *(*func) (void) = 0; + int status = 1; + + LTDL_SET_PRELOADED_SYMBOLS(); + if (lt_dlinit() != 0) { + fprintf (stderr, "error during initialisation: %s\n", lt_dlerror()); + return 1; + } + + module = lt_dlopen("./module.la"); + if (!module) { + fprintf (stderr, "error dlopening ./module.la: %s\n", lt_dlerror()); + goto finish; + } + + func = (const char *(*)(void)) lt_dlsym (module, "hello"); + if (!func) { + fprintf (stderr, "error fetching func: %s\n", lt_dlerror()); + goto finish; + } + + printf ("%s\n", (*func) ()); + status = 0; + +finish: + if (lt_dlexit() != 0) { + fprintf (stderr, "error during finalisation: %s\n", lt_dlerror()); + status = 1; + } + + return status; +} +_ATEOF + + + +cat >Makefile <<'_ATEOF' +top_builddir = . +LIBTOOL = ./libltdl/libtool +INCLUDES = -I./libltdl +MODFLAGS = -module -avoid-version -no-undefined + +LTCOMPILE = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile \ + $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) +LTLINK = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=link \ + $(CC) $(CFLAGS) $(LDFLAGS) + +TARGETS = libltdl/libltdlc.la module.la ltdldemo$(EXEEXT) + +all: $(TARGETS) + +libltdl/libltdlc.la: $(LIBTOOL) libltdl/Makefile + MAKE='$(MAKE)'; test -n "$$MAKE" || MAKE=make; \ + cd libltdl && $$MAKE CC="$(CC)" LIBTOOLFLAGS="$(LIBTOOLFLAGS)" \ + CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ + CONFIGURE_OPTIONS="$(CONFIGURE_OPTIONS)" + +$(LIBTOOL): libltdl/Makefile + +libltdl/Makefile: + cd libltdl && CONFIG_SHELL="$(SHELL)" $(SHELL) ./configure $(CONFIGURE_OPTIONS) + +ltdldemo$(EXEEXT): $(LIBTOOL) module.la libltdl/libltdlc.la main.lo + $(LTLINK) -o ltdldemo$(EXEEXT) main.lo -dlopen module.la ./libltdl/libltdlc.la + +main.lo: $(LIBTOOL) main.c + $(LTCOMPILE) -c main.c + +module.la: $(LIBTOOL) module.lo + $(LTLINK) -o module.la module.lo $(MODFLAGS) -rpath /dev/null + +module.lo: $(LIBTOOL) module.c + $(LTCOMPILE) -c module.c +_ATEOF + +cat >> Makefile <>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:417" +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:82" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/dlloader-api.at:418: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlopen module.la \$LIBLTDL" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen module.la $LIBLTDL" "dlloader-api.at:418" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen module.la $LIBLTDL + +for target in all +do + { set +x +$as_echo "$at_srcdir/standalone.at:83: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target CC=\"\$CC\" LIBTOOLFLAGS=\"\$LIBTOOLFLAGS\" CPPFLAGS=\"\$CPPFLAGS\" CFLAGS=\"\$CFLAGS\" LDFLAGS=\"\$LDFLAGS\" CONFIGURE_OPTIONS=\"\$configure_options\"" +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target CC=\"$CC\" LIBTOOLFLAGS=\"$LIBTOOLFLAGS\" CPPFLAGS=\"$CPPFLAGS\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\" CONFIGURE_OPTIONS=\"$configure_options\"" "standalone.at:83" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CONFIGURE_OPTIONS="$configure_options" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:418" +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:83" $at_failed && at_fn_log_failure $at_traceon; } +done + -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +lt_exe=./ltdldemo; if test -f "./ltdldemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/dlloader-api.at:422: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "dlloader-api.at:422" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/standalone.at:87: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "standalone.at:87" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -$at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/dlloader-api.at:422" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:87" $at_failed && at_fn_log_failure $at_traceon; } @@ -15638,1363 +18987,1026 @@ $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_69 -#AT_START_70 -# 70. loadlibrary.at:23: loadlibrary error messages -at_setup_line='loadlibrary.at:23' -at_fn_banner 6 -at_desc="loadlibrary error messages" -at_desc_line=" 70: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_88 +#AT_START_89 +at_fn_group_banner 89 'subproject.at:57' \ + "compiling softlinked libltdl" " " 9 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes ( - $as_echo "70. loadlibrary.at:23: testing ..." + $as_echo "89. $at_setup_line: testing $at_desc ..." $at_traceon +cat >configure.ac <<'_ATEOF' +AC_INIT([subproject-demo], 2.4, bug-libtool@gnu.org) +LT_CONFIG_LTDL_DIR([sub/ltdl]) +AC_CONFIG_AUX_DIR([sub/ltdl/config]) +AC_CONFIG_MACRO_DIR([sub/ltdl/m4]) +AM_INIT_AUTOMAKE([foreign]) +LT_INIT +LT_WITH_LTDL +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +_ATEOF -eval "`$LIBTOOL --config | $EGREP '^(objdir)='`" - -cat >main.c <<'_ATEOF' -#include -#include - -static int -standard_error_message(const char *error) -{ - int error_number; - - for (error_number = 0; error_number < LT_ERROR_MAX; ++error_number) - { - lt_dlseterror (error_number); - if (error == lt_dlerror ()) - { - return 1; - } - } - - lt_dlseterror (LT_ERROR_UNKNOWN); - return 0; -} - -int -main (int argc, char* argv[]) -{ - int err = 0; - lt_dlhandle module = NULL; - const lt_dlvtable *loadlibrary; - const lt_dlvtable *preopen; - lt_dlloader loader = NULL; - lt_dlloader next; - const lt_dlvtable *vtable; - void *symbol; - const char *error; - - if (argc < 2) - { - fprintf (stderr, "usage: %s plugin [symbol]\n", argv[0]); - return 1; - } - - lt_dlinit (); - - loadlibrary = lt_dlloader_find ("lt_loadlibrary"); - if (!loadlibrary) - { - /* Skip if the loadlibrary loader isn't supported */ - printf ("loadlibrary loader not found\n"); - err = 77; - goto cleanup; - } - - preopen = lt_dlloader_find ("lt_preopen"); - if (!loadlibrary) - { - printf ("preopen loader not found\n"); - err = 2; - goto cleanup; - } - - /* Remove all loaders except the preopen and loadlibrary loaders. */ - while (next = lt_dlloader_next (loader)) - { - if (lt_dlloader_get (next) == loadlibrary) - { - loader = next; - continue; - } - - if (lt_dlloader_get (next) == preopen) - { - loader = next; - continue; - } - - lt_dlloader_remove (lt_dlloader_get (next)->name); - } - - module = lt_dlopen (argv[1]); - error = lt_dlerror (); - - if (module) - { - printf ("lt_dlopen: success!\n"); - - if (argc == 2) - { - /* But failure was the desired result... */ - printf ("expected failure\n"); - err = 2; - goto cleanup; - } - } - else if (argc > 2) - { - /* Didn't expect failure... */ - printf ("lt_dlopen: failure: %s\n", error); - err = 2; - goto cleanup; - } - else if (standard_error_message (error)) - { - /* Expected custom error message... */ - printf ("lt_dlopen: standard error (bad): %s\n", error); - err = 1; - goto cleanup; - } - else - { - printf ("lt_dlopen: custom error (good): %s\n", error); - goto cleanup; - } - - symbol = lt_dlsym (module, argv[2]); - error = lt_dlerror (); - - if (symbol) - { - printf ("lt_dlsym: success!\n"); - } - else if (standard_error_message (error)) - { - /* Expected custom failure message... */ - printf ("lt_dlsym: standard error (bad): %s\n", error); - err = 1; - } - else - { - printf ("lt_dlsym: custom error (good): %s\n", error); - } -cleanup: - if (module) - { - lt_dlclose (module); - } - lt_dlexit (); - return err; -} +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I sub/ltdl/m4 +AUTOMAKE_OPTIONS = 1.9 +SUBDIRS = sub/ltdl +lib_LTLIBRARIES = foo.la +foo_la_LDFLAGS = -module -avoid-version -no-undefined _ATEOF -cat >foomod.c <<'_ATEOF' - -#ifdef __cplusplus -extern "C" -#endif -int foosym (void); -int -foosym (void) -{ - return 0; -} -_ATEOF +echo 'int dummy = 0;' > foo.c -cat >bardep.c <<'_ATEOF' +$LIBTOOLIZE --ltdl -#ifdef __cplusplus -extern "C" -#endif -int bardep (void); -int -bardep (void) -{ - return 0; -} -_ATEOF +{ set +x +$as_echo "$at_srcdir/subproject.at:61: \$ACLOCAL -I sub/ltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I sub/ltdl/m4" "subproject.at:61" +( $at_check_trace; $ACLOCAL -I sub/ltdl/m4 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >barmod.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" { -#endif -int bardep (void); -int barsym (void); -#ifdef __cplusplus -} -#endif -int -barsym (void) -{ - return bardep (); -} -_ATEOF -: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} -: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} -# Skip this test when called from: -# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install { set +x -$as_echo "$at_srcdir/loadlibrary.at:217: case \$LIBLTDL in #( - */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; -esac" -at_fn_check_prepare_notrace 'an embedded newline' "loadlibrary.at:217" -( $at_check_trace; case $LIBLTDL in #( - */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; -esac +$as_echo "$at_srcdir/subproject.at:61: \$AUTOMAKE --add-missing --copy" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "subproject.at:61" +( $at_check_trace; $AUTOMAKE --add-missing --copy ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:217" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/subproject.at:61: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "subproject.at:61" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/subproject.at:61" $at_failed && at_fn_log_failure $at_traceon; } +fi +$at_failed && at_fn_log_failure +$at_traceon; } + + -CPPFLAGS="$LTDLINCL $CPPFLAGS" -inst=`pwd`/inst -libdir=$inst/lib { set +x -$as_echo "$at_srcdir/loadlibrary.at:225: \$CC \$CPPFLAGS \$CFLAGS -c main.c" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "loadlibrary.at:225" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c +$as_echo "$at_srcdir/subproject.at:61: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "subproject.at:61" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:225" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61" $at_failed && at_fn_log_failure $at_traceon; } -for file in foomod.c bardep.c barmod.c; do - { set +x -$as_echo "$at_srcdir/loadlibrary.at:227: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c \$file" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file" "loadlibrary.at:227" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file + + + +{ set +x +$as_echo "$at_srcdir/subproject.at:61: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:61" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:227" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61" $at_failed && at_fn_log_failure $at_traceon; } -done -{ set +x -$as_echo "$at_srcdir/loadlibrary.at:230: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o foomod.la -rpath \$libdir -module -avoid-version -no-undefined foomod.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o foomod.la -rpath $libdir -module -avoid-version -no-undefined foomod.lo" "loadlibrary.at:230" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o foomod.la -rpath $libdir -module -avoid-version -no-undefined foomod.lo + +for target in all $tst_dist +do + { set +x +$as_echo "$at_srcdir/subproject.at:61: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "subproject.at:61" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:230" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61" $at_failed && at_fn_log_failure $at_traceon; } +done + + + { set +x -$as_echo "$at_srcdir/loadlibrary.at:234: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbardep.la -rpath \$libdir -avoid-version -no-undefined bardep.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbardep.la -rpath $libdir -avoid-version -no-undefined bardep.lo" "loadlibrary.at:234" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbardep.la -rpath $libdir -avoid-version -no-undefined bardep.lo +$as_echo "$at_srcdir/subproject.at:64: test -f sub/ltdl/libltdlc.la" +at_fn_check_prepare_trace "subproject.at:64" +( $at_check_trace; test -f sub/ltdl/libltdlc.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:234" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:64" $at_failed && at_fn_log_failure $at_traceon; } + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_89 +#AT_START_90 +at_fn_group_banner 90 'subproject.at:73' \ + "compiling copied libltdl" " " 9 +at_xfail=no + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "90. $at_setup_line: testing $at_desc ..." + $at_traceon + + +cat >configure.ac <<'_ATEOF' +AC_INIT([subproject-demo], 2.4, bug-libtool@gnu.org) +LT_CONFIG_LTDL_DIR([sub/ltdl]) +AC_CONFIG_AUX_DIR([sub/ltdl/config]) +AC_CONFIG_MACRO_DIR([sub/ltdl/m4]) +AM_INIT_AUTOMAKE([foreign]) +LT_INIT +LT_WITH_LTDL +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +_ATEOF + + +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I sub/ltdl/m4 +AUTOMAKE_OPTIONS = 1.9 +SUBDIRS = sub/ltdl +lib_LTLIBRARIES = foo.la +foo_la_LDFLAGS = -module -avoid-version -no-undefined +_ATEOF + + +echo 'int dummy = 0;' > foo.c + + +$LIBTOOLIZE --copy --ltdl + + { set +x -$as_echo "$at_srcdir/loadlibrary.at:238: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o barmod.la -rpath \$libdir -module -avoid-version -no-undefined barmod.lo ./libbardep.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o barmod.la -rpath $libdir -module -avoid-version -no-undefined barmod.lo ./libbardep.la" "loadlibrary.at:238" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o barmod.la -rpath $libdir -module -avoid-version -no-undefined barmod.lo ./libbardep.la +$as_echo "$at_srcdir/subproject.at:77: \$ACLOCAL -I sub/ltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I sub/ltdl/m4" "subproject.at:77" +( $at_check_trace; $ACLOCAL -I sub/ltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:238" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/loadlibrary.at:243: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT \$LIBLTDL" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $LIBLTDL" "loadlibrary.at:243" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT $LIBLTDL +$as_echo "$at_srcdir/subproject.at:77: \$AUTOMAKE --add-missing --copy" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "subproject.at:77" +( $at_check_trace; $AUTOMAKE --add-missing --copy ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:243" -$at_failed && at_fn_log_failure -$at_traceon; } - - -. ./foomod.la -{ set +x -$as_echo "$at_srcdir/loadlibrary.at:248: test -n \"\$dlname\" || (exit 77)" -at_fn_check_prepare_dynamic "test -n \"$dlname\" || (exit 77)" "loadlibrary.at:248" -( $at_check_trace; test -n "$dlname" || (exit 77) +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/subproject.at:77: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "subproject.at:77" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:248" +at_fn_check_status 1 $at_status "$at_srcdir/subproject.at:77" +$at_failed && at_fn_log_failure +$at_traceon; } + +fi $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi + + { set +x -$as_echo "$at_srcdir/loadlibrary.at:250: if \"\$lt_exe\" ./foomod.la no_symbol; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ./foomod.la no_symbol; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "loadlibrary.at:250" -( $at_check_trace; if "$lt_exe" ./foomod.la no_symbol; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/subproject.at:77: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "subproject.at:77" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:250" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77" $at_failed && at_fn_log_failure $at_traceon; } -# chmod -x doesn't appear to work in MSYS, and Wine can load no-exec dlls. -rm -f $objdir/$dlname -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/loadlibrary.at:257: if \"\$lt_exe\" ./foomod.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ./foomod.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "loadlibrary.at:257" -( $at_check_trace; if "$lt_exe" ./foomod.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/subproject.at:77: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:77" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:257" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77" $at_failed && at_fn_log_failure $at_traceon; } - -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/loadlibrary.at:259: if \"\$lt_exe\" ./barmod.la no_symbol; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ./barmod.la no_symbol; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "loadlibrary.at:259" -( $at_check_trace; if "$lt_exe" ./barmod.la no_symbol; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +for target in all $tst_dist +do + { set +x +$as_echo "$at_srcdir/subproject.at:77: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "subproject.at:77" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:259" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77" $at_failed && at_fn_log_failure $at_traceon; } +done -. ./libbardep.la -# chmod -x doesn't appear to work in MSYS, and Wine can load no-exec dlls. -rm -f $objdir/$dlname -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/loadlibrary.at:267: if \"\$lt_exe\" ./barmod.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ./barmod.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "loadlibrary.at:267" -( $at_check_trace; if "$lt_exe" ./barmod.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/subproject.at:80: test -f sub/ltdl/libltdlc.la" +at_fn_check_prepare_trace "subproject.at:80" +( $at_check_trace; test -f sub/ltdl/libltdlc.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/loadlibrary.at:267" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:80" $at_failed && at_fn_log_failure $at_traceon; } - set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_70 -#AT_START_71 -# 71. lalib-syntax.at:24: syntax of .la files -at_setup_line='lalib-syntax.at:24' -at_fn_banner 6 -at_desc="syntax of .la files" -at_desc_line=" 71: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_90 +#AT_START_91 +at_fn_group_banner 91 'subproject.at:89' \ + "installable libltdl" " " 9 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "71. lalib-syntax.at:24: testing ..." - $at_traceon - - - - -cat >main.c <<'_ATEOF' -#include -#include - -int -main (int argc, char* argv[]) -{ - int err = 0; - lt_dlhandle plugin_handle; - - if (argc < 2) - { - fprintf (stderr, "usage: %s plugin\n", argv[0]); - return 1; - } - - lt_dlinit (); - plugin_handle = lt_dlopenext (argv[1]); - if (NULL != plugin_handle) - { - printf ("plugin opened successfully!\n"); - lt_dlclose (plugin_handle); - } - else - { - printf ("plugin failed to open: %s\n", lt_dlerror()); - err = 1; - } - lt_dlexit (); - return err; -} + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "91. $at_setup_line: testing $at_desc ..." + $at_traceon + + +prefix=`pwd`/_inst + +cat >configure.ac <<'_ATEOF' +AC_INIT([subproject-demo], 2.4, bug-libtool@gnu.org) +LT_CONFIG_LTDL_DIR([sub/ltdl]) +AC_CONFIG_AUX_DIR([sub/ltdl/config]) +AC_CONFIG_MACRO_DIR([sub/ltdl/m4]) +AM_INIT_AUTOMAKE([foreign]) +LT_INIT +LT_WITH_LTDL +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT _ATEOF -cat >module.c <<'_ATEOF' -int foo (void) { return 0; } +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I sub/ltdl/m4 +AUTOMAKE_OPTIONS = 1.9 +SUBDIRS = sub/ltdl +lib_LTLIBRARIES = foo.la +foo_la_LDFLAGS = -module -avoid-version -no-undefined _ATEOF -: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} -: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} +echo 'int dummy = 0;' > foo.c + + +$LIBTOOLIZE --copy --ltdl + -# Skip this test when called from: -# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install { set +x -$as_echo "$at_srcdir/lalib-syntax.at:70: case \$LIBLTDL in #( - */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; -esac" -at_fn_check_prepare_notrace 'an embedded newline' "lalib-syntax.at:70" -( $at_check_trace; case $LIBLTDL in #( - */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; -esac +$as_echo "$at_srcdir/subproject.at:95: \$ACLOCAL -I sub/ltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I sub/ltdl/m4" "subproject.at:95" +( $at_check_trace; $ACLOCAL -I sub/ltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:70" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95" $at_failed && at_fn_log_failure $at_traceon; } -CPPFLAGS="$CPPFLAGS $LTDLINCL" + + { set +x -$as_echo "$at_srcdir/lalib-syntax.at:76: \$CC \$CPPFLAGS \$CFLAGS -c main.c" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "lalib-syntax.at:76" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c +$as_echo "$at_srcdir/subproject.at:95: \$AUTOMAKE --add-missing --copy" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "subproject.at:95" +( $at_check_trace; $AUTOMAKE --add-missing --copy ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:76" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/subproject.at:95: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "subproject.at:95" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/subproject.at:95" $at_failed && at_fn_log_failure $at_traceon; } +fi +$at_failed && at_fn_log_failure +$at_traceon; } + + + + { set +x -$as_echo "$at_srcdir/lalib-syntax.at:77: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c module.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c" "lalib-syntax.at:77" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c module.c +$as_echo "$at_srcdir/subproject.at:95: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "subproject.at:95" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:77" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/lalib-syntax.at:79: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o module.la module.lo -module -avoid-version -rpath /somewhere" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la module.lo -module -avoid-version -rpath /somewhere" "lalib-syntax.at:79" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o module.la module.lo -module -avoid-version -rpath /somewhere +$as_echo "$at_srcdir/subproject.at:95: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:95" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:79" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/lalib-syntax.at:81: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.\$OBJEXT \$LIBLTDL" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT $LIBLTDL" "lalib-syntax.at:81" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.$OBJEXT $LIBLTDL + +for target in all install $tst_dist +do + { set +x +$as_echo "$at_srcdir/subproject.at:95: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "subproject.at:95" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:81" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95" $at_failed && at_fn_log_failure $at_traceon; } +done -# Several bogus test cases. - -cat >missing-closing-quote.la <<'_ATEOF' -# missing-closing-quote.la - a libtool library file -# Generated by libtool -dlname='module.so -library_names='module.so module.so module.so' -old_library='module.a' -installed=no -shouldnotlink=yes -libdir='/somewhere' -_ATEOF - - -cat >wrong-quotes.la <<'_ATEOF' -# wrong-quotes.la - a libtool library file -# Generated by libtool -dlname="module.so" -library_names='module.so module.so module.so' -old_library='module.a' -installed=no -shouldnotlink=yes -libdir='/somewhere' -_ATEOF - - -cat >no-dlname.la <<'_ATEOF' -# no-dlname.la - a libtool library file -# Generated by libtool -installed=no -shouldnotlink=yes -libdir='/somewhere' -_ATEOF - - -cat >nonexistent-dlname.la <<'_ATEOF' -# nonexistent-dlname.la - a libtool library file -# Generated by libtool -dlname='does-not-exist.so' -installed=no -shouldnotlink=yes -libdir='/somewhere' -_ATEOF - -for file in ./missing-closing-quote.la ./wrong-quotes.la \ - ./no-dlname.la ./nonexistent-dlname.la; do - lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/lalib-syntax.at:128: if \"\$lt_exe\" \$file; then :; else lt_status=\$?; test \$lt_status != 1 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" $file; then :; else lt_status=$?; test $lt_status != 1 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "lalib-syntax.at:128" -( $at_check_trace; if "$lt_exe" $file; then :; else lt_status=$?; test $lt_status != 1 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/subproject.at:99: test -f \$prefix/lib/libltdl.la" +at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "subproject.at:99" +( $at_check_trace; test -f $prefix/lib/libltdl.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/lalib-syntax.at:128" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:99" $at_failed && at_fn_log_failure $at_traceon; } - - { set +x -$as_echo "$at_srcdir/lalib-syntax.at:129: grep 'plugin failed to open' stdout" -at_fn_check_prepare_trace "lalib-syntax.at:129" -( $at_check_trace; grep 'plugin failed to open' stdout +{ set +x +$as_echo "$at_srcdir/subproject.at:100: test -f \$prefix/include/ltdl.h" +at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "subproject.at:100" +( $at_check_trace; test -f $prefix/include/ltdl.h ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/lalib-syntax.at:129" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:100" $at_failed && at_fn_log_failure $at_traceon; } -done set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_71 -#AT_START_72 -# 72. resident.at:27: resident modules -at_setup_line='resident.at:27' -at_fn_banner 6 -at_desc="resident modules" -at_desc_line=" 72: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_91 +#AT_START_92 +at_fn_group_banner 92 'subproject.at:109' \ + "linking libltdl without autotools" " " 9 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "72. resident.at:27: testing ..." + $as_echo "92. $at_setup_line: testing $at_desc ..." $at_traceon +cat >module.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" +#endif +const char * +hello (void) +{ + return "Hello!"; +} +_ATEOF + cat >main.c <<'_ATEOF' -#include #include +#include "ltdl.h" int -main (int argc, char* argv[]) +main () { - int err = 0; - lt_dlhandle plugin_handle; - lt_dladvise advise; + lt_dlhandle module; + const char *(*func) (void) = 0; + int status = 1; - if (argc < 2) - { - fprintf (stderr, "usage: %s plugin\n", argv[0]); - return 1; - } + LTDL_SET_PRELOADED_SYMBOLS(); + if (lt_dlinit() != 0) { + fprintf (stderr, "error during initialisation: %s\n", lt_dlerror()); + return 1; + } - lt_dlinit (); - if (lt_dladvise_init (&advise) != 0 - || lt_dladvise_ext (&advise) != 0 - || lt_dladvise_resident (&advise) != 0) - { - printf ("advise failure: %s\n", lt_dlerror ()); - err = 1; - } - else - { - plugin_handle = lt_dlopenadvise (argv[1], advise); - if (NULL != plugin_handle) - { - int (*pf) (void); - printf ("plugin opened successfully!\n"); - pf = (int (*) (void)) lt_dlsym (plugin_handle, "setup_plugin"); - if (pf) - pf (); - else - { - printf ("dlsym failure: %s\n", lt_dlerror ()); - err = 1; - } - if (!lt_dlisresident (plugin_handle)) - { - printf ("module wrongly not marked resident\n"); - err = 1; - } - if (lt_dlclose (plugin_handle) != 0) - { - printf ("close failure (expected): %s\n", lt_dlerror ()); - } - else - { - printf ("wrongly closed resident module\n"); - err = 1; - } - } - else - { - printf ("plugin failed to open: %s\n", lt_dlerror ()); - err = 1; - } - if (lt_dladvise_destroy (&advise) != 0) - { - printf ("advise destroy failure: %s\n", lt_dlerror ()); - err = 1; - } - } - lt_dlexit (); - return err; -} -_ATEOF + module = lt_dlopen("./module.la"); + if (!module) { + fprintf (stderr, "error dlopening ./module.la: %s\n", lt_dlerror()); + goto finish; + } + func = (const char *(*)(void)) lt_dlsym (module, "hello"); + if (!func) { + fprintf (stderr, "error fetching func: %s\n", lt_dlerror()); + goto finish; + } -cat >plugin.c <<'_ATEOF' -#include -#include + printf ("%s\n", (*func) ()); + status = 0; -void -bye (void) -{ - puts ("called from atexit handler"); -} +finish: + if (lt_dlexit() != 0) { + fprintf (stderr, "error during finalisation: %s\n", lt_dlerror()); + status = 1; + } -#ifdef __cplusplus -extern "C" -#endif -int -setup_plugin (void) -{ - atexit (bye); + return status; } _ATEOF -: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} -: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} -# Skip this test when called from: -# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install -{ set +x -$as_echo "$at_srcdir/resident.at:126: case \$LIBLTDL in #( - */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; -esac" -at_fn_check_prepare_notrace 'an embedded newline' "resident.at:126" -( $at_check_trace; case $LIBLTDL in #( - */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; -esac -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/resident.at:126" -$at_failed && at_fn_log_failure -$at_traceon; } +cat >Makefile <<'_ATEOF' +top_builddir = . +LIBTOOL = ./sub/ltdl/libtool +INCLUDES = -I./sub/ltdl +MODFLAGS = -module -avoid-version -no-undefined +LTCOMPILE = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile \ + $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) +LTLINK = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=link \ + $(CC) $(CFLAGS) $(LDFLAGS) -CPPFLAGS="$LTDLINCL $CPPFLAGS" -LDFLAGS="$LDFLAGS -no-undefined" -inst=`pwd`/inst -libdir=$inst/lib +TARGETS = sub/ltdl/libltdlc.la module.la ltdldemo$(EXEEXT) -{ set +x -$as_echo "$at_srcdir/resident.at:135: \$CC \$CPPFLAGS \$CFLAGS -c main.c" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c main.c" "resident.at:135" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c main.c -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/resident.at:135" -$at_failed && at_fn_log_failure -$at_traceon; } +all: $(TARGETS) -{ set +x -$as_echo "$at_srcdir/resident.at:136: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c plugin.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c" "resident.at:136" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c plugin.c -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/resident.at:136" -$at_failed && at_fn_log_failure -$at_traceon; } +sub/ltdl/libltdlc.la: $(LIBTOOL) sub/ltdl/Makefile + MAKE='$(MAKE)'; test -n "$$MAKE" || MAKE=make; \ + cd sub/ltdl && $$MAKE CC="$(CC)" LIBTOOLFLAGS="$(LIBTOOLFLAGS)" \ + CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ + CONFIGURE_OPTIONS="$(CONFIGURE_OPTIONS)" -{ set +x -$as_echo "$at_srcdir/resident.at:138: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o plugin.la -rpath \$libdir -module -avoid-version plugin.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir -module -avoid-version plugin.lo" "resident.at:138" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o plugin.la -rpath $libdir -module -avoid-version plugin.lo -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/resident.at:138" -$at_failed && at_fn_log_failure -$at_traceon; } +$(LIBTOOL): sub/ltdl/Makefile -{ set +x -$as_echo "$at_srcdir/resident.at:140: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlopen plugin.la \$LIBLTDL" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen plugin.la $LIBLTDL" "resident.at:140" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlopen plugin.la $LIBLTDL +sub/ltdl/Makefile: + cd sub/ltdl && CONFIG_SHELL="$(SHELL)" $(SHELL) ./configure $(CONFIGURE_OPTIONS) + +ltdldemo$(EXEEXT): $(LIBTOOL) module.la sub/ltdl/libltdlc.la main.lo + $(LTLINK) -o ltdldemo$(EXEEXT) main.lo -dlopen module.la ./sub/ltdl/libltdlc.la + +main.lo: $(LIBTOOL) main.c + $(LTCOMPILE) -c main.c + +module.la: $(LIBTOOL) module.lo + $(LTLINK) -o module.la module.lo $(MODFLAGS) -rpath /dev/null + +module.lo: $(LIBTOOL) module.c + $(LTCOMPILE) -c module.c +_ATEOF + +cat >> Makefile <>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/resident.at:140" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:113" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/resident.at:143: if \"\$lt_exe\" ./plugin.la; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ./plugin.la; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "resident.at:143" -( $at_check_trace; if "$lt_exe" ./plugin.la; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/resident.at:143" -$at_failed && at_fn_log_failure -$at_traceon; } +done +lt_exe=./ltdldemo; if test -f "./ltdldemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/resident.at:144: grep 'called from atexit handler' stdout" -at_fn_check_prepare_trace "resident.at:144" -( $at_check_trace; grep 'called from atexit handler' stdout +$as_echo "$at_srcdir/subproject.at:117: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "subproject.at:117" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/resident.at:144" +at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:117" $at_failed && at_fn_log_failure $at_traceon; } + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_72 -#AT_START_73 -# 73. slist.at:24: SList functionality -at_setup_line='slist.at:24' -at_fn_banner 6 -at_desc="SList functionality" -at_desc_line=" 73: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_92 +#AT_START_93 +at_fn_group_banner 93 'nonrecursive.at:78' \ + "compiling softlinked libltdl" " " 10 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOHEADER" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes ( - $as_echo "73. slist.at:24: testing ..." + $as_echo "93. $at_setup_line: testing $at_desc ..." $at_traceon -cat >test-slist.c <<'_ATEOF' +cat >configure.ac <<'_ATEOF' +AC_INIT([subdirectory-demo], 2.4, bug-libtool@gnu.org) +LT_CONFIG_LTDL_DIR([ltdl]) +AC_CONFIG_AUX_DIR([ltdl/config]) +AC_CONFIG_MACRO_DIR([ltdl/m4]) +AC_CONFIG_LIBOBJ_DIR([ltdl]) +AC_CONFIG_HEADERS([config.h:config.hin]) +AM_INIT_AUTOMAKE([foreign subdir-objects]) +AC_PROG_CC +AM_PROG_CC_C_O +LT_INIT +LTDL_INIT([nonrecursive]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +_ATEOF -#include -#include -#include -#include -#include -#include "slist.h" -void *find_string (SList *item, void *data) -{ - if (data != NULL && !strcmp ((const char *) item->userdata, (const char *)data)) - return item; - else - return NULL; -} +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I ltdl/m4 +AUTOMAKE_OPTIONS = 1.9.6 +BUILT_SOURCES = -void boxed_delete (void *item) -{ - free (slist_unbox ((SList *) item)); -} +AM_CPPFLAGS = +AM_LDFLAGS = -void *print_item (SList *item, void *userdata) -{ - userdata = userdata; /* unused */ - printf ("%s\n", (const char*)item->userdata); - return NULL; -} +include_HEADERS = +noinst_LTLIBRARIES = +lib_LTLIBRARIES = foo.la +EXTRA_LTLIBRARIES = -int list_compare (const SList *item1, const SList *item2, void *userdata) -{ - userdata = userdata; - return strcmp ((const char *) item1->userdata, (const char *)item2->userdata); -} +EXTRA_DIST = -int main () -{ - int i; - SList *empty_list = NULL, *list = NULL, *item, *list_save; - char *data = NULL; +CLEANFILES = +MOSTLYCLEANFILES = - /* slist_cons */ - list = slist_cons (NULL, NULL); +include ltdl/Makefile.inc - for (i=0; i < 10; ++i) { - data = (char *) malloc (42); - assert (data); - sprintf (data, "foo%d", i); - list = slist_cons (slist_box (data), list); - } - list_save = list; - list = slist_cons (NULL, list); - assert (list == list_save); +foo_la_LDFLAGS = -module -avoid-version -no-undefined +foo_la_SOURCES = foo.c +_ATEOF - /* slist_find */ - assert (slist_find (NULL, find_string, (void *) "whatever") == NULL); - assert (slist_find (empty_list, find_string, (void *) "whatever") == NULL); - assert (slist_find (list, find_string, (void *) "foo10") == NULL); - item = (SList *) slist_find (list, find_string, (void *) "foo1"); - assert (item != NULL); - assert (!strcmp ((const char *) item->userdata, "foo1")); +echo 'int dummy = 0;' > foo.c + + +$LIBTOOLIZE --ltdl + + +{ set +x +$as_echo "$at_srcdir/nonrecursive.at:83: if test -f ltdl/configure.ac; then false; fi" +at_fn_check_prepare_trace "nonrecursive.at:83" +( $at_check_trace; if test -f ltdl/configure.ac; then false; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:83" +$at_failed && at_fn_log_failure +$at_traceon; } - item = slist_nth (list, 10); - assert (item != NULL && !strcmp ((const char *) item->userdata, "foo0")); - puts ("list as inserted:"); - slist_foreach (list, print_item, NULL); - puts ("reversed list:"); - list = slist_reverse (list); - slist_foreach (list, print_item, NULL); +# Support vanilla autoconf-2.59 & automake-1.9.6 +for file in argz.c lt__dirent.c lt__strl.c; do + cp ltdl/$file $file +done - item = slist_nth (list, 1); - assert (item != NULL && !strcmp ((const char *) item->userdata, "foo0")); - assert (10 == slist_length (list)); +{ set +x +$as_echo "$at_srcdir/nonrecursive.at:90: \$ACLOCAL -I ltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I ltdl/m4" "nonrecursive.at:90" +( $at_check_trace; $ACLOCAL -I ltdl/m4 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90" +$at_failed && at_fn_log_failure +$at_traceon; } - /* slist_tail is the second item, not the last one */ - item = slist_tail (list); - assert (item != NULL && !strcmp ((const char *) item->userdata, "foo1")); - assert (slist_tail (slist_nth (list, 10)) == NULL); - /* slist_sort and implicitly, slist_sort_merge */ - assert (slist_sort (NULL, list_compare, NULL) == NULL); - list = slist_sort (list, list_compare, NULL); - puts ("list after no-op sort:"); - slist_foreach (list, print_item, NULL); - list = slist_reverse (list); - puts ("reversed list:"); - slist_foreach (list, print_item, NULL); - puts ("sorting reversed list:"); - list = slist_sort (list, list_compare, NULL); - slist_foreach (list, print_item, NULL); +{ set +x +$as_echo "$at_srcdir/nonrecursive.at:90: \$AUTOHEADER " +at_fn_check_prepare_dynamic "$AUTOHEADER " "nonrecursive.at:90" +( $at_check_trace; $AUTOHEADER +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90" +$at_failed && at_fn_log_failure +$at_traceon; } - /* slist_remove */ - assert (slist_remove (NULL, find_string, NULL) == NULL); - assert (slist_remove (&empty_list, find_string, NULL) == NULL); - list_save = list; - assert (slist_remove (&list, find_string, NULL) == NULL); - assert (list_save == list); - /* remove entries: middle, last, first, not present */ - /* slist_reverse above has left us with increasing order */ - list_save = list; - item = slist_remove (&list, find_string, (void *) "foo5"); - assert (list_save == list); - assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), "foo5")); - free (data); - list_save = list; - item = slist_remove (&list, find_string, (void *) "foo9"); - assert (list_save == list); - assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), "foo9")); - free (data); +{ set +x +$as_echo "$at_srcdir/nonrecursive.at:90: \$AUTOMAKE --add-missing --copy" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "nonrecursive.at:90" +( $at_check_trace; $AUTOMAKE --add-missing --copy +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/nonrecursive.at:90: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "nonrecursive.at:90" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/nonrecursive.at:90" +$at_failed && at_fn_log_failure +$at_traceon; } - list_save = list; - item = slist_remove (&list, find_string, (void *) "foo0"); - assert (list_save != list); - assert (item != NULL && !strcmp (data = (char *) slist_unbox (item), "foo0")); - free (data); +fi +$at_failed && at_fn_log_failure +$at_traceon; } - list_save = list; - item = slist_remove (&list, find_string, (void *) "foo5"); - assert (list_save == list); - assert (item == NULL); - assert (slist_delete (list, boxed_delete) == NULL); - return 0; -} -_ATEOF -CPPFLAGS="-I$top_srcdir/libltdl -I$top_srcdir/libltdl/libltdl -I$abs_top_builddir" { set +x -$as_echo "$at_srcdir/slist.at:160: \$CC \$CPPFLAGS \$CFLAGS -c test-slist.c" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c test-slist.c" "slist.at:160" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c test-slist.c +$as_echo "$at_srcdir/nonrecursive.at:90: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "nonrecursive.at:90" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/slist.at:160" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/slist.at:162: \$CC \$CPPFLAGS \$CFLAGS -c \$top_srcdir/libltdl/slist.c" -at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS -c $top_srcdir/libltdl/slist.c" "slist.at:162" -( $at_check_trace; $CC $CPPFLAGS $CFLAGS -c $top_srcdir/libltdl/slist.c +$as_echo "$at_srcdir/nonrecursive.at:90: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "nonrecursive.at:90" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/slist.at:162" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/slist.at:164: \$CC \$CFLAGS \$LDFLAGS -o test-slist test-slist.\$OBJEXT slist.\$OBJEXT" -at_fn_check_prepare_dynamic "$CC $CFLAGS $LDFLAGS -o test-slist test-slist.$OBJEXT slist.$OBJEXT" "slist.at:164" -( $at_check_trace; $CC $CFLAGS $LDFLAGS -o test-slist test-slist.$OBJEXT slist.$OBJEXT + +for target in all $tst_dist +do + { set +x +$as_echo "$at_srcdir/nonrecursive.at:90: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "nonrecursive.at:90" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/slist.at:164" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./test-slist; if test -f "./test-slist$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +done + + + { set +x -$as_echo "$at_srcdir/slist.at:166: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "slist.at:166" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/nonrecursive.at:93: test -f ltdl/libltdlc.la" +at_fn_check_prepare_trace "nonrecursive.at:93" +( $at_check_trace; test -f ltdl/libltdlc.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/slist.at:166" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:93" $at_failed && at_fn_log_failure $at_traceon; } - set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_73 -#AT_START_74 -# 74. need_lib_prefix.at:25: enforced lib prefix -at_setup_line='need_lib_prefix.at:25' -at_fn_banner 6 -at_desc="enforced lib prefix" -at_desc_line=" 74: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_93 +#AT_START_94 +at_fn_group_banner 94 'nonrecursive.at:102' \ + "compiling copied libltdl" " " 10 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOHEADER" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes ( - $as_echo "74. need_lib_prefix.at:25: testing ..." + $as_echo "94. $at_setup_line: testing $at_desc ..." $at_traceon +cat >configure.ac <<'_ATEOF' +AC_INIT([subdirectory-demo], 2.4, bug-libtool@gnu.org) +LT_CONFIG_LTDL_DIR([ltdl]) +AC_CONFIG_AUX_DIR([ltdl/config]) +AC_CONFIG_MACRO_DIR([ltdl/m4]) +AC_CONFIG_LIBOBJ_DIR([ltdl]) +AC_CONFIG_HEADERS([config.h:config.hin]) +AM_INIT_AUTOMAKE([foreign subdir-objects]) +AC_PROG_CC +AM_PROG_CC_C_O +LT_INIT +LTDL_INIT([nonrecursive]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +_ATEOF -cat >main.c <<'_ATEOF' -#include -#include - -typedef int fun (int); - -static int errors = 0; - -static void -complain (const char *msg) -{ - const char *errmsg = lt_dlerror (); - fprintf (stderr, "%s", msg); - if (errmsg) - fprintf (stderr, ": %s\n", errmsg); - else - fprintf (stderr, ".\n"); - ++errors; -} - -static lt_dlhandle -moduleopen (const char *filename) -{ - lt_dlhandle handle; - - handle = lt_dlopen (filename); - if (!handle) - { - fprintf (stderr, "can't open the module %s!\n", filename); - complain ("error was"); - } - - return handle; -} - -static int -moduletest (lt_dlhandle handle) -{ - const lt_dlinfo *info = lt_dlgetinfo (handle); - fun *f = (fun *) lt_dlsym (handle, "f"); - int *v = (int *) lt_dlsym (handle, "i"); - - if (!f) - { - complain ("function `f' not found"); - return 1; - } - if (!v) - { - complain ("variable `i' not found"); - return 1; - } - printf ("%s: %d\n", info->name, f (*v)); - - return 0; -} - -int -main (int argc, char **argv) -{ - lt_dlhandle handle; - - LTDL_SET_PRELOADED_SYMBOLS(); - - if (lt_dlinit() != 0) - { - fprintf (stderr, "error during initialization: %s\n", lt_dlerror()); - return 1; - } - if (lt_dlpreload_open (0, moduletest) != 0) - complain ("error during preloading"); +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I ltdl/m4 +AUTOMAKE_OPTIONS = 1.9.6 +BUILT_SOURCES = - if (lt_dlexit () != 0) - complain ("error during exit"); +AM_CPPFLAGS = +AM_LDFLAGS = - return (errors != 0); -} -_ATEOF +include_HEADERS = +noinst_LTLIBRARIES = +lib_LTLIBRARIES = foo.la +EXTRA_LTLIBRARIES = +EXTRA_DIST = -cat >foo1.c <<'_ATEOF' -#define f foo1_LTX_f -#define i foo1_LTX_i -#ifdef __cplusplus -extern "C" { -#endif -int f (int x) { return x / 3; } -int i = 7; -#ifdef __cplusplus -} -#endif -_ATEOF +CLEANFILES = +MOSTLYCLEANFILES = +include ltdl/Makefile.inc -cat >foo2.c <<'_ATEOF' -#define f libfoo2_LTX_f -#define i libfoo2_LTX_i -#ifdef __cplusplus -extern "C" { -#endif -int f (int x) { return (x * x) / 10; } -int i = 6; -#ifdef __cplusplus -} -#endif +foo_la_LDFLAGS = -module -avoid-version -no-undefined +foo_la_SOURCES = foo.c _ATEOF -cat >expout <<'_ATEOF' -libfoo1: 2 -libfoo2: 3 -_ATEOF +echo 'int dummy = 0;' > foo.c -case $host_os in mingw*) - while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t - mv -f expout.t expout ;; -esac -: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} -: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} +$LIBTOOLIZE --copy --ltdl + -# Skip this test when called from: -# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install { set +x -$as_echo "$at_srcdir/need_lib_prefix.at:144: case \$LIBLTDL in #( - */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; -esac" -at_fn_check_prepare_notrace 'an embedded newline' "need_lib_prefix.at:144" -( $at_check_trace; case $LIBLTDL in #( - */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; -esac +$as_echo "$at_srcdir/nonrecursive.at:107: if test -f ltdl/configure.ac; then false; fi" +at_fn_check_prepare_trace "nonrecursive.at:107" +( $at_check_trace; if test -f ltdl/configure.ac; then false; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:144" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:107" $at_failed && at_fn_log_failure $at_traceon; } -CPPFLAGS="$LTDLINCL $CPPFLAGS" -LDFLAGS="$LDFLAGS" - -# Create our own libtool, forcing need_lib_prefix setting -sed 's,^\(need_lib_prefix\)=.*$,\1=unknown,' $LIBTOOL > ./libtool -LIBTOOL="$SHELL ./libtool" - -# Installation directory: -instdir=`pwd`/_inst - -$CC $CPPFLAGS $CFLAGS -c main.c -for file in foo1 foo2; do - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file.c +# Support vanilla autoconf-2.59 & automake-1.9.6 +for file in argz.c lt__dirent.c lt__strl.c; do + cp ltdl/$file $file done + { set +x -$as_echo "$at_srcdir/need_lib_prefix.at:163: \$LIBTOOL --mode=link \$CC -module -avoid-version \$CFLAGS \$LDFLAGS -o foo1.la foo1.lo -rpath \$instdir/lib" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o foo1.la foo1.lo -rpath $instdir/lib" "need_lib_prefix.at:163" -( $at_check_trace; $LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o foo1.la foo1.lo -rpath $instdir/lib +$as_echo "$at_srcdir/nonrecursive.at:114: \$ACLOCAL -I ltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I ltdl/m4" "nonrecursive.at:114" +( $at_check_trace; $ACLOCAL -I ltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:163" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/need_lib_prefix.at:165: \$LIBTOOL --mode=link \$CC -module -avoid-version \$CFLAGS \$LDFLAGS -o libfoo2.la foo2.lo -rpath \$instdir/lib" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o libfoo2.la foo2.lo -rpath $instdir/lib" "need_lib_prefix.at:165" -( $at_check_trace; $LIBTOOL --mode=link $CC -module -avoid-version $CFLAGS $LDFLAGS -o libfoo2.la foo2.lo -rpath $instdir/lib +$as_echo "$at_srcdir/nonrecursive.at:114: \$AUTOHEADER " +at_fn_check_prepare_dynamic "$AUTOHEADER " "nonrecursive.at:114" +( $at_check_trace; $AUTOHEADER ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:165" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/need_lib_prefix.at:167: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la \$LIBLTDL" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la $LIBLTDL" "need_lib_prefix.at:167" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -dlpreopen foo1.la -dlpreopen libfoo2.la $LIBLTDL +$as_echo "$at_srcdir/nonrecursive.at:114: \$AUTOMAKE --add-missing --copy" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "nonrecursive.at:114" +( $at_check_trace; $AUTOMAKE --add-missing --copy ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:167" -$at_failed && at_fn_log_failure -$at_traceon; } - - -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/need_lib_prefix.at:170: if \$LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "need_lib_prefix.at:170" -( $at_check_trace; if $LIBTOOL --mode=execute -dlopen foo1.la -dlopen libfoo2.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/nonrecursive.at:114: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "nonrecursive.at:114" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:170" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/nonrecursive.at:114" $at_failed && at_fn_log_failure $at_traceon; } - - -# Install the libraries. -mkdir $instdir -mkdir $instdir/lib -$LIBTOOL --mode=install cp foo1.la $instdir/lib/foo1.la -$LIBTOOL --mode=install cp libfoo2.la $instdir/lib/libfoo2.la - -# Install the binary -mkdir $instdir/bin -$LIBTOOL --mode=install cp main$EXEEXT $instdir/bin/main$EXEEXT - -lt_exe=$instdir/bin/main; if test -f "$instdir/bin/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/need_lib_prefix.at:183: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "need_lib_prefix.at:183" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/need_lib_prefix.at:183" +fi $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_74 -#AT_START_75 -# 75. standalone.at:31: compiling softlinked libltdl -at_setup_line='standalone.at:31' -at_fn_banner 7 -at_desc="compiling softlinked libltdl" -at_desc_line=" 75: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "75. standalone.at:31: testing ..." - $at_traceon - { set +x -$as_echo "$at_srcdir/standalone.at:33: \$LIBTOOLIZE --ltdl=. - -" -at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:33" -( $at_check_trace; $LIBTOOLIZE --ltdl=. - - +$as_echo "$at_srcdir/nonrecursive.at:114: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "nonrecursive.at:114" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:33" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114" $at_failed && at_fn_log_failure $at_traceon; } + + { set +x -$as_echo "$at_srcdir/standalone.at:34: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "standalone.at:34" +$as_echo "$at_srcdir/nonrecursive.at:114: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "nonrecursive.at:114" ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:34" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114" $at_failed && at_fn_log_failure $at_traceon; } @@ -17002,167 +20014,213 @@ $at_traceon; } for target in all $tst_dist do { set +x -$as_echo "$at_srcdir/standalone.at:35: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "standalone.at:35" +$as_echo "$at_srcdir/nonrecursive.at:114: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "nonrecursive.at:114" ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:35" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114" $at_failed && at_fn_log_failure $at_traceon; } done + { set +x -$as_echo "$at_srcdir/standalone.at:37: test -f libltdlc.la" -at_fn_check_prepare_trace "standalone.at:37" -( $at_check_trace; test -f libltdlc.la +$as_echo "$at_srcdir/nonrecursive.at:117: test -f ltdl/libltdlc.la" +at_fn_check_prepare_trace "nonrecursive.at:117" +( $at_check_trace; test -f ltdl/libltdlc.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:37" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:117" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_75 -#AT_START_76 -# 76. standalone.at:46: compiling copied libltdl -at_setup_line='standalone.at:46' -at_fn_banner 7 -at_desc="compiling copied libltdl" -at_desc_line=" 76: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_94 +#AT_START_95 +at_fn_group_banner 95 'nonrecursive.at:126' \ + "installable libltdl" " " 10 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOHEADER" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes ( - $as_echo "76. standalone.at:46: testing ..." + $as_echo "95. $at_setup_line: testing $at_desc ..." $at_traceon -{ set +x -$as_echo "$at_srcdir/standalone.at:48: \$LIBTOOLIZE --copy --ltdl=. +cat >configure.ac <<'_ATEOF' +AC_INIT([subdirectory-demo], 2.4, bug-libtool@gnu.org) +LT_CONFIG_LTDL_DIR([ltdl]) +AC_CONFIG_AUX_DIR([ltdl/config]) +AC_CONFIG_MACRO_DIR([ltdl/m4]) +AC_CONFIG_LIBOBJ_DIR([ltdl]) +AC_CONFIG_HEADERS([config.h:config.hin]) +AM_INIT_AUTOMAKE([foreign subdir-objects]) +AC_PROG_CC +AM_PROG_CC_C_O +LT_INIT +LTDL_INIT([nonrecursive]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +_ATEOF + + +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I ltdl/m4 +AUTOMAKE_OPTIONS = 1.9.6 +BUILT_SOURCES = + +AM_CPPFLAGS = +AM_LDFLAGS = + +include_HEADERS = +noinst_LTLIBRARIES = +lib_LTLIBRARIES = foo.la +EXTRA_LTLIBRARIES = + +EXTRA_DIST = + +CLEANFILES = +MOSTLYCLEANFILES = + +include ltdl/Makefile.inc + +foo_la_LDFLAGS = -module -avoid-version -no-undefined +foo_la_SOURCES = foo.c +_ATEOF + + +echo 'int dummy = 0;' > foo.c -" -at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:48" -( $at_check_trace; $LIBTOOLIZE --copy --ltdl=. + +prefix=`pwd`/_inst + +$LIBTOOLIZE --copy --ltdl +{ set +x +$as_echo "$at_srcdir/nonrecursive.at:133: if test -f ltdl/configure.ac; then false; fi" +at_fn_check_prepare_trace "nonrecursive.at:133" +( $at_check_trace; if test -f ltdl/configure.ac; then false; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:48" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:133" $at_failed && at_fn_log_failure $at_traceon; } +# Support vanilla autoconf-2.59 & automake-1.9.6 +for file in argz.c lt__dirent.c lt__strl.c; do + cp ltdl/$file $file +done + + { set +x -$as_echo "$at_srcdir/standalone.at:49: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "standalone.at:49" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +$as_echo "$at_srcdir/nonrecursive.at:140: \$ACLOCAL -I ltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I ltdl/m4" "nonrecursive.at:140" +( $at_check_trace; $ACLOCAL -I ltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:49" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140" $at_failed && at_fn_log_failure $at_traceon; } -for target in all $tst_dist -do - { set +x -$as_echo "$at_srcdir/standalone.at:50: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "standalone.at:50" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target + + +{ set +x +$as_echo "$at_srcdir/nonrecursive.at:140: \$AUTOHEADER " +at_fn_check_prepare_dynamic "$AUTOHEADER " "nonrecursive.at:140" +( $at_check_trace; $AUTOHEADER ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:50" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140" $at_failed && at_fn_log_failure $at_traceon; } -done + { set +x -$as_echo "$at_srcdir/standalone.at:52: test -f libltdlc.la" -at_fn_check_prepare_trace "standalone.at:52" -( $at_check_trace; test -f libltdlc.la +$as_echo "$at_srcdir/nonrecursive.at:140: \$AUTOMAKE --add-missing --copy" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "nonrecursive.at:140" +( $at_check_trace; $AUTOMAKE --add-missing --copy +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/nonrecursive.at:140: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "nonrecursive.at:140" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:52" +at_fn_check_status 1 $at_status "$at_srcdir/nonrecursive.at:140" $at_failed && at_fn_log_failure $at_traceon; } +fi +$at_failed && at_fn_log_failure +$at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_76 -#AT_START_77 -# 77. standalone.at:61: installable libltdl -at_setup_line='standalone.at:61' -at_fn_banner 7 -at_desc="installable libltdl" -at_desc_line=" 77: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "77. standalone.at:61: testing ..." - $at_traceon -prefix=`pwd`/_inst { set +x -$as_echo "$at_srcdir/standalone.at:65: \$LIBTOOLIZE --copy --ltdl=. - -" -at_fn_check_prepare_notrace 'an embedded newline' "standalone.at:65" -( $at_check_trace; $LIBTOOLIZE --copy --ltdl=. - - +$as_echo "$at_srcdir/nonrecursive.at:140: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "nonrecursive.at:140" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:65" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140" $at_failed && at_fn_log_failure $at_traceon; } + + { set +x -$as_echo "$at_srcdir/standalone.at:66: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "standalone.at:66" +$as_echo "$at_srcdir/nonrecursive.at:140: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "nonrecursive.at:140" ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:66" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140" $at_failed && at_fn_log_failure $at_traceon; } @@ -17170,308 +20228,267 @@ $at_traceon; } for target in all install $tst_dist do { set +x -$as_echo "$at_srcdir/standalone.at:67: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "standalone.at:67" +$as_echo "$at_srcdir/nonrecursive.at:140: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "nonrecursive.at:140" ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:67" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140" $at_failed && at_fn_log_failure $at_traceon; } done + { set +x -$as_echo "$at_srcdir/standalone.at:69: test -f \$prefix/lib/libltdl.la" -at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "standalone.at:69" +$as_echo "$at_srcdir/nonrecursive.at:143: test -f \$prefix/lib/libltdl.la" +at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "nonrecursive.at:143" ( $at_check_trace; test -f $prefix/lib/libltdl.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:69" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:143" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/standalone.at:70: test -f \$prefix/include/ltdl.h" -at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "standalone.at:70" +$as_echo "$at_srcdir/nonrecursive.at:144: test -f \$prefix/include/ltdl.h" +at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "nonrecursive.at:144" ( $at_check_trace; test -f $prefix/include/ltdl.h ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:70" +at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:144" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_77 -#AT_START_78 -# 78. standalone.at:79: linking libltdl without autotools -at_setup_line='standalone.at:79' -at_fn_banner 7 -at_desc="linking libltdl without autotools" -at_desc_line=" 78: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_95 +#AT_START_96 +at_fn_group_banner 96 'recursive.at:60' \ + "compiling softlinked libltdl" " " 11 at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" + case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes ( - $as_echo "78. standalone.at:79: testing ..." + $as_echo "96. $at_setup_line: testing $at_desc ..." $at_traceon -cat >module.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" -#endif -const char * -hello (void) -{ - return "Hello!"; -} +cat >configure.ac <<'_ATEOF' +AC_INIT([subdirectory-demo], 2.4, bug-libtool@gnu.org) +LT_CONFIG_LTDL_DIR([ltdl]) +AC_CONFIG_AUX_DIR([ltdl/config]) +AC_CONFIG_MACRO_DIR([ltdl/m4]) +AC_CONFIG_LIBOBJ_DIR([ltdl]) +AC_CONFIG_HEADERS([config.h:config.hin]) +AM_INIT_AUTOMAKE([foreign]) +LT_INIT +LTDL_INIT([recursive]) +AC_CONFIG_FILES([Makefile ltdl/Makefile]) +AC_OUTPUT _ATEOF -cat >main.c <<'_ATEOF' -#include -#include "ltdl.h" - -int -main () -{ - lt_dlhandle module; - const char *(*func) (void) = 0; - int status = 1; - - LTDL_SET_PRELOADED_SYMBOLS(); - if (lt_dlinit() != 0) { - fprintf (stderr, "error during initialisation: %s\n", lt_dlerror()); - return 1; - } - - module = lt_dlopen("./module.la"); - if (!module) { - fprintf (stderr, "error dlopening ./module.la: %s\n", lt_dlerror()); - goto finish; - } - - func = (const char *(*)(void)) lt_dlsym (module, "hello"); - if (!func) { - fprintf (stderr, "error fetching func: %s\n", lt_dlerror()); - goto finish; - } - - printf ("%s\n", (*func) ()); - status = 0; - -finish: - if (lt_dlexit() != 0) { - fprintf (stderr, "error during finalisation: %s\n", lt_dlerror()); - status = 1; - } - - return status; -} +cat >Makefile.am <<'_ATEOF' +ACLOCAL_AMFLAGS = -I ltdl/m4 +AUTOMAKE_OPTIONS = 1.7 +SUBDIRS = ltdl +lib_LTLIBRARIES = foo.la +foo_la_LDFLAGS = -module -avoid-version -no-undefined +foo_la_SOURCES = foo.c _ATEOF +echo 'int dummy = 0;' > foo.c -cat >Makefile <<'_ATEOF' -top_builddir = . -LIBTOOL = ./libltdl/libtool -INCLUDES = -I./libltdl -MODFLAGS = -module -avoid-version -no-undefined - -LTCOMPILE = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile \ - $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -LTLINK = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=link \ - $(CC) $(CFLAGS) $(LDFLAGS) - -TARGETS = libltdl/libltdlc.la module.la ltdldemo$(EXEEXT) - -all: $(TARGETS) - -libltdl/libltdlc.la: $(LIBTOOL) libltdl/Makefile - MAKE='$(MAKE)'; test -n "$$MAKE" || MAKE=make; \ - cd libltdl && $$MAKE CC="$(CC)" LIBTOOLFLAGS="$(LIBTOOLFLAGS)" \ - CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ - CONFIGURE_OPTIONS="$(CONFIGURE_OPTIONS)" -$(LIBTOOL): libltdl/Makefile +$LIBTOOLIZE --ltdl -libltdl/Makefile: - cd libltdl && CONFIG_SHELL="$(SHELL)" $(SHELL) ./configure $(CONFIGURE_OPTIONS) -ltdldemo$(EXEEXT): $(LIBTOOL) module.la libltdl/libltdlc.la main.lo - $(LTLINK) -o ltdldemo$(EXEEXT) main.lo -dlopen module.la ./libltdl/libltdlc.la +{ set +x +$as_echo "$at_srcdir/recursive.at:65: if test -f ltdl/configure.ac; then false; fi" +at_fn_check_prepare_trace "recursive.at:65" +( $at_check_trace; if test -f ltdl/configure.ac; then false; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:65" +$at_failed && at_fn_log_failure +$at_traceon; } -main.lo: $(LIBTOOL) main.c - $(LTCOMPILE) -c main.c -module.la: $(LIBTOOL) module.lo - $(LTLINK) -o module.la module.lo $(MODFLAGS) -rpath /dev/null +{ set +x +$as_echo "$at_srcdir/recursive.at:67: \$AUTORECONF --force --verbose --install" +at_fn_check_prepare_dynamic "$AUTORECONF --force --verbose --install" "recursive.at:67" +( $at_check_trace; $AUTORECONF --force --verbose --install +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:67" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/recursive.at:67: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "recursive.at:67" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/recursive.at:67" +$at_failed && at_fn_log_failure +$at_traceon; } -module.lo: $(LIBTOOL) module.c - $(LTCOMPILE) -c module.c -_ATEOF +fi +$at_failed && at_fn_log_failure +$at_traceon; } -cat >> Makefile <>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:82" +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:68" $at_failed && at_fn_log_failure $at_traceon; } -for target in all +for target in all $tst_dist do { set +x -$as_echo "$at_srcdir/standalone.at:83: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target CC=\"\$CC\" LIBTOOLFLAGS=\"\$LIBTOOLFLAGS\" CPPFLAGS=\"\$CPPFLAGS\" CFLAGS=\"\$CFLAGS\" LDFLAGS=\"\$LDFLAGS\" CONFIGURE_OPTIONS=\"\$configure_options\"" -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target CC=\"$CC\" LIBTOOLFLAGS=\"$LIBTOOLFLAGS\" CPPFLAGS=\"$CPPFLAGS\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\" CONFIGURE_OPTIONS=\"$configure_options\"" "standalone.at:83" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CONFIGURE_OPTIONS="$configure_options" +$as_echo "$at_srcdir/recursive.at:69: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "recursive.at:69" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:83" +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:69" $at_failed && at_fn_log_failure $at_traceon; } done -lt_exe=./ltdldemo; if test -f "./ltdldemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/standalone.at:87: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "standalone.at:87" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/recursive.at:71: test -f ltdl/libltdlc.la" +at_fn_check_prepare_trace "recursive.at:71" +( $at_check_trace; test -f ltdl/libltdlc.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/standalone.at:87" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:71" $at_failed && at_fn_log_failure $at_traceon; } - set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_78 -#AT_START_79 -# 79. subproject.at:57: compiling softlinked libltdl -at_setup_line='subproject.at:57' -at_fn_banner 8 -at_desc="compiling softlinked libltdl" -at_desc_line=" 79: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_96 +#AT_START_97 +at_fn_group_banner 97 'recursive.at:80' \ + "compiling copied libltdl" " " 11 at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOMAKE" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" + case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes ( - $as_echo "79. subproject.at:57: testing ..." + $as_echo "97. $at_setup_line: testing $at_desc ..." $at_traceon cat >configure.ac <<'_ATEOF' -AC_INIT([subproject-demo], 2.2.10, bug-libtool@gnu.org) -LT_CONFIG_LTDL_DIR([sub/ltdl]) -AC_CONFIG_AUX_DIR([sub/ltdl/config]) -AC_CONFIG_MACRO_DIR([sub/ltdl/m4]) +AC_INIT([subdirectory-demo], 2.4, bug-libtool@gnu.org) +LT_CONFIG_LTDL_DIR([ltdl]) +AC_CONFIG_AUX_DIR([ltdl/config]) +AC_CONFIG_MACRO_DIR([ltdl/m4]) +AC_CONFIG_LIBOBJ_DIR([ltdl]) +AC_CONFIG_HEADERS([config.h:config.hin]) AM_INIT_AUTOMAKE([foreign]) LT_INIT -LT_WITH_LTDL -AC_CONFIG_FILES([Makefile]) +LTDL_INIT([recursive]) +AC_CONFIG_FILES([Makefile ltdl/Makefile]) AC_OUTPUT _ATEOF cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I sub/ltdl/m4 -AUTOMAKE_OPTIONS = 1.9 -SUBDIRS = sub/ltdl +ACLOCAL_AMFLAGS = -I ltdl/m4 +AUTOMAKE_OPTIONS = 1.7 +SUBDIRS = ltdl lib_LTLIBRARIES = foo.la foo_la_LDFLAGS = -module -avoid-version -no-undefined +foo_la_SOURCES = foo.c _ATEOF echo 'int dummy = 0;' > foo.c -$LIBTOOLIZE --ltdl +$LIBTOOLIZE --copy --ltdl { set +x -$as_echo "$at_srcdir/subproject.at:61: \$ACLOCAL -I sub/ltdl/m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I sub/ltdl/m4" "subproject.at:61" -( $at_check_trace; $ACLOCAL -I sub/ltdl/m4 +$as_echo "$at_srcdir/recursive.at:85: if test -f ltdl/configure.ac; then false; fi" +at_fn_check_prepare_trace "recursive.at:85" +( $at_check_trace; if test -f ltdl/configure.ac; then false; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:85" $at_failed && at_fn_log_failure $at_traceon; } - - - { set +x -$as_echo "$at_srcdir/subproject.at:61: \$AUTOMAKE --add-missing --copy" -at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "subproject.at:61" -( $at_check_trace; $AUTOMAKE --add-missing --copy +$as_echo "$at_srcdir/recursive.at:87: \$AUTORECONF --force --verbose --install" +at_fn_check_prepare_dynamic "$AUTORECONF --force --verbose --install" "recursive.at:87" +( $at_check_trace; $AUTORECONF --force --verbose --install ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61" +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:87" if $at_failed; then : { set +x -$as_echo "$at_srcdir/subproject.at:61: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "subproject.at:61" +$as_echo "$at_srcdir/recursive.at:87: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "recursive.at:87" ( $at_check_trace; grep 'require .*but have' stderr && (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/subproject.at:61" +at_fn_check_status 1 $at_status "$at_srcdir/recursive.at:87" $at_failed && at_fn_log_failure $at_traceon; } @@ -17483,31 +20500,15 @@ $at_traceon; } { set +x -$as_echo "$at_srcdir/subproject.at:61: \$AUTOCONF " -at_fn_check_prepare_dynamic "$AUTOCONF " "subproject.at:61" -( $at_check_trace; $AUTOCONF -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61" -$at_failed && at_fn_log_failure -$at_traceon; } - - - - -{ set +x -$as_echo "$at_srcdir/subproject.at:61: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:61" +$as_echo "$at_srcdir/recursive.at:88: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "recursive.at:88" ( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61" +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:88" $at_failed && at_fn_log_failure $at_traceon; } @@ -17515,124 +20516,118 @@ $at_traceon; } for target in all $tst_dist do { set +x -$as_echo "$at_srcdir/subproject.at:61: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "subproject.at:61" +$as_echo "$at_srcdir/recursive.at:89: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "recursive.at:89" ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:61" +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:89" $at_failed && at_fn_log_failure $at_traceon; } done - { set +x -$as_echo "$at_srcdir/subproject.at:64: test -f sub/ltdl/libltdlc.la" -at_fn_check_prepare_trace "subproject.at:64" -( $at_check_trace; test -f sub/ltdl/libltdlc.la +$as_echo "$at_srcdir/recursive.at:91: test -f ltdl/libltdlc.la" +at_fn_check_prepare_trace "recursive.at:91" +( $at_check_trace; test -f ltdl/libltdlc.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:64" +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:91" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_79 -#AT_START_80 -# 80. subproject.at:73: compiling copied libltdl -at_setup_line='subproject.at:73' -at_fn_banner 8 -at_desc="compiling copied libltdl" -at_desc_line=" 80: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_97 +#AT_START_98 +at_fn_group_banner 98 'recursive.at:100' \ + "installable libltdl" " " 11 at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOMAKE" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" + case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes ( - $as_echo "80. subproject.at:73: testing ..." + $as_echo "98. $at_setup_line: testing $at_desc ..." $at_traceon cat >configure.ac <<'_ATEOF' -AC_INIT([subproject-demo], 2.2.10, bug-libtool@gnu.org) -LT_CONFIG_LTDL_DIR([sub/ltdl]) -AC_CONFIG_AUX_DIR([sub/ltdl/config]) -AC_CONFIG_MACRO_DIR([sub/ltdl/m4]) +AC_INIT([subdirectory-demo], 2.4, bug-libtool@gnu.org) +LT_CONFIG_LTDL_DIR([ltdl]) +AC_CONFIG_AUX_DIR([ltdl/config]) +AC_CONFIG_MACRO_DIR([ltdl/m4]) +AC_CONFIG_LIBOBJ_DIR([ltdl]) +AC_CONFIG_HEADERS([config.h:config.hin]) AM_INIT_AUTOMAKE([foreign]) LT_INIT -LT_WITH_LTDL -AC_CONFIG_FILES([Makefile]) +LTDL_INIT([recursive]) +AC_CONFIG_FILES([Makefile ltdl/Makefile]) AC_OUTPUT _ATEOF cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I sub/ltdl/m4 -AUTOMAKE_OPTIONS = 1.9 -SUBDIRS = sub/ltdl +ACLOCAL_AMFLAGS = -I ltdl/m4 +AUTOMAKE_OPTIONS = 1.7 +SUBDIRS = ltdl lib_LTLIBRARIES = foo.la foo_la_LDFLAGS = -module -avoid-version -no-undefined +foo_la_SOURCES = foo.c _ATEOF echo 'int dummy = 0;' > foo.c +prefix=`pwd`/_inst + $LIBTOOLIZE --copy --ltdl { set +x -$as_echo "$at_srcdir/subproject.at:77: \$ACLOCAL -I sub/ltdl/m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I sub/ltdl/m4" "subproject.at:77" -( $at_check_trace; $ACLOCAL -I sub/ltdl/m4 +$as_echo "$at_srcdir/recursive.at:107: if test -f ltdl/configure.ac; then false; fi" +at_fn_check_prepare_trace "recursive.at:107" +( $at_check_trace; if test -f ltdl/configure.ac; then false; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:107" $at_failed && at_fn_log_failure $at_traceon; } - - - { set +x -$as_echo "$at_srcdir/subproject.at:77: \$AUTOMAKE --add-missing --copy" -at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "subproject.at:77" -( $at_check_trace; $AUTOMAKE --add-missing --copy +$as_echo "$at_srcdir/recursive.at:109: \$AUTORECONF --force --verbose --install" +at_fn_check_prepare_dynamic "$AUTORECONF --force --verbose --install" "recursive.at:109" +( $at_check_trace; $AUTORECONF --force --verbose --install ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77" +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:109" if $at_failed; then : { set +x -$as_echo "$at_srcdir/subproject.at:77: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "subproject.at:77" +$as_echo "$at_srcdir/recursive.at:109: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "recursive.at:109" ( $at_check_trace; grep 'require .*but have' stderr && (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/subproject.at:77" +at_fn_check_status 1 $at_status "$at_srcdir/recursive.at:109" $at_failed && at_fn_log_failure $at_traceon; } @@ -17644,4084 +20639,4735 @@ $at_traceon; } { set +x -$as_echo "$at_srcdir/subproject.at:77: \$AUTOCONF " -at_fn_check_prepare_dynamic "$AUTOCONF " "subproject.at:77" -( $at_check_trace; $AUTOCONF +$as_echo "$at_srcdir/recursive.at:110: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "recursive.at:110" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77" +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:110" +$at_failed && at_fn_log_failure +$at_traceon; } + + +for target in all install $tst_dist +do + { set +x +$as_echo "$at_srcdir/recursive.at:111: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "recursive.at:111" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:111" $at_failed && at_fn_log_failure $at_traceon; } +done +{ set +x +$as_echo "$at_srcdir/recursive.at:113: test -f \$prefix/lib/libltdl.la" +at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "recursive.at:113" +( $at_check_trace; test -f $prefix/lib/libltdl.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:113" +$at_failed && at_fn_log_failure +$at_traceon; } { set +x -$as_echo "$at_srcdir/subproject.at:77: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:77" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +$as_echo "$at_srcdir/recursive.at:114: test -f \$prefix/include/ltdl.h" +at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "recursive.at:114" +( $at_check_trace; test -f $prefix/include/ltdl.h ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:114" $at_failed && at_fn_log_failure $at_traceon; } -for target in all $tst_dist -do - { set +x -$as_echo "$at_srcdir/subproject.at:77: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "subproject.at:77" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_98 +#AT_START_99 +at_fn_group_banner 99 'template.at:27' \ + "simple template test" " " 12 +at_xfail=no +( + $as_echo "99. $at_setup_line: testing $at_desc ..." + $at_traceon + + +{ set +x +$as_echo "$at_srcdir/template.at:28: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "template.at:28" +( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:77" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/template.at:28" $at_failed && at_fn_log_failure $at_traceon; } -done - - - { set +x -$as_echo "$at_srcdir/subproject.at:80: test -f sub/ltdl/libltdlc.la" -at_fn_check_prepare_trace "subproject.at:80" -( $at_check_trace; test -f sub/ltdl/libltdlc.la +$as_echo "$at_srcdir/template.at:28: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" +at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "template.at:28" +( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:80" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:28" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_80 -#AT_START_81 -# 81. subproject.at:89: installable libltdl -at_setup_line='subproject.at:89' -at_fn_banner 8 -at_desc="installable libltdl" -at_desc_line=" 81: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOMAKE" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "81. subproject.at:89: testing ..." - $at_traceon -prefix=`pwd`/_inst +cat >aclib.h <<'_ATEOF' +int cf(int); +_ATEOF -cat >configure.ac <<'_ATEOF' -AC_INIT([subproject-demo], 2.2.10, bug-libtool@gnu.org) -LT_CONFIG_LTDL_DIR([sub/ltdl]) -AC_CONFIG_AUX_DIR([sub/ltdl/config]) -AC_CONFIG_MACRO_DIR([sub/ltdl/m4]) -AM_INIT_AUTOMAKE([foreign]) -LT_INIT -LT_WITH_LTDL -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT + +cat >aclib.cpp <<'_ATEOF' +#include "aclib.h" +template + +T cq(T b) +{ + return b * 3; +} + +int cf(int i) +{ + return cq(i); +} _ATEOF -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I sub/ltdl/m4 -AUTOMAKE_OPTIONS = 1.9 -SUBDIRS = sub/ltdl -lib_LTLIBRARIES = foo.la -foo_la_LDFLAGS = -module -avoid-version -no-undefined +cat >alib.h <<'_ATEOF' +int f(int); _ATEOF -echo 'int dummy = 0;' > foo.c +cat >alib.cpp <<'_ATEOF' +#include "alib.h" +template +T q(T b) +{ + return b * 2; +} -$LIBTOOLIZE --copy --ltdl +int f(int i) +{ + return q(i); +} +_ATEOF + + +cat >prog.cpp <<'_ATEOF' +#include "alib.h" +#include "aclib.h" + +int main() +{ + return f(3) + 3 - cf(3) != 0; +} +_ATEOF { set +x -$as_echo "$at_srcdir/subproject.at:95: \$ACLOCAL -I sub/ltdl/m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I sub/ltdl/m4" "subproject.at:95" -( $at_check_trace; $ACLOCAL -I sub/ltdl/m4 +$as_echo "$at_srcdir/template.at:79: \$LIBTOOL --tag=CXX --mode=compile \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c -o alib.lo alib.cpp" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o alib.lo alib.cpp" "template.at:79" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o alib.lo alib.cpp ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:79" $at_failed && at_fn_log_failure $at_traceon; } - - - - { set +x -$as_echo "$at_srcdir/subproject.at:95: \$AUTOMAKE --add-missing --copy" -at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "subproject.at:95" -( $at_check_trace; $AUTOMAKE --add-missing --copy +$as_echo "$at_srcdir/template.at:81: \$LIBTOOL --tag=CXX --mode=compile \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c -o aclib.lo aclib.cpp" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o aclib.lo aclib.cpp" "template.at:81" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o aclib.lo aclib.cpp ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95" -if $at_failed; then : - { set +x -$as_echo "$at_srcdir/subproject.at:95: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "subproject.at:95" -( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +at_fn_check_status 0 $at_status "$at_srcdir/template.at:81" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/template.at:83: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o libaclib.la aclib.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libaclib.la aclib.lo" "template.at:83" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libaclib.la aclib.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/subproject.at:95" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:83" $at_failed && at_fn_log_failure $at_traceon; } -fi +{ set +x +$as_echo "$at_srcdir/template.at:85: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o libalib.la -rpath /nonexistent alib.lo libaclib.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libalib.la -rpath /nonexistent alib.lo libaclib.la" "template.at:85" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libalib.la -rpath /nonexistent alib.lo libaclib.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:85" $at_failed && at_fn_log_failure $at_traceon; } - - - { set +x -$as_echo "$at_srcdir/subproject.at:95: \$AUTOCONF " -at_fn_check_prepare_dynamic "$AUTOCONF " "subproject.at:95" -( $at_check_trace; $AUTOCONF +$as_echo "$at_srcdir/template.at:87: \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c prog.cpp" +at_fn_check_prepare_dynamic "$CXX -I. $CPPFLAGS $CXXFLAGS -c prog.cpp" "template.at:87" +( $at_check_trace; $CXX -I. $CPPFLAGS $CXXFLAGS -c prog.cpp ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:87" $at_failed && at_fn_log_failure $at_traceon; } - - - { set +x -$as_echo "$at_srcdir/subproject.at:95: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:95" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix +$as_echo "$at_srcdir/template.at:89: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o prog\$EXEEXT prog.\$OBJEXT libalib.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o prog$EXEEXT prog.$OBJEXT libalib.la" "template.at:89" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o prog$EXEEXT prog.$OBJEXT libalib.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:89" $at_failed && at_fn_log_failure $at_traceon; } -for target in all install $tst_dist -do - { set +x -$as_echo "$at_srcdir/subproject.at:95: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "subproject.at:95" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +lt_exe=./prog; if test -f "./prog$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/template.at:92: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:92" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:95" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:92" $at_failed && at_fn_log_failure $at_traceon; } -done + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_99 +#AT_START_100 +at_fn_group_banner 100 'template.at:126' \ + "template test with subdirs" " " 12 +at_xfail=no +( + $as_echo "100. $at_setup_line: testing $at_desc ..." + $at_traceon + + { set +x -$as_echo "$at_srcdir/subproject.at:99: test -f \$prefix/lib/libltdl.la" -at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "subproject.at:99" -( $at_check_trace; test -f $prefix/lib/libltdl.la +$as_echo "$at_srcdir/template.at:127: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "template.at:127" +( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:99" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:127" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/subproject.at:100: test -f \$prefix/include/ltdl.h" -at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "subproject.at:100" -( $at_check_trace; test -f $prefix/include/ltdl.h +$as_echo "$at_srcdir/template.at:127: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" +at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "template.at:127" +( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:100" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:127" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_81 -#AT_START_82 -# 82. subproject.at:109: linking libltdl without autotools -at_setup_line='subproject.at:109' -at_fn_banner 8 -at_desc="linking libltdl without autotools" -at_desc_line=" 82: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "82. subproject.at:109: testing ..." - $at_traceon - - -cat >module.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" -#endif -const char * -hello (void) -{ - return "Hello!"; -} -_ATEOF - - -cat >main.c <<'_ATEOF' -#include -#include "ltdl.h" - -int -main () -{ - lt_dlhandle module; - const char *(*func) (void) = 0; - int status = 1; - LTDL_SET_PRELOADED_SYMBOLS(); - if (lt_dlinit() != 0) { - fprintf (stderr, "error during initialisation: %s\n", lt_dlerror()); - return 1; - } - module = lt_dlopen("./module.la"); - if (!module) { - fprintf (stderr, "error dlopening ./module.la: %s\n", lt_dlerror()); - goto finish; - } +noskip=: +# Mac OS X. +# The linker has issues with this test. +case $host in +*-darwin*) noskip=false ;; +esac - func = (const char *(*)(void)) lt_dlsym (module, "hello"); - if (!func) { - fprintf (stderr, "error fetching func: %s\n", lt_dlerror()); - goto finish; - } - printf ("%s\n", (*func) ()); - status = 0; +CPPFLAGS="$CPPFLAGS -I../src/lib -I../src/lib2" -finish: - if (lt_dlexit() != 0) { - fprintf (stderr, "error during finalisation: %s\n", lt_dlerror()); - status = 1; - } +mkdir src obj +( cd src; mkdir lib lib2 sub ) +( cd obj; mkdir lib lib2 sub ) - return status; -} -_ATEOF +cat >src/lib/a.hh <<'_ATEOF' +template +unsigned int a(const T&); +template +unsigned int a(const T& t) +{ + return sizeof t; +} +extern int a2(char t); -cat >Makefile <<'_ATEOF' -top_builddir = . -LIBTOOL = ./sub/ltdl/libtool -INCLUDES = -I./sub/ltdl -MODFLAGS = -module -avoid-version -no-undefined +inline int a3(const double* t) +{ + return a(t); +} +_ATEOF -LTCOMPILE = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=compile \ - $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -LTLINK = $(LIBTOOL) --tag=CC $(LIBTOOLFLAGS) --mode=link \ - $(CC) $(CFLAGS) $(LDFLAGS) -TARGETS = sub/ltdl/libltdlc.la module.la ltdldemo$(EXEEXT) +cat >src/lib/a.cpp <<'_ATEOF' +#include "a.hh" -all: $(TARGETS) +int a2(char t) +{ + return a(t); +} +_ATEOF -sub/ltdl/libltdlc.la: $(LIBTOOL) sub/ltdl/Makefile - MAKE='$(MAKE)'; test -n "$$MAKE" || MAKE=make; \ - cd sub/ltdl && $$MAKE CC="$(CC)" LIBTOOLFLAGS="$(LIBTOOLFLAGS)" \ - CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ - CONFIGURE_OPTIONS="$(CONFIGURE_OPTIONS)" -$(LIBTOOL): sub/ltdl/Makefile +cat >src/lib2/b.hh <<'_ATEOF' +#include "a.hh" -sub/ltdl/Makefile: - cd sub/ltdl && CONFIG_SHELL="$(SHELL)" $(SHELL) ./configure $(CONFIGURE_OPTIONS) +template +unsigned int b(T& t) +{ + return a(t); +} +extern int b2(char* t); +struct bs { int bi; }; +extern int b3(bs t); +_ATEOF -ltdldemo$(EXEEXT): $(LIBTOOL) module.la sub/ltdl/libltdlc.la main.lo - $(LTLINK) -o ltdldemo$(EXEEXT) main.lo -dlopen module.la ./sub/ltdl/libltdlc.la -main.lo: $(LIBTOOL) main.c - $(LTCOMPILE) -c main.c +cat >src/lib2/b.cpp <<'_ATEOF' +#include "b.hh" -module.la: $(LIBTOOL) module.lo - $(LTLINK) -o module.la module.lo $(MODFLAGS) -rpath /dev/null +int b2(char* t) +{ + return a2(t[0]); +} -module.lo: $(LIBTOOL) module.c - $(LTCOMPILE) -c module.c +int b3(bs t) +{ + return b(t); +} _ATEOF -cat >> Makefile <src/sub/main.cpp <<'_ATEOF' +#include "b.hh" +int main() +{ + double foo; + const char s = ' '; + char d; + char *t = &d; + return b(foo) + a3(&foo) + b2(t) - a(s) + - (sizeof(double) + sizeof(double*)); +} +_ATEOF -$LIBTOOLIZE --copy --ltdl=sub/ltdl +cd obj -for target in all -do +# If the compiler supports -c -o, we want to use it: +# it may make a difference for templates +eval `$LIBTOOL --tag=CXX --config | grep ^compiler_c_o=` +case $compiler_c_o in +yes) + main_o=sub/main.$OBJEXT { set +x -$as_echo "$at_srcdir/subproject.at:113: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target CC=\"\$CC\" LIBTOOLFLAGS=\"\$LIBTOOLFLAGS\" CPPFLAGS=\"\$CPPFLAGS\" CFLAGS=\"\$CFLAGS\" LDFLAGS=\"\$LDFLAGS\" SHELL=\"\$SHELL\" MAKE=\"\${MAKE-make}\" CONFIGURE_OPTIONS=\"\$configure_options\"" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "subproject.at:113" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" SHELL="$SHELL" MAKE="${MAKE-make}" CONFIGURE_OPTIONS="$configure_options" +$as_echo "$at_srcdir/template.at:220: \$CXX \$CPPFLAGS \$CXXFLAGS -c -o \$main_o ../src/sub/main.cpp" +at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp" "template.at:220" +( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:113" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:220" $at_failed && at_fn_log_failure $at_traceon; } -done + ;; +*) + main_o=main.$OBJEXT + { set +x +$as_echo "$at_srcdir/template.at:225: \$CXX \$CPPFLAGS \$CXXFLAGS -c ../src/sub/main.cpp" +at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp" "template.at:225" +( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:225" +$at_failed && at_fn_log_failure +$at_traceon; } + ;; +esac -lt_exe=./ltdldemo; if test -f "./ltdldemo$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/subproject.at:117: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "subproject.at:117" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/template.at:230: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp" "template.at:230" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/subproject.at:117" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:230" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/template.at:232: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp" "template.at:232" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:232" +$at_failed && at_fn_log_failure +$at_traceon; } +{ set +x +$as_echo "$at_srcdir/template.at:234: \$CXX \$CPPFLAGS \$CXXFLAGS -c ../src/sub/main.cpp" +at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp" "template.at:234" +( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:234" +$at_failed && at_fn_log_failure +$at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_82 -#AT_START_83 -# 83. nonrecursive.at:78: compiling softlinked libltdl -at_setup_line='nonrecursive.at:78' -at_fn_banner 9 -at_desc="compiling softlinked libltdl" -at_desc_line=" 83: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOHEADER" = no && at_xfail=yes - test "$AUTOMAKE" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "83. nonrecursive.at:78: testing ..." - $at_traceon - - -cat >configure.ac <<'_ATEOF' -AC_INIT([subdirectory-demo], 2.2.10, bug-libtool@gnu.org) -LT_CONFIG_LTDL_DIR([ltdl]) -AC_CONFIG_AUX_DIR([ltdl/config]) -AC_CONFIG_MACRO_DIR([ltdl/m4]) -AC_CONFIG_LIBOBJ_DIR([ltdl]) -AC_CONFIG_HEADERS([config.h:config.hin]) -AM_INIT_AUTOMAKE([foreign subdir-objects]) -AC_PROG_CC -AM_PROG_CC_C_O -LT_INIT -LTDL_INIT([nonrecursive]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -_ATEOF - - -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I ltdl/m4 -AUTOMAKE_OPTIONS = 1.9.6 -BUILT_SOURCES = - -AM_CPPFLAGS = -AM_LDFLAGS = - -include_HEADERS = -noinst_LTLIBRARIES = -lib_LTLIBRARIES = foo.la -EXTRA_LTLIBRARIES = - -EXTRA_DIST = - -CLEANFILES = -MOSTLYCLEANFILES = - -include ltdl/Makefile.inc - -foo_la_LDFLAGS = -module -avoid-version -no-undefined -foo_la_SOURCES = foo.c -_ATEOF - - -echo 'int dummy = 0;' > foo.c - - -$LIBTOOLIZE --ltdl - - +# both convenience { set +x -$as_echo "$at_srcdir/nonrecursive.at:83: if test -f ltdl/configure.ac; then false; fi" -at_fn_check_prepare_trace "nonrecursive.at:83" -( $at_check_trace; if test -f ltdl/configure.ac; then false; fi +$as_echo "$at_srcdir/template.at:237: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo" "template.at:237" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:83" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:237" $at_failed && at_fn_log_failure $at_traceon; } - -# Support vanilla autoconf-2.59 & automake-1.9.6 -for file in argz.c lt__dirent.c lt__strl.c; do - cp ltdl/$file $file -done - - { set +x -$as_echo "$at_srcdir/nonrecursive.at:90: \$ACLOCAL -I ltdl/m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I ltdl/m4" "nonrecursive.at:90" -( $at_check_trace; $ACLOCAL -I ltdl/m4 +$as_echo "$at_srcdir/template.at:239: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo" "template.at:239" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:239" $at_failed && at_fn_log_failure $at_traceon; } - - - { set +x -$as_echo "$at_srcdir/nonrecursive.at:90: \$AUTOHEADER " -at_fn_check_prepare_dynamic "$AUTOHEADER " "nonrecursive.at:90" -( $at_check_trace; $AUTOHEADER +$as_echo "$at_srcdir/template.at:241: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la lib/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la" "template.at:241" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:241" $at_failed && at_fn_log_failure $at_traceon; } +lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/template.at:243: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != ignore && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != ignore && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:243" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != ignore && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_skip $at_status "$at_srcdir/template.at:243" +$at_failed && at_fn_log_failure +$at_traceon; } - -{ set +x -$as_echo "$at_srcdir/nonrecursive.at:90: \$AUTOMAKE --add-missing --copy" -at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "nonrecursive.at:90" -( $at_check_trace; $AUTOMAKE --add-missing --copy +# lib convenience +if $noskip; then + { set +x +$as_echo "$at_srcdir/template.at:246: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo" "template.at:246" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90" -if $at_failed; then : +at_fn_check_status 0 $at_status "$at_srcdir/template.at:246" +$at_failed && at_fn_log_failure +$at_traceon; } + { set +x -$as_echo "$at_srcdir/nonrecursive.at:90: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "nonrecursive.at:90" -( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +$as_echo "$at_srcdir/template.at:248: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la lib/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la" "template.at:248" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/nonrecursive.at:90" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:248" $at_failed && at_fn_log_failure $at_traceon; } -fi + lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/template.at:250: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:250" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/template.at:250" $at_failed && at_fn_log_failure $at_traceon; } +fi - +# both installed { set +x -$as_echo "$at_srcdir/nonrecursive.at:90: \$AUTOCONF " -at_fn_check_prepare_dynamic "$AUTOCONF " "nonrecursive.at:90" -( $at_check_trace; $AUTOCONF +$as_echo "$at_srcdir/template.at:254: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo" "template.at:254" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:254" $at_failed && at_fn_log_failure $at_traceon; } - - - { set +x -$as_echo "$at_srcdir/nonrecursive.at:90: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "nonrecursive.at:90" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +$as_echo "$at_srcdir/template.at:256: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar" "template.at:256" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:256" $at_failed && at_fn_log_failure $at_traceon; } - -for target in all $tst_dist -do - { set +x -$as_echo "$at_srcdir/nonrecursive.at:90: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "nonrecursive.at:90" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +{ set +x +$as_echo "$at_srcdir/template.at:258: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la lib/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la" "template.at:258" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:90" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:258" $at_failed && at_fn_log_failure $at_traceon; } -done - - - +lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/nonrecursive.at:93: test -f ltdl/libltdlc.la" -at_fn_check_prepare_trace "nonrecursive.at:93" -( $at_check_trace; test -f ltdl/libltdlc.la +$as_echo "$at_srcdir/template.at:260: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:260" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:93" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:260" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_83 -#AT_START_84 -# 84. nonrecursive.at:102: compiling copied libltdl -at_setup_line='nonrecursive.at:102' -at_fn_banner 9 -at_desc="compiling copied libltdl" -at_desc_line=" 84: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOHEADER" = no && at_xfail=yes - test "$AUTOMAKE" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "84. nonrecursive.at:102: testing ..." - $at_traceon - - -cat >configure.ac <<'_ATEOF' -AC_INIT([subdirectory-demo], 2.2.10, bug-libtool@gnu.org) -LT_CONFIG_LTDL_DIR([ltdl]) -AC_CONFIG_AUX_DIR([ltdl/config]) -AC_CONFIG_MACRO_DIR([ltdl/m4]) -AC_CONFIG_LIBOBJ_DIR([ltdl]) -AC_CONFIG_HEADERS([config.h:config.hin]) -AM_INIT_AUTOMAKE([foreign subdir-objects]) -AC_PROG_CC -AM_PROG_CC_C_O -LT_INIT -LTDL_INIT([nonrecursive]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -_ATEOF - - -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I ltdl/m4 -AUTOMAKE_OPTIONS = 1.9.6 -BUILT_SOURCES = - -AM_CPPFLAGS = -AM_LDFLAGS = - -include_HEADERS = -noinst_LTLIBRARIES = -lib_LTLIBRARIES = foo.la -EXTRA_LTLIBRARIES = - -EXTRA_DIST = - -CLEANFILES = -MOSTLYCLEANFILES = - -include ltdl/Makefile.inc - -foo_la_LDFLAGS = -module -avoid-version -no-undefined -foo_la_SOURCES = foo.c -_ATEOF - - -echo 'int dummy = 0;' > foo.c - - -$LIBTOOLIZE --copy --ltdl - - +# both convenience, libb depending on liba { set +x -$as_echo "$at_srcdir/nonrecursive.at:107: if test -f ltdl/configure.ac; then false; fi" -at_fn_check_prepare_trace "nonrecursive.at:107" -( $at_check_trace; if test -f ltdl/configure.ac; then false; fi +$as_echo "$at_srcdir/template.at:262: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo" "template.at:262" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:107" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:262" $at_failed && at_fn_log_failure $at_traceon; } - -# Support vanilla autoconf-2.59 & automake-1.9.6 -for file in argz.c lt__dirent.c lt__strl.c; do - cp ltdl/$file $file -done - +{ set +x +$as_echo "$at_srcdir/template.at:264: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la" "template.at:264" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:264" +$at_failed && at_fn_log_failure +$at_traceon; } { set +x -$as_echo "$at_srcdir/nonrecursive.at:114: \$ACLOCAL -I ltdl/m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I ltdl/m4" "nonrecursive.at:114" -( $at_check_trace; $ACLOCAL -I ltdl/m4 +$as_echo "$at_srcdir/template.at:266: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la" "template.at:266" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:266" $at_failed && at_fn_log_failure $at_traceon; } +lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/template.at:268: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:268" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/template.at:268" +$at_failed && at_fn_log_failure +$at_traceon; } +# lib convenience +if $noskip; then -{ set +x -$as_echo "$at_srcdir/nonrecursive.at:114: \$AUTOHEADER " -at_fn_check_prepare_dynamic "$AUTOHEADER " "nonrecursive.at:114" -( $at_check_trace; $AUTOHEADER + { set +x +$as_echo "$at_srcdir/template.at:272: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo" "template.at:272" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:272" $at_failed && at_fn_log_failure $at_traceon; } - - - -{ set +x -$as_echo "$at_srcdir/nonrecursive.at:114: \$AUTOMAKE --add-missing --copy" -at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "nonrecursive.at:114" -( $at_check_trace; $AUTOMAKE --add-missing --copy + { set +x +$as_echo "$at_srcdir/template.at:274: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la" "template.at:274" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114" -if $at_failed; then : - { set +x -$as_echo "$at_srcdir/nonrecursive.at:114: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "nonrecursive.at:114" -( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +at_fn_check_status 0 $at_status "$at_srcdir/template.at:274" +$at_failed && at_fn_log_failure +$at_traceon; } + + lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/template.at:276: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:276" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/nonrecursive.at:114" -$at_failed && at_fn_log_failure -$at_traceon; } - -fi +at_fn_check_status 0 $at_status "$at_srcdir/template.at:276" $at_failed && at_fn_log_failure $at_traceon; } - - -{ set +x -$as_echo "$at_srcdir/nonrecursive.at:114: \$AUTOCONF " -at_fn_check_prepare_dynamic "$AUTOCONF " "nonrecursive.at:114" -( $at_check_trace; $AUTOCONF +fi +# both installed +if $noskip; then + { set +x +$as_echo "$at_srcdir/template.at:280: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar" "template.at:280" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:280" $at_failed && at_fn_log_failure $at_traceon; } - - - -{ set +x -$as_echo "$at_srcdir/nonrecursive.at:114: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "nonrecursive.at:114" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options + { set +x +$as_echo "$at_srcdir/template.at:282: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la" +at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la" "template.at:282" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:282" $at_failed && at_fn_log_failure $at_traceon; } - -for target in all $tst_dist -do - { set +x -$as_echo "$at_srcdir/nonrecursive.at:114: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "nonrecursive.at:114" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target + lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/template.at:284: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:284" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:114" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/template.at:284" $at_failed && at_fn_log_failure $at_traceon; } -done +fi +cd .. { set +x -$as_echo "$at_srcdir/nonrecursive.at:117: test -f ltdl/libltdlc.la" -at_fn_check_prepare_trace "nonrecursive.at:117" -( $at_check_trace; test -f ltdl/libltdlc.la +$as_echo "$at_srcdir/template.at:289: \$noskip || (exit 77)" +at_fn_check_prepare_dynamic "$noskip || (exit 77)" "template.at:289" +( $at_check_trace; $noskip || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:117" +at_fn_check_status 0 $at_status "$at_srcdir/template.at:289" $at_failed && at_fn_log_failure $at_traceon; } + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_84 -#AT_START_85 -# 85. nonrecursive.at:126: installable libltdl -at_setup_line='nonrecursive.at:126' -at_fn_banner 9 -at_desc="installable libltdl" -at_desc_line=" 85: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_100 +#AT_START_101 +at_fn_group_banner 101 'ctor.at:27' \ + "C++ static constructors" " " 13 at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOHEADER" = no && at_xfail=yes - test "$AUTOMAKE" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "85. nonrecursive.at:126: testing ..." + $as_echo "101. $at_setup_line: testing $at_desc ..." $at_traceon -cat >configure.ac <<'_ATEOF' -AC_INIT([subdirectory-demo], 2.2.10, bug-libtool@gnu.org) -LT_CONFIG_LTDL_DIR([ltdl]) -AC_CONFIG_AUX_DIR([ltdl/config]) -AC_CONFIG_MACRO_DIR([ltdl/m4]) -AC_CONFIG_LIBOBJ_DIR([ltdl]) -AC_CONFIG_HEADERS([config.h:config.hin]) -AM_INIT_AUTOMAKE([foreign subdir-objects]) -AC_PROG_CC -AM_PROG_CC_C_O -LT_INIT -LTDL_INIT([nonrecursive]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -_ATEOF - - -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I ltdl/m4 -AUTOMAKE_OPTIONS = 1.9.6 -BUILT_SOURCES = - -AM_CPPFLAGS = -AM_LDFLAGS = - -include_HEADERS = -noinst_LTLIBRARIES = -lib_LTLIBRARIES = foo.la -EXTRA_LTLIBRARIES = - -EXTRA_DIST = - -CLEANFILES = -MOSTLYCLEANFILES = - -include ltdl/Makefile.inc - -foo_la_LDFLAGS = -module -avoid-version -no-undefined -foo_la_SOURCES = foo.c -_ATEOF - - -echo 'int dummy = 0;' > foo.c - - -prefix=`pwd`/_inst - -$LIBTOOLIZE --copy --ltdl - - { set +x -$as_echo "$at_srcdir/nonrecursive.at:133: if test -f ltdl/configure.ac; then false; fi" -at_fn_check_prepare_trace "nonrecursive.at:133" -( $at_check_trace; if test -f ltdl/configure.ac; then false; fi +$as_echo "$at_srcdir/ctor.at:28: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" +at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "ctor.at:28" +( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:133" +at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:28" $at_failed && at_fn_log_failure $at_traceon; } - -# Support vanilla autoconf-2.59 & automake-1.9.6 -for file in argz.c lt__dirent.c lt__strl.c; do - cp ltdl/$file $file -done - - { set +x -$as_echo "$at_srcdir/nonrecursive.at:140: \$ACLOCAL -I ltdl/m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I ltdl/m4" "nonrecursive.at:140" -( $at_check_trace; $ACLOCAL -I ltdl/m4 +$as_echo "$at_srcdir/ctor.at:28: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" +at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "ctor.at:28" +( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:28" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/nonrecursive.at:140: \$AUTOHEADER " -at_fn_check_prepare_dynamic "$AUTOHEADER " "nonrecursive.at:140" -( $at_check_trace; $AUTOHEADER -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140" -$at_failed && at_fn_log_failure -$at_traceon; } - +cat >class.h <<'_ATEOF' +#define magic 0xaabbccdd +class Foo { +public: + Foo() { bar = magic; } + unsigned bar; +}; +extern Foo instance; +_ATEOF -{ set +x -$as_echo "$at_srcdir/nonrecursive.at:140: \$AUTOMAKE --add-missing --copy" -at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing --copy" "nonrecursive.at:140" -( $at_check_trace; $AUTOMAKE --add-missing --copy -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140" -if $at_failed; then : - { set +x -$as_echo "$at_srcdir/nonrecursive.at:140: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "nonrecursive.at:140" -( $at_check_trace; grep 'require .*but have' stderr && (exit 77) -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/nonrecursive.at:140" -$at_failed && at_fn_log_failure -$at_traceon; } +cat >libctor.cpp <<'_ATEOF' +#include "class.h" +Foo instance; +_ATEOF -fi -$at_failed && at_fn_log_failure -$at_traceon; } +cat >main.cpp <<'_ATEOF' +#include "class.h" +int main(void) +{ + return instance.bar != magic; +} +_ATEOF { set +x -$as_echo "$at_srcdir/nonrecursive.at:140: \$AUTOCONF " -at_fn_check_prepare_dynamic "$AUTOCONF " "nonrecursive.at:140" -( $at_check_trace; $AUTOCONF +$as_echo "$at_srcdir/ctor.at:56: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS \\ + -c libctor.cpp -o libctor.lo" +at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:56" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS \ + -c libctor.cpp -o libctor.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140" +at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:56" $at_failed && at_fn_log_failure $at_traceon; } - - - { set +x -$as_echo "$at_srcdir/nonrecursive.at:140: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "nonrecursive.at:140" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix +$as_echo "$at_srcdir/ctor.at:58: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS \\ + -c main.cpp -o main.lo" +at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:58" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS \ + -c main.cpp -o main.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140" +at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:58" $at_failed && at_fn_log_failure $at_traceon; } - -for target in all install $tst_dist -do - { set +x -$as_echo "$at_srcdir/nonrecursive.at:140: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "nonrecursive.at:140" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +{ set +x +$as_echo "$at_srcdir/ctor.at:60: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS \\ + libctor.lo -o libctor.la -rpath /none" +at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:60" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS \ + libctor.lo -o libctor.la -rpath /none ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:140" +at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:60" $at_failed && at_fn_log_failure $at_traceon; } -done - - - { set +x -$as_echo "$at_srcdir/nonrecursive.at:143: test -f \$prefix/lib/libltdl.la" -at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "nonrecursive.at:143" -( $at_check_trace; test -f $prefix/lib/libltdl.la +$as_echo "$at_srcdir/ctor.at:62: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS \\ + main.lo libctor.la -o main\$EXEEXT" +at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:62" +( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS \ + main.lo libctor.la -o main$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:143" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:62" $at_failed && at_fn_log_failure $at_traceon; } + +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/nonrecursive.at:144: test -f \$prefix/include/ltdl.h" -at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "nonrecursive.at:144" -( $at_check_trace; test -f $prefix/include/ltdl.h +$as_echo "$at_srcdir/ctor.at:65: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "ctor.at:65" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/nonrecursive.at:144" +at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:65" $at_failed && at_fn_log_failure $at_traceon; } + set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_85 -#AT_START_86 -# 86. recursive.at:60: compiling softlinked libltdl -at_setup_line='recursive.at:60' -at_fn_banner 10 -at_desc="compiling softlinked libltdl" -at_desc_line=" 86: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_101 +#AT_START_102 +at_fn_group_banner 102 'exceptions.at:24' \ + "C++ exception handling" " " 13 at_xfail=no - case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "86. recursive.at:60: testing ..." + $as_echo "102. $at_setup_line: testing $at_desc ..." $at_traceon -cat >configure.ac <<'_ATEOF' -AC_INIT([subdirectory-demo], 2.2.10, bug-libtool@gnu.org) -LT_CONFIG_LTDL_DIR([ltdl]) -AC_CONFIG_AUX_DIR([ltdl/config]) -AC_CONFIG_MACRO_DIR([ltdl/m4]) -AC_CONFIG_LIBOBJ_DIR([ltdl]) -AC_CONFIG_HEADERS([config.h:config.hin]) -AM_INIT_AUTOMAKE([foreign]) -LT_INIT -LTDL_INIT([recursive]) -AC_CONFIG_FILES([Makefile ltdl/Makefile]) -AC_OUTPUT -_ATEOF - - -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I ltdl/m4 -AUTOMAKE_OPTIONS = 1.7 -SUBDIRS = ltdl -lib_LTLIBRARIES = foo.la -foo_la_LDFLAGS = -module -avoid-version -no-undefined -foo_la_SOURCES = foo.c -_ATEOF - - -echo 'int dummy = 0;' > foo.c - -$LIBTOOLIZE --ltdl +: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} +: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} +# Skip this test when called from: +# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install { set +x -$as_echo "$at_srcdir/recursive.at:65: if test -f ltdl/configure.ac; then false; fi" -at_fn_check_prepare_trace "recursive.at:65" -( $at_check_trace; if test -f ltdl/configure.ac; then false; fi +$as_echo "$at_srcdir/exceptions.at:33: case \$LIBLTDL in #( + */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; +esac" +at_fn_check_prepare_notrace 'an embedded newline' "exceptions.at:33" +( $at_check_trace; case $LIBLTDL in #( + */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; +esac ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:65" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:33" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/recursive.at:67: \$AUTORECONF --force --verbose --install" -at_fn_check_prepare_dynamic "$AUTORECONF --force --verbose --install" "recursive.at:67" -( $at_check_trace; $AUTORECONF --force --verbose --install -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:67" -if $at_failed; then : - { set +x -$as_echo "$at_srcdir/recursive.at:67: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "recursive.at:67" -( $at_check_trace; grep 'require .*but have' stderr && (exit 77) -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/recursive.at:67" -$at_failed && at_fn_log_failure -$at_traceon; } +CPPFLAGS="$LTDLINCL $CPPFLAGS" -fi -$at_failed && at_fn_log_failure -$at_traceon; } +# Win32 (and cygwin) notes +# ------------------------ +# When using C++ and Win32 DLLs, data types used in the DLL's interface +# which are other-than-POD, must have vtables, typeinfo, and other +# elements resolved when the client is linked. This includes exception +# classes. Therefore, the exception class "modexc" thrown by the +# dynamically-loaded module must be defined in a separate DLL, to which +# both that module and main must be directly linked; hence, the 'common' +# library. Not using a 'common' library in this manner represents an +# ODR violation, unless the platform's runtime loader is capable of +# rationalizing vague linkage items such as vtables, typeinfo, and +# typename elements) at runtime. The Win32 loader is not capable of +# this, but some ELF loaders appear to be. +# +# Similar treatment is not necessary for liba (e.g. the libexc +# exception class), because that library is not dynamically loaded. As a +# consequence, vague linkage items for the class libexc are resolved at +# link time using the vague linkage rules, for both Win32 and other +# (e.g. ELF) platforms. +# +# Also, when linking a C++ DLL with another C++ DLL, some versions of +# the GNU toolchain on Win32 (or cygwin) mistakenly re-export symbols +# that were imported from the other DLL, when the client DLL is linked +# using -export-all-symbols. Similar issues MAY also arise with those +# versions of the GNU toolchain if using the libtool link flags +# -export-symbols LIST or -export-symbols-regex REGEX, if any symbols +# from the dependency, rather than client, library are listed (or match +# the regex). However, in this test, none of these situations apply, +# so we don't directly address it. Otherwise, the correct mechanism +# would be to avoid all of those flags, and instead explicitly decorate +# all symbols with appropriate __declspec (dllexport) or +# __declspec (dllimport) flags when building the DLLs and the clients. +# +# For more information, see these two threads: +# http://lists.gnu.org/archive/html/bug-libtool/2010-06/msg00069.html +# http://cygwin.com/ml/cygwin/2010-06/msg00392.html +# To sum up: C++ is complicated. +cat >common.h <<'_ATEOF' +#ifndef LIBTOOL_TEST_COMMON_HEADER +#define LIBTOOL_TEST_COMMON_HEADER +#include +#include +#if defined(__CYGWIN__) || defined(_WIN32) +# if defined(DLL_EXPORT) || defined(USING_COMMON_DLL) +# if defined(LIBTOOL_TEST_IN_COMMON) +# define COMMON_IMPEXP __declspec (dllexport) +# else +# define COMMON_IMPEXP __declspec (dllimport) +# endif +# else +# define COMMON_IMPEXP +# endif +#else +# define COMMON_IMPEXP +#endif +class COMMON_IMPEXP modexc : public std::exception { +public: + modexc (std::string str) : message (str) { } + ~modexc () throw () { } + virtual const char *what () const throw () + { + return message.c_str (); + } +private: + std::string message; +}; -{ set +x -$as_echo "$at_srcdir/recursive.at:68: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "recursive.at:68" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:68" -$at_failed && at_fn_log_failure -$at_traceon; } +extern "C" int COMMON_IMPEXP common_dummy (void); +#endif +_ATEOF -for target in all $tst_dist -do - { set +x -$as_echo "$at_srcdir/recursive.at:69: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "recursive.at:69" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:69" -$at_failed && at_fn_log_failure -$at_traceon; } +cat >common.cpp <<'_ATEOF' +#define LIBTOOL_TEST_IN_COMMON +#include "common.h" -done +extern "C" +int common_dummy (void) +{ + return 0; +} +_ATEOF -{ set +x -$as_echo "$at_srcdir/recursive.at:71: test -f ltdl/libltdlc.la" -at_fn_check_prepare_trace "recursive.at:71" -( $at_check_trace; test -f ltdl/libltdlc.la -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:71" -$at_failed && at_fn_log_failure -$at_traceon; } +cat >module.h <<'_ATEOF' +#include "common.h" +#if defined(__CYGWIN__) || defined(_WIN32) +# if defined(DLL_EXPORT) || defined(USING_MODULE_DLL) +# if defined(LIBTOOL_TEST_IN_MODULE) +# define MODULE_IMPEXP __declspec (dllexport) +# else +# define MODULE_IMPEXP __declspec (dllimport) +# endif +# else +# define MODULE_IMPEXP +# endif +#else +# define MODULE_IMPEXP +#endif - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_86 -#AT_START_87 -# 87. recursive.at:80: compiling copied libltdl -at_setup_line='recursive.at:80' -at_fn_banner 10 -at_desc="compiling copied libltdl" -at_desc_line=" 87: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no - case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "87. recursive.at:80: testing ..." - $at_traceon +extern "C" int MODULE_IMPEXP modfoo () throw (modexc); +_ATEOF -cat >configure.ac <<'_ATEOF' -AC_INIT([subdirectory-demo], 2.2.10, bug-libtool@gnu.org) -LT_CONFIG_LTDL_DIR([ltdl]) -AC_CONFIG_AUX_DIR([ltdl/config]) -AC_CONFIG_MACRO_DIR([ltdl/m4]) -AC_CONFIG_LIBOBJ_DIR([ltdl]) -AC_CONFIG_HEADERS([config.h:config.hin]) -AM_INIT_AUTOMAKE([foreign]) -LT_INIT -LTDL_INIT([recursive]) -AC_CONFIG_FILES([Makefile ltdl/Makefile]) -AC_OUTPUT +cat >module.cpp <<'_ATEOF' +#include +#define LIBTOOL_TEST_IN_MODULE +#include "module.h" + +int modbar (void) throw (modexc) +{ + throw modexc ("exception in module"); +} + +extern "C" +int modfoo (void) throw (modexc) +{ + try { + modbar (); + } + catch (modexc e) { + std::cerr << "caught inside module: " << e.what () << '\n'; + throw modexc ("exception from module"); + } + return 0; +} +_ATEOF + + +cat >lib.h <<'_ATEOF' +#include +#include + + +#if defined(__CYGWIN__) || defined(_WIN32) +# if defined(DLL_EXPORT) || defined(USING_LIB_DLL) +# if defined(LIBTOOL_TEST_IN_LIB) +# define LIB_IMPEXP __declspec (dllexport) +# else +# define LIB_IMPEXP __declspec (dllimport) +# endif +# else +# define LIB_IMPEXP +# endif +#else +# define LIB_IMPEXP +#endif + +class LIB_IMPEXP libexc : public std::exception { +public: + libexc (std::string str) : message (str) { } + ~libexc () throw () { } + virtual const char *what () const throw () + { + return message.c_str (); + } +private: + std::string message; +}; +int LIB_IMPEXP libfoo () throw (libexc); _ATEOF -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I ltdl/m4 -AUTOMAKE_OPTIONS = 1.7 -SUBDIRS = ltdl -lib_LTLIBRARIES = foo.la -foo_la_LDFLAGS = -module -avoid-version -no-undefined -foo_la_SOURCES = foo.c +cat >lib.cpp <<'_ATEOF' +#include +#define LIBTOOL_TEST_IN_LIB +#include "lib.h" + +int libbar (void) throw (libexc) +{ + throw libexc ("exception in library"); +} + +int libfoo (void) throw (libexc) +{ + try { + libbar (); + } + catch (libexc e) { + std::cerr << "caught inside lib: " << e.what () << '\n'; + throw libexc ("exception from library"); + } + return 0; +} _ATEOF -echo 'int dummy = 0;' > foo.c +cat >main.cpp <<'_ATEOF' +#include +#include +#include +#include +#include +#include "common.h" +#include "lib.h" +#include "module.h" +class exc : public std::exception { +public: + exc (std::string str) : message (str) { } + ~exc () throw () { } + virtual const char *what () const throw () + { + return message.c_str (); + } +private: + std::string message; +}; -$LIBTOOLIZE --copy --ltdl +int foo (void) throw (exc) +{ + throw exc ("exception in program"); + return 0; +} +int exceptions_in_prog (void) +{ + std::cerr << "exceptions_in_prog\n"; + try { + foo (); + } + catch (exc e) { + std::cerr << "caught: " << e.what () << '\n'; + return 0; + } + return 1; +} -{ set +x -$as_echo "$at_srcdir/recursive.at:85: if test -f ltdl/configure.ac; then false; fi" -at_fn_check_prepare_trace "recursive.at:85" -( $at_check_trace; if test -f ltdl/configure.ac; then false; fi -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:85" -$at_failed && at_fn_log_failure -$at_traceon; } +int exceptions_in_lib (void) +{ + std::cerr << "exceptions_in_lib\n"; + try { + libfoo (); + } + catch (libexc e) { + std::cerr << "caught: " << e.what () << '\n'; + return 0; + } + return 1; +} +int exceptions_in_module (void) +{ + std::cerr << "exceptions_in_module\n"; -{ set +x -$as_echo "$at_srcdir/recursive.at:87: \$AUTORECONF --force --verbose --install" -at_fn_check_prepare_dynamic "$AUTORECONF --force --verbose --install" "recursive.at:87" -( $at_check_trace; $AUTORECONF --force --verbose --install -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:87" -if $at_failed; then : - { set +x -$as_echo "$at_srcdir/recursive.at:87: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "recursive.at:87" -( $at_check_trace; grep 'require .*but have' stderr && (exit 77) -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/recursive.at:87" -$at_failed && at_fn_log_failure -$at_traceon; } + if (lt_dlinit ()) + { + std::cerr << "init error: " << lt_dlerror () << '\n'; + return 1; + } -fi -$at_failed && at_fn_log_failure -$at_traceon; } + // Some systems need RTLD_GLOBAL for exceptions to work in modules. + lt_dladvise advise; + if (lt_dladvise_init (&advise) || lt_dladvise_global (&advise)) + { + std::cerr << "error setting advise global\n"; + return 1; + } + lt_dlhandle handle = lt_dlopenadvise ("module.la", advise); + if (handle == NULL) + { + std::cerr << "dlopen failed: " << lt_dlerror () << '\n'; + return 1; + } + lt_dladvise_destroy (&advise); + typedef int (*pfun) (void); + pfun pf = (pfun) lt_dlsym (handle, "modfoo"); + if (pf == NULL) + { + std::cerr << "dlsym failed: " << lt_dlerror () << '\n'; + return 1; + } + bool exception_caught = false; + try { + (*pf) (); + } + catch (modexc e) { + std::cerr << "caught: " << e.what () << '\n'; + exception_caught = true; + } -{ set +x -$as_echo "$at_srcdir/recursive.at:88: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "recursive.at:88" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:88" -$at_failed && at_fn_log_failure -$at_traceon; } + /* Only close the module after all of its objects have gone out of scope. */ + if (exception_caught) + { + if (lt_dlclose (handle)) + { + std::cerr << "dlclose failed: " << lt_dlerror () << '\n'; + return 1; + } + if (lt_dlexit ()) + { + std::cerr << "lt_dlexit failed: " << lt_dlerror () << '\n'; + return 1; + } + return 0; + } + return 1; +} +int main (void) +{ -for target in all $tst_dist -do - { set +x -$as_echo "$at_srcdir/recursive.at:89: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "recursive.at:89" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:89" -$at_failed && at_fn_log_failure -$at_traceon; } + LTDL_SET_PRELOADED_SYMBOLS(); -done + if (exceptions_in_prog ()) + return 1; + if (exceptions_in_lib ()) + return 1; + if (exceptions_in_module ()) + return 1; + return 0; +} +_ATEOF +inst=`pwd`/inst +libdir=$inst/lib +bindir=$inst/bin +moddir=$inst/mod +mkdir l m $inst $libdir $bindir $moddir + +# If the C++ compiler isn't capable, don't bother. { set +x -$as_echo "$at_srcdir/recursive.at:91: test -f ltdl/libltdlc.la" -at_fn_check_prepare_trace "recursive.at:91" -( $at_check_trace; test -f ltdl/libltdlc.la +$as_echo "$at_srcdir/exceptions.at:361: \$CXX \$CPPFLAGS \$CXXFLAGS -DUSING_COMMON_DLL -DUSING_MODULE_DLL -DUSING_LIB_DLL -c main.cpp || exit 77" +at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -DUSING_COMMON_DLL -DUSING_MODULE_DLL -DUSING_LIB_DLL -c main.cpp || exit 77" "exceptions.at:361" +( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -DUSING_COMMON_DLL -DUSING_MODULE_DLL -DUSING_LIB_DLL -c main.cpp || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:91" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:361" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_87 -#AT_START_88 -# 88. recursive.at:100: installable libltdl -at_setup_line='recursive.at:100' -at_fn_banner 10 -at_desc="installable libltdl" -at_desc_line=" 88: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no - case ,$AUTORECONF,$AUTOCONF,$AUTOHEADER,$ACLOCAL,$AUTOMAKE, in *,no,*) :;; *) false;; esac && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "88. recursive.at:100: testing ..." - $at_traceon - - -cat >configure.ac <<'_ATEOF' -AC_INIT([subdirectory-demo], 2.2.10, bug-libtool@gnu.org) -LT_CONFIG_LTDL_DIR([ltdl]) -AC_CONFIG_AUX_DIR([ltdl/config]) -AC_CONFIG_MACRO_DIR([ltdl/m4]) -AC_CONFIG_LIBOBJ_DIR([ltdl]) -AC_CONFIG_HEADERS([config.h:config.hin]) -AM_INIT_AUTOMAKE([foreign]) -LT_INIT -LTDL_INIT([recursive]) -AC_CONFIG_FILES([Makefile ltdl/Makefile]) -AC_OUTPUT -_ATEOF - - -cat >Makefile.am <<'_ATEOF' -ACLOCAL_AMFLAGS = -I ltdl/m4 -AUTOMAKE_OPTIONS = 1.7 -SUBDIRS = ltdl -lib_LTLIBRARIES = foo.la -foo_la_LDFLAGS = -module -avoid-version -no-undefined -foo_la_SOURCES = foo.c -_ATEOF - - -echo 'int dummy = 0;' > foo.c - - -prefix=`pwd`/_inst - -$LIBTOOLIZE --copy --ltdl +{ set +x +$as_echo "$at_srcdir/exceptions.at:363: \$LIBTOOL --mode=compile --tag=CXX \$CXX \$CPPFLAGS \$CXXFLAGS -c common.cpp" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c common.cpp" "exceptions.at:363" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c common.cpp +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:363" +$at_failed && at_fn_log_failure +$at_traceon; } +{ set +x +$as_echo "$at_srcdir/exceptions.at:365: \$LIBTOOL --mode=compile --tag=CXX \$CXX \$CPPFLAGS \$CXXFLAGS -c lib.cpp" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c lib.cpp" "exceptions.at:365" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c lib.cpp +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:365" +$at_failed && at_fn_log_failure +$at_traceon; } { set +x -$as_echo "$at_srcdir/recursive.at:107: if test -f ltdl/configure.ac; then false; fi" -at_fn_check_prepare_trace "recursive.at:107" -( $at_check_trace; if test -f ltdl/configure.ac; then false; fi +$as_echo "$at_srcdir/exceptions.at:367: \$LIBTOOL --mode=compile --tag=CXX \$CXX \$CPPFLAGS \$CXXFLAGS -DUSING_COMMON_DLL -c module.cpp" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -DUSING_COMMON_DLL -c module.cpp" "exceptions.at:367" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -DUSING_COMMON_DLL -c module.cpp ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:107" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:367" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/recursive.at:109: \$AUTORECONF --force --verbose --install" -at_fn_check_prepare_dynamic "$AUTORECONF --force --verbose --install" "recursive.at:109" -( $at_check_trace; $AUTORECONF --force --verbose --install +$as_echo "$at_srcdir/exceptions.at:370: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o l/libcommon.la common.lo -no-undefined -version-info 1:0:0 -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/libcommon.la common.lo -no-undefined -version-info 1:0:0 -rpath $libdir" "exceptions.at:370" +( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/libcommon.la common.lo -no-undefined -version-info 1:0:0 -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:109" -if $at_failed; then : - { set +x -$as_echo "$at_srcdir/recursive.at:109: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "recursive.at:109" -( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:370" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/exceptions.at:373: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o l/liba.la lib.lo -no-undefined -version-info 1:0:0 -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/liba.la lib.lo -no-undefined -version-info 1:0:0 -rpath $libdir" "exceptions.at:373" +( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/liba.la lib.lo -no-undefined -version-info 1:0:0 -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/recursive.at:109" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:373" $at_failed && at_fn_log_failure $at_traceon; } -fi +{ set +x +$as_echo "$at_srcdir/exceptions.at:376: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o m/module.la module.lo l/libcommon.la -module -avoid-version -no-undefined -rpath \$moddir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o m/module.la module.lo l/libcommon.la -module -avoid-version -no-undefined -rpath $moddir" "exceptions.at:376" +( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o m/module.la module.lo l/libcommon.la -module -avoid-version -no-undefined -rpath $moddir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:376" $at_failed && at_fn_log_failure $at_traceon; } - - +# We need -export-dynamic for the exception handling in modules to work. { set +x -$as_echo "$at_srcdir/recursive.at:110: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "recursive.at:110" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix +$as_echo "$at_srcdir/exceptions.at:381: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT l/liba.la l/libcommon.la -dlopen m/module.la \$LIBLTDL -export-dynamic" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT l/liba.la l/libcommon.la -dlopen m/module.la $LIBLTDL -export-dynamic" "exceptions.at:381" +( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT l/liba.la l/libcommon.la -dlopen m/module.la $LIBLTDL -export-dynamic ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:110" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:381" $at_failed && at_fn_log_failure $at_traceon; } -for target in all install $tst_dist -do - { set +x -$as_echo "$at_srcdir/recursive.at:111: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "recursive.at:111" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/exceptions.at:385: if \$LIBTOOL --mode=execute -dlopen m/module.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen m/module.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "exceptions.at:385" +( $at_check_trace; if $LIBTOOL --mode=execute -dlopen m/module.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:111" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:385" $at_failed && at_fn_log_failure $at_traceon; } -done { set +x -$as_echo "$at_srcdir/recursive.at:113: test -f \$prefix/lib/libltdl.la" -at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "recursive.at:113" -( $at_check_trace; test -f $prefix/lib/libltdl.la +$as_echo "$at_srcdir/exceptions.at:387: \$LIBTOOL --mode=install cp l/libcommon.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp l/libcommon.la $libdir" "exceptions.at:387" +( $at_check_trace; $LIBTOOL --mode=install cp l/libcommon.la $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:113" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:387" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/recursive.at:114: test -f \$prefix/include/ltdl.h" -at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "recursive.at:114" -( $at_check_trace; test -f $prefix/include/ltdl.h +$as_echo "$at_srcdir/exceptions.at:389: \$LIBTOOL --mode=install cp l/liba.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp l/liba.la $libdir" "exceptions.at:389" +( $at_check_trace; $LIBTOOL --mode=install cp l/liba.la $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/recursive.at:114" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:389" $at_failed && at_fn_log_failure $at_traceon; } - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_88 -#AT_START_89 -# 89. template.at:27: simple template test -at_setup_line='template.at:27' -at_fn_banner 11 -at_desc="simple template test" -at_desc_line=" 89: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "89. template.at:27: testing ..." - $at_traceon - +{ set +x +$as_echo "$at_srcdir/exceptions.at:391: \$LIBTOOL --mode=install cp m/module.la \$moddir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m/module.la $moddir" "exceptions.at:391" +( $at_check_trace; $LIBTOOL --mode=install cp m/module.la $moddir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:391" +$at_failed && at_fn_log_failure +$at_traceon; } { set +x -$as_echo "$at_srcdir/template.at:28: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "template.at:28" -( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) +$as_echo "$at_srcdir/exceptions.at:393: \$LIBTOOL --mode=install cp main\$EXEEXT \$bindir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp main$EXEEXT $bindir" "exceptions.at:393" +( $at_check_trace; $LIBTOOL --mode=install cp main$EXEEXT $bindir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/template.at:28" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:393" $at_failed && at_fn_log_failure $at_traceon; } +rm -rf l m main$EXEEXT + +LTDL_LIBRARY_PATH=$moddir +export LTDL_LIBRARY_PATH +lt_exe=$bindir/main; if test -f "$bindir/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/template.at:28: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" -at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "template.at:28" -( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) +$as_echo "$at_srcdir/exceptions.at:399: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "exceptions.at:399" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/template.at:28" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:399" $at_failed && at_fn_log_failure $at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_102 +#AT_START_103 +at_fn_group_banner 103 'early-libtool.at:32' \ + "config.status" " " 14 +at_xfail=no + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "103. $at_setup_line: testing $at_desc ..." + $at_traceon + -cat >aclib.h <<'_ATEOF' -int cf(int); +cat >configure.ac <<'_ATEOF' +AC_INIT([libtool-demo], 2.4, bug-libtool@gnu.org) +AC_CONFIG_MACRO_DIR([m4]) +LT_INIT +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT _ATEOF -cat >aclib.cpp <<'_ATEOF' -#include "aclib.h" -template +cat >Makefile.in <<'_ATEOF' +prefix = @prefix@ +libdir = @libdir@ +top_builddir = . +SHELL = @SHELL@ +DEFAULT_INCLUDES = -I. -I@srcdir@ +EXEEXT = @EXEEXT@ +LIBTOOL = @LIBTOOL@ +OBJEXT = @OBJEXT@ -T cq(T b) -{ - return b * 3; -} +CPPFLAGS = @CPPFLAGS@ +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ -int cf(int i) -{ - return cq(i); -} -_ATEOF +COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES) +LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES) +LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) -o $@ +all: hell$(EXEEXT) -cat >alib.h <<'_ATEOF' -int f(int); -_ATEOF +libhello.la: hello.lo + $(LINK) -rpath $(libdir) hello.lo +hell$(EXEEXT): main.$(OBJEXT) libhello.la + $(LINK) main.$(OBJEXT) libhello.la +.SUFFIXES: +.SUFFIXES: .c .$(OBJEXT) .lo -cat >alib.cpp <<'_ATEOF' -#include "alib.h" +.c.$(OBJEXT): + $(COMPILE) -c $< +.c.lo: + $(LTCOMPILE) -c -o $@ $< +_ATEOF -template -T q(T b) -{ - return b * 2; -} -int f(int i) +cat >hello.c <<'_ATEOF' +#include + +void +hello (void) { - return q(i); + printf ("** This is not GNU Hello. There is no built-in mail reader. **\n"); } _ATEOF -cat >prog.cpp <<'_ATEOF' -#include "alib.h" -#include "aclib.h" +cat >main.c <<'_ATEOF' +#include -int main() +extern void hello (void); + +int +main (void) { - return f(3) + 3 - cf(3) != 0; + printf ("Welcome to GNU Hell!\n"); + + hello (); + + return 0; } _ATEOF -{ set +x -$as_echo "$at_srcdir/template.at:79: \$LIBTOOL --tag=CXX --mode=compile \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c -o alib.lo alib.cpp" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o alib.lo alib.cpp" "template.at:79" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o alib.lo alib.cpp -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:79" -$at_failed && at_fn_log_failure -$at_traceon; } +cat > missing <<_EOF +#! /bin/sh +exit 0 +_EOF +chmod a+x missing + +$LIBTOOLIZE --copy --verbose --install -{ set +x -$as_echo "$at_srcdir/template.at:81: \$LIBTOOL --tag=CXX --mode=compile \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c -o aclib.lo aclib.cpp" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o aclib.lo aclib.cpp" "template.at:81" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX -I. $CPPFLAGS $CXXFLAGS -c -o aclib.lo aclib.cpp -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:81" -$at_failed && at_fn_log_failure -$at_traceon; } { set +x -$as_echo "$at_srcdir/template.at:83: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o libaclib.la aclib.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libaclib.la aclib.lo" "template.at:83" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libaclib.la aclib.lo +$as_echo "$at_srcdir/early-libtool.at:109: \$ACLOCAL -I m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "early-libtool.at:109" +( $at_check_trace; $ACLOCAL -I m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:83" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:109" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/template.at:85: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o libalib.la -rpath /nonexistent alib.lo libaclib.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libalib.la -rpath /nonexistent alib.lo libaclib.la" "template.at:85" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o libalib.la -rpath /nonexistent alib.lo libaclib.la +$as_echo "$at_srcdir/early-libtool.at:110: \$AUTOCONF --force" +at_fn_check_prepare_dynamic "$AUTOCONF --force" "early-libtool.at:110" +( $at_check_trace; $AUTOCONF --force ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:85" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:110" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/template.at:87: \$CXX -I. \$CPPFLAGS \$CXXFLAGS -c prog.cpp" -at_fn_check_prepare_dynamic "$CXX -I. $CPPFLAGS $CXXFLAGS -c prog.cpp" "template.at:87" -( $at_check_trace; $CXX -I. $CPPFLAGS $CXXFLAGS -c prog.cpp +$as_echo "$at_srcdir/early-libtool.at:111: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "early-libtool.at:111" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:87" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:111" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/template.at:89: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CPPFLAGS \$CXXFLAGS \$LDFLAGS -o prog\$EXEEXT prog.\$OBJEXT libalib.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o prog$EXEEXT prog.$OBJEXT libalib.la" "template.at:89" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CPPFLAGS $CXXFLAGS $LDFLAGS -o prog$EXEEXT prog.$OBJEXT libalib.la + +for target in all +do + { set +x +$as_echo "$at_srcdir/early-libtool.at:112: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "early-libtool.at:112" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:89" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:112" $at_failed && at_fn_log_failure $at_traceon; } +done -lt_exe=./prog; if test -f "./prog$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi + +lt_exe=./hell; if test -f "./hell$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/template.at:92: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:92" +$as_echo "$at_srcdir/early-libtool.at:114: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "early-libtool.at:114" ( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:92" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:114" $at_failed && at_fn_log_failure $at_traceon; } - - - - - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_89 -#AT_START_90 -# 90. template.at:126: template test with subdirs -at_setup_line='template.at:126' -at_fn_banner 11 -at_desc="template test with subdirs" -at_desc_line=" 90: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "90. template.at:126: testing ..." - $at_traceon - - { set +x -$as_echo "$at_srcdir/template.at:127: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "template.at:127" -( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) +$as_echo "$at_srcdir/early-libtool.at:115: grep 'Welcome to GNU Hell' stdout" +at_fn_check_prepare_trace "early-libtool.at:115" +( $at_check_trace; grep 'Welcome to GNU Hell' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/template.at:127" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:115" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/template.at:127: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" -at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "template.at:127" -( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) +$as_echo "$at_srcdir/early-libtool.at:116: grep 'This is not GNU Hello.' stdout" +at_fn_check_prepare_trace "early-libtool.at:116" +( $at_check_trace; grep 'This is not GNU Hello.' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/template.at:127" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:116" $at_failed && at_fn_log_failure $at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_103 +#AT_START_104 +at_fn_group_banner 104 'early-libtool.at:126' \ + "config.lt" " " 14 +at_xfail=no + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "104. $at_setup_line: testing $at_desc ..." + $at_traceon -noskip=: -# Mac OS X. -# The linker has issues with this test. -case $host in -*-darwin*) noskip=false ;; -esac - - -CPPFLAGS="$CPPFLAGS -I../src/lib -I../src/lib2" - -mkdir src obj -( cd src; mkdir lib lib2 sub ) -( cd obj; mkdir lib lib2 sub ) +cat >configure.ac <<'_ATEOF' +AC_INIT([libtool-demo], 2.4, bug-libtool@gnu.org) +AC_CONFIG_MACRO_DIR([m4]) +LT_INIT +LT_OUTPUT -cat >src/lib/a.hh <<'_ATEOF' -template -unsigned int a(const T&); +cat >hello.c <<\_EOF +#include -template -unsigned int a(const T& t) +void +hello (void) { - return sizeof t; + printf ("** This is not GNU Hello. There is no built-in mail reader. **\n"); } +_EOF -extern int a2(char t); +# Prove that we can run libtool from inside configure: +$SHELL ./libtool --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS \ + -I. -I$srcdir -c -o hello.lo hello.c || exit 1 +$SHELL ./libtool --mode=link --tag=CC $CC $CFLAGS $LDFLAGS \ + -o libhello.la -rpath /notexist hello.lo || exit 1 -inline int a3(const double* t) -{ - return a(t); -} +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT _ATEOF -cat >src/lib/a.cpp <<'_ATEOF' -#include "a.hh" +cat >Makefile.in <<'_ATEOF' +prefix = @prefix@ +libdir = @libdir@ +top_builddir = . +SHELL = @SHELL@ +DEFAULT_INCLUDES = -I. -I@srcdir@ +EXEEXT = @EXEEXT@ +LIBTOOL = @LIBTOOL@ +OBJEXT = @OBJEXT@ -int a2(char t) -{ - return a(t); -} +CPPFLAGS = @CPPFLAGS@ +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ + +COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES) +LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) -o $@ + +all: hell$(EXEEXT) + +hell$(EXEEXT): main.$(OBJEXT) libhello.la + $(LINK) main.$(OBJEXT) libhello.la + +.SUFFIXES: +.SUFFIXES: .c .$(OBJEXT) + +.c.$(OBJEXT): + $(COMPILE) -c $< _ATEOF -cat >src/lib2/b.hh <<'_ATEOF' -#include "a.hh" +cat >hello.c <<'_ATEOF' +#include -template -unsigned int b(T& t) +void +hello (void) { - return a(t); + printf ("** This is not GNU Hello. There is no built-in mail reader. **\n"); } -extern int b2(char* t); -struct bs { int bi; }; -extern int b3(bs t); _ATEOF -cat >src/lib2/b.cpp <<'_ATEOF' -#include "b.hh" +cat >main.c <<'_ATEOF' +#include -int b2(char* t) -{ - return a2(t[0]); -} +extern void hello (void); -int b3(bs t) +int +main (int argc, char *argv[]) { - return b(t); + printf ("Welcome to GNU Hell!\n"); + + hello (); + + return 0; } _ATEOF -cat >src/sub/main.cpp <<'_ATEOF' -#include "b.hh" +cat > missing <<_EOF +#! /bin/sh +exit 0 +_EOF +chmod a+x missing -int main() -{ - double foo; - const char s = ' '; - char d; - char *t = &d; - return b(foo) + a3(&foo) + b2(t) - a(s) - - (sizeof(double) + sizeof(double*)); -} -_ATEOF +$LIBTOOLIZE --copy --verbose --install -cd obj +{ set +x +$as_echo "$at_srcdir/early-libtool.at:216: \$ACLOCAL -I m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "early-libtool.at:216" +( $at_check_trace; $ACLOCAL -I m4 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:216" +$at_failed && at_fn_log_failure +$at_traceon; } -# If the compiler supports -c -o, we want to use it: -# it may make a difference for templates -eval `$LIBTOOL --tag=CXX --config | grep ^compiler_c_o=` -case $compiler_c_o in -yes) - main_o=sub/main.$OBJEXT - { set +x -$as_echo "$at_srcdir/template.at:220: \$CXX \$CPPFLAGS \$CXXFLAGS -c -o \$main_o ../src/sub/main.cpp" -at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp" "template.at:220" -( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c -o $main_o ../src/sub/main.cpp + + + +{ set +x +$as_echo "$at_srcdir/early-libtool.at:217: \$AUTOCONF --force" +at_fn_check_prepare_dynamic "$AUTOCONF --force" "early-libtool.at:217" +( $at_check_trace; $AUTOCONF --force +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:217" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +{ set +x +$as_echo "$at_srcdir/early-libtool.at:218: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "early-libtool.at:218" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:220" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:218" $at_failed && at_fn_log_failure $at_traceon; } - ;; -*) - main_o=main.$OBJEXT + +for target in all +do { set +x -$as_echo "$at_srcdir/template.at:225: \$CXX \$CPPFLAGS \$CXXFLAGS -c ../src/sub/main.cpp" -at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp" "template.at:225" -( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp +$as_echo "$at_srcdir/early-libtool.at:219: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "early-libtool.at:219" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:225" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:219" $at_failed && at_fn_log_failure $at_traceon; } - ;; -esac +done + +lt_exe=./hell; if test -f "./hell$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/template.at:230: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp" "template.at:230" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib/a.lo ../src/lib/a.cpp +$as_echo "$at_srcdir/early-libtool.at:221: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "early-libtool.at:221" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:230" +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:221" $at_failed && at_fn_log_failure $at_traceon; } + { set +x -$as_echo "$at_srcdir/template.at:232: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp" "template.at:232" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS -c -o lib2/b.lo ../src/lib2/b.cpp +$as_echo "$at_srcdir/early-libtool.at:222: grep 'Welcome to GNU Hell' stdout" +at_fn_check_prepare_trace "early-libtool.at:222" +( $at_check_trace; grep 'Welcome to GNU Hell' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:232" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:222" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/template.at:234: \$CXX \$CPPFLAGS \$CXXFLAGS -c ../src/sub/main.cpp" -at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp" "template.at:234" -( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c ../src/sub/main.cpp +$as_echo "$at_srcdir/early-libtool.at:223: grep 'This is not GNU Hello.' stdout" +at_fn_check_prepare_trace "early-libtool.at:223" +( $at_check_trace; grep 'This is not GNU Hello.' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:234" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:223" $at_failed && at_fn_log_failure $at_traceon; } -# both convenience + +# Make sure config.status --recheck updates the libtool script +rm libtool { set +x -$as_echo "$at_srcdir/template.at:237: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo" "template.at:237" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo +$as_echo "$at_srcdir/early-libtool.at:227: \$SHELL ./config.status --recheck" +at_fn_check_prepare_dynamic "$SHELL ./config.status --recheck" "early-libtool.at:227" +( $at_check_trace; $SHELL ./config.status --recheck ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:237" +at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:227" $at_failed && at_fn_log_failure $at_traceon; } + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_104 +#AT_START_105 +at_fn_group_banner 105 'no-executables.at:25' \ + "AC_NO_EXECUTABLES" " " 15 +at_xfail=no + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "105. $at_setup_line: testing $at_desc ..." + $at_traceon + + +mkdir m4 + +cat >configure.ac <<'_ATEOF' +AC_INIT([no-exec], [1]) +AC_CONFIG_MACRO_DIR([m4]) + +# We punt a bit here, to get the results of AC_PROG_CC +# (and allow it to do link tests) but still error out on +# link tests within Libtool macros. +LDFLAGS=-lnosuchlibrary +AC_NO_EXECUTABLES +AC_PROG_CC +AC_PROG_CXX +AC_PROG_F77 +AC_PROG_FC +AM_PROG_GCJ + +# Consequently, we have to set cache variables for each link +# test we may need. For the purposes of this test, it shouldn't +# matter much whether these values are actually wrong, the point +# is that the linker should never be invoked. + +lt_cv_shlibpath_overrides_runpath=no +lt_cv_archive_cmds_need_lc=no +lt_cv_cc_needs_belf=no +lt_cv_ld_exported_symbols_list=no +lt_cv_prog_compiler_static_works=no +lt_cv_aix_libpath="/usr/lib:/lib" +lt_cv_irix_exported_symbol=yes + +# Deal with AC_LIBTOOL_DLOPEN in one of two possible ways: +# - do not execute it at all in the ac_no_link case +# - preset the individual Autoconf test variables + +if ${test_ac_libtool_dlopen-false}; then + ac_cv_func_shl_load=no + ac_cv_lib_dld_shl_load=no + ac_cv_func_dlopen=no + ac_cv_lib_dl_dlopen=no + ac_cv_lib_svld_dlopen=no + ac_cv_lib_dld_dld_link=no + AC_LIBTOOL_DLOPEN +fi +AC_PROG_LIBTOOL + +AC_OUTPUT +_ATEOF + + +$LIBTOOLIZE --install + + { set +x -$as_echo "$at_srcdir/template.at:239: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo" "template.at:239" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo +$as_echo "$at_srcdir/no-executables.at:75: \$ACLOCAL -I m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "no-executables.at:75" +( $at_check_trace; $ACLOCAL -I m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:239" +at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:75" $at_failed && at_fn_log_failure $at_traceon; } + + + + + { set +x -$as_echo "$at_srcdir/template.at:241: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la lib/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la" "template.at:241" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la +$as_echo "$at_srcdir/no-executables.at:75: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "no-executables.at:75" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:241" +at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:75" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi + + + + + + { set +x -$as_echo "$at_srcdir/template.at:243: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != ignore && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != ignore && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:243" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != ignore && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/no-executables.at:76: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "no-executables.at:76" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_skip $at_status "$at_srcdir/template.at:243" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:76" $at_failed && at_fn_log_failure $at_traceon; } -# lib convenience -if $noskip; then - { set +x -$as_echo "$at_srcdir/template.at:246: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo" "template.at:246" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /foo +{ set +x +$as_echo "$at_srcdir/no-executables.at:77: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options test_ac_libtool_dlopen=:" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "no-executables.at:77" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options test_ac_libtool_dlopen=: ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:246" +at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:77" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/template.at:248: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la lib/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la" "template.at:248" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_105 +#AT_START_106 +at_fn_group_banner 106 'deplibs-ident.at:32' \ + "build tree relpaths" " " 16 +at_xfail=no + case $host in + *-*-aix*|hppa*-*-hpux*|*-*-interix*|*-*-openbsd*) false;; + *):;; + esac && at_xfail=yes +( + $as_echo "106. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +mkdir a a/b c +echo 'int c() { return 0; }' > c/libcee.c +{ set +x +$as_echo "$at_srcdir/deplibs-ident.at:37: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c c/libcee.c -o c/libcee.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c/libcee.c -o c/libcee.lo" "deplibs-ident.at:37" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c/libcee.c -o c/libcee.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:248" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:37" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/template.at:250: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:250" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/deplibs-ident.at:39: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere" "deplibs-ident.at:39" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/template.at:250" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:39" $at_failed && at_fn_log_failure $at_traceon; } -fi +depl_1=../c/libcee.la +depl_2=`pwd`/c/libcee.la +depl_3="-L../c -lcee" -# both installed -{ set +x -$as_echo "$at_srcdir/template.at:254: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo" "template.at:254" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo -rpath /foo +( + cd a + for i in 1 2 3; do + eval depend_on_c=\"\$depl_$i\" + echo "extern int c(void); int a$i() { return c(); }" > liba$i.c + { set +x +$as_echo "$at_srcdir/deplibs-ident.at:51: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba\$i.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba$i.c" "deplibs-ident.at:51" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba$i.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:51" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/deplibs-ident.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba\$i.la liba\$i.lo \$depend_on_c -rpath /nowhere" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la liba$i.lo $depend_on_c -rpath /nowhere" "deplibs-ident.at:53" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la liba$i.lo $depend_on_c -rpath /nowhere ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:254" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:53" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/template.at:256: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar" "template.at:256" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo -rpath /bar + done +) + +cat >a/b/b.c <<'_ATEOF' +extern int a1(void), a2(void), a3(void), c(void); +int main() { return a1() + a2() + a3() + c(); } +_ATEOF + + +( + cd a/b + { set +x +$as_echo "$at_srcdir/deplibs-ident.at:65: \$CC \$CFLAGS -c b.c" +at_fn_check_prepare_dynamic "$CC $CFLAGS -c b.c" "deplibs-ident.at:65" +( $at_check_trace; $CC $CFLAGS -c b.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:256" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:65" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/template.at:258: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la lib/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la" "template.at:258" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la lib/liba.la + { set +x +$as_echo "$at_srcdir/deplibs-ident.at:66: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o b\$EXEEXT b.\$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b$EXEEXT b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere" "deplibs-ident.at:66" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b$EXEEXT b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:258" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:66" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/template.at:260: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:260" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi + { set +x +$as_echo "$at_srcdir/deplibs-ident.at:68: \$EGREP 'cee.*cee' stdout" +at_fn_check_prepare_dynamic "$EGREP 'cee.*cee' stdout" "deplibs-ident.at:68" +( $at_check_trace; $EGREP 'cee.*cee' stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/template.at:260" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 1 $at_status "$at_srcdir/deplibs-ident.at:68" $at_failed && at_fn_log_failure $at_traceon; } -# both convenience, libb depending on liba + ) + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_106 +#AT_START_107 +at_fn_group_banner 107 'configure-iface.at:102' \ + "installable libltdl" " " 17 +at_xfail=no + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOHEADER" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "107. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +cat >main.c <<'_ATEOF' +#include +#include + +typedef int funcp (void); + +static int errors = 0; + +int +main (void) +{ + lt_dlhandle handle; + + LTDL_SET_PRELOADED_SYMBOLS(); + + if (lt_dlinit () != 0) + { + fprintf (stderr, "error during initialization: %s\n", lt_dlerror ()); + return 1; + } + + handle = lt_dlopenext ("libmodule"); + if (!handle) + { + fprintf (stderr, "can't open libmodule: %s\n", lt_dlerror ()); + ++errors; + } + + { + funcp *f = (funcp *) lt_dlsym (handle, "f"); + + if (f) + { + printf ("%d\n", f ()); + } + else + { + fprintf (stderr, "function `f' not found: %s\n", lt_dlerror ()); + ++errors; + } + } + + if (lt_dlexit () != 0) + { + fprintf (stderr, "error during exit: %s\n", lt_dlerror ()); + ++errors; + } + + return (errors != 0); +} +_ATEOF + + +cat >libmodule.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" { +#endif +int f (void) { return 5150; } +#ifdef __cplusplus +} +#endif +_ATEOF + + +cat >expout <<'_ATEOF' +5150 +_ATEOF + +case $host_os in mingw*) + while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t + mv -f expout.t expout ;; +esac + + +cat >configure.ac <<'_ATEOF' +AC_INIT([installable-ltdl-demo], 2.4, bug-libtool@gnu.org) +AC_CONFIG_AUX_DIR([libltdl/config]) +AC_CONFIG_MACRO_DIR([libltdl/m4]) +AC_CONFIG_HEADERS([config.h:config.hin]) +LT_CONFIG_LTDL_DIR([libltdl]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AM_PROG_CC_C_O +LT_INIT([dlopen]) +LTDL_INIT([installable]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +_ATEOF + + +cat >Makefile.am <<'_ATEOF' +AUTOMAKE_OPTIONS = 1.7 + +SUBDIRS = libltdl + +AM_CPPFLAGS = $(LTDLINCL) + +lib_LTLIBRARIES = libmodule.la +# Automake < 1.8 will use libmodule.la.c as default source, +# while newer will choose libmodule.c; so specify it here. +libmodule_la_SOURCES = libmodule.c +libmodule_la_LDFLAGS = -module + +bin_PROGRAMS = main +main_LDFLAGS = -dlopen libmodule.la +main_LDADD = $(LIBLTDL) +main_DEPENDENCIES = $(LTDLDEPS) libmodule.la +_ATEOF + + +# Install everything! +prefix=`pwd`/_inst + +$LIBTOOLIZE --ltdl + + { set +x -$as_echo "$at_srcdir/template.at:262: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib/liba.la lib/a.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo" "template.at:262" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib/liba.la lib/a.lo +$as_echo "$at_srcdir/configure-iface.at:144: \$ACLOCAL -I libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "configure-iface.at:144" +( $at_check_trace; $ACLOCAL -I libltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:262" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/template.at:264: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la" "template.at:264" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la +$as_echo "$at_srcdir/configure-iface.at:144: \$AUTOHEADER " +at_fn_check_prepare_dynamic "$AUTOHEADER " "configure-iface.at:144" +( $at_check_trace; $AUTOHEADER ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:264" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/template.at:266: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la" "template.at:266" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la +$as_echo "$at_srcdir/configure-iface.at:144: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "configure-iface.at:144" +( $at_check_trace; $AUTOMAKE --add-missing ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:266" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/configure-iface.at:144: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "configure-iface.at:144" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:144" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +fi +$at_failed && at_fn_log_failure +$at_traceon; } + + + + { set +x -$as_echo "$at_srcdir/template.at:268: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:268" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/configure-iface.at:144: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:144" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/template.at:268" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144" $at_failed && at_fn_log_failure $at_traceon; } -# lib convenience -if $noskip; then - { set +x -$as_echo "$at_srcdir/template.at:272: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo" "template.at:272" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /foo + +{ set +x +$as_echo "$at_srcdir/configure-iface.at:144: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --with-included-ltdl --prefix=\$prefix" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:144" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --with-included-ltdl --prefix=$prefix ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:272" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144" $at_failed && at_fn_log_failure $at_traceon; } + +for target in all install +do { set +x -$as_echo "$at_srcdir/template.at:274: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la" "template.at:274" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la +$as_echo "$at_srcdir/configure-iface.at:144: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:144" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:274" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +done + + + +# TODO: Check that the installed program `main' is linked against our libltdl { set +x -$as_echo "$at_srcdir/template.at:276: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:276" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/configure-iface.at:148: test -f \$prefix/lib/libltdl.la" +at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "configure-iface.at:148" +( $at_check_trace; test -f $prefix/lib/libltdl.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/template.at:276" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:148" $at_failed && at_fn_log_failure $at_traceon; } - -fi -# both installed -if $noskip; then - { set +x -$as_echo "$at_srcdir/template.at:280: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar" "template.at:280" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o lib2/libb.la lib2/b.lo lib/liba.la -rpath /bar +{ set +x +$as_echo "$at_srcdir/configure-iface.at:149: test -f \$prefix/include/ltdl.h" +at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "configure-iface.at:149" +( $at_check_trace; test -f $prefix/include/ltdl.h ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:280" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:149" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/template.at:282: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS -o sub/main\$EXEEXT \$main_o lib2/libb.la" -at_fn_check_prepare_dynamic "$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la" "template.at:282" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o sub/main$EXEEXT $main_o lib2/libb.la + +# Check that main is rebuilt if libltdl.la is newer +rm -f libltdl/libltdl.la +{ set +x +$as_echo "$at_srcdir/configure-iface.at:153: \$MAKE -q main\$EXEEXT || exit 1" +at_fn_check_prepare_dynamic "$MAKE -q main$EXEEXT || exit 1" "configure-iface.at:153" +( $at_check_trace; $MAKE -q main$EXEEXT || exit 1 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/template.at:282" +at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:153" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./sub/main; if test -f "./sub/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_107 +#AT_START_108 +at_fn_group_banner 108 'configure-iface.at:162' \ + "--with-ltdl-include/lib" " " 17 +at_xfail=no + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOHEADER" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "108. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +# Install libltdl +prefix=`pwd`/_inst + +$LIBTOOLIZE --copy --ltdl=ltdl + + + +(cd ltdl { set +x -$as_echo "$at_srcdir/template.at:284: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "template.at:284" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/configure-iface.at:171: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:171" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/template.at:284" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:171" $at_failed && at_fn_log_failure $at_traceon; } -fi - -cd .. - -{ set +x -$as_echo "$at_srcdir/template.at:289: \$noskip || (exit 77)" -at_fn_check_prepare_dynamic "$noskip || (exit 77)" "template.at:289" -( $at_check_trace; $noskip || (exit 77) +for target in all install +do + { set +x +$as_echo "$at_srcdir/configure-iface.at:172: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:172" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/template.at:289" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:172" $at_failed && at_fn_log_failure $at_traceon; } +done +) - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_90 -#AT_START_91 -# 91. ctor.at:27: C++ static constructors -at_setup_line='ctor.at:27' -at_fn_banner 12 -at_desc="C++ static constructors" -at_desc_line=" 91: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "91. ctor.at:27: testing ..." - $at_traceon - +# Remove build files +rm -rf ltdl/ { set +x -$as_echo "$at_srcdir/ctor.at:28: { test -n \"\$CXX\" && test \"X\$CXX\" != Xno; } || (exit 77)" -at_fn_check_prepare_dynamic "{ test -n \"$CXX\" && test \"X$CXX\" != Xno; } || (exit 77)" "ctor.at:28" -( $at_check_trace; { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77) +$as_echo "$at_srcdir/configure-iface.at:178: test -f \$prefix/lib/libltdl.la" +at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "configure-iface.at:178" +( $at_check_trace; test -f $prefix/lib/libltdl.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:178" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/ctor.at:28: test \"X\$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" -at_fn_check_prepare_dynamic "test \"X$CXX\" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)" "ctor.at:28" -( $at_check_trace; test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77) +$as_echo "$at_srcdir/configure-iface.at:179: test -f \$prefix/include/ltdl.h" +at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "configure-iface.at:179" +( $at_check_trace; test -f $prefix/include/ltdl.h ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:179" $at_failed && at_fn_log_failure $at_traceon; } +cat >main.c <<'_ATEOF' +#include +#include +typedef int funcp (void); -cat >class.h <<'_ATEOF' -#define magic 0xaabbccdd -class Foo { -public: - Foo() { bar = magic; } - unsigned bar; -}; +static int errors = 0; -extern Foo instance; +int +main (void) +{ + lt_dlhandle handle; + + LTDL_SET_PRELOADED_SYMBOLS(); + + if (lt_dlinit () != 0) + { + fprintf (stderr, "error during initialization: %s\n", lt_dlerror ()); + return 1; + } + + handle = lt_dlopenext ("libmodule"); + if (!handle) + { + fprintf (stderr, "can't open libmodule: %s\n", lt_dlerror ()); + ++errors; + } + + { + funcp *f = (funcp *) lt_dlsym (handle, "f"); + + if (f) + { + printf ("%d\n", f ()); + } + else + { + fprintf (stderr, "function `f' not found: %s\n", lt_dlerror ()); + ++errors; + } + } + + if (lt_dlexit () != 0) + { + fprintf (stderr, "error during exit: %s\n", lt_dlerror ()); + ++errors; + } + + return (errors != 0); +} _ATEOF -cat >libctor.cpp <<'_ATEOF' -#include "class.h" -Foo instance; +cat >libmodule.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" { +#endif +int f (void) { return 5150; } +#ifdef __cplusplus +} +#endif _ATEOF -cat >main.cpp <<'_ATEOF' -#include "class.h" +cat >expout <<'_ATEOF' +5150 +_ATEOF + +case $host_os in mingw*) + while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t + mv -f expout.t expout ;; +esac + + +cat >configure.ac <<'_ATEOF' +AC_INIT([configure-iface-demo], 2.4, bug-libtool@gnu.org) +AC_CONFIG_MACRO_DIR([_inst/aclocal]) +AC_CONFIG_HEADERS([config.h:config.hin]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AM_PROG_CC_C_O +LT_INIT([dlopen]) +LTDL_INIT +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +_ATEOF + + +cat >Makefile.am <<'_ATEOF' +AUTOMAKE_OPTIONS = 1.7 + +AM_CPPFLAGS = $(LTDLINCL) + +lib_LTLIBRARIES = libmodule.la +# Automake < 1.8 will use libmodule.la.c as default source, +# while newer will choose libmodule.c; so specify it here. +libmodule_la_SOURCES = libmodule.c +libmodule_la_LDFLAGS = -module + +bin_PROGRAMS = main +main_LDFLAGS = -dlopen libmodule.la +main_LDADD = $(LIBLTDL) +main_DEPENDENCIES = $(LTDLDEPS) libmodule.la +_ATEOF + + +## Try to avoid linking against a previously installed libltdl found +## with an explicit -L/path. +save_LDFLAGS=$LDFLAGS +LDFLAGS= +for l in $save_LDFLAGS +do + case $l in + -L*) ;; + *) LDFLAGS="$LDFLAGS $l" ;; + esac +done -int main(void) -{ - return instance.bar != magic; -} -_ATEOF +# We don't use 'libtoolize --ltdl', so that we get an error if the test +# tries to build and link against its own ltdl sources: +$LIBTOOLIZE { set +x -$as_echo "$at_srcdir/ctor.at:56: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS \\ - -c libctor.cpp -o libctor.lo" -at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:56" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS \ - -c libctor.cpp -o libctor.lo +$as_echo "$at_srcdir/configure-iface.at:227: \$ACLOCAL -I _inst/aclocal" +at_fn_check_prepare_dynamic "$ACLOCAL -I _inst/aclocal" "configure-iface.at:227" +( $at_check_trace; $ACLOCAL -I _inst/aclocal ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:56" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/ctor.at:58: \$LIBTOOL --tag=CXX --mode=compile \$CXX \$CPPFLAGS \$CXXFLAGS \\ - -c main.cpp -o main.lo" -at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:58" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=compile $CXX $CPPFLAGS $CXXFLAGS \ - -c main.cpp -o main.lo +$as_echo "$at_srcdir/configure-iface.at:227: \$AUTOHEADER " +at_fn_check_prepare_dynamic "$AUTOHEADER " "configure-iface.at:227" +( $at_check_trace; $AUTOHEADER ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:58" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/ctor.at:60: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS \\ - libctor.lo -o libctor.la -rpath /none" -at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:60" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS \ - libctor.lo -o libctor.la -rpath /none +$as_echo "$at_srcdir/configure-iface.at:227: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "configure-iface.at:227" +( $at_check_trace; $AUTOMAKE --add-missing ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:60" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/configure-iface.at:227: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "configure-iface.at:227" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:227" $at_failed && at_fn_log_failure $at_traceon; } +fi +$at_failed && at_fn_log_failure +$at_traceon; } + + + + { set +x -$as_echo "$at_srcdir/ctor.at:62: \$LIBTOOL --tag=CXX --mode=link \$CXX \$CXXFLAGS \$LDFLAGS \\ - main.lo libctor.la -o main\$EXEEXT" -at_fn_check_prepare_notrace 'an embedded newline' "ctor.at:62" -( $at_check_trace; $LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS \ - main.lo libctor.la -o main$EXEEXT +$as_echo "$at_srcdir/configure-iface.at:227: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:227" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:62" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi + + { set +x -$as_echo "$at_srcdir/ctor.at:65: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "ctor.at:65" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/configure-iface.at:227: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --with-ltdl-lib=\$prefix/lib --with-ltdl-include=\$prefix/include" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:227" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --with-ltdl-lib=$prefix/lib --with-ltdl-include=$prefix/include ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/ctor.at:65" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227" $at_failed && at_fn_log_failure $at_traceon; } +for target in all +do + { set +x +$as_echo "$at_srcdir/configure-iface.at:227: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:227" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227" +$at_failed && at_fn_log_failure +$at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_91 -#AT_START_92 -# 92. exceptions.at:24: C++ exception handling -at_setup_line='exceptions.at:24' -at_fn_banner 12 -at_desc="C++ exception handling" -at_desc_line=" 92: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "92. exceptions.at:24: testing ..." - $at_traceon - - +done -: ${LTDLINCL="-I$abs_top_srcdir/libltdl"} -: ${LIBLTDL="$abs_builddir/../libltdl/libltdlc.la"} -# Skip this test when called from: -# make distcheck DISTCHECK_CONFIGURE_FLAGS=--disable-ltdl-install +## TODO: portable ldd check for correct libltdl +## Currently, this test doesn't fail if `main' ends up linking against a +## previously installed system libltdl. +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/exceptions.at:33: case \$LIBLTDL in #( - */_inst/lib/*) test -f \$LIBLTDL || (exit 77) ;; -esac" -at_fn_check_prepare_notrace 'an embedded newline' "exceptions.at:33" -( $at_check_trace; case $LIBLTDL in #( - */_inst/lib/*) test -f $LIBLTDL || (exit 77) ;; -esac +$as_echo "$at_srcdir/configure-iface.at:234: if \$LIBTOOL --mode=execute -dlopen libmodule.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen libmodule.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "configure-iface.at:234" +( $at_check_trace; if $LIBTOOL --mode=execute -dlopen libmodule.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:33" +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:234" $at_failed && at_fn_log_failure $at_traceon; } -CPPFLAGS="$LTDLINCL $CPPFLAGS" - -cat >module.h <<'_ATEOF' -#include -#include -class modexc : public std::exception { -public: - modexc (std::string str) : message (str) { } - ~modexc () throw () { } - virtual const char *what () const throw () - { - return message.c_str (); - } -private: - std::string message; -}; -extern "C" int modfoo () throw (modexc); -_ATEOF - - -cat >module.cpp <<'_ATEOF' -#include -#include "module.h" - -int modbar (void) throw (modexc) -{ - throw modexc ("exception in module"); -} - -extern "C" -int modfoo (void) throw (modexc) -{ - try { - modbar (); - } - catch (modexc e) { - std::cerr << "caught inside module: " << e.what () << '\n'; - throw modexc ("exception from module"); - } - return 0; -} -_ATEOF - - -cat >lib.h <<'_ATEOF' -#include -#include -class libexc : public std::exception { -public: - libexc (std::string str) : message (str) { } - ~libexc () throw () { } - virtual const char *what () const throw () - { - return message.c_str (); - } -private: - std::string message; -}; -int libfoo () throw (libexc); -_ATEOF - - -cat >lib.cpp <<'_ATEOF' -#include -#include "lib.h" - -int libbar (void) throw (libexc) -{ - throw libexc ("exception in library"); -} - -int libfoo (void) throw (libexc) -{ - try { - libbar (); - } - catch (libexc e) { - std::cerr << "caught inside lib: " << e.what () << '\n'; - throw libexc ("exception from library"); - } - return 0; -} -_ATEOF + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_108 +#AT_START_109 +at_fn_group_banner 109 'configure-iface.at:243' \ + "--with-included-ltdl" " " 17 +at_xfail=no + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOHEADER" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "109. $at_setup_line: testing $at_desc ..." + $at_traceon -cat >main.cpp <<'_ATEOF' -#include -#include -#include -#include -#include -#include "lib.h" -#include "module.h" -class exc : public std::exception { -public: - exc (std::string str) : message (str) { } - ~exc () throw () { } - virtual const char *what () const throw () - { - return message.c_str (); - } -private: - std::string message; -}; -int foo (void) throw (exc) -{ - throw exc ("exception in program"); - return 0; -} +cat >main.c <<'_ATEOF' +#include +#include -int exceptions_in_prog (void) -{ - std::cerr << "exceptions_in_prog\n"; - try { - foo (); - } - catch (exc e) { - std::cerr << "caught: " << e.what () << '\n'; - return 0; - } - return 1; -} +typedef int funcp (void); -int exceptions_in_lib (void) -{ - std::cerr << "exceptions_in_lib\n"; - try { - libfoo (); - } - catch (libexc e) { - std::cerr << "caught: " << e.what () << '\n'; - return 0; - } - return 1; -} +static int errors = 0; -int exceptions_in_module (void) +int +main (void) { - std::cerr << "exceptions_in_module\n"; + lt_dlhandle handle; - if (lt_dlinit ()) - { - std::cerr << "init error: " << lt_dlerror () << '\n'; - return 1; - } + LTDL_SET_PRELOADED_SYMBOLS(); - // Some systems need RTLD_GLOBAL for exceptions to work in modules. - lt_dladvise advise; - if (lt_dladvise_init (&advise) || lt_dladvise_global (&advise)) + if (lt_dlinit () != 0) { - std::cerr << "error setting advise global\n"; + fprintf (stderr, "error during initialization: %s\n", lt_dlerror ()); return 1; } - lt_dlhandle handle = lt_dlopenadvise ("module.la", advise); - if (handle == NULL) + handle = lt_dlopenext ("libmodule"); + if (!handle) { - std::cerr << "dlopen failed: " << lt_dlerror () << '\n'; - return 1; + fprintf (stderr, "can't open libmodule: %s\n", lt_dlerror ()); + ++errors; } - lt_dladvise_destroy (&advise); - typedef int (*pfun) (void); - pfun pf = (pfun) lt_dlsym (handle, "modfoo"); - if (pf == NULL) - { - std::cerr << "dlsym failed: " << lt_dlerror () << '\n'; - return 1; - } + { + funcp *f = (funcp *) lt_dlsym (handle, "f"); - try { - (*pf) (); - } - catch (modexc e) { - std::cerr << "caught: " << e.what () << '\n'; - if (lt_dlclose (handle)) + if (f) { - std::cerr << "dlclose failed: " << lt_dlerror () << '\n'; - return 1; + printf ("%d\n", f ()); } - if (lt_dlexit ()) + else { - std::cerr << "lt_dlexit failed: " << lt_dlerror () << '\n'; - return 1; + fprintf (stderr, "function `f' not found: %s\n", lt_dlerror ()); + ++errors; } - return 0; } - return 1; + + if (lt_dlexit () != 0) + { + fprintf (stderr, "error during exit: %s\n", lt_dlerror ()); + ++errors; + } + + return (errors != 0); } +_ATEOF -int main (void) -{ - if (exceptions_in_prog ()) - return 1; - if (exceptions_in_lib ()) - return 1; - if (exceptions_in_module ()) - return 1; - return 0; + +cat >libmodule.c <<'_ATEOF' +#ifdef __cplusplus +extern "C" { +#endif +int f (void) { return 5150; } +#ifdef __cplusplus } +#endif _ATEOF -inst=`pwd`/inst -libdir=$inst/lib -bindir=$inst/bin -moddir=$inst/mod -mkdir l m $inst $libdir $bindir $moddir +cat >expout <<'_ATEOF' +5150 +_ATEOF + +case $host_os in mingw*) + while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t + mv -f expout.t expout ;; +esac + + +cat >configure.ac <<'_ATEOF' +AC_INIT([configure-iface-demo], 2.4, bug-libtool@gnu.org) +AC_CONFIG_AUX_DIR([libltdl/config]) +AC_CONFIG_MACRO_DIR([libltdl/m4]) +AC_CONFIG_HEADERS([config.h:config.hin]) +LT_CONFIG_LTDL_DIR([libltdl]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AM_PROG_CC_C_O +LT_INIT([dlopen]) +LTDL_INIT +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +_ATEOF + + +cat >Makefile.am <<'_ATEOF' +AUTOMAKE_OPTIONS = 1.7 + +SUBDIRS = libltdl + +AM_CPPFLAGS = $(LTDLINCL) + +lib_LTLIBRARIES = libmodule.la +# Automake < 1.8 will use libmodule.la.c as default source, +# while newer will choose libmodule.c; so specify it here. +libmodule_la_SOURCES = libmodule.c +libmodule_la_LDFLAGS = -module + +bin_PROGRAMS = main +main_LDFLAGS = -dlopen libmodule.la +main_LDADD = $(LIBLTDL) +main_DEPENDENCIES = $(LTDLDEPS) libmodule.la +_ATEOF + + +$LIBTOOLIZE --ltdl + + +{ set +x +$as_echo "$at_srcdir/configure-iface.at:282: \$ACLOCAL -I libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "configure-iface.at:282" +( $at_check_trace; $ACLOCAL -I libltdl/m4 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +{ set +x +$as_echo "$at_srcdir/configure-iface.at:282: \$AUTOHEADER " +at_fn_check_prepare_dynamic "$AUTOHEADER " "configure-iface.at:282" +( $at_check_trace; $AUTOHEADER +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +{ set +x +$as_echo "$at_srcdir/configure-iface.at:282: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "configure-iface.at:282" +( $at_check_trace; $AUTOMAKE --add-missing +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/configure-iface.at:282: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "configure-iface.at:282" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:282" +$at_failed && at_fn_log_failure +$at_traceon; } + +fi +$at_failed && at_fn_log_failure +$at_traceon; } + + + -# If the C++ compiler isn't capable, don't bother. { set +x -$as_echo "$at_srcdir/exceptions.at:244: \$CXX \$CPPFLAGS \$CXXFLAGS -c main.cpp || exit 77" -at_fn_check_prepare_dynamic "$CXX $CPPFLAGS $CXXFLAGS -c main.cpp || exit 77" "exceptions.at:244" -( $at_check_trace; $CXX $CPPFLAGS $CXXFLAGS -c main.cpp || exit 77 +$as_echo "$at_srcdir/configure-iface.at:282: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:282" +( $at_check_trace; $AUTOCONF +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + +{ set +x +$as_echo "$at_srcdir/configure-iface.at:282: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --with-included-ltdl" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:282" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --with-included-ltdl ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:244" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282" $at_failed && at_fn_log_failure $at_traceon; } -for file in lib.cpp module.cpp; do +for target in all +do { set +x -$as_echo "$at_srcdir/exceptions.at:247: \$LIBTOOL --mode=compile --tag=CXX \$CXX \$CPPFLAGS \$CXXFLAGS -c \$file" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c $file" "exceptions.at:247" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CXX $CXX $CPPFLAGS $CXXFLAGS -c $file +$as_echo "$at_srcdir/configure-iface.at:282: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:282" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:247" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282" $at_failed && at_fn_log_failure $at_traceon; } done + + + +# --with-included-ltdl should build a convenience lib by default { set +x -$as_echo "$at_srcdir/exceptions.at:250: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o l/liba.la lib.lo -no-undefined -version-info 1:0:0 -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/liba.la lib.lo -no-undefined -version-info 1:0:0 -rpath $libdir" "exceptions.at:250" -( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o l/liba.la lib.lo -no-undefined -version-info 1:0:0 -rpath $libdir +$as_echo "$at_srcdir/configure-iface.at:286: test -f libltdl/libltdlc.la" +at_fn_check_prepare_trace "configure-iface.at:286" +( $at_check_trace; test -f libltdl/libltdlc.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:250" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:286" $at_failed && at_fn_log_failure $at_traceon; } + +## TODO: portable ldd check for correct libltdl +## Currently, this test doesn't fail if `main' ends up linking against a +## previously installed system libltdl. +lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/exceptions.at:253: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o m/module.la module.lo -module -avoid-version -no-undefined -rpath \$moddir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o m/module.la module.lo -module -avoid-version -no-undefined -rpath $moddir" "exceptions.at:253" -( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o m/module.la module.lo -module -avoid-version -no-undefined -rpath $moddir +$as_echo "$at_srcdir/configure-iface.at:291: if \$LIBTOOL --mode=execute -dlopen libmodule.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen libmodule.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "configure-iface.at:291" +( $at_check_trace; if $LIBTOOL --mode=execute -dlopen libmodule.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:253" +at_fn_diff_devnull "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:291" $at_failed && at_fn_log_failure $at_traceon; } -# We need -export-dynamic for the exception handling in modules to work. + +# Check that main is rebuilt if libltdlc.la is newer +rm -f libltdl/libltdlc.la { set +x -$as_echo "$at_srcdir/exceptions.at:258: \$LIBTOOL --mode=link --tag=CXX \$CXX \$CXXFLAGS \$LDFLAGS -o main\$EXEEXT main.\$OBJEXT l/liba.la -dlopen m/module.la \$LIBLTDL -export-dynamic" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT l/liba.la -dlopen m/module.la $LIBLTDL -export-dynamic" "exceptions.at:258" -( $at_check_trace; $LIBTOOL --mode=link --tag=CXX $CXX $CXXFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT l/liba.la -dlopen m/module.la $LIBLTDL -export-dynamic +$as_echo "$at_srcdir/configure-iface.at:295: \$MAKE -q main\$EXEEXT || exit 1" +at_fn_check_prepare_dynamic "$MAKE -q main$EXEEXT || exit 1" "configure-iface.at:295" +( $at_check_trace; $MAKE -q main$EXEEXT || exit 1 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:258" +at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:295" $at_failed && at_fn_log_failure $at_traceon; } -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_109 +#AT_START_110 +at_fn_group_banner 110 'configure-iface.at:304' \ + "convenience libltdl" " " 17 +at_xfail=no + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "110. $at_setup_line: testing $at_desc ..." + $at_traceon + + +cat >configure.ac <<'_ATEOF' +AC_INIT +AC_CONFIG_AUX_DIR([libltdl/config]) +AC_LIBLTDL_CONVENIENCE +AC_LIBTOOL_DLOPEN +AC_PROG_LIBTOOL +AC_CONFIG_FILES(Makefile) +AC_OUTPUT +_ATEOF + +cat >Makefile.in <<'_ATEOF' +LIBLTDL = @LIBLTDL@ +print-ltdl: + echo $(LIBLTDL) +_ATEOF + + +$LIBTOOLIZE --ltdl + + { set +x -$as_echo "$at_srcdir/exceptions.at:262: if \$LIBTOOL --mode=execute -dlopen m/module.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen m/module.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "exceptions.at:262" -( $at_check_trace; if $LIBTOOL --mode=execute -dlopen m/module.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/configure-iface.at:321: \$ACLOCAL -I libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "configure-iface.at:321" +( $at_check_trace; $ACLOCAL -I libltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:262" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:321" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/exceptions.at:264: \$LIBTOOL --mode=install cp l/liba.la \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp l/liba.la $libdir" "exceptions.at:264" -( $at_check_trace; $LIBTOOL --mode=install cp l/liba.la $libdir +$as_echo "$at_srcdir/configure-iface.at:321: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:321" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:264" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:321" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/exceptions.at:266: \$LIBTOOL --mode=install cp m/module.la \$moddir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp m/module.la $moddir" "exceptions.at:266" -( $at_check_trace; $LIBTOOL --mode=install cp m/module.la $moddir +$as_echo "$at_srcdir/configure-iface.at:321: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:321" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:266" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:321" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/exceptions.at:268: \$LIBTOOL --mode=install cp main\$EXEEXT \$bindir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp main$EXEEXT $bindir" "exceptions.at:268" -( $at_check_trace; $LIBTOOL --mode=install cp main$EXEEXT $bindir +$as_echo "$at_srcdir/configure-iface.at:322: \$MAKE print-ltdl" +at_fn_check_prepare_dynamic "$MAKE print-ltdl" "configure-iface.at:322" +( $at_check_trace; $MAKE print-ltdl ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:268" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:322" $at_failed && at_fn_log_failure $at_traceon; } -rm -rf l m main$EXEEXT - -LTDL_LIBRARY_PATH=$moddir -export LTDL_LIBRARY_PATH -lt_exe=$bindir/main; if test -f "$bindir/main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/exceptions.at:274: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "exceptions.at:274" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/configure-iface.at:323: grep libltdl/libltdlc.la stdout" +at_fn_check_prepare_trace "configure-iface.at:323" +( $at_check_trace; grep libltdl/libltdlc.la stdout ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/exceptions.at:274" +at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:323" $at_failed && at_fn_log_failure $at_traceon; } - set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_92 -#AT_START_93 -# 93. early-libtool.at:32: config.status -at_setup_line='early-libtool.at:32' -at_fn_banner 13 -at_desc="config.status" -at_desc_line=" 93: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_110 +#AT_START_111 +at_fn_group_banner 111 'stresstest.at:31' \ + "Link option thorough search test" " " 18 at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "93. early-libtool.at:32: testing ..." + $as_echo "111. $at_setup_line: testing $at_desc ..." $at_traceon -cat >configure.ac <<'_ATEOF' -AC_INIT([libtool-demo], 2.2.10, bug-libtool@gnu.org) -AC_CONFIG_MACRO_DIR([m4]) -LT_INIT -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -_ATEOF - +eval `$LIBTOOL --config | $EGREP '^(CC|objdir|allow_undefined_flag)='` -cat >Makefile.in <<'_ATEOF' -prefix = @prefix@ -libdir = @libdir@ -top_builddir = . -SHELL = @SHELL@ -DEFAULT_INCLUDES = -I. -I@srcdir@ -EXEEXT = @EXEEXT@ -LIBTOOL = @LIBTOOL@ -OBJEXT = @OBJEXT@ +mkdir sub sub2 sub3 2>/dev/null -CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ +cat >a.c <<'_ATEOF' +/* all kinds of data items */ +#ifdef __cplusplus +extern "C" { +#endif +int v1; +static int v2; +int v3 = 0; +int v4 = 1; +extern const int v5, v6; +extern const char *v7; +extern const char v8[]; +extern int (*const v12) (void); +const int v5 = 0; +const int v6 = 1; +const char* v7 = "\01foo"; +const char v8[] = "\01bar"; +int v9(void) { return v2 + 1; } +int (*v10) (void); +int (*v11) (void) = v9; +int (*const v12) (void) = v9; -COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES) -LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES) -LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) -o $@ +typedef struct { int arr[1000]; } large; +large v13; +large v14 = { { 0 } }; +large v15 = { { 1 } }; +#ifdef __cplusplus +} +#endif +_ATEOF -all: hell$(EXEEXT) -libhello.la: hello.lo - $(LINK) -rpath $(libdir) hello.lo -hell$(EXEEXT): main.$(OBJEXT) libhello.la - $(LINK) main.$(OBJEXT) libhello.la +cat >asyms <<'_ATEOF' +v1 +v3 +v4 +v5 +v6 +v7 +v8 +v9 +v10 +v11 +v12 +v13 +v14 +v15 +_ATEOF -.SUFFIXES: -.SUFFIXES: .c .$(OBJEXT) .lo -.c.$(OBJEXT): - $(COMPILE) -c $< -.c.lo: - $(LTCOMPILE) -c -o $@ $< +cat >b.c <<'_ATEOF' +int b = 42; +int b3 = 1; +int ab = 1; _ATEOF -cat >hello.c <<'_ATEOF' -#include +cat >main.c <<'_ATEOF' -void -hello (void) +#if defined(LIBA_DLL_IMPORT) +# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) +# define LIBA_SCOPE extern __declspec(dllimport) +# if defined(_MSC_VER) +# define LIBA_SCOPE_VAR LIBA_SCOPE +# endif +# endif +#endif +#if !defined(LIBA_SCOPE) +# define LIBA_SCOPE extern +#endif +#if !defined(LIBA_SCOPE_VAR) +# define LIBA_SCOPE_VAR extern +#endif +#ifdef __cplusplus +extern "C" { +#endif +LIBA_SCOPE_VAR int v1; +LIBA_SCOPE_VAR int v3, v4; +LIBA_SCOPE const int v5, v6; +LIBA_SCOPE_VAR const char* v7; +LIBA_SCOPE_VAR const char v8[]; +extern int v9(void); +LIBA_SCOPE_VAR int (*v10) (void); +LIBA_SCOPE_VAR int (*v11) (void); +LIBA_SCOPE int (*const v12) (void); +#ifdef __cplusplus +} +#endif + +typedef struct { int arr[1000]; } large; +LIBA_SCOPE_VAR large v13, v14, v15; + +int main(void) { - printf ("** This is not GNU Hello. There is no built-in mail reader. **\n"); + char s = v7[0] + v8[0]; + return s + v1 + v3 + v4 + v5 + v6 + v9() + v11() + v12() + + v13.arr[0] + v14.arr[0] + v15.arr[0] + - 8; } _ATEOF -cat >main.c <<'_ATEOF' -#include +cat >dlself.c <<'_ATEOF' -extern void hello (void); +#if defined(LIBA_DLL_IMPORT) +# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) +# define LIBA_SCOPE extern __declspec(dllimport) +# if defined(_MSC_VER) +# define LIBA_SCOPE_VAR LIBA_SCOPE +# endif +# endif +#endif +#if !defined(LIBA_SCOPE) +# define LIBA_SCOPE extern +#endif +#if !defined(LIBA_SCOPE_VAR) +# define LIBA_SCOPE_VAR extern +#endif +#ifdef __cplusplus +extern "C" { +#endif +LIBA_SCOPE_VAR int v1; +LIBA_SCOPE_VAR int v3, v4; +LIBA_SCOPE const int v5, v6; +LIBA_SCOPE_VAR const char* v7; +LIBA_SCOPE_VAR const char v8[]; +extern int v9(void); +LIBA_SCOPE_VAR int (*v10) (void); +LIBA_SCOPE_VAR int (*v11) (void); +LIBA_SCOPE int (*const v12) (void); + +typedef struct { int arr[1000]; } large; +LIBA_SCOPE_VAR large v13, v14, v15; + +extern int w1; +extern int w3, w4; +extern const int w5, w6; +extern const char* w7; +extern const char w8[]; +extern int w9(void); +extern int (*w10) (void); +extern int (*w11) (void); +extern int (*const w12) (void); +extern large w13, w14, w15; +#ifdef __cplusplus +} +#endif -int -main (void) +int main(void) { - printf ("Welcome to GNU Hell!\n"); + char s = v7[0] + v8[0] + w7[0] + w8[0]; + return s + v1 + v3 + v4 + v5 + v6 + v9() + v11() + v12() + + v13.arr[0] + v14.arr[0] + v15.arr[0] + + w1 + w3 + w4 + w5 + w6 + w9() + w11() + w12() + + w13.arr[0] + w14.arr[0] + w15.arr[0] + - 16; +} - hello (); - return 0; +#ifdef __cplusplus +extern "C" { +#endif +int w1; +static int w2; +int w3 = 0; +int w4 = 1; +const int w5 = 0; +const int w6 = 1; +const char* w7 = "\01foo"; +const char w8[] = "\01bar"; +int w9(void) { return w2 + 1; } +int (*w10) (void); +int (*w11) (void) = w9; +int (*const w12) (void) = w9; +large w13; +large w14 = { { 0 } }; +large w15 = { { 1 } }; +#ifdef __cplusplus } +#endif _ATEOF -cat > missing <<_EOF -#! /bin/sh -exit 0 -_EOF -chmod a+x missing +cat >dlselfsyms <<'_ATEOF' +w1 +w3 +w4 +w5 +w6 +w7 +w8 +w9 +w10 +w11 +w12 +w13 +w14 +w15 +_ATEOF -$LIBTOOLIZE --copy --verbose --install { set +x -$as_echo "$at_srcdir/early-libtool.at:109: \$ACLOCAL -I m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "early-libtool.at:109" -( $at_check_trace; $ACLOCAL -I m4 +$as_echo "$at_srcdir/stresstest.at:233: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c -o sub/a.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -o sub/a.lo" "stresstest.at:233" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -o sub/a.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:109" +at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:233" $at_failed && at_fn_log_failure $at_traceon; } - - - { set +x -$as_echo "$at_srcdir/early-libtool.at:110: \$AUTOCONF --force" -at_fn_check_prepare_dynamic "$AUTOCONF --force" "early-libtool.at:110" -( $at_check_trace; $AUTOCONF --force +$as_echo "$at_srcdir/stresstest.at:235: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c b.c -o sub/b.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c -o sub/b.lo" "stresstest.at:235" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c -o sub/b.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:110" +at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:235" $at_failed && at_fn_log_failure $at_traceon; } - - +{ set +x +$as_echo "$at_srcdir/stresstest.at:237: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c main.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c" "stresstest.at:237" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:237" +$at_failed && at_fn_log_failure +$at_traceon; } { set +x -$as_echo "$at_srcdir/early-libtool.at:111: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "early-libtool.at:111" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +$as_echo "$at_srcdir/stresstest.at:239: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c main.c -o main-static.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c -o main-static.lo" "stresstest.at:239" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c -o main-static.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:111" +at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:239" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/stresstest.at:241: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c dlself.c -o sub3/dlself.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c dlself.c -o sub3/dlself.lo" "stresstest.at:241" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c dlself.c -o sub3/dlself.lo +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:241" +$at_failed && at_fn_log_failure +$at_traceon; } -for target in all -do - { set +x -$as_echo "$at_srcdir/early-libtool.at:112: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "early-libtool.at:112" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +{ set +x +$as_echo "$at_srcdir/stresstest.at:243: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c dlself.c -o sub3/dlself-static.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c dlself.c -o sub3/dlself-static.lo" "stresstest.at:243" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c dlself.c -o sub3/dlself-static.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:112" +at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:243" $at_failed && at_fn_log_failure $at_traceon; } -done +case $allow_undefined_flag in + unsupported) undef_opts=-no-undefined ;; + *) undef_opts='"" -no-undefined' ;; +esac -lt_exe=./hell; if test -f "./hell$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi -{ set +x -$as_echo "$at_srcdir/early-libtool.at:114: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "early-libtool.at:114" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +# expose problems with the regex: +touch vfoo v.bar + +for l1 in $undef_opts +do + for l2 in '' '-export-symbols-regex "v.*"' '-export-symbols asyms' + do + for l3 in '' '-rpath /nonexistent' + do + linkargs="$l1 $l2 $l3" + for rel in '' ./ `pwd`/ + do + echo "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o \"$rel\"sub2/liba.la \"$rel\"sub/a.lo' $linkargs"; { set +x +$as_echo "$at_srcdir/stresstest.at:263: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o \"\$rel\"sub2/liba.la \"\$rel\"sub/a.lo' \$linkargs" +at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o \"$rel\"sub2/liba.la \"$rel\"sub/a.lo' $linkargs" "stresstest.at:263" +( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o "$rel"sub2/liba.la "$rel"sub/a.lo' $linkargs ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:114" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:263" $at_failed && at_fn_log_failure $at_traceon; } + for st in '' '-static' '-no-install' + do + # if -static is not passed, and the library is shared, then we have + # to use -DLIBA_DLL_IMPORT, thus main.lo (and not main-static.lo). + case $st,$l3 in + -static,*) mst=-static ;; + *,-rpath*) mst= ;; + *) mst=-static ;; + esac -{ set +x -$as_echo "$at_srcdir/early-libtool.at:115: grep 'Welcome to GNU Hell' stdout" -at_fn_check_prepare_trace "early-libtool.at:115" -( $at_check_trace; grep 'Welcome to GNU Hell' stdout + echo "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"main$EXEEXT \"$rel\"main$mst.lo \"$rel\"sub2/liba.la"; { set +x +$as_echo "$at_srcdir/stresstest.at:275: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o \"\$rel\"main\$EXEEXT \"\$rel\"main\$mst.lo \"\$rel\"sub2/liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"main$EXEEXT \"$rel\"main$mst.lo \"$rel\"sub2/liba.la" "stresstest.at:275" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"main$EXEEXT "$rel"main$mst.lo "$rel"sub2/liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:115" +at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:275" $at_failed && at_fn_log_failure $at_traceon; } + lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/early-libtool.at:116: grep 'This is not GNU Hello.' stdout" -at_fn_check_prepare_trace "early-libtool.at:116" -( $at_check_trace; grep 'This is not GNU Hello.' stdout +$as_echo "$at_srcdir/stresstest.at:277: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "stresstest.at:277" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:116" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:277" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_93 -#AT_START_94 -# 94. early-libtool.at:126: config.lt -at_setup_line='early-libtool.at:126' -at_fn_banner 13 -at_desc="config.lt" -at_desc_line=" 94: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "94. early-libtool.at:126: testing ..." - $at_traceon - - -cat >configure.ac <<'_ATEOF' -AC_INIT([libtool-demo], 2.2.10, bug-libtool@gnu.org) -AC_CONFIG_MACRO_DIR([m4]) -LT_INIT -LT_OUTPUT - -cat >hello.c <<\_EOF -#include - -void -hello (void) -{ - printf ("** This is not GNU Hello. There is no built-in mail reader. **\n"); -} -_EOF - -# Prove that we can run libtool from inside configure: -$SHELL ./libtool --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS \ - -I. -I$srcdir -c -o hello.lo hello.c || exit 1 -$SHELL ./libtool --mode=link --tag=CC $CC $CFLAGS $LDFLAGS \ - -o libhello.la -rpath /notexist hello.lo || exit 1 - -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -_ATEOF - - -cat >Makefile.in <<'_ATEOF' -prefix = @prefix@ -libdir = @libdir@ -top_builddir = . -SHELL = @SHELL@ -DEFAULT_INCLUDES = -I. -I@srcdir@ -EXEEXT = @EXEEXT@ -LIBTOOL = @LIBTOOL@ -OBJEXT = @OBJEXT@ - -CPPFLAGS = @CPPFLAGS@ -CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ - -COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES) -LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) -o $@ - -all: hell$(EXEEXT) - -hell$(EXEEXT): main.$(OBJEXT) libhello.la - $(LINK) main.$(OBJEXT) libhello.la - -.SUFFIXES: -.SUFFIXES: .c .$(OBJEXT) - -.c.$(OBJEXT): - $(COMPILE) -c $< -_ATEOF - - -cat >hello.c <<'_ATEOF' -#include - -void -hello (void) -{ - printf ("** This is not GNU Hello. There is no built-in mail reader. **\n"); -} -_ATEOF - - -cat >main.c <<'_ATEOF' -#include - -extern void hello (void); + for l10 in '' '-export-symbols dlselfsyms' + do + echo "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"sub3/dlself$EXEEXT \"$rel\"sub3/dlself$mst.lo \"$rel\"sub2/liba.la sub/b.lo -dlopen self $l10"; { set +x +$as_echo "$at_srcdir/stresstest.at:280: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o \"\$rel\"sub3/dlself\$EXEEXT \"\$rel\"sub3/dlself\$mst.lo \"\$rel\"sub2/liba.la sub/b.lo -dlopen self \$l10" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"sub3/dlself$EXEEXT \"$rel\"sub3/dlself$mst.lo \"$rel\"sub2/liba.la sub/b.lo -dlopen self $l10" "stresstest.at:280" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"sub3/dlself$EXEEXT "$rel"sub3/dlself$mst.lo "$rel"sub2/liba.la sub/b.lo -dlopen self $l10 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:280" +$at_failed && at_fn_log_failure +$at_traceon; } -int -main (int argc, char *argv[]) -{ - printf ("Welcome to GNU Hell!\n"); + lt_exe=./sub3/dlself; if test -f "./sub3/dlself$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi +{ set +x +$as_echo "$at_srcdir/stresstest.at:282: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" +at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "stresstest.at:282" +( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:282" +$at_failed && at_fn_log_failure +$at_traceon; } - hello (); - return 0; -} -_ATEOF + done + done + done + done + done +done + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_111 +#AT_START_112 +at_fn_group_banner 112 'cmdline_wrap.at:28' \ + "Run tests with low max_cmd_len" " " 18 +at_xfail=no +( + $as_echo "112. $at_setup_line: testing $at_desc ..." + $at_traceon -cat > missing <<_EOF -#! /bin/sh -exit 0 -_EOF -chmod a+x missing -$LIBTOOLIZE --copy --verbose --install +sed 's,max_cmd_len=.*,max_cmd_len="24",' < $LIBTOOL > libtool +chmod +x libtool +LIBTOOL=`pwd`/libtool +export LIBTOOL +# run the suite in a subdirectory, otherwise the two suites will compete +# for the output file `testsuite.log'. +mkdir tests +cd tests +INNER_TESTSUITEFLAGS="$INNER_TESTSUITEFLAGS abs_top_srcdir=$abs_top_srcdir \ + abs_builddir=$abs_builddir" { set +x -$as_echo "$at_srcdir/early-libtool.at:216: \$ACLOCAL -I m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "early-libtool.at:216" -( $at_check_trace; $ACLOCAL -I m4 +$as_echo "$at_srcdir/cmdline_wrap.at:43: \$CONFIG_SHELL \$abs_srcdir/testsuite -k libtool\$INNER_TESTSUITEFLAGS" +at_fn_check_prepare_dynamic "$CONFIG_SHELL $abs_srcdir/testsuite -k libtool$INNER_TESTSUITEFLAGS" "cmdline_wrap.at:43" +( $at_check_trace; $CONFIG_SHELL $abs_srcdir/testsuite -k libtool$INNER_TESTSUITEFLAGS ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:216" -$at_failed && at_fn_log_failure +at_fn_check_status 0 $at_status "$at_srcdir/cmdline_wrap.at:43" +$at_failed && at_fn_log_failure \ +"testsuite.log" $at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_112 +#AT_START_113 +at_fn_group_banner 113 'pic_flag.at:24' \ + "override pic_flag at configure time" " " 18 +at_xfail=no +( + $as_echo "113. $at_setup_line: testing $at_desc ..." + $at_traceon + + +# Just try to configure the Libtool package with -fpic if we can compile +# with it, for C and C++. +cat >foo.c <<'_ATEOF' +int data = 42; +int func(void) { return data; } +_ATEOF + +cp foo.c foo.cpp +C_pic_flag='-fpic -DPIC' { set +x -$as_echo "$at_srcdir/early-libtool.at:217: \$AUTOCONF --force" -at_fn_check_prepare_dynamic "$AUTOCONF --force" "early-libtool.at:217" -( $at_check_trace; $AUTOCONF --force +$as_echo "$at_srcdir/pic_flag.at:36: \$CC \$CPPFLAGS \$CFLAGS \$C_pic_flag -c foo.c || exit 77" +at_fn_check_prepare_dynamic "$CC $CPPFLAGS $CFLAGS $C_pic_flag -c foo.c || exit 77" "pic_flag.at:36" +( $at_check_trace; $CC $CPPFLAGS $CFLAGS $C_pic_flag -c foo.c || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:217" +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/pic_flag.at:36" $at_failed && at_fn_log_failure $at_traceon; } - - - +# The configure test for the PIC flag also checks for warnings. { set +x -$as_echo "$at_srcdir/early-libtool.at:218: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "early-libtool.at:218" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +$as_echo "$at_srcdir/pic_flag.at:39: grep fpic stdout stderr && exit 77" +at_fn_check_prepare_trace "pic_flag.at:39" +( $at_check_trace; grep fpic stdout stderr && exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:218" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/pic_flag.at:39" $at_failed && at_fn_log_failure $at_traceon; } - -for target in all -do - { set +x -$as_echo "$at_srcdir/early-libtool.at:219: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "early-libtool.at:219" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +{ set +x +$as_echo "$at_srcdir/pic_flag.at:40: grep '[uU]nknown.*option' stdout stderr && exit 77" +at_fn_check_prepare_trace "pic_flag.at:40" +( $at_check_trace; grep '[uU]nknown.*option' stdout stderr && exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:219" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/pic_flag.at:40" $at_failed && at_fn_log_failure $at_traceon; } -done +CXX_pic_flag='-fpic -DPIC' +if $CXX $CPPFLAGS $CXXFLAGS $CXX_pic_flag -c foo.cpp; then :; else + CXX_pic_flag= +fi -lt_exe=./hell; if test -f "./hell$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/early-libtool.at:221: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "early-libtool.at:221" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/pic_flag.at:47: test \"\$at_srcdir\" != . || exit 77" +at_fn_check_prepare_dynamic "test \"$at_srcdir\" != . || exit 77" "pic_flag.at:47" +( $at_check_trace; test "$at_srcdir" != . || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:221" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/pic_flag.at:47" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/early-libtool.at:222: grep 'Welcome to GNU Hell' stdout" -at_fn_check_prepare_trace "early-libtool.at:222" -( $at_check_trace; grep 'Welcome to GNU Hell' stdout +$as_echo "$at_srcdir/pic_flag.at:48: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL \"\$abs_top_srcdir\"/configure \$configure_options lt_cv_prog_compiler_pic=\"\$C_pic_flag\" lt_cv_prog_compiler_pic_CXX=\"\$CXX_pic_flag\"" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "pic_flag.at:48" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL "$abs_top_srcdir"/configure $configure_options lt_cv_prog_compiler_pic="$C_pic_flag" lt_cv_prog_compiler_pic_CXX="$CXX_pic_flag" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:222" +at_fn_check_status 0 $at_status "$at_srcdir/pic_flag.at:48" $at_failed && at_fn_log_failure $at_traceon; } + +: ${MAKE=make} { set +x -$as_echo "$at_srcdir/early-libtool.at:223: grep 'This is not GNU Hello.' stdout" -at_fn_check_prepare_trace "early-libtool.at:223" -( $at_check_trace; grep 'This is not GNU Hello.' stdout +$as_echo "$at_srcdir/pic_flag.at:52: \$MAKE" +at_fn_check_prepare_dynamic "$MAKE" "pic_flag.at:52" +( $at_check_trace; $MAKE ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:223" +echo stderr:; cat "$at_stderr" +echo stdout:; tee stdout <"$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/pic_flag.at:52" $at_failed && at_fn_log_failure $at_traceon; } - -# Make sure config.status --recheck updates the libtool script -rm libtool { set +x -$as_echo "$at_srcdir/early-libtool.at:227: \$SHELL ./config.status --recheck" -at_fn_check_prepare_dynamic "$SHELL ./config.status --recheck" "early-libtool.at:227" -( $at_check_trace; $SHELL ./config.status --recheck +$as_echo "$at_srcdir/pic_flag.at:53: if ./libtool --features | grep 'enable shared libraries'; then grep ' -fpic' stdout; else exit 77; fi" +at_fn_check_prepare_notrace 'a shell pipeline' "pic_flag.at:53" +( $at_check_trace; if ./libtool --features | grep 'enable shared libraries'; then grep ' -fpic' stdout; else exit 77; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/early-libtool.at:227" +at_fn_check_status 0 $at_status "$at_srcdir/pic_flag.at:53" $at_failed && at_fn_log_failure $at_traceon; } set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_94 -#AT_START_95 -# 95. no-executables.at:26: AC_NO_EXECUTABLES -at_setup_line='no-executables.at:26' -at_fn_banner 14 -at_desc="AC_NO_EXECUTABLES" -at_desc_line=" 95: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_113 +#AT_START_114 +at_fn_group_banner 114 'darwin.at:26' \ + "darwin fat compile" " " 19 at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "95. no-executables.at:26: testing ..." + $as_echo "114. $at_setup_line: testing $at_desc ..." $at_traceon +noskip=: +case "$host_os" in +darwin*) ;; +*) noskip=false ;; +esac + +cat >simple.c <<'_ATEOF' -mkdir m4 +int main() { return 0;} +_ATEOF -cat >configure.ac <<'_ATEOF' -AC_INIT([no-exec], [1]) -AC_CONFIG_MACRO_DIR([m4]) -# We punt a bit here, to get the results of AC_PROG_CC -# (and allow it to do link tests) but still error out on -# link tests within Libtool macros. -LDFLAGS=-lnosuchlibrary -AC_NO_EXECUTABLES -AC_PROG_CC -AC_PROG_CXX -AC_PROG_F77 -AC_PROG_FC -AM_PROG_GCJ +$noskip && { +$CC $CPPFLAGS $CFLAGS -arch ppc -arch i386 -o simple simple.c 2>&1 > /dev/null || noskip=false +rm -f simple +} -# Consequently, we have to set cache variables for each link -# test we may need. For the purposes of this test, it shouldn't -# matter much whether these values are actually wrong, the point -# is that the linker should never be invoked. +{ set +x +$as_echo "$at_srcdir/darwin.at:42: \$noskip || (exit 77)" +at_fn_check_prepare_dynamic "$noskip || (exit 77)" "darwin.at:42" +( $at_check_trace; $noskip || (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:42" +$at_failed && at_fn_log_failure +$at_traceon; } -lt_cv_shlibpath_overrides_runpath=no -lt_cv_archive_cmds_need_lc=no -lt_cv_cc_needs_belf=no -lt_cv_ld_exported_symbols_list=no -lt_cv_prog_compiler_static_works=no -# Deal with AC_LIBTOOL_DLOPEN in one of two possible ways: -# - do not execute it at all in the ac_no_link case -# - preset the individual Autoconf test variables +cat >foo.c <<'_ATEOF' -if ${test_ac_libtool_dlopen-false}; then - ac_cv_func_shl_load=no - ac_cv_lib_dld_shl_load=no - ac_cv_func_dlopen=no - ac_cv_lib_dl_dlopen=no - ac_cv_lib_svld_dlopen=no - ac_cv_lib_dld_dld_link=no - AC_LIBTOOL_DLOPEN +int x=0; +_ATEOF + + +cat >baz.c <<'_ATEOF' + +int y=0; +_ATEOF + + +cat >bar.c <<'_ATEOF' + +extern int x; +int bar(void); +int bar() { return x;} +_ATEOF + + +cat >main.c <<'_ATEOF' + +extern int x; +extern int y; + +int main() { +return x+y; +} +_ATEOF + + +mkdir bin +cat >bin/basename <<'_ATEOF' + +#! /bin/sh + +usage="usage: $0 argument" +if test $# != 1; then + echo $usage >&2 + exit 1 fi -AC_PROG_LIBTOOL -AC_OUTPUT +echo $1 | sed "s,^.*/,," _ATEOF -$LIBTOOLIZE --install +chmod +x bin/basename +save_PATH=$PATH +PATH=`pwd`/bin:$PATH +export PATH + +{ set +x +$as_echo "$at_srcdir/darwin.at:85: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o foo.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 foo.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 foo.c" "darwin.at:85" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 foo.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:85" +$at_failed && at_fn_log_failure +$at_traceon; } + + +{ set +x +$as_echo "$at_srcdir/darwin.at:87: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o baz.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 baz.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 baz.c" "darwin.at:87" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 baz.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:87" +$at_failed && at_fn_log_failure +$at_traceon; } { set +x -$as_echo "$at_srcdir/no-executables.at:74: \$ACLOCAL -I m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I m4" "no-executables.at:74" -( $at_check_trace; $ACLOCAL -I m4 +$as_echo "$at_srcdir/darwin.at:89: \$LIBTOOL --mode=link --tag=CC \$CC -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS -arch ppc -arch i386 foo.lo baz.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 foo.lo baz.lo" "darwin.at:89" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 foo.lo baz.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:74" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:89" $at_failed && at_fn_log_failure $at_traceon; } - - - - { set +x -$as_echo "$at_srcdir/no-executables.at:74: \$AUTOCONF " -at_fn_check_prepare_dynamic "$AUTOCONF " "no-executables.at:74" -( $at_check_trace; $AUTOCONF +$as_echo "$at_srcdir/darwin.at:91: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o bar.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 bar.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 bar.c" "darwin.at:91" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 bar.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:74" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:91" $at_failed && at_fn_log_failure $at_traceon; } - - - +{ set +x +$as_echo "$at_srcdir/darwin.at:93: \$LIBTOOL --mode=link --tag=CC \$CC -o libbar.la \$CPPFLAGS \$CFLAGS \$LDFLAGS -arch ppc -arch i386 bar.lo libfoo.la -rpath /nonexistent" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 bar.lo libfoo.la -rpath /nonexistent" "darwin.at:93" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 bar.lo libfoo.la -rpath /nonexistent +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:93" +$at_failed && at_fn_log_failure +$at_traceon; } { set +x -$as_echo "$at_srcdir/no-executables.at:75: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "no-executables.at:75" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +$as_echo "$at_srcdir/darwin.at:95: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o main.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 main.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 main.c" "darwin.at:95" +( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 main.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:75" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:95" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/no-executables.at:76: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options test_ac_libtool_dlopen=:" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "no-executables.at:76" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options test_ac_libtool_dlopen=: +$as_echo "$at_srcdir/darwin.at:97: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS -arch ppc -arch i386 main.lo libbar.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 main.lo libbar.la" "darwin.at:97" +( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 main.lo libbar.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/no-executables.at:76" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:97" $at_failed && at_fn_log_failure $at_traceon; } - +PATH=$save_PATH set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_95 -#AT_START_96 -# 96. deplibs-ident.at:32: build tree relpaths -at_setup_line='deplibs-ident.at:32' -at_fn_banner 15 -at_desc="build tree relpaths" -at_desc_line=" 96: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_114 +#AT_START_115 +at_fn_group_banner 115 'darwin.at:103' \ + "darwin concurrent library extraction" " " 19 at_xfail=no - case $host in - *-*-aix*|hppa*-*-hpux*|*-*-interix*|*-*-openbsd*) false;; - *):;; - esac && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "96. deplibs-ident.at:32: testing ..." + $as_echo "115. $at_setup_line: testing $at_desc ..." $at_traceon +cat >foo.c <<'_ATEOF' -mkdir a a/b c -echo 'int c() { return 0; }' > c/libcee.c -{ set +x -$as_echo "$at_srcdir/deplibs-ident.at:37: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c c/libcee.c -o c/libcee.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c/libcee.c -o c/libcee.lo" "deplibs-ident.at:37" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c c/libcee.c -o c/libcee.lo +int foo (void) { return 0; } +_ATEOF + + +cat >bar.c <<'_ATEOF' + +extern int foo1 (void); +int bar (void) { return foo1 (); } +_ATEOF + +cp bar.c baz.c + +objects= +for obj in 1 2 3 4 5 6 7 8; do + sed "s/foo/foo$obj/" < foo.c > foo$obj.c + { set +x +$as_echo "$at_srcdir/darwin.at:118: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c foo\$obj.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo$obj.c" "darwin.at:118" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo$obj.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:37" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:118" $at_failed && at_fn_log_failure $at_traceon; } + objects="$objects foo$obj.lo" +done { set +x -$as_echo "$at_srcdir/deplibs-ident.at:39: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere" "deplibs-ident.at:39" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o c/libcee.la c/libcee.lo -rpath /nowhere +$as_echo "$at_srcdir/darwin.at:122: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c bar.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c" "darwin.at:122" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:39" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:122" $at_failed && at_fn_log_failure $at_traceon; } - -depl_1=../c/libcee.la -depl_2=`pwd`/c/libcee.la -depl_3="-L../c -lcee" - -( - cd a - for i in 1 2 3; do - eval depend_on_c=\"\$depl_$i\" - echo "extern int c(void); int a$i() { return c(); }" > liba$i.c - { set +x -$as_echo "$at_srcdir/deplibs-ident.at:51: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c liba\$i.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba$i.c" "deplibs-ident.at:51" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c liba$i.c +{ set +x +$as_echo "$at_srcdir/darwin.at:124: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c baz.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c baz.c" "darwin.at:124" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c baz.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:51" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:124" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/deplibs-ident.at:53: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba\$i.la liba\$i.lo \$depend_on_c -rpath /nowhere" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la liba$i.lo $depend_on_c -rpath /nowhere" "deplibs-ident.at:53" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba$i.la liba$i.lo $depend_on_c -rpath /nowhere +{ set +x +$as_echo "$at_srcdir/darwin.at:126: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libfoo.la \$objects" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la $objects" "darwin.at:126" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la $objects ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:53" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:126" $at_failed && at_fn_log_failure $at_traceon; } - done -) - -cat >a/b/b.c <<'_ATEOF' -extern int a1(void), a2(void), a3(void), c(void); -int main() { return a1() + a2() + a3() + c(); } -_ATEOF - -( - cd a/b +# Hypothesis: concurrent convenience archive extraction works. +for i in 1 2 3 4 5; do + rm -f libbar.la libbaz.la { set +x -$as_echo "$at_srcdir/deplibs-ident.at:65: \$CC \$CFLAGS -c b.c" -at_fn_check_prepare_dynamic "$CC $CFLAGS -c b.c" "deplibs-ident.at:65" -( $at_check_trace; $CC $CFLAGS -c b.c +$as_echo "$at_srcdir/darwin.at:132: (\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la) & (\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbaz.la baz.lo -rpath /foo libfoo.la) & wait; test -f libbar.la && test -f libbaz.la" +at_fn_check_prepare_dynamic "($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la) & ($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -rpath /foo libfoo.la) & wait; test -f libbar.la && test -f libbaz.la" "darwin.at:132" +( $at_check_trace; ($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la) & ($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -rpath /foo libfoo.la) & wait; test -f libbar.la && test -f libbaz.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:65" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:132" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/deplibs-ident.at:66: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o b\$EXEEXT b.\$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b$EXEEXT b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere" "deplibs-ident.at:66" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o b$EXEEXT b.$OBJEXT ../liba1.la ../liba2.la ../liba3.la ../../c/libcee.la -rpath /nowhere +done + +# Hypothesis: the lock is not used in dry run mode. +eval "`$LIBTOOL --config | $EGREP '^(objdir)='`" +# Next line is internal detail. +lockfile=$objdir/libfoo.a.lock +echo stamp > $lockfile +{ set +x +$as_echo "$at_srcdir/darwin.at:145: \$LIBTOOL --dry-run --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la" +at_fn_check_prepare_dynamic "$LIBTOOL --dry-run --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la" "darwin.at:145" +( $at_check_trace; $LIBTOOL --dry-run --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-ident.at:66" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:145" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/deplibs-ident.at:68: \$EGREP 'cee.*cee' stdout" -at_fn_check_prepare_dynamic "$EGREP 'cee.*cee' stdout" "deplibs-ident.at:68" -( $at_check_trace; $EGREP 'cee.*cee' stdout +{ set +x +$as_echo "$at_srcdir/darwin.at:148: grep stamp \$lockfile" +at_fn_check_prepare_dynamic "grep stamp $lockfile" "darwin.at:148" +( $at_check_trace; grep stamp $lockfile ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/deplibs-ident.at:68" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:148" $at_failed && at_fn_log_failure -$at_traceon; } - - - ) - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_96 -#AT_START_97 -# 97. configure-iface.at:102: installable libltdl -at_setup_line='configure-iface.at:102' -at_fn_banner 16 -at_desc="installable libltdl" -at_desc_line=" 97: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOHEADER" = no && at_xfail=yes - test "$AUTOMAKE" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "97. configure-iface.at:102: testing ..." - $at_traceon - - - -cat >main.c <<'_ATEOF' -#include -#include - -typedef int funcp (void); - -static int errors = 0; - -int -main (void) -{ - lt_dlhandle handle; - - LTDL_SET_PRELOADED_SYMBOLS(); - - if (lt_dlinit () != 0) - { - fprintf (stderr, "error during initialization: %s\n", lt_dlerror ()); - return 1; - } - - handle = lt_dlopenext ("libmodule"); - if (!handle) - { - fprintf (stderr, "can't open libmodule: %s\n", lt_dlerror ()); - ++errors; - } - - { - funcp *f = (funcp *) lt_dlsym (handle, "f"); - - if (f) - { - printf ("%d\n", f ()); - } - else - { - fprintf (stderr, "function `f' not found: %s\n", lt_dlerror ()); - ++errors; - } - } - - if (lt_dlexit () != 0) - { - fprintf (stderr, "error during exit: %s\n", lt_dlerror ()); - ++errors; - } - - return (errors != 0); -} -_ATEOF - - -cat >libmodule.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" { -#endif -int f (void) { return 5150; } -#ifdef __cplusplus -} -#endif -_ATEOF +$at_traceon; } -cat >expout <<'_ATEOF' -5150 -_ATEOF + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_115 +#AT_START_116 +at_fn_group_banner 116 'darwin.at:152' \ + "darwin gdb debug information" " " 19 +at_xfail=no -case $host_os in mingw*) - while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t - mv -f expout.t expout ;; -esac +eval "`$LIBTOOL --config | $EGREP '^(whole_archive_flag_spec)='`" +case $whole_archive_flag_spec:$host_os in +:darwin*) : ;; +*) false ;; +esac && at_xfail=yes +( + $as_echo "116. $at_setup_line: testing $at_desc ..." + $at_traceon -cat >configure.ac <<'_ATEOF' -AC_INIT([installable-ltdl-demo], 2.2.10, bug-libtool@gnu.org) -AC_CONFIG_AUX_DIR([libltdl/config]) -AC_CONFIG_MACRO_DIR([libltdl/m4]) -AC_CONFIG_HEADERS([config.h:config.hin]) -LT_CONFIG_LTDL_DIR([libltdl]) -AM_INIT_AUTOMAKE([foreign]) -AC_PROG_CC -AM_PROG_CC_C_O -LT_INIT([dlopen]) -LTDL_INIT([installable]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -_ATEOF +{ set +x +$as_echo "$at_srcdir/darwin.at:154: gdb --version || (exit 77)" +at_fn_check_prepare_trace "darwin.at:154" +( $at_check_trace; gdb --version || (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_skip $at_status "$at_srcdir/darwin.at:154" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >Makefile.am <<'_ATEOF' -AUTOMAKE_OPTIONS = 1.7 +cat >foo.c <<'_ATEOF' -SUBDIRS = libltdl +int foo (void) { return 0; } +_ATEOF -AM_CPPFLAGS = $(LTDLINCL) -lib_LTLIBRARIES = libmodule.la -# Automake < 1.8 will use libmodule.la.c as default source, -# while newer will choose libmodule.c; so specify it here. -libmodule_la_SOURCES = libmodule.c -libmodule_la_LDFLAGS = -module +cat >bar.c <<'_ATEOF' -bin_PROGRAMS = main -main_LDFLAGS = -dlopen libmodule.la -main_LDADD = $(LIBLTDL) -main_DEPENDENCIES = $(LTDLDEPS) libmodule.la +extern int foo (void); +int bar (void) { return foo (); } _ATEOF -# Install everything! -prefix=`pwd`/_inst +cat >main.c <<'_ATEOF' -$LIBTOOLIZE --ltdl +extern int bar(void); + +int main() { return bar();} +_ATEOF { set +x -$as_echo "$at_srcdir/configure-iface.at:144: \$ACLOCAL -I libltdl/m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "configure-iface.at:144" -( $at_check_trace; $ACLOCAL -I libltdl/m4 +$as_echo "$at_srcdir/darwin.at:171: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c bar.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c" "darwin.at:171" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:171" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/darwin.at:173: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c foo.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo.c" "darwin.at:173" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:173" +$at_failed && at_fn_log_failure +$at_traceon; } +{ set +x +$as_echo "$at_srcdir/darwin.at:175: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c main.c" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c" "darwin.at:175" +( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:175" +$at_failed && at_fn_log_failure +$at_traceon; } { set +x -$as_echo "$at_srcdir/configure-iface.at:144: \$AUTOHEADER " -at_fn_check_prepare_dynamic "$AUTOHEADER " "configure-iface.at:144" -( $at_check_trace; $AUTOHEADER +$as_echo "$at_srcdir/darwin.at:178: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libfoo.la foo.lo" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo" "darwin.at:178" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:178" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/darwin.at:181: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la " +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la " "darwin.at:181" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:181" +$at_failed && at_fn_log_failure +$at_traceon; } { set +x -$as_echo "$at_srcdir/configure-iface.at:144: \$AUTOMAKE --add-missing" -at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "configure-iface.at:144" -( $at_check_trace; $AUTOMAKE --add-missing +$as_echo "$at_srcdir/darwin.at:185: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.lo libbar.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.lo libbar.la" "darwin.at:185" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.lo libbar.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144" -if $at_failed; then : - { set +x -$as_echo "$at_srcdir/configure-iface.at:144: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "configure-iface.at:144" -( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:185" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/darwin.at:187: echo quit | \$LIBTOOL --mode=execute gdb main" +at_fn_check_prepare_notrace 'a shell pipeline' "darwin.at:187" +( $at_check_trace; echo quit | $LIBTOOL --mode=execute gdb main ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:144" +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_skip $at_status "$at_srcdir/darwin.at:187" $at_failed && at_fn_log_failure $at_traceon; } -fi + +{ set +x +$as_echo "$at_srcdir/darwin.at:190: grep 'Could not find object file' stderr" +at_fn_check_prepare_trace "darwin.at:190" +( $at_check_trace; grep 'Could not find object file' stderr +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 1 $at_status "$at_srcdir/darwin.at:190" $at_failed && at_fn_log_failure $at_traceon; } +# Remove any dSYM bundle +rm -rf .libs/*.dSYM + { set +x -$as_echo "$at_srcdir/configure-iface.at:144: \$AUTOCONF " -at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:144" -( $at_check_trace; $AUTOCONF +$as_echo "$at_srcdir/darwin.at:202: echo quit | \$LIBTOOL --mode=execute gdb main" +at_fn_check_prepare_notrace 'a shell pipeline' "darwin.at:202" +( $at_check_trace; echo quit | $LIBTOOL --mode=execute gdb main +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_skip $at_status "$at_srcdir/darwin.at:202" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/darwin.at:204: grep 'Could not find object file' stderr" +at_fn_check_prepare_trace "darwin.at:204" +( $at_check_trace; grep 'Could not find object file' stderr ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144" +at_fn_check_status 1 $at_status "$at_srcdir/darwin.at:204" $at_failed && at_fn_log_failure $at_traceon; } + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_116 +#AT_START_117 +at_fn_group_banner 117 'deplibs-mingw.at:27' \ + "deplibs without file command" " " 19 +at_xfail=no +( + $as_echo "117. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +cwd=`pwd` +instdir=$cwd/inst +libdir=$instdir/lib +bindir=$instdir/bin +LDFLAGS="$LDFLAGS -no-undefined" + +mkdir inst inst/bin inst/lib + +cat >a.c <<'_ATEOF' +int a () { return 0; } +_ATEOF + +cat >b.c <<'_ATEOF' +extern int a (); +int b () { return a (); } +_ATEOF +for file in a.c b.c; do + $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file +done { set +x -$as_echo "$at_srcdir/configure-iface.at:144: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --with-included-ltdl --prefix=\$prefix" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:144" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --with-included-ltdl --prefix=$prefix +$as_echo "$at_srcdir/deplibs-mingw.at:49: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -rpath \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir" "deplibs-mingw.at:49" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:49" $at_failed && at_fn_log_failure $at_traceon; } - -for target in all install -do - { set +x -$as_echo "$at_srcdir/configure-iface.at:144: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:144" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +{ set +x +$as_echo "$at_srcdir/deplibs-mingw.at:51: library_names= && . ./liba.la && if test -z \"\$library_names\"; then exit 77; fi " +at_fn_check_prepare_dynamic "library_names= && . ./liba.la && if test -z \"$library_names\"; then exit 77; fi " "deplibs-mingw.at:51" +( $at_check_trace; library_names= && . ./liba.la && if test -z "$library_names"; then exit 77; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:144" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:51" $at_failed && at_fn_log_failure $at_traceon; } -done - - +{ set +x +$as_echo "$at_srcdir/deplibs-mingw.at:53: \$LIBTOOL --mode=install cp liba.la \$libdir" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "deplibs-mingw.at:53" +( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:53" +$at_failed && at_fn_log_failure +$at_traceon; } -# TODO: Check that the installed program `main' is linked against our libltdl { set +x -$as_echo "$at_srcdir/configure-iface.at:148: test -f \$prefix/lib/libltdl.la" -at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "configure-iface.at:148" -( $at_check_trace; test -f $prefix/lib/libltdl.la +$as_echo "$at_srcdir/deplibs-mingw.at:54: \$LIBTOOL --mode=clean rm -f liba.la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "deplibs-mingw.at:54" +( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:148" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:54" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/configure-iface.at:149: test -f \$prefix/include/ltdl.h" -at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "configure-iface.at:149" -( $at_check_trace; test -f $prefix/include/ltdl.h +rm -f $libdir/liba.la + +# check once with `file' (if present) and once without, if on MinGW. +for try in with-file without-file; do + { set +x +$as_echo "$at_srcdir/deplibs-mingw.at:59: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la b.lo -rpath \$libdir -L\$libdir -la" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir -L$libdir -la" "deplibs-mingw.at:59" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir -L$libdir -la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:149" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:59" $at_failed && at_fn_log_failure $at_traceon; } - -# Check that main is rebuilt if libltdl.la is newer -rm -f libltdl/libltdl.la -{ set +x -$as_echo "$at_srcdir/configure-iface.at:153: \$MAKE -q main\$EXEEXT || exit 1" -at_fn_check_prepare_dynamic "$MAKE -q main$EXEEXT || exit 1" "configure-iface.at:153" -( $at_check_trace; $MAKE -q main$EXEEXT || exit 1 + { set +x +$as_echo "$at_srcdir/deplibs-mingw.at:62: library_names= && . ./libb.la && if test -z \"\$library_names\"; then exit 99; fi " +at_fn_check_prepare_dynamic "library_names= && . ./libb.la && if test -z \"$library_names\"; then exit 99; fi " "deplibs-mingw.at:62" +( $at_check_trace; library_names= && . ./libb.la && if test -z "$library_names"; then exit 99; fi ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:153" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:62" $at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_97 -#AT_START_98 -# 98. configure-iface.at:162: --with-ltdl-include/lib -at_setup_line='configure-iface.at:162' -at_fn_banner 16 -at_desc="--with-ltdl-include/lib" -at_desc_line=" 98: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOHEADER" = no && at_xfail=yes - test "$AUTOMAKE" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "98. configure-iface.at:162: testing ..." - $at_traceon - - - -# Install libltdl -prefix=`pwd`/_inst - -$LIBTOOLIZE --copy --ltdl=ltdl - - + case $host_os in + mingw*) + if file /; then + mkdir bin new-libtool -(cd ltdl -{ set +x -$as_echo "$at_srcdir/configure-iface.at:171: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --enable-ltdl-install --prefix=\$prefix" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:171" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --enable-ltdl-install --prefix=$prefix + cat >bin/file <<\EOF +#! /bin/sh +exit 1 +EOF + chmod +x bin/file + PATH=`pwd`/bin${PATH_SEPARATOR-:}$PATH + cd new-libtool + # configure might fail due to in-tree build of toplevel, or + # missing configure flags and other reasons. + { set +x +$as_echo "$at_srcdir/deplibs-mingw.at:79: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL \"\$abs_top_srcdir\"/configure \$configure_options || exit 77" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "deplibs-mingw.at:79" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL "$abs_top_srcdir"/configure $configure_options || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:171" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:79" $at_failed && at_fn_log_failure $at_traceon; } -for target in all install -do - { set +x -$as_echo "$at_srcdir/configure-iface.at:172: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:172" -( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target + cd .. + LIBTOOL=new-libtool/libtool + export LIBTOOL + # Check whether the generated script is usable; otherwise, skip. + { set +x +$as_echo "$at_srcdir/deplibs-mingw.at:84: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libunrelated.la a.lo -rpath \$libdir || exit 77" +at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libunrelated.la a.lo -rpath $libdir || exit 77" "deplibs-mingw.at:84" +( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libunrelated.la a.lo -rpath $libdir || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:172" +at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:84" $at_failed && at_fn_log_failure $at_traceon; } + else + break; + fi;; + *) + break;; + esac done -) + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_117 +#AT_START_118 +at_fn_group_banner 118 'sysroot.at:203' \ + "-L=.../lib -l" " " 20 +at_xfail=no + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "118. $at_setup_line: testing $at_desc ..." + $at_traceon + -# Remove build files -rm -rf ltdl/ +gcc_sysroot=`$CC --print-sysroot 2> /dev/null` +if test $? != 0; then + gcc_sysroot= +fi { set +x -$as_echo "$at_srcdir/configure-iface.at:178: test -f \$prefix/lib/libltdl.la" -at_fn_check_prepare_dynamic "test -f $prefix/lib/libltdl.la" "configure-iface.at:178" -( $at_check_trace; test -f $prefix/lib/libltdl.la +$as_echo "$at_srcdir/sysroot.at:203: test -n \"\$gcc_sysroot\" || exit 77" +at_fn_check_prepare_dynamic "test -n \"$gcc_sysroot\" || exit 77" "sysroot.at:203" +( $at_check_trace; test -n "$gcc_sysroot" || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:178" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } + +# Detect installation prefix for the compiler +prefix= +for i in crt0.o crt1.o crt2.o crti.o; do + j=`$CC --print-file-name $i 2> /dev/null` + test $? = 0 || continue + case "$j" in + $gcc_sysroot*/lib/$i) + prefix=`echo "$j" | sed "s,^$gcc_sysroot\\(.*\\)/lib/$i\$,\\1,"` + break ;; + esac +done { set +x -$as_echo "$at_srcdir/configure-iface.at:179: test -f \$prefix/include/ltdl.h" -at_fn_check_prepare_dynamic "test -f $prefix/include/ltdl.h" "configure-iface.at:179" -( $at_check_trace; test -f $prefix/include/ltdl.h +$as_echo "$at_srcdir/sysroot.at:203: test -n \"\$prefix\" || exit 77" +at_fn_check_prepare_dynamic "test -n \"$prefix\" || exit 77" "sysroot.at:203" +( $at_check_trace; test -n "$prefix" || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:179" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } -cat >main.c <<'_ATEOF' -#include -#include - -typedef int funcp (void); - -static int errors = 0; - -int -main (void) -{ - lt_dlhandle handle; - - LTDL_SET_PRELOADED_SYMBOLS(); - - if (lt_dlinit () != 0) - { - fprintf (stderr, "error during initialization: %s\n", lt_dlerror ()); - return 1; - } - - handle = lt_dlopenext ("libmodule"); - if (!handle) - { - fprintf (stderr, "can't open libmodule: %s\n", lt_dlerror ()); - ++errors; - } - - { - funcp *f = (funcp *) lt_dlsym (handle, "f"); - - if (f) - { - printf ("%d\n", f ()); - } - else - { - fprintf (stderr, "function `f' not found: %s\n", lt_dlerror ()); - ++errors; - } - } - - if (lt_dlexit () != 0) - { - fprintf (stderr, "error during exit: %s\n", lt_dlerror ()); - ++errors; - } - - return (errors != 0); -} -_ATEOF - - -cat >libmodule.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" { -#endif -int f (void) { return 5150; } -#ifdef __cplusplus -} -#endif -_ATEOF - - -cat >expout <<'_ATEOF' -5150 -_ATEOF - -case $host_os in mingw*) - while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t - mv -f expout.t expout ;; -esac - - -cat >configure.ac <<'_ATEOF' -AC_INIT([configure-iface-demo], 2.2.10, bug-libtool@gnu.org) -AC_CONFIG_MACRO_DIR([_inst/aclocal]) -AC_CONFIG_HEADERS([config.h:config.hin]) -AM_INIT_AUTOMAKE([foreign]) -AC_PROG_CC -AM_PROG_CC_C_O -LT_INIT([dlopen]) -LTDL_INIT -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -_ATEOF - - -cat >Makefile.am <<'_ATEOF' -AUTOMAKE_OPTIONS = 1.7 - -AM_CPPFLAGS = $(LTDLINCL) - -lib_LTLIBRARIES = libmodule.la -# Automake < 1.8 will use libmodule.la.c as default source, -# while newer will choose libmodule.c; so specify it here. -libmodule_la_SOURCES = libmodule.c -libmodule_la_LDFLAGS = -module - -bin_PROGRAMS = main -main_LDFLAGS = -dlopen libmodule.la -main_LDADD = $(LIBLTDL) -main_DEPENDENCIES = $(LTDLDEPS) libmodule.la -_ATEOF - +sysroot=`pwd`/sys-root -## Try to avoid linking against a previously installed libltdl found -## with an explicit -L/path. -save_LDFLAGS=$LDFLAGS -LDFLAGS= -for l in $save_LDFLAGS -do - case $l in - -L*) ;; - *) LDFLAGS="$LDFLAGS $l" ;; - esac +# difficult to use AS_DIRNAME inside the AT_CHECK macro, so +# encapsulate as a shell function. +local_dirname() { + $as_dirname -- "$1" || +$as_expr X"$1" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$1" : 'X\(//\)[^/]' \| \ + X"$1" : 'X\(//\)$' \| \ + X"$1" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$1" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' +} + +{ set +x +$as_echo "$at_srcdir/sysroot.at:203: +(cd \"\$gcc_sysroot\" && find \".\$prefix/bin\" \".\$prefix/include\" \".\$prefix/lib\" \\! -type d) | \\ +while read file; do + dir=\`local_dirname \"\$sysroot/\$file\"\` + test -d \"\$dir\" || mkdir -p \"\$dir\" + rm -f \"\$sysroot/\$file\" + ln -s \"\$gcc_sysroot/\$file\" \"\$sysroot/\$file\" || \\ + cp \"\$gcc_sysroot/\$file\" \"\$sysroot/\$file\" +done" +at_fn_check_prepare_notrace 'a `...` command substitution' "sysroot.at:203" +( $at_check_trace; +(cd "$gcc_sysroot" && find ".$prefix/bin" ".$prefix/include" ".$prefix/lib" \! -type d) | \ +while read file; do + dir=`local_dirname "$sysroot/$file"` + test -d "$dir" || mkdir -p "$dir" + rm -f "$sysroot/$file" + ln -s "$gcc_sysroot/$file" "$sysroot/$file" || \ + cp "$gcc_sysroot/$file" "$sysroot/$file" done +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" +$at_failed && at_fn_log_failure +$at_traceon; } -# We don't use 'libtoolize --ltdl', so that we get an error if the test -# tries to build and link against its own ltdl sources: -$LIBTOOLIZE +LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" +configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" + +#??? +if test "$shlibpath_var" = PATH; then + configure_options="$configure_options --libdir=/$prefix/bin" +fi { set +x -$as_echo "$at_srcdir/configure-iface.at:227: \$ACLOCAL -I _inst/aclocal" -at_fn_check_prepare_dynamic "$ACLOCAL -I _inst/aclocal" "configure-iface.at:227" -( $at_check_trace; $ACLOCAL -I _inst/aclocal +$as_echo "$at_srcdir/sysroot.at:203: mkdir lib1 lib2 prog" +at_fn_check_prepare_trace "sysroot.at:203" +( $at_check_trace; mkdir lib1 lib2 prog ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } +# Build and install package 1. +cat >lib1/configure.ac <<'_ATEOF' +AC_INIT([lib1], [1.0]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AC_CONFIG_SRCDIR([lib1.c]) +LT_INIT +AC_OUTPUT(Makefile) +_ATEOF + + +cat >lib1/Makefile.am <<'_ATEOF' +lib_LTLIBRARIES = lib1.la +lib1_la_SOURCES = lib1.c +lib1_la_LDFLAGS = -rpath $(libdir) +_ATEOF + + +cat >lib1/lib1.c <<'_ATEOF' +#include +#include +char *f(const char *s) +{ + return strdup (s); +} +_ATEOF + + +cd lib1 +$LIBTOOLIZE { set +x -$as_echo "$at_srcdir/configure-iface.at:227: \$AUTOHEADER " -at_fn_check_prepare_dynamic "$AUTOHEADER " "configure-iface.at:227" -( $at_check_trace; $AUTOHEADER +$as_echo "$at_srcdir/sysroot.at:203: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:203" +( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } + { set +x -$as_echo "$at_srcdir/configure-iface.at:227: \$AUTOMAKE --add-missing" -at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "configure-iface.at:227" +$as_echo "$at_srcdir/sysroot.at:203: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:203" ( $at_check_trace; $AUTOMAKE --add-missing ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" if $at_failed; then : { set +x -$as_echo "$at_srcdir/configure-iface.at:227: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "configure-iface.at:227" +$as_echo "$at_srcdir/sysroot.at:203: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "sysroot.at:203" ( $at_check_trace; grep 'require .*but have' stderr && (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:227" +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } @@ -21733,15 +25379,15 @@ $at_traceon; } { set +x -$as_echo "$at_srcdir/configure-iface.at:227: \$AUTOCONF " -at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:227" +$as_echo "$at_srcdir/sysroot.at:203: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:203" ( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } @@ -21749,15 +25395,15 @@ $at_traceon; } { set +x -$as_echo "$at_srcdir/configure-iface.at:227: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --with-ltdl-lib=\$prefix/lib --with-ltdl-include=\$prefix/include" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:227" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --with-ltdl-lib=$prefix/lib --with-ltdl-include=$prefix/include +$as_echo "$at_srcdir/sysroot.at:203: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:203" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } @@ -21765,15 +25411,15 @@ $at_traceon; } for target in all do { set +x -$as_echo "$at_srcdir/configure-iface.at:227: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:227" +$as_echo "$at_srcdir/sysroot.at:203: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:203" ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:227" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } @@ -21781,215 +25427,300 @@ done -## TODO: portable ldd check for correct libltdl -## Currently, this test doesn't fail if `main' ends up linking against a -## previously installed system libltdl. -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/configure-iface.at:234: if \$LIBTOOL --mode=execute -dlopen libmodule.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen libmodule.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "configure-iface.at:234" -( $at_check_trace; if $LIBTOOL --mode=execute -dlopen libmodule.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/sysroot.at:203: \$MAKE install DESTDIR=\$sysroot" +at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:203" +( $at_check_trace; $MAKE install DESTDIR=$sysroot ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:234" +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/sysroot.at:203: test -f \"\$sysroot/\$prefix/lib/lib1.la\"" +at_fn_check_prepare_dynamic "test -f \"$sysroot/$prefix/lib/lib1.la\"" "sysroot.at:203" +( $at_check_trace; test -f "$sysroot/$prefix/lib/lib1.la" +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" +$at_failed && at_fn_log_failure +$at_traceon; } +{ set +x +$as_echo "$at_srcdir/sysroot.at:203: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/lib/lib1.la\"" +at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/lib/lib1.la\"" "sysroot.at:203" +( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/lib/lib1.la" +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203" +$at_failed && at_fn_log_failure +$at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_98 -#AT_START_99 -# 99. configure-iface.at:243: --with-included-ltdl -at_setup_line='configure-iface.at:243' -at_fn_banner 16 -at_desc="--with-included-ltdl" -at_desc_line=" 99: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no - test "$ACLOCAL" = no && at_xfail=yes - test "$AUTOHEADER" = no && at_xfail=yes - test "$AUTOMAKE" = no && at_xfail=yes - test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "99. configure-iface.at:243: testing ..." - $at_traceon - +cd .. +# Build and install package 2. +cat >lib2/configure.ac <<'_ATEOF' +AC_INIT([lib2], [1.0]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AC_CONFIG_SRCDIR([lib2.c]) +LT_INIT +sysroot=$with_sysroot +AC_SUBST([sysroot]) +AC_OUTPUT(Makefile) +_ATEOF -cat >main.c <<'_ATEOF' -#include -#include -typedef int funcp (void); +cat >lib2/Makefile.am <<'_ATEOF' +lib_LTLIBRARIES = lib2.la +lib2_la_SOURCES = lib2.c +lib2_la_LDFLAGS = -rpath $(libdir) +lib2_la_LIBADD = -L=$(libdir) -l1 +_ATEOF -static int errors = 0; -int -main (void) +cat >lib2/lib2.c <<'_ATEOF' +#include +#include +#include +extern char *f(const char *s); +char *g(const char *s) { - lt_dlhandle handle; + char *q = f(s); + puts (q); + return q; +} +_ATEOF - LTDL_SET_PRELOADED_SYMBOLS(); - if (lt_dlinit () != 0) - { - fprintf (stderr, "error during initialization: %s\n", lt_dlerror ()); - return 1; - } +cd lib2 +$LIBTOOLIZE - handle = lt_dlopenext ("libmodule"); - if (!handle) - { - fprintf (stderr, "can't open libmodule: %s\n", lt_dlerror ()); - ++errors; - } - { - funcp *f = (funcp *) lt_dlsym (handle, "f"); +{ set +x +$as_echo "$at_srcdir/sysroot.at:203: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:203" +( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" +$at_failed && at_fn_log_failure +$at_traceon; } - if (f) - { - printf ("%d\n", f ()); - } - else - { - fprintf (stderr, "function `f' not found: %s\n", lt_dlerror ()); - ++errors; - } - } - if (lt_dlexit () != 0) - { - fprintf (stderr, "error during exit: %s\n", lt_dlerror ()); - ++errors; - } - return (errors != 0); -} -_ATEOF -cat >libmodule.c <<'_ATEOF' -#ifdef __cplusplus -extern "C" { -#endif -int f (void) { return 5150; } -#ifdef __cplusplus -} -#endif -_ATEOF +{ set +x +$as_echo "$at_srcdir/sysroot.at:203: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:203" +( $at_check_trace; $AUTOMAKE --add-missing +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/sysroot.at:203: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "sysroot.at:203" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203" +$at_failed && at_fn_log_failure +$at_traceon; } +fi +$at_failed && at_fn_log_failure +$at_traceon; } -cat >expout <<'_ATEOF' -5150 -_ATEOF -case $host_os in mingw*) - while read -r l; do printf "%s\r\n" "$l"; done < expout > expout.t - mv -f expout.t expout ;; -esac -cat >configure.ac <<'_ATEOF' -AC_INIT([configure-iface-demo], 2.2.10, bug-libtool@gnu.org) -AC_CONFIG_AUX_DIR([libltdl/config]) -AC_CONFIG_MACRO_DIR([libltdl/m4]) -AC_CONFIG_HEADERS([config.h:config.hin]) -LT_CONFIG_LTDL_DIR([libltdl]) -AM_INIT_AUTOMAKE([foreign]) -AC_PROG_CC -AM_PROG_CC_C_O -LT_INIT([dlopen]) -LTDL_INIT -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT -_ATEOF +{ set +x +$as_echo "$at_srcdir/sysroot.at:203: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:203" +( $at_check_trace; $AUTOCONF +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >Makefile.am <<'_ATEOF' -AUTOMAKE_OPTIONS = 1.7 -SUBDIRS = libltdl -AM_CPPFLAGS = $(LTDLINCL) +{ set +x +$as_echo "$at_srcdir/sysroot.at:203: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:203" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" +$at_failed && at_fn_log_failure +$at_traceon; } -lib_LTLIBRARIES = libmodule.la -# Automake < 1.8 will use libmodule.la.c as default source, -# while newer will choose libmodule.c; so specify it here. -libmodule_la_SOURCES = libmodule.c -libmodule_la_LDFLAGS = -module -bin_PROGRAMS = main -main_LDFLAGS = -dlopen libmodule.la -main_LDADD = $(LIBLTDL) -main_DEPENDENCIES = $(LTDLDEPS) libmodule.la -_ATEOF +for target in all +do + { set +x +$as_echo "$at_srcdir/sysroot.at:203: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:203" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" +$at_failed && at_fn_log_failure +$at_traceon; } +done -$LIBTOOLIZE --ltdl { set +x -$as_echo "$at_srcdir/configure-iface.at:282: \$ACLOCAL -I libltdl/m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "configure-iface.at:282" -( $at_check_trace; $ACLOCAL -I libltdl/m4 +$as_echo "$at_srcdir/sysroot.at:203: \$MAKE install DESTDIR=\$sysroot" +at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:203" +( $at_check_trace; $MAKE install DESTDIR=$sysroot ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/sysroot.at:203: test -f \$sysroot/\$prefix/lib/lib2.la" +at_fn_check_prepare_dynamic "test -f $sysroot/$prefix/lib/lib2.la" "sysroot.at:203" +( $at_check_trace; test -f $sysroot/$prefix/lib/lib2.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/sysroot.at:203: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/lib/lib2.la\"" +at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/lib/lib2.la\"" "sysroot.at:203" +( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/lib/lib2.la" +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } +cd .. + +# Build and install a program. +cat >prog/configure.ac <<'_ATEOF' +AC_INIT([prog], [1.0]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AC_CONFIG_SRCDIR([prog.c]) +LT_INIT +sysroot=$with_sysroot +AC_SUBST([sysroot]) +AC_OUTPUT(Makefile) +_ATEOF + + +cat >prog/Makefile.am <<'_ATEOF' +bin_PROGRAMS = prog +prog_SOURCES = prog.c +prog_LDADD = -L=$(libdir) -l2 +_ATEOF + + +cat >prog/prog.c <<'_ATEOF' +#include +#include +#include +extern char *g(const char *s); +int main() +{ + char *q = g("hello world"); + free (q); + return 0; +} +_ATEOF + +cd prog +$LIBTOOLIZE { set +x -$as_echo "$at_srcdir/configure-iface.at:282: \$AUTOHEADER " -at_fn_check_prepare_dynamic "$AUTOHEADER " "configure-iface.at:282" -( $at_check_trace; $AUTOHEADER +$as_echo "$at_srcdir/sysroot.at:203: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:203" +( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } + { set +x -$as_echo "$at_srcdir/configure-iface.at:282: \$AUTOMAKE --add-missing" -at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "configure-iface.at:282" +$as_echo "$at_srcdir/sysroot.at:203: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:203" ( $at_check_trace; $AUTOMAKE --add-missing ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" if $at_failed; then : { set +x -$as_echo "$at_srcdir/configure-iface.at:282: grep 'require .*but have' stderr && (exit 77)" -at_fn_check_prepare_trace "configure-iface.at:282" +$as_echo "$at_srcdir/sysroot.at:203: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "sysroot.at:203" ( $at_check_trace; grep 'require .*but have' stderr && (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:282" +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } @@ -22001,15 +25732,15 @@ $at_traceon; } { set +x -$as_echo "$at_srcdir/configure-iface.at:282: \$AUTOCONF " -at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:282" +$as_echo "$at_srcdir/sysroot.at:203: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:203" ( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } @@ -22017,15 +25748,15 @@ $at_traceon; } { set +x -$as_echo "$at_srcdir/configure-iface.at:282: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options --with-included-ltdl" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:282" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options --with-included-ltdl +$as_echo "$at_srcdir/sysroot.at:203: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:203" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } @@ -22033,15 +25764,15 @@ $at_traceon; } for target in all do { set +x -$as_echo "$at_srcdir/configure-iface.at:282: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " -at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "configure-iface.at:282" +$as_echo "$at_srcdir/sysroot.at:203: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:203" ( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:282" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } @@ -22049,1331 +25780,1525 @@ done -# --with-included-ltdl should build a convenience lib by default { set +x -$as_echo "$at_srcdir/configure-iface.at:286: test -f libltdl/libltdlc.la" -at_fn_check_prepare_trace "configure-iface.at:286" -( $at_check_trace; test -f libltdl/libltdlc.la +$as_echo "$at_srcdir/sysroot.at:203: \$MAKE install DESTDIR=\$sysroot" +at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:203" +( $at_check_trace; $MAKE install DESTDIR=$sysroot +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/sysroot.at:203: test -f \$sysroot/\$prefix/bin/prog\$EXEEXT" +at_fn_check_prepare_dynamic "test -f $sysroot/$prefix/bin/prog$EXEEXT" "sysroot.at:203" +( $at_check_trace; test -f $sysroot/$prefix/bin/prog$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:286" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } - -## TODO: portable ldd check for correct libltdl -## Currently, this test doesn't fail if `main' ends up linking against a -## previously installed system libltdl. -lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/configure-iface.at:291: if \$LIBTOOL --mode=execute -dlopen libmodule.la \"\$lt_exe\" ; then :; else lt_status=\$?; test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if $LIBTOOL --mode=execute -dlopen libmodule.la \"$lt_exe\" ; then :; else lt_status=$?; test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "configure-iface.at:291" -( $at_check_trace; if $LIBTOOL --mode=execute -dlopen libmodule.la "$lt_exe" ; then :; else lt_status=$?; test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/sysroot.at:203: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/bin/prog\$EXEEXT\"" +at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/bin/prog$EXEEXT\"" "sysroot.at:203" +( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/bin/prog$EXEEXT" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:291" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/sysroot.at:203: grep \"'.*=\" \$sysroot/\$prefix/lib/lib2.la" +at_fn_check_prepare_dynamic "grep \"'.*=\" $sysroot/$prefix/lib/lib2.la" "sysroot.at:203" +( $at_check_trace; grep "'.*=" $sysroot/$prefix/lib/lib2.la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" +$at_failed && at_fn_log_failure +$at_traceon; } - -# Check that main is rebuilt if libltdlc.la is newer -rm -f libltdl/libltdlc.la { set +x -$as_echo "$at_srcdir/configure-iface.at:295: \$MAKE -q main\$EXEEXT || exit 1" -at_fn_check_prepare_dynamic "$MAKE -q main$EXEEXT || exit 1" "configure-iface.at:295" -( $at_check_trace; $MAKE -q main$EXEEXT || exit 1 +$as_echo "$at_srcdir/sysroot.at:203: ./libtool --mode=finish \$sysroot/\$prefix/lib/lib[12].la" +at_fn_check_prepare_dynamic "./libtool --mode=finish $sysroot/$prefix/lib/lib[12].la" "sysroot.at:203" +( $at_check_trace; ./libtool --mode=finish $sysroot/$prefix/lib/lib[12].la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/configure-iface.at:295" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:203" +$at_failed && at_fn_log_failure +$at_traceon; } + +{ set +x +$as_echo "$at_srcdir/sysroot.at:203: grep \"'.*=\" \$sysroot/\$prefix/lib/lib[12].la" +at_fn_check_prepare_dynamic "grep \"'.*=\" $sysroot/$prefix/lib/lib[12].la" "sysroot.at:203" +( $at_check_trace; grep "'.*=" $sysroot/$prefix/lib/lib[12].la +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:203" $at_failed && at_fn_log_failure $at_traceon; } +# missing tests +# 1) pass absolute .la files +# 2) pass absolute -L +# 2) pass relative .la files + +cd .. set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_99 -#AT_START_100 -# 100. configure-iface.at:304: convenience libltdl -at_setup_line='configure-iface.at:304' -at_fn_banner 16 -at_desc="convenience libltdl" -at_desc_line="100: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" +#AT_STOP_118 +#AT_START_119 +at_fn_group_banner 119 'sysroot.at:204' \ + "-L SYSROOT/.../lib -l" " " 20 at_xfail=no test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes test "$AUTOCONF" = no && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" ( - $as_echo "100. configure-iface.at:304: testing ..." + $as_echo "119. $at_setup_line: testing $at_desc ..." $at_traceon -cat >configure.ac <<'_ATEOF' -AC_INIT -AC_CONFIG_AUX_DIR([libltdl/config]) -AC_LIBLTDL_CONVENIENCE -AC_LIBTOOL_DLOPEN -AC_PROG_LIBTOOL -AC_CONFIG_FILES(Makefile) -AC_OUTPUT + +gcc_sysroot=`$CC --print-sysroot 2> /dev/null` +if test $? != 0; then + gcc_sysroot= +fi +{ set +x +$as_echo "$at_srcdir/sysroot.at:204: test -n \"\$gcc_sysroot\" || exit 77" +at_fn_check_prepare_dynamic "test -n \"$gcc_sysroot\" || exit 77" "sysroot.at:204" +( $at_check_trace; test -n "$gcc_sysroot" || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } + + +# Detect installation prefix for the compiler +prefix= +for i in crt0.o crt1.o crt2.o crti.o; do + j=`$CC --print-file-name $i 2> /dev/null` + test $? = 0 || continue + case "$j" in + $gcc_sysroot*/lib/$i) + prefix=`echo "$j" | sed "s,^$gcc_sysroot\\(.*\\)/lib/$i\$,\\1,"` + break ;; + esac +done +{ set +x +$as_echo "$at_srcdir/sysroot.at:204: test -n \"\$prefix\" || exit 77" +at_fn_check_prepare_dynamic "test -n \"$prefix\" || exit 77" "sysroot.at:204" +( $at_check_trace; test -n "$prefix" || exit 77 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } + + +sysroot=`pwd`/sys-root + +# difficult to use AS_DIRNAME inside the AT_CHECK macro, so +# encapsulate as a shell function. +local_dirname() { + $as_dirname -- "$1" || +$as_expr X"$1" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$1" : 'X\(//\)[^/]' \| \ + X"$1" : 'X\(//\)$' \| \ + X"$1" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$1" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' +} + +{ set +x +$as_echo "$at_srcdir/sysroot.at:204: +(cd \"\$gcc_sysroot\" && find \".\$prefix/bin\" \".\$prefix/include\" \".\$prefix/lib\" \\! -type d) | \\ +while read file; do + dir=\`local_dirname \"\$sysroot/\$file\"\` + test -d \"\$dir\" || mkdir -p \"\$dir\" + rm -f \"\$sysroot/\$file\" + ln -s \"\$gcc_sysroot/\$file\" \"\$sysroot/\$file\" || \\ + cp \"\$gcc_sysroot/\$file\" \"\$sysroot/\$file\" +done" +at_fn_check_prepare_notrace 'a `...` command substitution' "sysroot.at:204" +( $at_check_trace; +(cd "$gcc_sysroot" && find ".$prefix/bin" ".$prefix/include" ".$prefix/lib" \! -type d) | \ +while read file; do + dir=`local_dirname "$sysroot/$file"` + test -d "$dir" || mkdir -p "$dir" + rm -f "$sysroot/$file" + ln -s "$gcc_sysroot/$file" "$sysroot/$file" || \ + cp "$gcc_sysroot/$file" "$sysroot/$file" +done +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } + + +LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" +configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" + +#??? +if test "$shlibpath_var" = PATH; then + configure_options="$configure_options --libdir=/$prefix/bin" +fi + +{ set +x +$as_echo "$at_srcdir/sysroot.at:204: mkdir lib1 lib2 prog" +at_fn_check_prepare_trace "sysroot.at:204" +( $at_check_trace; mkdir lib1 lib2 prog +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } + + +# Build and install package 1. +cat >lib1/configure.ac <<'_ATEOF' +AC_INIT([lib1], [1.0]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AC_CONFIG_SRCDIR([lib1.c]) +LT_INIT +AC_OUTPUT(Makefile) +_ATEOF + + +cat >lib1/Makefile.am <<'_ATEOF' +lib_LTLIBRARIES = lib1.la +lib1_la_SOURCES = lib1.c +lib1_la_LDFLAGS = -rpath $(libdir) +_ATEOF + + +cat >lib1/lib1.c <<'_ATEOF' +#include +#include +char *f(const char *s) +{ + return strdup (s); +} _ATEOF -cat >Makefile.in <<'_ATEOF' -LIBLTDL = @LIBLTDL@ -print-ltdl: - echo $(LIBLTDL) -_ATEOF + +cd lib1 +$LIBTOOLIZE + + +{ set +x +$as_echo "$at_srcdir/sysroot.at:204: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:204" +( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4 +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + +{ set +x +$as_echo "$at_srcdir/sysroot.at:204: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:204" +( $at_check_trace; $AUTOMAKE --add-missing +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/sysroot.at:204: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "sysroot.at:204" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } + +fi +$at_failed && at_fn_log_failure +$at_traceon; } -$LIBTOOLIZE --ltdl { set +x -$as_echo "$at_srcdir/configure-iface.at:321: \$ACLOCAL -I libltdl/m4" -at_fn_check_prepare_dynamic "$ACLOCAL -I libltdl/m4" "configure-iface.at:321" -( $at_check_trace; $ACLOCAL -I libltdl/m4 +$as_echo "$at_srcdir/sysroot.at:204: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:204" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:321" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } - - { set +x -$as_echo "$at_srcdir/configure-iface.at:321: \$AUTOCONF " -at_fn_check_prepare_dynamic "$AUTOCONF " "configure-iface.at:321" -( $at_check_trace; $AUTOCONF +$as_echo "$at_srcdir/sysroot.at:204: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:204" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:321" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } - - -{ set +x -$as_echo "$at_srcdir/configure-iface.at:321: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "configure-iface.at:321" -( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +for target in all +do + { set +x +$as_echo "$at_srcdir/sysroot.at:204: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:204" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:321" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } +done { set +x -$as_echo "$at_srcdir/configure-iface.at:322: \$MAKE print-ltdl" -at_fn_check_prepare_dynamic "$MAKE print-ltdl" "configure-iface.at:322" -( $at_check_trace; $MAKE print-ltdl +$as_echo "$at_srcdir/sysroot.at:204: \$MAKE install DESTDIR=\$sysroot" +at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:204" +( $at_check_trace; $MAKE install DESTDIR=$sysroot ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" -echo stdout:; tee stdout <"$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:322" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/configure-iface.at:323: grep libltdl/libltdlc.la stdout" -at_fn_check_prepare_trace "configure-iface.at:323" -( $at_check_trace; grep libltdl/libltdlc.la stdout +$as_echo "$at_srcdir/sysroot.at:204: test -f \"\$sysroot/\$prefix/lib/lib1.la\"" +at_fn_check_prepare_dynamic "test -f \"$sysroot/$prefix/lib/lib1.la\"" "sysroot.at:204" +( $at_check_trace; test -f "$sysroot/$prefix/lib/lib1.la" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/configure-iface.at:323" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } +{ set +x +$as_echo "$at_srcdir/sysroot.at:204: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/lib/lib1.la\"" +at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/lib/lib1.la\"" "sysroot.at:204" +( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/lib/lib1.la" +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_100 -#AT_START_101 -# 101. stresstest.at:31: Link option thorough search test -at_setup_line='stresstest.at:31' -at_fn_banner 17 -at_desc="Link option thorough search test" -at_desc_line="101: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "101. stresstest.at:31: testing ..." - $at_traceon - - -eval `$LIBTOOL --config | $EGREP '^(CC|objdir|allow_undefined_flag)='` - -mkdir sub sub2 sub3 2>/dev/null - -cat >a.c <<'_ATEOF' -/* all kinds of data items */ -#ifdef __cplusplus -extern "C" { -#endif -int v1; -static int v2; -int v3 = 0; -int v4 = 1; -extern const int v5, v6; -extern const char *v7; -extern const char v8[]; -extern int (*const v12) (void); -const int v5 = 0; -const int v6 = 1; -const char* v7 = "\01foo"; -const char v8[] = "\01bar"; -int v9(void) { return v2 + 1; } -int (*v10) (void); -int (*v11) (void) = v9; -int (*const v12) (void) = v9; - -typedef struct { int arr[1000]; } large; -large v13; -large v14 = { { 0 } }; -large v15 = { { 1 } }; -#ifdef __cplusplus -} -#endif -_ATEOF - - -cat >asyms <<'_ATEOF' -v1 -v3 -v4 -v5 -v6 -v7 -v8 -v9 -v10 -v11 -v12 -v13 -v14 -v15 -_ATEOF - +cd .. -cat >b.c <<'_ATEOF' -int b = 42; -int b3 = 1; -int ab = 1; +# Build and install package 2. +cat >lib2/configure.ac <<'_ATEOF' +AC_INIT([lib2], [1.0]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AC_CONFIG_SRCDIR([lib2.c]) +LT_INIT +sysroot=$with_sysroot +AC_SUBST([sysroot]) +AC_OUTPUT(Makefile) _ATEOF -cat >main.c <<'_ATEOF' - -#if defined(LIBA_DLL_IMPORT) -# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) -# define LIBA_SCOPE extern __declspec(dllimport) -# endif -#endif -#if !defined(LIBA_SCOPE) -# define LIBA_SCOPE extern -#endif -#ifdef __cplusplus -extern "C" { -#endif -extern int v1; -extern int v3, v4; -LIBA_SCOPE const int v5, v6; -extern const char* v7; -extern const char v8[]; -extern int v9(void); -extern int (*v10) (void); -extern int (*v11) (void); -LIBA_SCOPE int (*const v12) (void); -#ifdef __cplusplus -} -#endif - -typedef struct { int arr[1000]; } large; -extern large v13, v14, v15; - -int main(void) -{ - char s = v7[0] + v8[0]; - return s + v1 + v3 + v4 + v5 + v6 + v9() + v11() + v12() - + v13.arr[0] + v14.arr[0] + v15.arr[0] - - 8; -} +cat >lib2/Makefile.am <<'_ATEOF' +lib_LTLIBRARIES = lib2.la +lib2_la_SOURCES = lib2.c +lib2_la_LDFLAGS = -rpath $(libdir) +lib2_la_LIBADD = -L$(sysroot)$(libdir) -l1 _ATEOF -cat >dlself.c <<'_ATEOF' - -#if defined(LIBA_DLL_IMPORT) -# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) -# define LIBA_SCOPE extern __declspec(dllimport) -# endif -#endif -#if !defined(LIBA_SCOPE) -# define LIBA_SCOPE extern -#endif -#ifdef __cplusplus -extern "C" { -#endif -extern int v1; -extern int v3, v4; -LIBA_SCOPE const int v5, v6; -extern const char* v7; -extern const char v8[]; -extern int v9(void); -extern int (*v10) (void); -extern int (*v11) (void); -LIBA_SCOPE int (*const v12) (void); - -typedef struct { int arr[1000]; } large; -extern large v13, v14, v15; - -extern int w1; -extern int w3, w4; -extern const int w5, w6; -extern const char* w7; -extern const char w8[]; -extern int w9(void); -extern int (*w10) (void); -extern int (*w11) (void); -extern int (*const w12) (void); -extern large w13, w14, w15; -#ifdef __cplusplus -} -#endif - -int main(void) +cat >lib2/lib2.c <<'_ATEOF' +#include +#include +#include +extern char *f(const char *s); +char *g(const char *s) { - char s = v7[0] + v8[0] + w7[0] + w8[0]; - return s + v1 + v3 + v4 + v5 + v6 + v9() + v11() + v12() - + v13.arr[0] + v14.arr[0] + v15.arr[0] - + w1 + w3 + w4 + w5 + w6 + w9() + w11() + w12() - + w13.arr[0] + w14.arr[0] + w15.arr[0] - - 16; -} - - -#ifdef __cplusplus -extern "C" { -#endif -int w1; -static int w2; -int w3 = 0; -int w4 = 1; -const int w5 = 0; -const int w6 = 1; -const char* w7 = "\01foo"; -const char w8[] = "\01bar"; -int w9(void) { return w2 + 1; } -int (*w10) (void); -int (*w11) (void) = w9; -int (*const w12) (void) = w9; -large w13; -large w14 = { { 0 } }; -large w15 = { { 1 } }; -#ifdef __cplusplus + char *q = f(s); + puts (q); + return q; } -#endif -_ATEOF - - -cat >dlselfsyms <<'_ATEOF' -w1 -w3 -w4 -w5 -w6 -w7 -w8 -w9 -w10 -w11 -w12 -w13 -w14 -w15 _ATEOF +cd lib2 +$LIBTOOLIZE -{ set +x -$as_echo "$at_srcdir/stresstest.at:221: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c a.c -o sub/a.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -o sub/a.lo" "stresstest.at:221" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c -o sub/a.lo -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:221" -$at_failed && at_fn_log_failure -$at_traceon; } { set +x -$as_echo "$at_srcdir/stresstest.at:223: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c b.c -o sub/b.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c -o sub/b.lo" "stresstest.at:223" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c b.c -o sub/b.lo +$as_echo "$at_srcdir/sysroot.at:204: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:204" +( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:223" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } + + + + { set +x -$as_echo "$at_srcdir/stresstest.at:225: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c main.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c" "stresstest.at:225" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c main.c +$as_echo "$at_srcdir/sysroot.at:204: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:204" +( $at_check_trace; $AUTOMAKE --add-missing ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:225" -$at_failed && at_fn_log_failure -$at_traceon; } - -{ set +x -$as_echo "$at_srcdir/stresstest.at:227: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c main.c -o main-static.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c -o main-static.lo" "stresstest.at:227" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c -o main-static.lo +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/sysroot.at:204: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "sysroot.at:204" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:227" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } + +fi $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/stresstest.at:229: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS -DLIBA_DLL_IMPORT \$CFLAGS -c dlself.c -o sub3/dlself.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c dlself.c -o sub3/dlself.lo" "stresstest.at:229" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS -DLIBA_DLL_IMPORT $CFLAGS -c dlself.c -o sub3/dlself.lo +$as_echo "$at_srcdir/sysroot.at:204: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:204" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:229" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/stresstest.at:231: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c dlself.c -o sub3/dlself-static.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c dlself.c -o sub3/dlself-static.lo" "stresstest.at:231" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c dlself.c -o sub3/dlself-static.lo +$as_echo "$at_srcdir/sysroot.at:204: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:204" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:231" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } -case $allow_undefined_flag in - unsupported) undef_opts=-no-undefined ;; - *) undef_opts='"" -no-undefined' ;; -esac - -# expose problems with the regex: -touch vfoo v.bar - -for l1 in $undef_opts +for target in all do - for l2 in '' '-export-symbols-regex "v.*"' '-export-symbols asyms' - do - for l3 in '' '-rpath /nonexistent' - do - linkargs="$l1 $l2 $l3" - for rel in '' ./ `pwd`/ - do - echo "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o \"$rel\"sub2/liba.la \"$rel\"sub/a.lo' $linkargs"; { set +x -$as_echo "$at_srcdir/stresstest.at:251: eval '\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o \"\$rel\"sub2/liba.la \"\$rel\"sub/a.lo' \$linkargs" -at_fn_check_prepare_dynamic "eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o \"$rel\"sub2/liba.la \"$rel\"sub/a.lo' $linkargs" "stresstest.at:251" -( $at_check_trace; eval '$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o "$rel"sub2/liba.la "$rel"sub/a.lo' $linkargs + { set +x +$as_echo "$at_srcdir/sysroot.at:204: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:204" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:251" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } - for st in '' '-static' '-no-install' - do - case $st,$l3 in - ,-rpath*) mst= ;; - *) mst=-static ;; - esac +done - echo "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"main$EXEEXT \"$rel\"main$mst.lo \"$rel\"sub2/liba.la"; { set +x -$as_echo "$at_srcdir/stresstest.at:260: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o \"\$rel\"main\$EXEEXT \"\$rel\"main\$mst.lo \"\$rel\"sub2/liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"main$EXEEXT \"$rel\"main$mst.lo \"$rel\"sub2/liba.la" "stresstest.at:260" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"main$EXEEXT "$rel"main$mst.lo "$rel"sub2/liba.la + + +{ set +x +$as_echo "$at_srcdir/sysroot.at:204: \$MAKE install DESTDIR=\$sysroot" +at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:204" +( $at_check_trace; $MAKE install DESTDIR=$sysroot ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:260" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./main; if test -f "./main$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/stresstest.at:262: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "stresstest.at:262" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/sysroot.at:204: test -f \$sysroot/\$prefix/lib/lib2.la" +at_fn_check_prepare_dynamic "test -f $sysroot/$prefix/lib/lib2.la" "sysroot.at:204" +( $at_check_trace; test -f $sysroot/$prefix/lib/lib2.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:262" -$at_failed && at_fn_log_failure -$at_traceon; } - - - for l10 in '' '-export-symbols dlselfsyms' - do - echo "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"sub3/dlself$EXEEXT \"$rel\"sub3/dlself$mst.lo \"$rel\"sub2/liba.la sub/b.lo -dlopen self $l10"; { set +x -$as_echo "$at_srcdir/stresstest.at:265: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS \$st -o \"\$rel\"sub3/dlself\$EXEEXT \"\$rel\"sub3/dlself\$mst.lo \"\$rel\"sub2/liba.la sub/b.lo -dlopen self \$l10" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o \"$rel\"sub3/dlself$EXEEXT \"$rel\"sub3/dlself$mst.lo \"$rel\"sub2/liba.la sub/b.lo -dlopen self $l10" "stresstest.at:265" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"sub3/dlself$EXEEXT "$rel"sub3/dlself$mst.lo "$rel"sub2/liba.la sub/b.lo -dlopen self $l10 -) >>"$at_stdout" 2>>"$at_stderr" -at_status=$? at_failed=false -$at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:265" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } - lt_exe=./sub3/dlself; if test -f "./sub3/dlself$EXEEXT"; then lt_exe=$lt_exe$EXEEXT; fi { set +x -$as_echo "$at_srcdir/stresstest.at:267: if \"\$lt_exe\" ; then :; else lt_status=\$?; test \$lt_status != 0 && test \"X\$host\" != \"X\$build\" && test -x \"\$lt_exe\" && exit 77; exit \$lt_status; fi" -at_fn_check_prepare_dynamic "if \"$lt_exe\" ; then :; else lt_status=$?; test $lt_status != 0 && test \"X$host\" != \"X$build\" && test -x \"$lt_exe\" && exit 77; exit $lt_status; fi" "stresstest.at:267" -( $at_check_trace; if "$lt_exe" ; then :; else lt_status=$?; test $lt_status != 0 && test "X$host" != "X$build" && test -x "$lt_exe" && exit 77; exit $lt_status; fi +$as_echo "$at_srcdir/sysroot.at:204: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/lib/lib2.la\"" +at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/lib/lib2.la\"" "sysroot.at:204" +( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/lib/lib2.la" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/stresstest.at:267" +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } +cd .. - done - done - done - done - done -done +# Build and install a program. +cat >prog/configure.ac <<'_ATEOF' +AC_INIT([prog], [1.0]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AC_CONFIG_SRCDIR([prog.c]) +LT_INIT +sysroot=$with_sysroot +AC_SUBST([sysroot]) +AC_OUTPUT(Makefile) +_ATEOF - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_101 -#AT_START_102 -# 102. cmdline_wrap.at:28: Run tests with low max_cmd_len -at_setup_line='cmdline_wrap.at:28' -at_fn_banner 17 -at_desc="Run tests with low max_cmd_len" -at_desc_line="102: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "102. cmdline_wrap.at:28: testing ..." - $at_traceon +cat >prog/Makefile.am <<'_ATEOF' +bin_PROGRAMS = prog +prog_SOURCES = prog.c +prog_LDADD = -L$(sysroot)$(libdir) -l2 +_ATEOF +cat >prog/prog.c <<'_ATEOF' +#include +#include +#include +extern char *g(const char *s); +int main() +{ + char *q = g("hello world"); + free (q); + return 0; +} +_ATEOF + + +cd prog +$LIBTOOLIZE + -sed 's,max_cmd_len=.*,max_cmd_len="24",' < $LIBTOOL > libtool -chmod +x libtool -LIBTOOL=`pwd`/libtool -export LIBTOOL -# run the suite in a subdirectory, otherwise the two suites will compete -# for the output file `testsuite.log'. -mkdir tests -cd tests -INNER_TESTSUITEFLAGS="$INNER_TESTSUITEFLAGS abs_top_srcdir=$abs_top_srcdir \ - abs_builddir=$abs_builddir" { set +x -$as_echo "$at_srcdir/cmdline_wrap.at:43: \$CONFIG_SHELL \$abs_srcdir/testsuite -k libtool\$INNER_TESTSUITEFLAGS" -at_fn_check_prepare_dynamic "$CONFIG_SHELL $abs_srcdir/testsuite -k libtool$INNER_TESTSUITEFLAGS" "cmdline_wrap.at:43" -( $at_check_trace; $CONFIG_SHELL $abs_srcdir/testsuite -k libtool$INNER_TESTSUITEFLAGS +$as_echo "$at_srcdir/sysroot.at:204: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:204" +( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/cmdline_wrap.at:43" -$at_failed && at_fn_log_failure \ -"testsuite.log" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure $at_traceon; } - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_102 -#AT_START_103 -# 103. darwin.at:26: darwin fat compile -at_setup_line='darwin.at:26' -at_fn_banner 18 -at_desc="darwin fat compile" -at_desc_line="103: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "103. darwin.at:26: testing ..." - $at_traceon - -noskip=: -case "$host_os" in -darwin*) ;; -*) noskip=false ;; -esac - -cat >simple.c <<'_ATEOF' - -int main() { return 0;} -_ATEOF -$noskip && { -$CC $CPPFLAGS $CFLAGS -arch ppc -arch i386 -o simple simple.c 2>&1 > /dev/null || noskip=false -rm -f simple -} { set +x -$as_echo "$at_srcdir/darwin.at:42: \$noskip || (exit 77)" -at_fn_check_prepare_dynamic "$noskip || (exit 77)" "darwin.at:42" -( $at_check_trace; $noskip || (exit 77) +$as_echo "$at_srcdir/sysroot.at:204: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:204" +( $at_check_trace; $AUTOMAKE --add-missing +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; tee stderr <"$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/sysroot.at:204: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "sysroot.at:204" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:42" +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } +fi +$at_failed && at_fn_log_failure +$at_traceon; } -cat >foo.c <<'_ATEOF' - -int x=0; -_ATEOF - - -cat >baz.c <<'_ATEOF' -int y=0; -_ATEOF -cat >bar.c <<'_ATEOF' +{ set +x +$as_echo "$at_srcdir/sysroot.at:204: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:204" +( $at_check_trace; $AUTOCONF +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } -extern int x; -int bar(void); -int bar() { return x;} -_ATEOF -cat >main.c <<'_ATEOF' -extern int x; -extern int y; +{ set +x +$as_echo "$at_srcdir/sysroot.at:204: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:204" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } -int main() { -return x+y; -} -_ATEOF +for target in all +do + { set +x +$as_echo "$at_srcdir/sysroot.at:204: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:204" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } -mkdir bin -cat >bin/basename <<'_ATEOF' +done -#! /bin/sh -usage="usage: $0 argument" -if test $# != 1; then - echo $usage >&2 - exit 1 -fi -echo $1 | sed "s,^.*/,," -_ATEOF +{ set +x +$as_echo "$at_srcdir/sysroot.at:204: \$MAKE install DESTDIR=\$sysroot" +at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:204" +( $at_check_trace; $MAKE install DESTDIR=$sysroot +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } +{ set +x +$as_echo "$at_srcdir/sysroot.at:204: test -f \$sysroot/\$prefix/bin/prog\$EXEEXT" +at_fn_check_prepare_dynamic "test -f $sysroot/$prefix/bin/prog$EXEEXT" "sysroot.at:204" +( $at_check_trace; test -f $sysroot/$prefix/bin/prog$EXEEXT +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } -chmod +x bin/basename -save_PATH=$PATH -PATH=`pwd`/bin:$PATH -export PATH +{ set +x +$as_echo "$at_srcdir/sysroot.at:204: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/bin/prog\$EXEEXT\"" +at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/bin/prog$EXEEXT\"" "sysroot.at:204" +( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/bin/prog$EXEEXT" +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204" +$at_failed && at_fn_log_failure +$at_traceon; } { set +x -$as_echo "$at_srcdir/darwin.at:85: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o foo.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 foo.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 foo.c" "darwin.at:85" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o foo.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 foo.c +$as_echo "$at_srcdir/sysroot.at:204: grep \"'.*=\" \$sysroot/\$prefix/lib/lib2.la" +at_fn_check_prepare_dynamic "grep \"'.*=\" $sysroot/$prefix/lib/lib2.la" "sysroot.at:204" +( $at_check_trace; grep "'.*=" $sysroot/$prefix/lib/lib2.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:85" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/darwin.at:87: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o baz.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 baz.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 baz.c" "darwin.at:87" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o baz.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 baz.c +$as_echo "$at_srcdir/sysroot.at:204: ./libtool --mode=finish \$sysroot/\$prefix/lib/lib[12].la" +at_fn_check_prepare_dynamic "./libtool --mode=finish $sysroot/$prefix/lib/lib[12].la" "sysroot.at:204" +( $at_check_trace; ./libtool --mode=finish $sysroot/$prefix/lib/lib[12].la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:87" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/darwin.at:89: \$LIBTOOL --mode=link --tag=CC \$CC -o libfoo.la \$CPPFLAGS \$CFLAGS \$LDFLAGS -arch ppc -arch i386 foo.lo baz.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 foo.lo baz.lo" "darwin.at:89" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o libfoo.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 foo.lo baz.lo +$as_echo "$at_srcdir/sysroot.at:204: grep \"'.*=\" \$sysroot/\$prefix/lib/lib[12].la" +at_fn_check_prepare_dynamic "grep \"'.*=\" $sysroot/$prefix/lib/lib[12].la" "sysroot.at:204" +( $at_check_trace; grep "'.*=" $sysroot/$prefix/lib/lib[12].la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:89" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:204" $at_failed && at_fn_log_failure $at_traceon; } +# missing tests +# 1) pass absolute .la files +# 2) pass absolute -L +# 2) pass relative .la files + +cd .. + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_119 +#AT_START_120 +at_fn_group_banner 120 'sysroot.at:205' \ + "SYSROOT/.../*.la" " " 20 +at_xfail=no + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes + test "$ACLOCAL" = no && at_xfail=yes + test "$AUTOMAKE" = no && at_xfail=yes + test "$AUTOCONF" = no && at_xfail=yes +( + $as_echo "120. $at_setup_line: testing $at_desc ..." + $at_traceon + + + +gcc_sysroot=`$CC --print-sysroot 2> /dev/null` +if test $? != 0; then + gcc_sysroot= +fi { set +x -$as_echo "$at_srcdir/darwin.at:91: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o bar.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 bar.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 bar.c" "darwin.at:91" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o bar.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 bar.c +$as_echo "$at_srcdir/sysroot.at:205: test -n \"\$gcc_sysroot\" || exit 77" +at_fn_check_prepare_dynamic "test -n \"$gcc_sysroot\" || exit 77" "sysroot.at:205" +( $at_check_trace; test -n "$gcc_sysroot" || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:91" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } +# Detect installation prefix for the compiler +prefix= +for i in crt0.o crt1.o crt2.o crti.o; do + j=`$CC --print-file-name $i 2> /dev/null` + test $? = 0 || continue + case "$j" in + $gcc_sysroot*/lib/$i) + prefix=`echo "$j" | sed "s,^$gcc_sysroot\\(.*\\)/lib/$i\$,\\1,"` + break ;; + esac +done { set +x -$as_echo "$at_srcdir/darwin.at:93: \$LIBTOOL --mode=link --tag=CC \$CC -o libbar.la \$CPPFLAGS \$CFLAGS \$LDFLAGS -arch ppc -arch i386 bar.lo libfoo.la -rpath /nonexistent" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 bar.lo libfoo.la -rpath /nonexistent" "darwin.at:93" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o libbar.la $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 bar.lo libfoo.la -rpath /nonexistent +$as_echo "$at_srcdir/sysroot.at:205: test -n \"\$prefix\" || exit 77" +at_fn_check_prepare_dynamic "test -n \"$prefix\" || exit 77" "sysroot.at:205" +( $at_check_trace; test -n "$prefix" || exit 77 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:93" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } +sysroot=`pwd`/sys-root + +# difficult to use AS_DIRNAME inside the AT_CHECK macro, so +# encapsulate as a shell function. +local_dirname() { + $as_dirname -- "$1" || +$as_expr X"$1" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$1" : 'X\(//\)[^/]' \| \ + X"$1" : 'X\(//\)$' \| \ + X"$1" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$1" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' +} + { set +x -$as_echo "$at_srcdir/darwin.at:95: \$LIBTOOL --mode=compile --tag=CC \$CC -c -o main.lo \$CPPFLAGS \$CFLAGS -arch ppc -arch i386 main.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 main.c" "darwin.at:95" -( $at_check_trace; $LIBTOOL --mode=compile --tag=CC $CC -c -o main.lo $CPPFLAGS $CFLAGS -arch ppc -arch i386 main.c +$as_echo "$at_srcdir/sysroot.at:205: +(cd \"\$gcc_sysroot\" && find \".\$prefix/bin\" \".\$prefix/include\" \".\$prefix/lib\" \\! -type d) | \\ +while read file; do + dir=\`local_dirname \"\$sysroot/\$file\"\` + test -d \"\$dir\" || mkdir -p \"\$dir\" + rm -f \"\$sysroot/\$file\" + ln -s \"\$gcc_sysroot/\$file\" \"\$sysroot/\$file\" || \\ + cp \"\$gcc_sysroot/\$file\" \"\$sysroot/\$file\" +done" +at_fn_check_prepare_notrace 'a `...` command substitution' "sysroot.at:205" +( $at_check_trace; +(cd "$gcc_sysroot" && find ".$prefix/bin" ".$prefix/include" ".$prefix/lib" \! -type d) | \ +while read file; do + dir=`local_dirname "$sysroot/$file"` + test -d "$dir" || mkdir -p "$dir" + rm -f "$sysroot/$file" + ln -s "$gcc_sysroot/$file" "$sysroot/$file" || \ + cp "$gcc_sysroot/$file" "$sysroot/$file" +done ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:95" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } +LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" +configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" + +#??? +if test "$shlibpath_var" = PATH; then + configure_options="$configure_options --libdir=/$prefix/bin" +fi + { set +x -$as_echo "$at_srcdir/darwin.at:97: \$LIBTOOL --mode=link --tag=CC \$CC -o main\$EXEEXT \$CPPFLAGS \$CFLAGS \$LDFLAGS -arch ppc -arch i386 main.lo libbar.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 main.lo libbar.la" "darwin.at:97" -( $at_check_trace; $LIBTOOL --mode=link --tag=CC $CC -o main$EXEEXT $CPPFLAGS $CFLAGS $LDFLAGS -arch ppc -arch i386 main.lo libbar.la +$as_echo "$at_srcdir/sysroot.at:205: mkdir lib1 lib2 prog" +at_fn_check_prepare_trace "sysroot.at:205" +( $at_check_trace; mkdir lib1 lib2 prog ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:97" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } -PATH=$save_PATH - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_103 -#AT_START_104 -# 104. darwin.at:103: darwin concurrent library extraction -at_setup_line='darwin.at:103' -at_fn_banner 18 -at_desc="darwin concurrent library extraction" -at_desc_line="104: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "104. darwin.at:103: testing ..." - $at_traceon - +# Build and install package 1. +cat >lib1/configure.ac <<'_ATEOF' +AC_INIT([lib1], [1.0]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AC_CONFIG_SRCDIR([lib1.c]) +LT_INIT +AC_OUTPUT(Makefile) +_ATEOF -cat >foo.c <<'_ATEOF' -int foo (void) { return 0; } +cat >lib1/Makefile.am <<'_ATEOF' +lib_LTLIBRARIES = lib1.la +lib1_la_SOURCES = lib1.c +lib1_la_LDFLAGS = -rpath $(libdir) _ATEOF -cat >bar.c <<'_ATEOF' - -extern int foo1 (void); -int bar (void) { return foo1 (); } +cat >lib1/lib1.c <<'_ATEOF' +#include +#include +char *f(const char *s) +{ + return strdup (s); +} _ATEOF -cp bar.c baz.c -objects= -for obj in 1 2 3 4 5 6 7 8; do - sed "s/foo/foo$obj/" < foo.c > foo$obj.c - { set +x -$as_echo "$at_srcdir/darwin.at:118: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c foo\$obj.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo$obj.c" "darwin.at:118" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo$obj.c +cd lib1 +$LIBTOOLIZE + + +{ set +x +$as_echo "$at_srcdir/sysroot.at:205: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:205" +( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:118" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } - objects="$objects foo$obj.lo" -done + + + + { set +x -$as_echo "$at_srcdir/darwin.at:122: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c bar.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c" "darwin.at:122" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c +$as_echo "$at_srcdir/sysroot.at:205: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:205" +( $at_check_trace; $AUTOMAKE --add-missing ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:122" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/sysroot.at:205: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "sysroot.at:205" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205" +$at_failed && at_fn_log_failure +$at_traceon; } + +fi $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/darwin.at:124: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c baz.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c baz.c" "darwin.at:124" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c baz.c +$as_echo "$at_srcdir/sysroot.at:205: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:205" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:124" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/darwin.at:126: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libfoo.la \$objects" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la $objects" "darwin.at:126" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la $objects +$as_echo "$at_srcdir/sysroot.at:205: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:205" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:126" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } -# Hypothesis: concurrent convenience archive extraction works. -for i in 1 2 3 4 5; do - rm -f libbar.la libbaz.la +for target in all +do { set +x -$as_echo "$at_srcdir/darwin.at:132: (\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la) & (\$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbaz.la baz.lo -rpath /foo libfoo.la) & wait; test -f libbar.la && test -f libbaz.la" -at_fn_check_prepare_dynamic "($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la) & ($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -rpath /foo libfoo.la) & wait; test -f libbar.la && test -f libbaz.la" "darwin.at:132" -( $at_check_trace; ($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la) & ($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbaz.la baz.lo -rpath /foo libfoo.la) & wait; test -f libbar.la && test -f libbaz.la +$as_echo "$at_srcdir/sysroot.at:205: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:205" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:132" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } done -# Hypothesis: the lock is not used in dry run mode. -eval "`$LIBTOOL --config | $EGREP '^(objdir)='`" -# Next line is internal detail. -lockfile=$objdir/libfoo.a.lock -echo stamp > $lockfile + + { set +x -$as_echo "$at_srcdir/darwin.at:145: \$LIBTOOL --dry-run --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la" -at_fn_check_prepare_dynamic "$LIBTOOL --dry-run --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la" "darwin.at:145" -( $at_check_trace; $LIBTOOL --dry-run --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la +$as_echo "$at_srcdir/sysroot.at:205: \$MAKE install DESTDIR=\$sysroot" +at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:205" +( $at_check_trace; $MAKE install DESTDIR=$sysroot ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:145" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/darwin.at:148: grep stamp \$lockfile" -at_fn_check_prepare_dynamic "grep stamp $lockfile" "darwin.at:148" -( $at_check_trace; grep stamp $lockfile +$as_echo "$at_srcdir/sysroot.at:205: test -f \"\$sysroot/\$prefix/lib/lib1.la\"" +at_fn_check_prepare_dynamic "test -f \"$sysroot/$prefix/lib/lib1.la\"" "sysroot.at:205" +( $at_check_trace; test -f "$sysroot/$prefix/lib/lib1.la" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:148" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_104 -#AT_START_105 -# 105. darwin.at:152: darwin gdb debug information -at_setup_line='darwin.at:152' -at_fn_banner 18 -at_desc="darwin gdb debug information" -at_desc_line="105: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no - -eval "`$LIBTOOL --config | $EGREP '^(whole_archive_flag_spec)='`" -case $whole_archive_flag_spec:$host_os in -:darwin*) : ;; -*) false ;; -esac && at_xfail=yes -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "105. darwin.at:152: testing ..." - $at_traceon - - { set +x -$as_echo "$at_srcdir/darwin.at:154: gdb --version || (exit 77)" -at_fn_check_prepare_trace "darwin.at:154" -( $at_check_trace; gdb --version || (exit 77) +$as_echo "$at_srcdir/sysroot.at:205: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/lib/lib1.la\"" +at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/lib/lib1.la\"" "sysroot.at:205" +( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/lib/lib1.la" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_skip $at_status "$at_srcdir/darwin.at:154" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } +cd .. -cat >foo.c <<'_ATEOF' - -int foo (void) { return 0; } +# Build and install package 2. +cat >lib2/configure.ac <<'_ATEOF' +AC_INIT([lib2], [1.0]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AC_CONFIG_SRCDIR([lib2.c]) +LT_INIT +sysroot=$with_sysroot +AC_SUBST([sysroot]) +AC_OUTPUT(Makefile) _ATEOF -cat >bar.c <<'_ATEOF' - -extern int foo (void); -int bar (void) { return foo (); } +cat >lib2/Makefile.am <<'_ATEOF' +lib_LTLIBRARIES = lib2.la +lib2_la_SOURCES = lib2.c +lib2_la_LDFLAGS = -rpath $(libdir) +lib2_la_LIBADD = $(sysroot)$(libdir)/lib1.la _ATEOF -cat >main.c <<'_ATEOF' +cat >lib2/lib2.c <<'_ATEOF' +#include +#include +#include +extern char *f(const char *s); +char *g(const char *s) +{ + char *q = f(s); + puts (q); + return q; +} +_ATEOF -extern int bar(void); -int main() { return bar();} -_ATEOF +cd lib2 +$LIBTOOLIZE { set +x -$as_echo "$at_srcdir/darwin.at:171: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c bar.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c" "darwin.at:171" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c bar.c +$as_echo "$at_srcdir/sysroot.at:205: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:205" +( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:171" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } + + + + { set +x -$as_echo "$at_srcdir/darwin.at:173: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c foo.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo.c" "darwin.at:173" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c foo.c +$as_echo "$at_srcdir/sysroot.at:205: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:205" +( $at_check_trace; $AUTOMAKE --add-missing ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:173" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/sysroot.at:205: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "sysroot.at:205" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205" +$at_failed && at_fn_log_failure +$at_traceon; } + +fi $at_failed && at_fn_log_failure $at_traceon; } + + + { set +x -$as_echo "$at_srcdir/darwin.at:175: \$LIBTOOL --mode=compile \$CC \$CPPFLAGS \$CFLAGS -c main.c" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c" "darwin.at:175" -( $at_check_trace; $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c main.c +$as_echo "$at_srcdir/sysroot.at:205: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:205" +( $at_check_trace; $AUTOCONF ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:175" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } + + { set +x -$as_echo "$at_srcdir/darwin.at:178: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libfoo.la foo.lo" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo" "darwin.at:178" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libfoo.la foo.lo +$as_echo "$at_srcdir/sysroot.at:205: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:205" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:178" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/darwin.at:181: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la " -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la " "darwin.at:181" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libbar.la bar.lo -rpath /foo libfoo.la +for target in all +do + { set +x +$as_echo "$at_srcdir/sysroot.at:205: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:205" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:181" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } +done + + { set +x -$as_echo "$at_srcdir/darwin.at:185: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o main main.lo libbar.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.lo libbar.la" "darwin.at:185" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.lo libbar.la +$as_echo "$at_srcdir/sysroot.at:205: \$MAKE install DESTDIR=\$sysroot" +at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:205" +( $at_check_trace; $MAKE install DESTDIR=$sysroot ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/darwin.at:185" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/darwin.at:187: echo quit | \$LIBTOOL --mode=execute gdb main" -at_fn_check_prepare_dynamic "echo quit | $LIBTOOL --mode=execute gdb main" "darwin.at:187" -( $at_check_trace; echo quit | $LIBTOOL --mode=execute gdb main +$as_echo "$at_srcdir/sysroot.at:205: test -f \$sysroot/\$prefix/lib/lib2.la" +at_fn_check_prepare_dynamic "test -f $sysroot/$prefix/lib/lib2.la" "sysroot.at:205" +( $at_check_trace; test -f $sysroot/$prefix/lib/lib2.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_skip $at_status "$at_srcdir/darwin.at:187" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/darwin.at:190: grep 'Could not find object file' stderr" -at_fn_check_prepare_trace "darwin.at:190" -( $at_check_trace; grep 'Could not find object file' stderr +$as_echo "$at_srcdir/sysroot.at:205: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/lib/lib2.la\"" +at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/lib/lib2.la\"" "sysroot.at:205" +( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/lib/lib2.la" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/darwin.at:190" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } +cd .. +# Build and install a program. +cat >prog/configure.ac <<'_ATEOF' +AC_INIT([prog], [1.0]) +AM_INIT_AUTOMAKE([foreign]) +AC_PROG_CC +AC_CONFIG_SRCDIR([prog.c]) +LT_INIT +sysroot=$with_sysroot +AC_SUBST([sysroot]) +AC_OUTPUT(Makefile) +_ATEOF -# Remove any dSYM bundle -rm -rf .libs/*.dSYM +cat >prog/Makefile.am <<'_ATEOF' +bin_PROGRAMS = prog +prog_SOURCES = prog.c +prog_LDADD = $(sysroot)$(libdir)/lib2.la +_ATEOF + + +cat >prog/prog.c <<'_ATEOF' +#include +#include +#include +extern char *g(const char *s); +int main() +{ + char *q = g("hello world"); + free (q); + return 0; +} +_ATEOF + + +cd prog +$LIBTOOLIZE + { set +x -$as_echo "$at_srcdir/darwin.at:202: echo quit | \$LIBTOOL --mode=execute gdb main" -at_fn_check_prepare_dynamic "echo quit | $LIBTOOL --mode=execute gdb main" "darwin.at:202" -( $at_check_trace; echo quit | $LIBTOOL --mode=execute gdb main +$as_echo "$at_srcdir/sysroot.at:205: \$ACLOCAL -I \$abs_top_srcdir/libltdl/m4" +at_fn_check_prepare_dynamic "$ACLOCAL -I $abs_top_srcdir/libltdl/m4" "sysroot.at:205" +( $at_check_trace; $ACLOCAL -I $abs_top_srcdir/libltdl/m4 ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; tee stderr <"$at_stderr" +echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_skip $at_status "$at_srcdir/darwin.at:202" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } + + + + { set +x -$as_echo "$at_srcdir/darwin.at:204: grep 'Could not find object file' stderr" -at_fn_check_prepare_trace "darwin.at:204" -( $at_check_trace; grep 'Could not find object file' stderr +$as_echo "$at_srcdir/sysroot.at:205: \$AUTOMAKE --add-missing" +at_fn_check_prepare_dynamic "$AUTOMAKE --add-missing" "sysroot.at:205" +( $at_check_trace; $AUTOMAKE --add-missing ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +echo stderr:; tee stderr <"$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 1 $at_status "$at_srcdir/darwin.at:204" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" +if $at_failed; then : + { set +x +$as_echo "$at_srcdir/sysroot.at:205: grep 'require .*but have' stderr && (exit 77)" +at_fn_check_prepare_trace "sysroot.at:205" +( $at_check_trace; grep 'require .*but have' stderr && (exit 77) +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_105 -#AT_START_106 -# 106. deplibs-mingw.at:27: deplibs without file command -at_setup_line='deplibs-mingw.at:27' -at_fn_banner 18 -at_desc="deplibs without file command" -at_desc_line="106: $at_desc " -$at_quiet $as_echo_n "$at_desc_line" -at_xfail=no -echo "# -*- compilation -*-" >> "$at_group_log" -( - $as_echo "106. deplibs-mingw.at:27: testing ..." - $at_traceon +fi +$at_failed && at_fn_log_failure +$at_traceon; } -cwd=`pwd` -instdir=$cwd/inst -libdir=$instdir/lib -bindir=$instdir/bin -LDFLAGS="$LDFLAGS -no-undefined" -mkdir inst inst/bin inst/lib +{ set +x +$as_echo "$at_srcdir/sysroot.at:205: \$AUTOCONF " +at_fn_check_prepare_dynamic "$AUTOCONF " "sysroot.at:205" +( $at_check_trace; $AUTOCONF +) >>"$at_stdout" 2>>"$at_stderr" +at_status=$? at_failed=false +$at_check_filter +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" +$at_failed && at_fn_log_failure +$at_traceon; } -cat >a.c <<'_ATEOF' -int a () { return 0; } -_ATEOF -cat >b.c <<'_ATEOF' -extern int a (); -int b () { return a (); } -_ATEOF -for file in a.c b.c; do - $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file -done { set +x -$as_echo "$at_srcdir/deplibs-mingw.at:49: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o liba.la a.lo -rpath \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir" "deplibs-mingw.at:49" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo -rpath $libdir +$as_echo "$at_srcdir/sysroot.at:205: : \${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; \$CONFIG_SHELL ./configure \$configure_options " +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "sysroot.at:205" +( $at_check_trace; : ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; $CONFIG_SHELL ./configure $configure_options ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:49" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } -{ set +x -$as_echo "$at_srcdir/deplibs-mingw.at:51: library_names= && . ./liba.la && if test -z \"\$library_names\"; then exit 77; fi " -at_fn_check_prepare_dynamic "library_names= && . ./liba.la && if test -z \"$library_names\"; then exit 77; fi " "deplibs-mingw.at:51" -( $at_check_trace; library_names= && . ./liba.la && if test -z "$library_names"; then exit 77; fi + +for target in all +do + { set +x +$as_echo "$at_srcdir/sysroot.at:205: \$unset LIBTOOL LIBTOOLIZE; \$MAKE \$target " +at_fn_check_prepare_dynamic "$unset LIBTOOL LIBTOOLIZE; $MAKE $target " "sysroot.at:205" +( $at_check_trace; $unset LIBTOOL LIBTOOLIZE; $MAKE $target ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:51" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } +done + + + { set +x -$as_echo "$at_srcdir/deplibs-mingw.at:53: \$LIBTOOL --mode=install cp liba.la \$libdir" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=install cp liba.la $libdir" "deplibs-mingw.at:53" -( $at_check_trace; $LIBTOOL --mode=install cp liba.la $libdir +$as_echo "$at_srcdir/sysroot.at:205: \$MAKE install DESTDIR=\$sysroot" +at_fn_check_prepare_dynamic "$MAKE install DESTDIR=$sysroot" "sysroot.at:205" +( $at_check_trace; $MAKE install DESTDIR=$sysroot ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter echo stderr:; cat "$at_stderr" echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:53" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/deplibs-mingw.at:54: \$LIBTOOL --mode=clean rm -f liba.la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=clean rm -f liba.la" "deplibs-mingw.at:54" -( $at_check_trace; $LIBTOOL --mode=clean rm -f liba.la +$as_echo "$at_srcdir/sysroot.at:205: test -f \$sysroot/\$prefix/bin/prog\$EXEEXT" +at_fn_check_prepare_dynamic "test -f $sysroot/$prefix/bin/prog$EXEEXT" "sysroot.at:205" +( $at_check_trace; test -f $sysroot/$prefix/bin/prog$EXEEXT ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:54" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } -rm -f $libdir/liba.la - -# check once with `file' (if present) and once without, if on MinGW. -for try in with-file without-file; do - { set +x -$as_echo "$at_srcdir/deplibs-mingw.at:59: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libb.la b.lo -rpath \$libdir -L\$libdir -la" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir -L$libdir -la" "deplibs-mingw.at:59" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo -rpath $libdir -L$libdir -la +{ set +x +$as_echo "$at_srcdir/sysroot.at:205: grep -F \"\$sysroot\" \"\$sysroot/\$prefix/bin/prog\$EXEEXT\"" +at_fn_check_prepare_dynamic "grep -F \"$sysroot\" \"$sysroot/$prefix/bin/prog$EXEEXT\"" "sysroot.at:205" +( $at_check_trace; grep -F "$sysroot" "$sysroot/$prefix/bin/prog$EXEEXT" ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:59" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/deplibs-mingw.at:62: library_names= && . ./libb.la && if test -z \"\$library_names\"; then exit 99; fi " -at_fn_check_prepare_dynamic "library_names= && . ./libb.la && if test -z \"$library_names\"; then exit 99; fi " "deplibs-mingw.at:62" -( $at_check_trace; library_names= && . ./libb.la && if test -z "$library_names"; then exit 99; fi +{ set +x +$as_echo "$at_srcdir/sysroot.at:205: grep \"'.*=\" \$sysroot/\$prefix/lib/lib2.la" +at_fn_check_prepare_dynamic "grep \"'.*=\" $sysroot/$prefix/lib/lib2.la" "sysroot.at:205" +( $at_check_trace; grep "'.*=" $sysroot/$prefix/lib/lib2.la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:62" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } - - case $host_os in - mingw*) - if file /; then - mkdir bin new-libtool - - cat >bin/file <<\EOF -#! /bin/sh -exit 1 -EOF - chmod +x bin/file - PATH=`pwd`/bin${PATH_SEPARATOR-:}$PATH - cd new-libtool - { set +x -$as_echo "$at_srcdir/deplibs-mingw.at:77: \"\$abs_top_srcdir\"/configure \$configure_options || exit 77" -at_fn_check_prepare_dynamic "\"$abs_top_srcdir\"/configure $configure_options || exit 77" "deplibs-mingw.at:77" -( $at_check_trace; "$abs_top_srcdir"/configure $configure_options || exit 77 +{ set +x +$as_echo "$at_srcdir/sysroot.at:205: ./libtool --mode=finish \$sysroot/\$prefix/lib/lib[12].la" +at_fn_check_prepare_dynamic "./libtool --mode=finish $sysroot/$prefix/lib/lib[12].la" "sysroot.at:205" +( $at_check_trace; ./libtool --mode=finish $sysroot/$prefix/lib/lib[12].la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" +at_fn_diff_devnull "$at_stderr" || at_failed=: echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:77" +at_fn_check_status 0 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } - cd .. - LIBTOOL=new-libtool/libtool - export LIBTOOL - # Check whether the generated script is usable; otherwise, skip. - { set +x -$as_echo "$at_srcdir/deplibs-mingw.at:83: \$LIBTOOL --mode=link \$CC \$CFLAGS \$LDFLAGS -o libunrelated.la a.lo -rpath \$libdir || exit 77" -at_fn_check_prepare_dynamic "$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libunrelated.la a.lo -rpath $libdir || exit 77" "deplibs-mingw.at:83" -( $at_check_trace; $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libunrelated.la a.lo -rpath $libdir || exit 77 +{ set +x +$as_echo "$at_srcdir/sysroot.at:205: grep \"'.*=\" \$sysroot/\$prefix/lib/lib[12].la" +at_fn_check_prepare_dynamic "grep \"'.*=\" $sysroot/$prefix/lib/lib[12].la" "sysroot.at:205" +( $at_check_trace; grep "'.*=" $sysroot/$prefix/lib/lib[12].la ) >>"$at_stdout" 2>>"$at_stderr" at_status=$? at_failed=false $at_check_filter -echo stderr:; cat "$at_stderr" -echo stdout:; cat "$at_stdout" -at_fn_check_status 0 $at_status "$at_srcdir/deplibs-mingw.at:83" +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 1 $at_status "$at_srcdir/sysroot.at:205" $at_failed && at_fn_log_failure $at_traceon; } - else - break; - fi;; - *) - break;; - esac -done +# missing tests +# 1) pass absolute .la files +# 2) pass absolute -L +# 2) pass relative .la files + +cd .. set +x $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 | eval $at_tee_pipe +) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_106 +#AT_STOP_120 diff -ruNp libtool-2.2.10/tests/testsuite.at libtool-2.4/tests/testsuite.at --- libtool-2.2.10/tests/testsuite.at 2010-06-09 16:20:59.000000000 +0700 +++ libtool-2.4/tests/testsuite.at 2010-09-18 12:39:21.000000000 +0700 @@ -1,6 +1,6 @@ # Process with autom4te to create an -*- Autotest -*- test suite. # -# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # @@ -23,8 +23,6 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #### -AT_INIT - m4_divert_push([PREPARE_TESTS])dnl : ${tst_dist=dist} : ${ACLOCAL=aclocal} @@ -39,7 +37,7 @@ for tool in ACLOCAL AUTOHEADER AUTOCONF done export ACLOCAL AUTOHEADER AUTOCONF AUTOMAKE AUTORECONF eval `$LIBTOOL --config | grep '^EGREP='` -eval `$LIBTOOL --config | $EGREP '^(host|host_os|host_alias|build|build_alias)='` +eval `$LIBTOOL --config | $EGREP '^(host|host_os|host_alias|build|build_alias|to_host_file_cmd|to_tool_file_cmd)='` configure_options=--prefix=/nonexistent if test -n "$host_alias"; then configure_options="$configure_options --host $host_alias" @@ -47,6 +45,12 @@ fi if test -n "$build_alias"; then configure_options="$configure_options --build $build_alias" fi +if test -n "$to_host_file_cmd"; then + configure_options="$configure_options lt_cv_to_host_file_cmd=$to_host_file_cmd" +fi +if test -n "$to_tool_file_cmd"; then + configure_options="$configure_options lt_cv_to_tool_file_cmd=$to_tool_file_cmd" +fi if (FOO=bar; unset FOO) >/dev/null 2>&1; then unset=unset else @@ -60,6 +64,11 @@ case $lt_INSTALL in ;; esac +# Unset some MAKE... variables that may cause $MAKE to act like a +# recursively invoked sub-make. Any $MAKE invocation in a test is +# conceptually an independent invocation. +unset MFLAGS MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO + # On AIX, shared libraries remain loaded in memory after use if they # are world-readable, until root issues slibclean. On NFS, this causes # a testsuite rerun to fail to clean up test group directories. Avoid @@ -148,11 +157,13 @@ AT_KEYWORDS([autoconf automake]) ]) -# LT_AT_CONFIGURE([OPTIONS]) -# -------------------------- +# LT_AT_CONFIGURE([OPTIONS], [CONFIGURE-SCRIPT]) +# ---------------------------------------------- +# Configure CONFIGURE-SCRIPT, defaulting to ./configure, with +# additional OPTIONS. m4_define([LT_AT_CONFIGURE], [AT_CHECK([: ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; ]dnl - [$CONFIG_SHELL ./configure $configure_options $1], + [$CONFIG_SHELL m4_default([$2], [./configure]) $configure_options $1], [0], [ignore], [ignore]) ]) @@ -229,10 +240,13 @@ esac]) # - distcc process numbers, # - ccache file location, # - newline encoding, -# - location of the libtool script. +# - location of the libtool script, +# - error messages involving unstable temporary file names. m4_define([LT_AT_NORMALIZE_COMPILER_OUTPUT], [_ltbase=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'` -[sed "/^distcc\[[0-9]*\]/d; /^$_ltbase: compile/d" < $1 > $1.t] +[sed "/^distcc\[[0-9]*\]/d + /^$_ltbase: compile/d + s/\(tmp\/\{1,\}cc\)\([a-zA-Z0-9_]\{1,\}\)/\1-normalized-tmpname/g" < $1 > $1.t] LT_AT_UNIFY_NL([$1.t], [m4_default([$2], [$1])])[]dnl ]) @@ -275,11 +289,38 @@ AT_CHECK([if $LIBTOOL --mode=execute $2 # LT_AT_TAG(TAG) # -------------- +# Declare that the language TAG will be used in this test. +# Skips the test if the compiler is apparently not functional. m4_define([LT_AT_TAG], [AT_KEYWORDS([$1]) AT_CHECK([{ test -n "[$]$1" && test "X[$]$1" != Xno; } || (exit 77)]) -m4_if([$1], [CXX], - [AT_CHECK([test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)])]) +m4_case([$1], + [CXX], + [AT_CHECK([test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)])], + [GCJ], + [# There are just too many broken gcj installations out there, either missing + # libgcj.spec or unable to find it. Skip the test for them. + AT_DATA([gcj_test.java], +[[public class gcj_test { + public static void main(String[] argv) { } + } +]]) + AT_CHECK([$GCJ $GCJFLAGS -c gcj_test.java || exit 77], + [], [ignore], [ignore])]) +]) + + +# LT_AT_EXEC_TAG([TAG]) +# --------------------- +# Declare that the language TAG will be used and compiled programs may be run. +# Skips the test if the compiler is apparently not functional. +m4_define([LT_AT_EXEC_TAG], +[LT_AT_TAG([$1]) +m4_case([$1], + [GCJ], + [AT_CHECK([$GCJ $GCJFLAGS --main=gcj_test -o gcj_test$EXEEXT gcj_test.java ]dnl + [|| exit 77], [], [ignore], [ignore]) + AT_CHECK([./gcj_test$EXEEXT || exit 77], [], [ignore], [ignore])]) ]) @@ -414,6 +455,11 @@ m4_pattern_allow([^dnl$]) # We exercise these tools. dnl AT_TESTED([grep autoreconf autom4te automake]) +# Enable colored output if available. +m4_ifdef([AT_COLOR_TESTS], [AT_COLOR_TESTS]) + +AT_INIT + ## ----------- ## ## The suite. ## ## ----------- ## diff -ruNp libtool-2.2.10/tests/versioning.at libtool-2.4/tests/versioning.at --- libtool-2.2.10/tests/versioning.at 2010-06-08 13:33:40.000000000 +0700 +++ libtool-2.4/tests/versioning.at 2010-09-01 13:02:45.000000000 +0700 @@ -24,7 +24,7 @@ AT_SETUP([versioning]) AT_KEYWORDS([libtool]) -eval "`$LIBTOOL --config | $EGREP '^(objdir)='`" +eval "`$LIBTOOL --config | $EGREP '^(objdir|host_os)='`" # Setup some library and program sources: # a library (a1), a new revision (a2), a compatible update (a3), @@ -91,14 +91,6 @@ int main (void) } ]]) -AT_DATA([prog3.c], [[ -extern int a (void), internal_detail; -int main (void) -{ - return a () + internal_detail - 42; -} -]]) - inst=`pwd`/inst libdir=$inst/lib @@ -109,7 +101,7 @@ mkdir $inst $libdir $bindir for file in liba1.c liba2.c liba3.c liba4.c libb.c; do $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c $file done -for file in prog1.c prog2.c prog3.c; do +for file in prog1.c prog2.c; do $CC $CPPFLAGS $CFLAGS -c $file done @@ -235,6 +227,11 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLA # available, so test_uninstalled will not necessarily work here any more. AT_CHECK([$LIBTOOL --mode=install cp liba.la $libdir], [], [ignore], [ignore]) AT_CHECK([$LIBTOOL --mode=clean rm -f liba.la], [], [ignore], [ignore]) + +# This test does not work on AIX, not even with runtimelinking, because +# the linker always records the unversioned name as dependency. +AT_CHECK([:; case $host_os in aix*) exit 77;; esac]) + test_installed