From 23d77c8747bee67dd01c4cf5096760611fd65f01 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 22 Jan 2018 09:58:50 +1100 Subject: [PATCH] 4870. [test] Update included ATF library to atf-0.21 preserving the ATF tool. [RT #46967] --- CHANGES | 3 + unit/atf-src/.travis.yml | 19 + unit/atf-src/Atffile | 4 +- unit/atf-src/Kyuafile | 10 +- unit/atf-src/Makefile.am | 49 +- unit/atf-src/Makefile.in | 4634 +++++----- unit/atf-src/NEWS | 106 + unit/atf-src/README.md | 45 + unit/atf-src/TODO | 184 - unit/atf-src/aclocal.m4 | 548 +- unit/atf-src/admin/Makefile.am.inc | 4 - unit/atf-src/admin/ar-lib | 270 + unit/atf-src/admin/check-style-c.awk | 4 - unit/atf-src/admin/check-style-common.awk | 4 - unit/atf-src/admin/check-style-cpp.awk | 4 - unit/atf-src/admin/check-style-man.awk | 4 - unit/atf-src/admin/check-style-shell.awk | 4 - unit/atf-src/admin/check-style.sh | 9 +- unit/atf-src/admin/compile | 14 +- unit/atf-src/admin/config.guess | 717 +- unit/atf-src/admin/config.sub | 364 +- unit/atf-src/admin/depcomp | 458 +- unit/atf-src/admin/install-sh | 726 +- unit/atf-src/admin/ltmain.sh | 8071 +++++++++++------ unit/atf-src/admin/missing | 405 +- unit/atf-src/admin/travis-build.sh | 50 + unit/atf-src/admin/travis-install-deps.sh | 77 + unit/atf-src/atf-c++.hpp | 10 +- unit/atf-src/atf-c++/Atffile | 1 - unit/atf-src/atf-c++/Kyuafile | 1 - unit/atf-src/atf-c++/Makefile.am.inc | 23 +- .../atf-c++/{atf-c++-api.3 => atf-c++.3} | 95 +- unit/atf-src/atf-c++/atf-c++.m4 | 4 - unit/atf-src/atf-c++/atf_c++_test.cpp | 8 +- unit/atf-src/atf-c++/build.cpp | 12 +- unit/atf-src/atf-c++/build.hpp | 10 +- unit/atf-src/atf-c++/build_test.cpp | 37 +- unit/atf-src/atf-c++/check.cpp | 14 +- unit/atf-src/atf-c++/check.hpp | 18 +- unit/atf-src/atf-c++/check_test.cpp | 34 +- unit/atf-src/atf-c++/detail/Atffile | 4 - unit/atf-src/atf-c++/detail/Kyuafile | 5 +- unit/atf-src/atf-c++/detail/Makefile.am.inc | 30 +- unit/atf-src/atf-c++/detail/application.cpp | 126 +- unit/atf-src/atf-c++/detail/application.hpp | 18 +- .../atf-c++/detail/application_test.cpp | 12 +- unit/atf-src/atf-c++/detail/auto_array.hpp | 10 +- .../atf-c++/detail/auto_array_test.cpp | 14 +- unit/atf-src/atf-c++/detail/env.cpp | 22 +- unit/atf-src/atf-c++/detail/env.hpp | 15 +- unit/atf-src/atf-c++/detail/env_test.cpp | 22 +- unit/atf-src/atf-c++/detail/exceptions.cpp | 15 +- unit/atf-src/atf-c++/detail/exceptions.hpp | 51 +- .../atf-c++/detail/exceptions_test.cpp | 13 +- unit/atf-src/atf-c++/detail/fs.cpp | 24 +- unit/atf-src/atf-c++/detail/fs.hpp | 12 +- unit/atf-src/atf-c++/detail/fs_test.cpp | 11 +- unit/atf-src/atf-c++/detail/process.cpp | 21 +- unit/atf-src/atf-c++/detail/process.hpp | 21 +- unit/atf-src/atf-c++/detail/process_test.cpp | 15 +- unit/atf-src/atf-c++/detail/sanity.hpp | 12 +- unit/atf-src/atf-c++/detail/test_helpers.cpp | 101 +- unit/atf-src/atf-c++/detail/test_helpers.hpp | 77 +- unit/atf-src/atf-c++/detail/text.cpp | 14 +- unit/atf-src/atf-c++/detail/text.hpp | 10 +- unit/atf-src/atf-c++/detail/text_test.cpp | 10 +- .../atf-src/atf-c++/detail/version_helper.cpp | 41 + unit/atf-src/atf-c++/macros.hpp | 85 +- unit/atf-src/atf-c++/macros_hpp_test.cpp | 8 +- unit/atf-src/atf-c++/macros_test.cpp | 51 +- unit/atf-src/atf-c++/pkg_config_test.sh | 10 +- unit/atf-src/atf-c++/tests.cpp | 409 +- unit/atf-src/atf-c++/tests.hpp | 18 +- unit/atf-src/atf-c++/tests_test.cpp | 21 +- unit/atf-src/atf-c++/unused_test.cpp | 6 +- unit/atf-src/atf-c++/utils.cpp | 8 +- unit/atf-src/atf-c++/utils.hpp | 10 +- unit/atf-src/atf-c++/utils_test.cpp | 66 +- unit/atf-src/atf-c.h | 8 +- unit/atf-src/atf-c/Atffile | 1 - unit/atf-src/atf-c/Kyuafile | 1 - unit/atf-src/atf-c/Makefile.am.inc | 52 +- unit/atf-src/atf-c/{atf-c-api.3 => atf-c.3} | 103 +- unit/atf-src/atf-c/atf-c.m4 | 4 - unit/atf-src/atf-c/atf-common.m4 | 4 - unit/atf-src/atf-c/atf_c_test.c | 10 +- unit/atf-src/atf-c/build.c | 43 +- unit/atf-src/atf-c/build.h | 10 +- unit/atf-src/atf-c/build_test.c | 33 +- unit/atf-src/atf-c/check.c | 26 +- unit/atf-src/atf-c/check.h | 10 +- unit/atf-src/atf-c/check_test.c | 36 +- unit/atf-src/atf-c/config.c | 164 - unit/atf-src/atf-c/config.h | 37 - unit/atf-src/atf-c/config_test.c | 156 - unit/atf-src/atf-c/defs.h.in | 8 +- unit/atf-src/atf-c/detail/Makefile.am.inc | 10 +- unit/atf-src/atf-c/detail/dynstr.c | 16 +- unit/atf-src/atf-c/detail/dynstr.h | 14 +- unit/atf-src/atf-c/detail/dynstr_test.c | 13 +- unit/atf-src/atf-c/detail/env.c | 28 +- unit/atf-src/atf-c/detail/env.h | 15 +- unit/atf-src/atf-c/detail/env_test.c | 35 +- unit/atf-src/atf-c/detail/fs.c | 20 +- unit/atf-src/atf-c/detail/fs.h | 17 +- unit/atf-src/atf-c/detail/fs_test.c | 15 +- unit/atf-src/atf-c/detail/list.c | 14 +- unit/atf-src/atf-c/detail/list.h | 14 +- unit/atf-src/atf-c/detail/list_test.c | 14 +- unit/atf-src/atf-c/detail/map.c | 14 +- unit/atf-src/atf-c/detail/map.h | 17 +- unit/atf-src/atf-c/detail/map_test.c | 14 +- unit/atf-src/atf-c/detail/process.c | 14 +- unit/atf-src/atf-c/detail/process.h | 19 +- unit/atf-src/atf-c/detail/process_helpers.c | 8 +- unit/atf-src/atf-c/detail/process_test.c | 16 +- unit/atf-src/atf-c/detail/sanity.c | 16 +- unit/atf-src/atf-c/detail/sanity.h | 14 +- unit/atf-src/atf-c/detail/sanity_test.c | 19 +- unit/atf-src/atf-c/detail/test_helpers.c | 46 +- unit/atf-src/atf-c/detail/test_helpers.h | 34 +- unit/atf-src/atf-c/detail/text.c | 16 +- unit/atf-src/atf-c/detail/text.h | 17 +- unit/atf-src/atf-c/detail/text_test.c | 15 +- unit/atf-src/atf-c/detail/tp_main.c | 23 +- unit/atf-src/atf-c/detail/user.c | 13 +- unit/atf-src/atf-c/detail/user.h | 14 +- unit/atf-src/atf-c/detail/user_test.c | 13 +- unit/atf-src/atf-c/detail/version_helper.c | 43 + unit/atf-src/atf-c/error.c | 14 +- unit/atf-src/atf-c/error.h | 14 +- unit/atf-src/atf-c/error_fwd.h | 10 +- unit/atf-src/atf-c/error_test.c | 24 +- unit/atf-src/atf-c/h_build.h | 12 +- unit/atf-src/atf-c/macros.h | 72 +- unit/atf-src/atf-c/macros_h_test.c | 11 +- unit/atf-src/atf-c/macros_test.c | 49 +- unit/atf-src/atf-c/pkg_config_test.sh | 10 +- unit/atf-src/atf-c/tc.c | 22 +- unit/atf-src/atf-c/tc.h | 10 +- unit/atf-src/atf-c/tc_test.c | 21 +- unit/atf-src/atf-c/tp.c | 18 +- unit/atf-src/atf-c/tp.h | 10 +- unit/atf-src/atf-c/tp_test.c | 21 +- unit/atf-src/atf-c/unused_test.c | 10 +- unit/atf-src/atf-c/utils.c | 75 +- unit/atf-src/atf-c/utils.h | 10 +- unit/atf-src/atf-c/utils_test.c | 62 +- unit/atf-src/atf-config/Atffile | 5 - unit/atf-src/atf-config/Kyuafile | 5 - unit/atf-src/atf-config/Makefile.am.inc | 48 - unit/atf-src/atf-report/Atffile | 5 - unit/atf-src/atf-report/Kyuafile | 6 - unit/atf-src/atf-report/Makefile.am.inc | 80 - unit/atf-src/atf-report/pass_helper.cpp | 44 - unit/atf-src/atf-run/Atffile | 5 - unit/atf-src/atf-run/Kyuafile | 13 - unit/atf-src/atf-run/Makefile.am.inc | 150 - unit/atf-src/atf-run/fs.cpp | 265 - unit/atf-src/atf-run/fs_test.cpp | 260 - unit/atf-src/atf-sh/Makefile.am.inc | 41 +- unit/atf-src/atf-sh/atf-check.1 | 47 +- unit/atf-src/atf-sh/atf-check.cpp | 29 +- unit/atf-src/atf-sh/atf-check_test.sh | 26 +- unit/atf-src/atf-sh/atf-sh.1 | 75 +- .../atf-src/atf-sh/{atf-sh-api.3 => atf-sh.3} | 186 +- unit/atf-src/atf-sh/atf-sh.cpp | 59 +- unit/atf-src/atf-sh/atf-sh.m4 | 4 - unit/atf-src/atf-sh/atf_check_test.sh | 20 +- unit/atf-src/atf-sh/config_test.sh | 4 - unit/atf-src/atf-sh/integration_test.sh | 91 +- unit/atf-src/atf-sh/libatf-sh.subr | 23 +- unit/atf-src/atf-sh/misc_helpers.sh | 17 +- unit/atf-src/atf-sh/normalize_test.sh | 4 - unit/atf-src/atf-sh/tc_test.sh | 4 - unit/atf-src/atf-sh/tp_test.sh | 4 - unit/atf-src/atf-version/Makefile.am.inc | 54 - unit/atf-src/bconfig.h.in | 21 +- unit/atf-src/bootstrap/Makefile.am.inc | 20 +- unit/atf-src/bootstrap/h_app_empty.cpp | 4 +- unit/atf-src/bootstrap/h_app_opts_args.cpp | 9 +- unit/atf-src/bootstrap/h_tp_atf_check_sh.sh | 4 - unit/atf-src/bootstrap/h_tp_basic_c.c | 8 +- unit/atf-src/bootstrap/h_tp_basic_cpp.cpp | 4 - unit/atf-src/bootstrap/h_tp_basic_sh.sh | 4 - unit/atf-src/bootstrap/h_tp_fail.sh | 4 - unit/atf-src/bootstrap/h_tp_pass.sh | 4 - unit/atf-src/bootstrap/t_subr_atf_check.at | 4 - .../bootstrap/t_test_program_compare.at | 4 - .../bootstrap/t_test_program_filter.at | 4 - unit/atf-src/bootstrap/t_test_program_list.at | 4 - unit/atf-src/bootstrap/t_test_program_run.at | 4 - unit/atf-src/bootstrap/testsuite.at | 6 +- unit/atf-src/config.h.in | 94 + unit/atf-src/configure | 6798 ++++++++------ unit/atf-src/configure.ac | 56 +- unit/atf-src/doc/Makefile.am.inc | 14 +- unit/atf-src/doc/atf-test-case.4 | 34 +- unit/atf-src/doc/atf-test-program.1 | 18 +- unit/atf-src/doc/atf.7.in | 174 +- unit/atf-src/m4/cxx-std-funcs.m4 | 33 - unit/atf-src/m4/libtool.m4 | 4184 +++++---- unit/atf-src/m4/ltoptions.m4 | 147 +- unit/atf-src/m4/ltsugar.m4 | 7 +- unit/atf-src/m4/ltversion.m4 | 14 +- unit/atf-src/m4/lt~obsolete.m4 | 17 +- unit/atf-src/m4/module-application.m4 | 4 - unit/atf-src/m4/module-defs.m4 | 4 - unit/atf-src/m4/module-env.m4 | 8 - unit/atf-src/m4/module-fs.m4 | 6 - unit/atf-src/m4/module-sanity.m4 | 32 - unit/atf-src/m4/runtime-tool.m4 | 8 +- unit/atf-src/test-programs/Makefile.am.inc | 22 +- unit/atf-src/test-programs/c_helpers.c | 11 +- unit/atf-src/test-programs/common.sh | 4 - unit/atf-src/test-programs/config_test.sh | 4 - unit/atf-src/test-programs/cpp_helpers.cpp | 4 - unit/atf-src/test-programs/expect_test.sh | 4 - unit/atf-src/test-programs/meta_data_test.sh | 4 - unit/atf-src/test-programs/result_test.sh | 20 +- unit/atf-src/test-programs/sh_helpers.sh | 4 - unit/atf-src/test-programs/srcdir_test.sh | 4 - unit/atf-src/tools/.gitignore | 9 + unit/atf-src/tools/Atffile | 25 + unit/atf-src/tools/Kyuafile | 24 + unit/atf-src/tools/Makefile.am.inc | 330 + unit/atf-src/tools/application.cpp | 317 + unit/atf-src/tools/application.hpp | 113 + unit/atf-src/tools/application_test.cpp | 94 + .../{atf-config => tools}/atf-config.1 | 0 .../{atf-config => tools}/atf-config.cpp | 23 +- .../atf-config_test.sh} | 0 unit/atf-src/{doc => tools}/atf-formats.5 | 0 .../{atf-report => tools}/atf-report.1 | 0 .../{atf-report => tools}/atf-report.cpp | 69 +- .../atf-report_test.sh} | 3 +- unit/atf-src/{atf-run => tools}/atf-run.1 | 0 unit/atf-src/{atf-run => tools}/atf-run.cpp | 234 +- .../atf-run_test.sh} | 0 .../{atf-version => tools}/atf-version.1 | 0 .../{atf-version => tools}/atf-version.cpp | 13 +- unit/atf-src/tools/atf.7.in | 192 + unit/atf-src/{atf-run => tools}/atffile.cpp | 101 +- unit/atf-src/{atf-run => tools}/atffile.hpp | 31 +- .../{atf-run => tools}/atffile_test.cpp | 34 +- unit/atf-src/tools/auto_array.hpp | 179 + unit/atf-src/tools/auto_array_test.cpp | 303 + .../{atf-run => tools}/bad_metadata_helper.c | 0 unit/atf-src/{atf-c++ => tools}/config.cpp | 82 +- unit/atf-src/{atf-c++ => tools}/config.hpp | 10 +- .../config.cpp => tools/config_file.cpp} | 89 +- .../config.hpp => tools/config_file.hpp} | 23 +- .../config_file_test.cpp} | 24 +- .../{atf-c++ => tools}/config_test.cpp | 68 +- .../sanity_test.cpp => tools/defs.hpp.in} | 18 +- unit/atf-src/tools/env.cpp | 102 + unit/atf-src/tools/env.hpp | 84 + .../misc_helpers.cpp => tools/env_test.cpp} | 67 +- .../noncopyable.hpp => tools/exceptions.cpp} | 54 +- .../{atf-run/fs.hpp => tools/exceptions.hpp} | 72 +- .../{atf-c++/detail => tools}/expand.cpp | 6 +- .../{atf-c++/detail => tools}/expand.hpp | 10 +- .../{atf-c++/detail => tools}/expand_test.cpp | 14 +- .../{atf-run => tools}/expect_helpers.c | 0 .../{atf-report => tools}/fail_helper.cpp | 2 +- unit/atf-src/tools/fs.cpp | 744 ++ unit/atf-src/tools/fs.hpp | 377 + unit/atf-src/tools/fs_test.cpp | 743 ++ .../generate-revision.sh | 0 unit/atf-src/{atf-run => tools}/io.cpp | 59 +- unit/atf-src/{atf-run => tools}/io.hpp | 38 +- unit/atf-src/{atf-run => tools}/io_test.cpp | 30 +- .../{atf-run => tools}/misc_helpers.cpp | 67 +- .../{atf-c++/detail => tools}/parser.cpp | 20 +- .../{atf-c++/detail => tools}/parser.hpp | 16 +- .../{atf-c++/detail => tools}/parser_test.cpp | 72 +- .../{atf-run => tools}/pass_helper.cpp | 2 +- unit/atf-src/tools/process.cpp | 492 + unit/atf-src/tools/process.hpp | 324 + unit/atf-src/tools/process_helpers.c | 117 + unit/atf-src/tools/process_test.cpp | 360 + unit/atf-src/{atf-report => tools}/reader.cpp | 116 +- unit/atf-src/{atf-report => tools}/reader.hpp | 12 +- .../{atf-report => tools}/reader_test.cpp | 17 +- .../{atf-run => tools}/requirements.cpp | 108 +- .../{atf-run => tools}/requirements.hpp | 21 +- .../{atf-run => tools}/requirements_test.cpp | 94 +- .../{atf-run => tools}/sample/atf-run.hooks | 0 .../{atf-run => tools}/sample/common.conf | 0 .../{atf-run => tools}/several_tcs_helper.c | 0 .../{atf-run => tools}/share/atf-run.hooks | 0 unit/atf-src/{atf-run => tools}/signals.cpp | 15 +- unit/atf-src/{atf-run => tools}/signals.hpp | 14 +- .../{atf-run => tools}/signals_test.cpp | 32 +- .../{atf-run => tools}/test-program.cpp | 226 +- .../{atf-run => tools}/test-program.hpp | 37 +- unit/atf-src/tools/test_helpers.hpp | 116 + .../{atf-run => tools}/test_program_test.cpp | 55 +- .../{atf-report => tools}/tests-results.css | 0 .../{atf-report => tools}/tests-results.dtd | 0 .../{atf-report => tools}/tests-results.xsl | 0 unit/atf-src/tools/text.cpp | 158 + unit/atf-src/tools/text.hpp | 153 + unit/atf-src/tools/text_test.cpp | 390 + .../{atf-run/timer.cpp => tools/timers.cpp} | 42 +- .../{atf-run/timer.hpp => tools/timers.hpp} | 22 +- unit/atf-src/{atf-c++/detail => tools}/ui.cpp | 23 +- unit/atf-src/{atf-c++/detail => tools}/ui.hpp | 10 +- .../{atf-c++/detail => tools}/ui_test.cpp | 6 +- unit/atf-src/{atf-run => tools}/user.cpp | 33 +- unit/atf-src/{atf-run => tools}/user.hpp | 14 +- unit/atf-src/{atf-run => tools}/user_test.cpp | 10 +- .../{atf-run => tools}/zero_tcs_helper.c | 0 313 files changed, 25977 insertions(+), 15705 deletions(-) create mode 100644 unit/atf-src/.travis.yml create mode 100644 unit/atf-src/README.md delete mode 100644 unit/atf-src/TODO create mode 100755 unit/atf-src/admin/ar-lib mode change 100755 => 100644 unit/atf-src/admin/ltmain.sh create mode 100644 unit/atf-src/admin/travis-build.sh create mode 100644 unit/atf-src/admin/travis-install-deps.sh rename unit/atf-src/atf-c++/{atf-c++-api.3 => atf-c++.3} (91%) create mode 100644 unit/atf-src/atf-c++/detail/version_helper.cpp rename unit/atf-src/atf-c/{atf-c-api.3 => atf-c.3} (90%) delete mode 100644 unit/atf-src/atf-c/config.c delete mode 100644 unit/atf-src/atf-c/config.h delete mode 100644 unit/atf-src/atf-c/config_test.c create mode 100644 unit/atf-src/atf-c/detail/version_helper.c delete mode 100644 unit/atf-src/atf-config/Atffile delete mode 100644 unit/atf-src/atf-config/Kyuafile delete mode 100644 unit/atf-src/atf-config/Makefile.am.inc delete mode 100644 unit/atf-src/atf-report/Atffile delete mode 100644 unit/atf-src/atf-report/Kyuafile delete mode 100644 unit/atf-src/atf-report/Makefile.am.inc delete mode 100644 unit/atf-src/atf-report/pass_helper.cpp delete mode 100644 unit/atf-src/atf-run/Atffile delete mode 100644 unit/atf-src/atf-run/Kyuafile delete mode 100644 unit/atf-src/atf-run/Makefile.am.inc delete mode 100644 unit/atf-src/atf-run/fs.cpp delete mode 100644 unit/atf-src/atf-run/fs_test.cpp rename unit/atf-src/atf-sh/{atf-sh-api.3 => atf-sh.3} (75%) delete mode 100644 unit/atf-src/atf-version/Makefile.am.inc create mode 100644 unit/atf-src/config.h.in delete mode 100644 unit/atf-src/m4/module-sanity.m4 create mode 100644 unit/atf-src/tools/.gitignore create mode 100644 unit/atf-src/tools/Atffile create mode 100644 unit/atf-src/tools/Kyuafile create mode 100644 unit/atf-src/tools/Makefile.am.inc create mode 100644 unit/atf-src/tools/application.cpp create mode 100644 unit/atf-src/tools/application.hpp create mode 100644 unit/atf-src/tools/application_test.cpp rename unit/atf-src/{atf-config => tools}/atf-config.1 (100%) rename unit/atf-src/{atf-config => tools}/atf-config.cpp (88%) rename unit/atf-src/{atf-config/integration_test.sh => tools/atf-config_test.sh} (100%) rename unit/atf-src/{doc => tools}/atf-formats.5 (100%) rename unit/atf-src/{atf-report => tools}/atf-report.1 (100%) rename unit/atf-src/{atf-report => tools}/atf-report.cpp (93%) rename unit/atf-src/{atf-report/integration_test.sh => tools/atf-report_test.sh} (99%) rename unit/atf-src/{atf-run => tools}/atf-run.1 (100%) rename unit/atf-src/{atf-run => tools}/atf-run.cpp (67%) rename unit/atf-src/{atf-run/integration_test.sh => tools/atf-run_test.sh} (100%) rename unit/atf-src/{atf-version => tools}/atf-version.1 (100%) rename unit/atf-src/{atf-version => tools}/atf-version.cpp (92%) create mode 100644 unit/atf-src/tools/atf.7.in rename unit/atf-src/{atf-run => tools}/atffile.cpp (79%) rename unit/atf-src/{atf-run => tools}/atffile.hpp (82%) rename unit/atf-src/{atf-run => tools}/atffile_test.cpp (95%) create mode 100644 unit/atf-src/tools/auto_array.hpp create mode 100644 unit/atf-src/tools/auto_array_test.cpp rename unit/atf-src/{atf-run => tools}/bad_metadata_helper.c (100%) rename unit/atf-src/{atf-c++ => tools}/config.cpp (57%) rename unit/atf-src/{atf-c++ => tools}/config.hpp (94%) rename unit/atf-src/{atf-run/config.cpp => tools/config_file.cpp} (69%) rename unit/atf-src/{atf-run/config.hpp => tools/config_file.hpp} (80%) rename unit/atf-src/{atf-run/config_test.cpp => tools/config_file_test.cpp} (96%) rename unit/atf-src/{atf-c++ => tools}/config_test.cpp (79%) rename unit/atf-src/{atf-c++/detail/sanity_test.cpp => tools/defs.hpp.in} (81%) create mode 100644 unit/atf-src/tools/env.cpp create mode 100644 unit/atf-src/tools/env.hpp rename unit/atf-src/{atf-report/misc_helpers.cpp => tools/env_test.cpp} (57%) rename unit/atf-src/{atf-c++/noncopyable.hpp => tools/exceptions.cpp} (65%) rename unit/atf-src/{atf-run/fs.hpp => tools/exceptions.hpp} (55%) rename unit/atf-src/{atf-c++/detail => tools}/expand.cpp (95%) rename unit/atf-src/{atf-c++/detail => tools}/expand.hpp (95%) rename unit/atf-src/{atf-c++/detail => tools}/expand_test.cpp (97%) rename unit/atf-src/{atf-run => tools}/expect_helpers.c (100%) rename unit/atf-src/{atf-report => tools}/fail_helper.cpp (98%) create mode 100644 unit/atf-src/tools/fs.cpp create mode 100644 unit/atf-src/tools/fs.hpp create mode 100644 unit/atf-src/tools/fs_test.cpp rename unit/atf-src/{atf-version => tools}/generate-revision.sh (100%) rename unit/atf-src/{atf-run => tools}/io.cpp (87%) rename unit/atf-src/{atf-run => tools}/io.hpp (96%) rename unit/atf-src/{atf-run => tools}/io_test.cpp (95%) rename unit/atf-src/{atf-run => tools}/misc_helpers.cpp (86%) rename unit/atf-src/{atf-c++/detail => tools}/parser.cpp (95%) rename unit/atf-src/{atf-c++/detail => tools}/parser.hpp (98%) rename unit/atf-src/{atf-c++/detail => tools}/parser_test.cpp (93%) rename unit/atf-src/{atf-run => tools}/pass_helper.cpp (98%) create mode 100644 unit/atf-src/tools/process.cpp create mode 100644 unit/atf-src/tools/process.hpp create mode 100644 unit/atf-src/tools/process_helpers.c create mode 100644 unit/atf-src/tools/process_test.cpp rename unit/atf-src/{atf-report => tools}/reader.cpp (78%) rename unit/atf-src/{atf-report => tools}/reader.hpp (93%) rename unit/atf-src/{atf-report => tools}/reader_test.cpp (98%) rename unit/atf-src/{atf-run => tools}/requirements.cpp (73%) rename unit/atf-src/{atf-run => tools}/requirements.hpp (76%) rename unit/atf-src/{atf-run => tools}/requirements_test.cpp (87%) rename unit/atf-src/{atf-run => tools}/sample/atf-run.hooks (100%) rename unit/atf-src/{atf-run => tools}/sample/common.conf (100%) rename unit/atf-src/{atf-run => tools}/several_tcs_helper.c (100%) rename unit/atf-src/{atf-run => tools}/share/atf-run.hooks (100%) rename unit/atf-src/{atf-run => tools}/signals.cpp (93%) rename unit/atf-src/{atf-run => tools}/signals.hpp (93%) rename unit/atf-src/{atf-run => tools}/signals_test.cpp (91%) rename unit/atf-src/{atf-run => tools}/test-program.cpp (78%) rename unit/atf-src/{atf-run => tools}/test-program.hpp (80%) create mode 100644 unit/atf-src/tools/test_helpers.hpp rename unit/atf-src/{atf-run => tools}/test_program_test.cpp (95%) rename unit/atf-src/{atf-report => tools}/tests-results.css (100%) rename unit/atf-src/{atf-report => tools}/tests-results.dtd (100%) rename unit/atf-src/{atf-report => tools}/tests-results.xsl (100%) create mode 100644 unit/atf-src/tools/text.cpp create mode 100644 unit/atf-src/tools/text.hpp create mode 100644 unit/atf-src/tools/text_test.cpp rename unit/atf-src/{atf-run/timer.cpp => tools/timers.cpp} (86%) rename unit/atf-src/{atf-run/timer.hpp => tools/timers.hpp} (89%) rename unit/atf-src/{atf-c++/detail => tools}/ui.cpp (89%) rename unit/atf-src/{atf-c++/detail => tools}/ui.hpp (96%) rename unit/atf-src/{atf-c++/detail => tools}/ui_test.cpp (98%) rename unit/atf-src/{atf-run => tools}/user.cpp (80%) rename unit/atf-src/{atf-run => tools}/user.hpp (90%) rename unit/atf-src/{atf-run => tools}/user_test.cpp (95%) rename unit/atf-src/{atf-run => tools}/zero_tcs_helper.c (100%) diff --git a/CHANGES b/CHANGES index 5f96f3eacf..57389df9ad 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4870. [test] Update included ATF library to atf-0.21 preserving + the ATF tool. [RT #46967] + 4869. [bug] Address some cases where NULL with zero length could be passed to memmove which is undefined behaviour and can lead to bad optimisation. [RT #46888] diff --git a/unit/atf-src/.travis.yml b/unit/atf-src/.travis.yml new file mode 100644 index 0000000000..cb5bea5536 --- /dev/null +++ b/unit/atf-src/.travis.yml @@ -0,0 +1,19 @@ +language: cpp + +compiler: + - gcc + - clang + +before_install: + - ./admin/travis-install-deps.sh + +env: + - AS_ROOT=no + - AS_ROOT=yes + +script: + - ./admin/travis-build.sh + +notifications: + email: + - atf-log@googlegroups.com diff --git a/unit/atf-src/Atffile b/unit/atf-src/Atffile index 9306a6c089..4d7aed7756 100644 --- a/unit/atf-src/Atffile +++ b/unit/atf-src/Atffile @@ -7,6 +7,4 @@ tp: atf-c++ tp: atf-sh tp: test-programs -tp-glob: atf-config* -tp-glob: atf-report* -tp-glob: atf-run* +tp-glob: tools* diff --git a/unit/atf-src/Kyuafile b/unit/atf-src/Kyuafile index 54084cd9bb..77125974a4 100644 --- a/unit/atf-src/Kyuafile +++ b/unit/atf-src/Kyuafile @@ -7,12 +7,6 @@ include("atf-c++/Kyuafile") include("atf-sh/Kyuafile") include("test-programs/Kyuafile") -if fs.exists("atf-config/Kyuafile") then - include("atf-config/Kyuafile") -end -if fs.exists("atf-report/Kyuafile") then - include("atf-report/Kyuafile") -end -if fs.exists("atf-run/Kyuafile") then - include("atf-run/Kyuafile") +if fs.exists("tools/Kyuafile") then + include("tools/Kyuafile") end diff --git a/unit/atf-src/Makefile.am b/unit/atf-src/Makefile.am index d5cee966eb..abf9e78499 100644 --- a/unit/atf-src/Makefile.am +++ b/unit/atf-src/Makefile.am @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,11 +22,11 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# atf_aclocal_DATA = BUILT_SOURCES = CLEANFILES = +DIST_HOOKS = EXTRA_DIST = bin_PROGRAMS = dist_man_MANS = @@ -54,10 +51,7 @@ include doc/Makefile.am.inc include test-programs/Makefile.am.inc if ENABLE_TOOLS -include atf-report/Makefile.am.inc -include atf-config/Makefile.am.inc -include atf-run/Makefile.am.inc -include atf-version/Makefile.am.inc +include tools/Makefile.am.inc endif # @@ -75,6 +69,10 @@ EXTRA_DIST += $(doc_DATA) INSTALL README TESTS_ENVIRONMENT = PATH=$(prefix)/bin:$${PATH} \ PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig +# Allow the caller to override the configuration file to passed to our +# test runs below. +KYUA_TEST_CONFIG_FILE = none + testsdir = $(exec_prefix)/tests pkgtestsdir = $(testsdir)/$(PACKAGE) @@ -105,7 +103,8 @@ if !ENABLE_TOOLS INSTALLCHECK_TARGETS += installcheck-kyua endif installcheck-kyua: - cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) $(KYUA) test + cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) \ + $(KYUA) --config='$(KYUA_TEST_CONFIG_FILE)' test endif installcheck-local: $(INSTALLCHECK_TARGETS) @@ -117,16 +116,20 @@ endif EXTRA_DIST += $(pkgtests_DATA) BUILD_SH_TP = \ - echo "Creating $${dst}"; \ - echo "\#! $(bindir)/atf-sh" >$${dst}; \ - cat $${src} >>$${dst}; \ - chmod +x $${dst} + test -d "$$(dirname "$${dst}")" || mkdir -p "$$(dirname "$${dst}")"; \ + echo "\#! $(bindir)/atf-sh" >"$${dst}"; \ + if [ -n "$${substs}" ]; then \ + cat $${src} | sed $${substs} >>"$${dst}"; \ + else \ + cat $${src} >>"$${dst}"; \ + fi; \ + chmod +x "$${dst}" # # Custom targets. # -dist-hook: forbid-dist +DIST_HOOKS += forbid-dist if ENABLE_TOOLS forbid-dist: @true @@ -141,14 +144,16 @@ PHONY_TARGETS += clean-all clean-all: GIT="$(GIT)" $(SH) $(srcdir)/admin/clean-all.sh -PHONY_TARGETS += release -release: - $(SH) $(srcdir)/admin/release.sh $(PACKAGE_VERSION) $(DIST_ARCHIVES) - -PHONY_TARGETS += release-test -release-test: - $(SH) $(srcdir)/admin/release-test.sh $(DIST_ARCHIVES) - .PHONY: $(PHONY_TARGETS) +# TODO(jmmv): Remove after atf 0.22. +install-data-hook: + cd $(DESTDIR)$(man3dir) && \ + for binding in c c++ sh; do \ + rm -f "atf-$${binding}-api.3"; \ + $(LN_S) "atf-$${binding}.3" "atf-$${binding}-api.3"; \ + done + +dist-hook: $(DIST_HOOKS) + # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 diff --git a/unit/atf-src/Makefile.in b/unit/atf-src/Makefile.in index 6463b4f1c0..a906dcd146 100644 --- a/unit/atf-src/Makefile.in +++ b/unit/atf-src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.12.2 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,9 +14,6 @@ @SET_MAKE@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -41,7 +38,231 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Copyright (c) 2007 The NetBSD Foundation, Inc. +# All rights reserved. # +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Copyright (c) 2007 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Copyright (c) 2007 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Copyright (c) 2007 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Copyright (c) 2007 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Copyright (c) 2007 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Copyright (c) 2007 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Copyright (c) 2007 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Copyright (c) 2007 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Automated Testing Framework (atf) @@ -72,376 +293,67 @@ # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -463,34 +375,11 @@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = atf-sh/atf-sh$(EXEEXT) $(am__EXEEXT_1) libexec_PROGRAMS = atf-sh/atf-check$(EXEEXT) -DIST_COMMON = README $(am__configure_deps) $(atf_c_HEADERS) \ - $(atf_c___HEADERS) $(dist_man_MANS) $(include_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/admin/Makefile.am.inc \ - $(srcdir)/atf-c++/Makefile.am.inc \ - $(srcdir)/atf-c++/detail/Makefile.am.inc \ - $(srcdir)/atf-c/Makefile.am.inc \ - $(srcdir)/atf-c/detail/Makefile.am.inc \ - $(srcdir)/atf-config/Makefile.am.inc \ - $(srcdir)/atf-report/Makefile.am.inc \ - $(srcdir)/atf-run/Makefile.am.inc \ - $(srcdir)/atf-sh/Makefile.am.inc \ - $(srcdir)/atf-version/Makefile.am.inc $(srcdir)/bconfig.h.in \ - $(srcdir)/bootstrap/Makefile.am.inc \ - $(srcdir)/doc/Makefile.am.inc \ - $(srcdir)/test-programs/Makefile.am.inc \ - $(top_srcdir)/admin/compile $(top_srcdir)/admin/config.guess \ - $(top_srcdir)/admin/config.sub $(top_srcdir)/admin/depcomp \ - $(top_srcdir)/admin/install-sh $(top_srcdir)/admin/ltmain.sh \ - $(top_srcdir)/admin/missing $(top_srcdir)/atf-c/defs.h.in \ - $(top_srcdir)/configure AUTHORS COPYING INSTALL NEWS TODO \ - admin/compile admin/config.guess admin/config.sub \ - admin/depcomp admin/install-sh admin/ltmain.sh admin/missing tests_atf_c_PROGRAMS = atf-c/atf_c_test$(EXEEXT) \ atf-c/build_test$(EXEEXT) atf-c/check_test$(EXEEXT) \ - atf-c/config_test$(EXEEXT) atf-c/error_test$(EXEEXT) \ - atf-c/macros_test$(EXEEXT) atf-c/tc_test$(EXEEXT) \ - atf-c/tp_test$(EXEEXT) atf-c/utils_test$(EXEEXT) + atf-c/error_test$(EXEEXT) atf-c/macros_test$(EXEEXT) \ + atf-c/tc_test$(EXEEXT) atf-c/tp_test$(EXEEXT) \ + atf-c/utils_test$(EXEEXT) tests_atf_c_detail_PROGRAMS = atf-c/detail/dynstr_test$(EXEEXT) \ atf-c/detail/env_test$(EXEEXT) atf-c/detail/fs_test$(EXEEXT) \ atf-c/detail/list_test$(EXEEXT) atf-c/detail/map_test$(EXEEXT) \ @@ -498,79 +387,85 @@ tests_atf_c_detail_PROGRAMS = atf-c/detail/dynstr_test$(EXEEXT) \ atf-c/detail/process_test$(EXEEXT) \ atf-c/detail/sanity_test$(EXEEXT) \ atf-c/detail/text_test$(EXEEXT) \ - atf-c/detail/user_test$(EXEEXT) + atf-c/detail/user_test$(EXEEXT) \ + atf-c/detail/version_helper$(EXEEXT) tests_atf_c___PROGRAMS = atf-c++/atf_c++_test$(EXEEXT) \ atf-c++/build_test$(EXEEXT) atf-c++/check_test$(EXEEXT) \ - atf-c++/config_test$(EXEEXT) atf-c++/macros_test$(EXEEXT) \ - atf-c++/tests_test$(EXEEXT) atf-c++/utils_test$(EXEEXT) + atf-c++/macros_test$(EXEEXT) atf-c++/tests_test$(EXEEXT) \ + atf-c++/utils_test$(EXEEXT) tests_atf_c___detail_PROGRAMS = \ atf-c++/detail/application_test$(EXEEXT) \ atf-c++/detail/auto_array_test$(EXEEXT) \ atf-c++/detail/env_test$(EXEEXT) \ atf-c++/detail/exceptions_test$(EXEEXT) \ - atf-c++/detail/expand_test$(EXEEXT) \ atf-c++/detail/fs_test$(EXEEXT) \ - atf-c++/detail/parser_test$(EXEEXT) \ atf-c++/detail/process_test$(EXEEXT) \ - atf-c++/detail/sanity_test$(EXEEXT) \ atf-c++/detail/text_test$(EXEEXT) \ - atf-c++/detail/ui_test$(EXEEXT) + atf-c++/detail/version_helper$(EXEEXT) check_PROGRAMS = bootstrap/h_app_empty$(EXEEXT) \ bootstrap/h_app_opts_args$(EXEEXT) \ bootstrap/h_tp_basic_c$(EXEEXT) \ bootstrap/h_tp_basic_cpp$(EXEEXT) -@ENABLE_TOOLS_TRUE@am__append_1 = doc/atf.7 -@ENABLE_TOOLS_TRUE@am__append_2 = doc/atf.7 -@ENABLE_TOOLS_TRUE@am__append_3 = doc/atf.7.in -@ENABLE_TOOLS_TRUE@am__append_4 = doc/atf-formats.5 \ -@ENABLE_TOOLS_TRUE@ atf-report/atf-report.1 \ -@ENABLE_TOOLS_TRUE@ atf-config/atf-config.1 atf-run/atf-run.1 \ -@ENABLE_TOOLS_TRUE@ atf-version/atf-version.1 tests_test_programs_PROGRAMS = test-programs/c_helpers$(EXEEXT) \ test-programs/cpp_helpers$(EXEEXT) -@ENABLE_TOOLS_TRUE@am__append_5 = atf-report/atf-report \ -@ENABLE_TOOLS_TRUE@ atf-config/atf-config atf-run/atf-run \ -@ENABLE_TOOLS_TRUE@ atf-version/atf-version -@ENABLE_TOOLS_TRUE@am__append_6 = $(css_DATA) $(dtd_DATA) $(xsl_DATA) \ -@ENABLE_TOOLS_TRUE@ $(tests_atf_report_DATA) \ -@ENABLE_TOOLS_TRUE@ atf-report/integration_test.sh \ -@ENABLE_TOOLS_TRUE@ $(tests_atf_config_DATA) \ -@ENABLE_TOOLS_TRUE@ atf-config/integration_test.sh \ -@ENABLE_TOOLS_TRUE@ $(tests_atf_run_DATA) \ -@ENABLE_TOOLS_TRUE@ atf-run/integration_test.sh $(hooks_DATA) \ -@ENABLE_TOOLS_TRUE@ $(eg_DATA) atf-version/generate-revision.sh -@ENABLE_TOOLS_TRUE@tests_atf_report_PROGRAMS = \ -@ENABLE_TOOLS_TRUE@ atf-report/fail_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-report/misc_helpers$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-report/pass_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-report/reader_test$(EXEEXT) -@ENABLE_TOOLS_TRUE@am__append_7 = atf-report/integration_test \ -@ENABLE_TOOLS_TRUE@ atf-config/integration_test \ -@ENABLE_TOOLS_TRUE@ atf-run/integration_test \ -@ENABLE_TOOLS_TRUE@ atf-version/revision.h \ -@ENABLE_TOOLS_TRUE@ atf-version/revision.h.stamp \ -@ENABLE_TOOLS_TRUE@ installcheck.fifo installcheck.log -@ENABLE_TOOLS_TRUE@tests_atf_run_PROGRAMS = \ -@ENABLE_TOOLS_TRUE@ atf-run/atffile_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/bad_metadata_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/config_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/expect_helpers$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/fs_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/io_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/misc_helpers$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/pass_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/several_tcs_helper$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/requirements_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/signals_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/test_program_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/user_test$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/zero_tcs_helper$(EXEEXT) -@ENABLE_TOOLS_TRUE@am__append_8 = atf-version/revision.h -@ENABLE_TOOLS_TRUE@am__append_9 = atf-version/revision.h.stamp \ + +# XXX For some reason, the nodist line above does not work as expected. +# Work this problem around. +@ENABLE_TOOLS_TRUE@am__append_1 = kill-defs-hpp +@ENABLE_TOOLS_TRUE@am__append_2 = tools/atf-config tools/atf-report \ +@ENABLE_TOOLS_TRUE@ tools/atf-run tools/atf-version + +#man_MANS += tools/atf.7 +#CLEANFILES += tools/atf.7 +#EXTRA_DIST += tools/atf.7.in +@ENABLE_TOOLS_TRUE@am__append_3 = tools/atf-config.1 \ +@ENABLE_TOOLS_TRUE@ tools/atf-report.1 tools/atf-run.1 \ +@ENABLE_TOOLS_TRUE@ tools/atf-version.1 tools/atf-formats.5 +@ENABLE_TOOLS_TRUE@am__append_4 = tools/generate-revision.sh \ +@ENABLE_TOOLS_TRUE@ $(css_DATA) $(dtd_DATA) $(eg_DATA) \ +@ENABLE_TOOLS_TRUE@ $(hooks_DATA) $(xsl_DATA) \ +@ENABLE_TOOLS_TRUE@ $(tests_tools_DATA) \ +@ENABLE_TOOLS_TRUE@ tools/atf-config_test.sh \ +@ENABLE_TOOLS_TRUE@ tools/atf-report_test.sh \ +@ENABLE_TOOLS_TRUE@ tools/atf-run_test.sh +@ENABLE_TOOLS_TRUE@am__append_5 = tools/revision.h +@ENABLE_TOOLS_TRUE@am__append_6 = tools/revision.h \ +@ENABLE_TOOLS_TRUE@ tools/revision.h.stamp \ +@ENABLE_TOOLS_TRUE@ tools/atf-config_test tools/atf-report_test \ +@ENABLE_TOOLS_TRUE@ tools/atf-run_test installcheck.fifo \ +@ENABLE_TOOLS_TRUE@ installcheck.log +@ENABLE_TOOLS_TRUE@am__append_7 = tools/revision.h.stamp \ @ENABLE_TOOLS_TRUE@ installcheck-atf -@ENABLE_TOOLS_TRUE@am__append_10 = installcheck-atf -@ENABLE_TOOLS_FALSE@@HAVE_KYUA_TRUE@am__append_11 = installcheck-kyua -@ENABLE_TOOLS_TRUE@am__append_12 = Atffile +@ENABLE_TOOLS_TRUE@tests_tools_PROGRAMS = \ +@ENABLE_TOOLS_TRUE@ tools/application_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/atffile_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/auto_array_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/bad_metadata_helper$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/config_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/config_file_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/env_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/expand_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/expect_helpers$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/fail_helper$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/fs_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/io_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/misc_helpers$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/parser_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/process_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/pass_helper$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/process_helpers$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/reader_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/requirements_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/several_tcs_helper$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/signals_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/test_program_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/text_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/ui_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/user_test$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/zero_tcs_helper$(EXEEXT) +@ENABLE_TOOLS_TRUE@am__append_8 = installcheck-atf +@ENABLE_TOOLS_FALSE@@HAVE_KYUA_TRUE@am__append_9 = installcheck-kyua +@ENABLE_TOOLS_TRUE@am__append_10 = Atffile subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/compiler-flags.m4 \ @@ -581,17 +476,63 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/module-application.m4 \ $(top_srcdir)/m4/module-defs.m4 $(top_srcdir)/m4/module-env.m4 \ $(top_srcdir)/m4/module-fs.m4 \ - $(top_srcdir)/m4/module-sanity.m4 \ $(top_srcdir)/m4/module-signals.m4 \ $(top_srcdir)/m4/runtime-tool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(atf_c_HEADERS) $(atf_c___HEADERS) \ + $(include_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = bconfig.h -CONFIG_CLEAN_FILES = atf-c/defs.h +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = atf-c/defs.h tools/defs.hpp CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +tools_libtools_a_AR = $(AR) $(ARFLAGS) +tools_libtools_a_LIBADD = +am__tools_libtools_a_SOURCES_DIST = tools/application.cpp \ + tools/application.hpp tools/atffile.cpp tools/atffile.hpp \ + tools/auto_array.hpp tools/config.cpp tools/config.hpp \ + tools/config_file.cpp tools/config_file.hpp tools/env.cpp \ + tools/env.hpp tools/exceptions.cpp tools/exceptions.hpp \ + tools/expand.cpp tools/expand.hpp tools/fs.cpp tools/fs.hpp \ + tools/io.cpp tools/io.hpp tools/parser.cpp tools/parser.hpp \ + tools/process.cpp tools/process.hpp tools/reader.cpp \ + tools/reader.hpp tools/requirements.cpp tools/requirements.hpp \ + tools/signals.cpp tools/signals.hpp tools/test-program.cpp \ + tools/test-program.hpp tools/test_helpers.hpp tools/text.cpp \ + tools/text.hpp tools/timers.cpp tools/timers.hpp tools/ui.cpp \ + tools/ui.hpp tools/user.cpp tools/user.hpp +am__dirstamp = $(am__leading_dot)dirstamp +@ENABLE_TOOLS_TRUE@am_tools_libtools_a_OBJECTS = tools/tools_libtools_a-application.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-atffile.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-config.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-config_file.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-env.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-exceptions.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-expand.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-fs.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-io.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-parser.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-process.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-reader.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-requirements.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-signals.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-test-program.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-text.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-timers.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-ui.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_libtools_a-user.$(OBJEXT) +nodist_tools_libtools_a_OBJECTS = +tools_libtools_a_OBJECTS = $(am_tools_libtools_a_OBJECTS) \ + $(nodist_tools_libtools_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -624,14 +565,11 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(tests_atf_c__dir)" \ "$(DESTDIR)$(tests_atf_c___detaildir)" \ "$(DESTDIR)$(tests_atf_c_detaildir)" \ - "$(DESTDIR)$(tests_atf_reportdir)" \ - "$(DESTDIR)$(tests_atf_rundir)" \ "$(DESTDIR)$(tests_test_programsdir)" \ - "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" \ - "$(DESTDIR)$(tests_atf_configdir)" \ - "$(DESTDIR)$(tests_atf_reportdir)" \ - "$(DESTDIR)$(tests_atf_rundir)" "$(DESTDIR)$(tests_atf_shdir)" \ - "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(man1dir)" \ + "$(DESTDIR)$(tests_toolsdir)" "$(DESTDIR)$(tests_atf_cdir)" \ + "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_shdir)" \ + "$(DESTDIR)$(tests_test_programsdir)" \ + "$(DESTDIR)$(tests_toolsdir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" \ "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" \ "$(DESTDIR)$(atf_aclocaldir)" \ @@ -644,19 +582,20 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(tests_atf_c__dir)" \ "$(DESTDIR)$(tests_atf_c___detaildir)" \ "$(DESTDIR)$(tests_atf_c_detaildir)" \ - "$(DESTDIR)$(tests_atf_configdir)" \ - "$(DESTDIR)$(tests_atf_reportdir)" \ - "$(DESTDIR)$(tests_atf_rundir)" "$(DESTDIR)$(tests_atf_shdir)" \ - "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(xsldir)" \ + "$(DESTDIR)$(tests_atf_shdir)" \ + "$(DESTDIR)$(tests_test_programsdir)" \ + "$(DESTDIR)$(tests_toolsdir)" "$(DESTDIR)$(xsldir)" \ "$(DESTDIR)$(atf_cdir)" "$(DESTDIR)$(atf_c__dir)" \ - "$(DESTDIR)$(includedir)" + "$(DESTDIR)$(includedir)" "$(DESTDIR)$(atf_cdir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) atf_c___detail_libtest_helpers_la_LIBADD = -am__dirstamp = $(am__leading_dot)dirstamp -am_atf_c___detail_libtest_helpers_la_OBJECTS = \ - atf-c++/detail/test_helpers.lo +am_atf_c___detail_libtest_helpers_la_OBJECTS = atf-c++/detail/atf_c___detail_libtest_helpers_la-test_helpers.lo atf_c___detail_libtest_helpers_la_OBJECTS = \ $(am_atf_c___detail_libtest_helpers_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = atf_c_detail_libtest_helpers_la_LIBADD = am_atf_c_detail_libtest_helpers_la_OBJECTS = \ atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo @@ -664,22 +603,20 @@ atf_c_detail_libtest_helpers_la_OBJECTS = \ $(am_atf_c_detail_libtest_helpers_la_OBJECTS) libatf_c___la_DEPENDENCIES = libatf-c.la am_libatf_c___la_OBJECTS = atf-c++/build.lo atf-c++/check.lo \ - atf-c++/config.lo atf-c++/tests.lo atf-c++/utils.lo \ + atf-c++/tests.lo atf-c++/utils.lo \ atf-c++/detail/application.lo atf-c++/detail/env.lo \ - atf-c++/detail/exceptions.lo atf-c++/detail/expand.lo \ - atf-c++/detail/fs.lo atf-c++/detail/parser.lo \ - atf-c++/detail/process.lo atf-c++/detail/text.lo \ - atf-c++/detail/ui.lo + atf-c++/detail/exceptions.lo atf-c++/detail/fs.lo \ + atf-c++/detail/process.lo atf-c++/detail/text.lo libatf_c___la_OBJECTS = $(am_libatf_c___la_OBJECTS) -libatf_c___la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(libatf_c___la_LDFLAGS) $(LDFLAGS) -o $@ +libatf_c___la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) $(libatf_c___la_LDFLAGS) $(LDFLAGS) \ + -o $@ libatf_c_la_LIBADD = am_libatf_c_la_OBJECTS = atf-c/libatf_c_la-build.lo \ - atf-c/libatf_c_la-check.lo atf-c/libatf_c_la-config.lo \ - atf-c/libatf_c_la-error.lo atf-c/libatf_c_la-tc.lo \ - atf-c/libatf_c_la-tp.lo atf-c/libatf_c_la-utils.lo \ - atf-c/detail/libatf_c_la-dynstr.lo \ + atf-c/libatf_c_la-check.lo atf-c/libatf_c_la-error.lo \ + atf-c/libatf_c_la-tc.lo atf-c/libatf_c_la-tp.lo \ + atf-c/libatf_c_la-utils.lo atf-c/detail/libatf_c_la-dynstr.lo \ atf-c/detail/libatf_c_la-env.lo atf-c/detail/libatf_c_la-fs.lo \ atf-c/detail/libatf_c_la-list.lo \ atf-c/detail/libatf_c_la-map.lo \ @@ -691,17 +628,17 @@ am_libatf_c_la_OBJECTS = atf-c/libatf_c_la-build.lo \ nodist_libatf_c_la_OBJECTS = libatf_c_la_OBJECTS = $(am_libatf_c_la_OBJECTS) \ $(nodist_libatf_c_la_OBJECTS) -libatf_c_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ +libatf_c_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libatf_c_la_LDFLAGS) $(LDFLAGS) -o $@ -@ENABLE_TOOLS_TRUE@am__EXEEXT_1 = atf-report/atf-report$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-config/atf-config$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf-run$(EXEEXT) \ -@ENABLE_TOOLS_TRUE@ atf-version/atf-version$(EXEEXT) +@ENABLE_TOOLS_TRUE@am__EXEEXT_1 = tools/atf-config$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/atf-report$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/atf-run$(EXEEXT) \ +@ENABLE_TOOLS_TRUE@ tools/atf-version$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(tests_atf_c_PROGRAMS) \ $(tests_atf_c___PROGRAMS) $(tests_atf_c___detail_PROGRAMS) \ - $(tests_atf_c_detail_PROGRAMS) $(tests_atf_report_PROGRAMS) \ - $(tests_atf_run_PROGRAMS) $(tests_test_programs_PROGRAMS) + $(tests_atf_c_detail_PROGRAMS) $(tests_test_programs_PROGRAMS) \ + $(tests_tools_PROGRAMS) am_atf_c___atf_c___test_OBJECTS = atf-c++/atf_c++_test.$(OBJEXT) atf_c___atf_c___test_OBJECTS = $(am_atf_c___atf_c___test_OBJECTS) atf_c___atf_c___test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \ @@ -714,10 +651,6 @@ am_atf_c___check_test_OBJECTS = atf-c++/check_test.$(OBJEXT) atf_c___check_test_OBJECTS = $(am_atf_c___check_test_OBJECTS) atf_c___check_test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \ $(ATF_CXX_LIBS) -am_atf_c___config_test_OBJECTS = atf-c++/config_test.$(OBJEXT) -atf_c___config_test_OBJECTS = $(am_atf_c___config_test_OBJECTS) -atf_c___config_test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \ - $(ATF_CXX_LIBS) am_atf_c___detail_application_test_OBJECTS = \ atf-c++/detail/application_test.$(OBJEXT) atf_c___detail_application_test_OBJECTS = \ @@ -742,44 +675,27 @@ atf_c___detail_exceptions_test_OBJECTS = \ $(am_atf_c___detail_exceptions_test_OBJECTS) atf_c___detail_exceptions_test_DEPENDENCIES = \ atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -am_atf_c___detail_expand_test_OBJECTS = \ - atf-c++/detail/expand_test.$(OBJEXT) -atf_c___detail_expand_test_OBJECTS = \ - $(am_atf_c___detail_expand_test_OBJECTS) -atf_c___detail_expand_test_DEPENDENCIES = \ - atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) am_atf_c___detail_fs_test_OBJECTS = atf-c++/detail/fs_test.$(OBJEXT) atf_c___detail_fs_test_OBJECTS = $(am_atf_c___detail_fs_test_OBJECTS) atf_c___detail_fs_test_DEPENDENCIES = \ atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -am_atf_c___detail_parser_test_OBJECTS = \ - atf-c++/detail/parser_test.$(OBJEXT) -atf_c___detail_parser_test_OBJECTS = \ - $(am_atf_c___detail_parser_test_OBJECTS) -atf_c___detail_parser_test_DEPENDENCIES = \ - atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) am_atf_c___detail_process_test_OBJECTS = \ atf-c++/detail/process_test.$(OBJEXT) atf_c___detail_process_test_OBJECTS = \ $(am_atf_c___detail_process_test_OBJECTS) atf_c___detail_process_test_DEPENDENCIES = \ atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -am_atf_c___detail_sanity_test_OBJECTS = \ - atf-c++/detail/sanity_test.$(OBJEXT) -atf_c___detail_sanity_test_OBJECTS = \ - $(am_atf_c___detail_sanity_test_OBJECTS) -atf_c___detail_sanity_test_DEPENDENCIES = \ - atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) am_atf_c___detail_text_test_OBJECTS = \ atf-c++/detail/text_test.$(OBJEXT) atf_c___detail_text_test_OBJECTS = \ $(am_atf_c___detail_text_test_OBJECTS) atf_c___detail_text_test_DEPENDENCIES = \ atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -am_atf_c___detail_ui_test_OBJECTS = atf-c++/detail/ui_test.$(OBJEXT) -atf_c___detail_ui_test_OBJECTS = $(am_atf_c___detail_ui_test_OBJECTS) -atf_c___detail_ui_test_DEPENDENCIES = \ - atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) +am_atf_c___detail_version_helper_OBJECTS = \ + atf-c++/detail/version_helper.$(OBJEXT) +atf_c___detail_version_helper_OBJECTS = \ + $(am_atf_c___detail_version_helper_OBJECTS) +atf_c___detail_version_helper_LDADD = $(LDADD) am_atf_c___macros_test_OBJECTS = atf-c++/macros_test.$(OBJEXT) atf_c___macros_test_OBJECTS = $(am_atf_c___macros_test_OBJECTS) atf_c___macros_test_DEPENDENCIES = atf-c++/detail/libtest_helpers.la \ @@ -804,10 +720,6 @@ am_atf_c_check_test_OBJECTS = atf-c/check_test.$(OBJEXT) atf_c_check_test_OBJECTS = $(am_atf_c_check_test_OBJECTS) atf_c_check_test_DEPENDENCIES = atf-c/detail/libtest_helpers.la \ libatf-c.la -am_atf_c_config_test_OBJECTS = atf-c/config_test.$(OBJEXT) -atf_c_config_test_OBJECTS = $(am_atf_c_config_test_OBJECTS) -atf_c_config_test_DEPENDENCIES = atf-c/detail/libtest_helpers.la \ - libatf-c.la am_atf_c_detail_dynstr_test_OBJECTS = \ atf-c/detail/dynstr_test.$(OBJEXT) atf_c_detail_dynstr_test_OBJECTS = \ @@ -855,6 +767,11 @@ am_atf_c_detail_user_test_OBJECTS = atf-c/detail/user_test.$(OBJEXT) atf_c_detail_user_test_OBJECTS = $(am_atf_c_detail_user_test_OBJECTS) atf_c_detail_user_test_DEPENDENCIES = atf-c/detail/libtest_helpers.la \ libatf-c.la +am_atf_c_detail_version_helper_OBJECTS = \ + atf-c/detail/version_helper.$(OBJEXT) +atf_c_detail_version_helper_OBJECTS = \ + $(am_atf_c_detail_version_helper_OBJECTS) +atf_c_detail_version_helper_LDADD = $(LDADD) am_atf_c_error_test_OBJECTS = atf-c/error_test.$(OBJEXT) atf_c_error_test_OBJECTS = $(am_atf_c_error_test_OBJECTS) atf_c_error_test_DEPENDENCIES = atf-c/detail/libtest_helpers.la \ @@ -875,206 +792,22 @@ am_atf_c_utils_test_OBJECTS = atf-c/utils_test.$(OBJEXT) atf_c_utils_test_OBJECTS = $(am_atf_c_utils_test_OBJECTS) atf_c_utils_test_DEPENDENCIES = atf-c/detail/libtest_helpers.la \ libatf-c.la -am__atf_config_atf_config_SOURCES_DIST = atf-config/atf-config.cpp -@ENABLE_TOOLS_TRUE@am_atf_config_atf_config_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-config/atf-config.$(OBJEXT) -atf_config_atf_config_OBJECTS = $(am_atf_config_atf_config_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_config_atf_config_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_report_atf_report_SOURCES_DIST = atf-report/atf-report.cpp \ - atf-report/reader.cpp atf-report/reader.hpp -@ENABLE_TOOLS_TRUE@am_atf_report_atf_report_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-report/atf-report.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-report/reader.$(OBJEXT) -atf_report_atf_report_OBJECTS = $(am_atf_report_atf_report_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_report_atf_report_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_report_fail_helper_SOURCES_DIST = atf-report/fail_helper.cpp -@ENABLE_TOOLS_TRUE@am_atf_report_fail_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-report/fail_helper.$(OBJEXT) -atf_report_fail_helper_OBJECTS = $(am_atf_report_fail_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_report_fail_helper_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_report_misc_helpers_SOURCES_DIST = \ - atf-report/misc_helpers.cpp -@ENABLE_TOOLS_TRUE@am_atf_report_misc_helpers_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-report/misc_helpers.$(OBJEXT) -atf_report_misc_helpers_OBJECTS = \ - $(am_atf_report_misc_helpers_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_report_misc_helpers_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_report_pass_helper_SOURCES_DIST = atf-report/pass_helper.cpp -@ENABLE_TOOLS_TRUE@am_atf_report_pass_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-report/pass_helper.$(OBJEXT) -atf_report_pass_helper_OBJECTS = $(am_atf_report_pass_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_report_pass_helper_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_report_reader_test_SOURCES_DIST = atf-report/reader_test.cpp \ - atf-report/reader.cpp -@ENABLE_TOOLS_TRUE@am_atf_report_reader_test_OBJECTS = atf-report/atf_report_reader_test-reader_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-report/atf_report_reader_test-reader.$(OBJEXT) -atf_report_reader_test_OBJECTS = $(am_atf_report_reader_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_report_reader_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ atf-c++/detail/libtest_helpers.la \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_atf_run_SOURCES_DIST = atf-run/atf-run.cpp \ - atf-run/atffile.cpp atf-run/atffile.hpp atf-run/config.cpp \ - atf-run/config.hpp atf-run/fs.cpp atf-run/fs.hpp \ - atf-run/io.cpp atf-run/io.hpp atf-run/requirements.cpp \ - atf-run/requirements.hpp atf-run/signals.cpp \ - atf-run/signals.hpp atf-run/test-program.cpp \ - atf-run/test-program.hpp atf-run/timer.cpp atf-run/timer.hpp \ - atf-run/user.cpp atf-run/user.hpp -@ENABLE_TOOLS_TRUE@am_atf_run_atf_run_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-atf-run.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-atffile.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-config.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-fs.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-io.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-requirements.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-signals.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-test-program.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-timer.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atf_run-user.$(OBJEXT) -atf_run_atf_run_OBJECTS = $(am_atf_run_atf_run_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_atf_run_DEPENDENCIES = $(ATF_CXX_LIBS) -am__atf_run_atffile_test_SOURCES_DIST = atf-run/atffile_test.cpp \ - atf-run/atffile.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_atffile_test_OBJECTS = atf-run/atf_run_atffile_test-atffile_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_atffile_test-atffile.$(OBJEXT) -atf_run_atffile_test_OBJECTS = $(am_atf_run_atffile_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_atffile_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ atf-c++/detail/libtest_helpers.la \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_bad_metadata_helper_SOURCES_DIST = \ - atf-run/bad_metadata_helper.c -@ENABLE_TOOLS_TRUE@am_atf_run_bad_metadata_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/bad_metadata_helper.$(OBJEXT) -atf_run_bad_metadata_helper_OBJECTS = \ - $(am_atf_run_bad_metadata_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_bad_metadata_helper_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ libatf-c.la -am__atf_run_config_test_SOURCES_DIST = atf-run/config_test.cpp \ - atf-run/config.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_config_test_OBJECTS = atf-run/atf_run_config_test-config_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_config_test-config.$(OBJEXT) -atf_run_config_test_OBJECTS = $(am_atf_run_config_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_config_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ atf-c++/detail/libtest_helpers.la \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_expect_helpers_SOURCES_DIST = atf-run/expect_helpers.c -@ENABLE_TOOLS_TRUE@am_atf_run_expect_helpers_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/expect_helpers.$(OBJEXT) -atf_run_expect_helpers_OBJECTS = $(am_atf_run_expect_helpers_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_expect_helpers_DEPENDENCIES = libatf-c.la -am__atf_run_fs_test_SOURCES_DIST = atf-run/fs_test.cpp atf-run/fs.cpp \ - atf-run/user.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_fs_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/fs_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/fs.$(OBJEXT) atf-run/user.$(OBJEXT) -atf_run_fs_test_OBJECTS = $(am_atf_run_fs_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_fs_test_DEPENDENCIES = $(ATF_CXX_LIBS) -am__atf_run_io_test_SOURCES_DIST = atf-run/io_test.cpp atf-run/io.cpp \ - atf-run/signals.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_io_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/io_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/io.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/signals.$(OBJEXT) -atf_run_io_test_OBJECTS = $(am_atf_run_io_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_io_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ atf-c++/detail/libtest_helpers.la \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_misc_helpers_SOURCES_DIST = atf-run/misc_helpers.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_misc_helpers_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/misc_helpers.$(OBJEXT) -atf_run_misc_helpers_OBJECTS = $(am_atf_run_misc_helpers_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_misc_helpers_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_pass_helper_SOURCES_DIST = atf-run/pass_helper.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_pass_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/pass_helper.$(OBJEXT) -atf_run_pass_helper_OBJECTS = $(am_atf_run_pass_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_pass_helper_DEPENDENCIES = $(ATF_CXX_LIBS) -am__atf_run_requirements_test_SOURCES_DIST = \ - atf-run/requirements_test.cpp atf-run/requirements.cpp \ - atf-run/user.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_requirements_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/requirements_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/requirements.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/user.$(OBJEXT) -atf_run_requirements_test_OBJECTS = \ - $(am_atf_run_requirements_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_requirements_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_several_tcs_helper_SOURCES_DIST = \ - atf-run/several_tcs_helper.c -@ENABLE_TOOLS_TRUE@am_atf_run_several_tcs_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/several_tcs_helper.$(OBJEXT) -atf_run_several_tcs_helper_OBJECTS = \ - $(am_atf_run_several_tcs_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_several_tcs_helper_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ libatf-c.la -am__atf_run_signals_test_SOURCES_DIST = atf-run/signals_test.cpp \ - atf-run/signals.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_signals_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/signals_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/signals.$(OBJEXT) -atf_run_signals_test_OBJECTS = $(am_atf_run_signals_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_signals_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_test_program_test_SOURCES_DIST = \ - atf-run/test_program_test.cpp atf-run/fs.cpp atf-run/io.cpp \ - atf-run/requirements.cpp atf-run/signals.cpp \ - atf-run/test-program.cpp atf-run/timer.cpp atf-run/user.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_test_program_test_OBJECTS = atf-run/atf_run_test_program_test-test_program_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-fs.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-io.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-requirements.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-signals.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-test-program.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-timer.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/atf_run_test_program_test-user.$(OBJEXT) -atf_run_test_program_test_OBJECTS = \ - $(am_atf_run_test_program_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_test_program_test_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ atf-c++/detail/libtest_helpers.la \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) -am__atf_run_user_test_SOURCES_DIST = atf-run/user_test.cpp \ - atf-run/user.cpp -@ENABLE_TOOLS_TRUE@am_atf_run_user_test_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/user_test.$(OBJEXT) \ -@ENABLE_TOOLS_TRUE@ atf-run/user.$(OBJEXT) -atf_run_user_test_OBJECTS = $(am_atf_run_user_test_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_user_test_DEPENDENCIES = $(ATF_CXX_LIBS) -am__atf_run_zero_tcs_helper_SOURCES_DIST = atf-run/zero_tcs_helper.c -@ENABLE_TOOLS_TRUE@am_atf_run_zero_tcs_helper_OBJECTS = \ -@ENABLE_TOOLS_TRUE@ atf-run/zero_tcs_helper.$(OBJEXT) -atf_run_zero_tcs_helper_OBJECTS = \ - $(am_atf_run_zero_tcs_helper_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_run_zero_tcs_helper_DEPENDENCIES = libatf-c.la -am_atf_sh_atf_check_OBJECTS = atf-sh/atf-check.$(OBJEXT) +am_atf_sh_atf_check_OBJECTS = \ + atf-sh/atf_sh_atf_check-atf-check.$(OBJEXT) atf_sh_atf_check_OBJECTS = $(am_atf_sh_atf_check_OBJECTS) atf_sh_atf_check_DEPENDENCIES = $(ATF_CXX_LIBS) -am_atf_sh_atf_sh_OBJECTS = atf-sh/atf-sh.$(OBJEXT) +am_atf_sh_atf_sh_OBJECTS = atf-sh/atf_sh_atf_sh-atf-sh.$(OBJEXT) atf_sh_atf_sh_OBJECTS = $(am_atf_sh_atf_sh_OBJECTS) atf_sh_atf_sh_DEPENDENCIES = $(ATF_CXX_LIBS) -am__atf_version_atf_version_SOURCES_DIST = \ - atf-version/atf-version.cpp -@ENABLE_TOOLS_TRUE@am_atf_version_atf_version_OBJECTS = atf-version/atf_version_atf_version-atf-version.$(OBJEXT) -nodist_atf_version_atf_version_OBJECTS = -atf_version_atf_version_OBJECTS = \ - $(am_atf_version_atf_version_OBJECTS) \ - $(nodist_atf_version_atf_version_OBJECTS) -@ENABLE_TOOLS_TRUE@atf_version_atf_version_DEPENDENCIES = \ -@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) am_bootstrap_h_app_empty_OBJECTS = bootstrap/h_app_empty.$(OBJEXT) bootstrap_h_app_empty_OBJECTS = $(am_bootstrap_h_app_empty_OBJECTS) -bootstrap_h_app_empty_DEPENDENCIES = $(ATF_CXX_LIBS) +bootstrap_h_app_empty_DEPENDENCIES = tools/libtools.a $(ATF_CXX_LIBS) am_bootstrap_h_app_opts_args_OBJECTS = \ bootstrap/h_app_opts_args.$(OBJEXT) bootstrap_h_app_opts_args_OBJECTS = \ $(am_bootstrap_h_app_opts_args_OBJECTS) -bootstrap_h_app_opts_args_DEPENDENCIES = $(ATF_CXX_LIBS) +bootstrap_h_app_opts_args_DEPENDENCIES = tools/libtools.a \ + $(ATF_CXX_LIBS) am_bootstrap_h_tp_basic_c_OBJECTS = bootstrap/h_tp_basic_c.$(OBJEXT) bootstrap_h_tp_basic_c_OBJECTS = $(am_bootstrap_h_tp_basic_c_OBJECTS) bootstrap_h_tp_basic_c_DEPENDENCIES = libatf-c.la @@ -1093,53 +826,249 @@ am_test_programs_cpp_helpers_OBJECTS = \ test_programs_cpp_helpers_OBJECTS = \ $(am_test_programs_cpp_helpers_OBJECTS) test_programs_cpp_helpers_DEPENDENCIES = $(ATF_CXX_LIBS) +am__tools_application_test_SOURCES_DIST = tools/application_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_application_test_OBJECTS = tools/tools_application_test-application_test.$(OBJEXT) +tools_application_test_OBJECTS = $(am_tools_application_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_application_test_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) +am__tools_atf_config_SOURCES_DIST = tools/atf-config.cpp +@ENABLE_TOOLS_TRUE@am_tools_atf_config_OBJECTS = tools/tools_atf_config-atf-config.$(OBJEXT) +tools_atf_config_OBJECTS = $(am_tools_atf_config_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_atf_config_DEPENDENCIES = $(TOOLS_LDADD) +am__tools_atf_report_SOURCES_DIST = tools/atf-report.cpp +@ENABLE_TOOLS_TRUE@am_tools_atf_report_OBJECTS = tools/tools_atf_report-atf-report.$(OBJEXT) +tools_atf_report_OBJECTS = $(am_tools_atf_report_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_atf_report_DEPENDENCIES = $(TOOLS_LDADD) +am__tools_atf_run_SOURCES_DIST = tools/atf-run.cpp +@ENABLE_TOOLS_TRUE@am_tools_atf_run_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_atf_run-atf-run.$(OBJEXT) +tools_atf_run_OBJECTS = $(am_tools_atf_run_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_atf_run_DEPENDENCIES = $(TOOLS_LDADD) +am__tools_atf_version_SOURCES_DIST = tools/atf-version.cpp +@ENABLE_TOOLS_TRUE@am_tools_atf_version_OBJECTS = tools/tools_atf_version-atf-version.$(OBJEXT) +nodist_tools_atf_version_OBJECTS = +tools_atf_version_OBJECTS = $(am_tools_atf_version_OBJECTS) \ + $(nodist_tools_atf_version_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_atf_version_DEPENDENCIES = $(TOOLS_LDADD) +am__tools_atffile_test_SOURCES_DIST = tools/atffile_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_atffile_test_OBJECTS = tools/tools_atffile_test-atffile_test.$(OBJEXT) +tools_atffile_test_OBJECTS = $(am_tools_atffile_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_atffile_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_auto_array_test_SOURCES_DIST = tools/auto_array_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_auto_array_test_OBJECTS = tools/tools_auto_array_test-auto_array_test.$(OBJEXT) +tools_auto_array_test_OBJECTS = $(am_tools_auto_array_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_auto_array_test_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) +am__tools_bad_metadata_helper_SOURCES_DIST = \ + tools/bad_metadata_helper.c +@ENABLE_TOOLS_TRUE@am_tools_bad_metadata_helper_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/bad_metadata_helper.$(OBJEXT) +tools_bad_metadata_helper_OBJECTS = \ + $(am_tools_bad_metadata_helper_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_bad_metadata_helper_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ libatf-c.la +am__tools_config_file_test_SOURCES_DIST = tools/config_file_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_config_file_test_OBJECTS = tools/tools_config_file_test-config_file_test.$(OBJEXT) +tools_config_file_test_OBJECTS = $(am_tools_config_file_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_config_file_test_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) +am__tools_config_test_SOURCES_DIST = tools/config_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_config_test_OBJECTS = tools/tools_config_test-config_test.$(OBJEXT) +tools_config_test_OBJECTS = $(am_tools_config_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_config_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_env_test_SOURCES_DIST = tools/env_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_env_test_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_env_test-env_test.$(OBJEXT) +tools_env_test_OBJECTS = $(am_tools_env_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_env_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_expand_test_SOURCES_DIST = tools/expand_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_expand_test_OBJECTS = tools/tools_expand_test-expand_test.$(OBJEXT) +tools_expand_test_OBJECTS = $(am_tools_expand_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_expand_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_expect_helpers_SOURCES_DIST = tools/expect_helpers.c +@ENABLE_TOOLS_TRUE@am_tools_expect_helpers_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/expect_helpers.$(OBJEXT) +tools_expect_helpers_OBJECTS = $(am_tools_expect_helpers_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_expect_helpers_DEPENDENCIES = libatf-c.la +am__tools_fail_helper_SOURCES_DIST = tools/fail_helper.cpp +@ENABLE_TOOLS_TRUE@am_tools_fail_helper_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/fail_helper.$(OBJEXT) +tools_fail_helper_OBJECTS = $(am_tools_fail_helper_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_fail_helper_DEPENDENCIES = $(ATF_CXX_LIBS) +am__tools_fs_test_SOURCES_DIST = tools/fs_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_fs_test_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_fs_test-fs_test.$(OBJEXT) +tools_fs_test_OBJECTS = $(am_tools_fs_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_fs_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_io_test_SOURCES_DIST = tools/io_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_io_test_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_io_test-io_test.$(OBJEXT) +tools_io_test_OBJECTS = $(am_tools_io_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_io_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_misc_helpers_SOURCES_DIST = tools/misc_helpers.cpp +@ENABLE_TOOLS_TRUE@am_tools_misc_helpers_OBJECTS = tools/tools_misc_helpers-misc_helpers.$(OBJEXT) +tools_misc_helpers_OBJECTS = $(am_tools_misc_helpers_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_misc_helpers_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_parser_test_SOURCES_DIST = tools/parser_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_parser_test_OBJECTS = tools/tools_parser_test-parser_test.$(OBJEXT) +tools_parser_test_OBJECTS = $(am_tools_parser_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_parser_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_pass_helper_SOURCES_DIST = tools/pass_helper.cpp +@ENABLE_TOOLS_TRUE@am_tools_pass_helper_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/pass_helper.$(OBJEXT) +tools_pass_helper_OBJECTS = $(am_tools_pass_helper_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_pass_helper_DEPENDENCIES = $(ATF_CXX_LIBS) +am__tools_process_helpers_SOURCES_DIST = tools/process_helpers.c +@ENABLE_TOOLS_TRUE@am_tools_process_helpers_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/process_helpers.$(OBJEXT) +tools_process_helpers_OBJECTS = $(am_tools_process_helpers_OBJECTS) +tools_process_helpers_LDADD = $(LDADD) +am__tools_process_test_SOURCES_DIST = tools/process_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_process_test_OBJECTS = tools/tools_process_test-process_test.$(OBJEXT) +tools_process_test_OBJECTS = $(am_tools_process_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_process_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_reader_test_SOURCES_DIST = tools/reader_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_reader_test_OBJECTS = tools/tools_reader_test-reader_test.$(OBJEXT) +tools_reader_test_OBJECTS = $(am_tools_reader_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_reader_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_requirements_test_SOURCES_DIST = \ + tools/requirements_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_requirements_test_OBJECTS = tools/tools_requirements_test-requirements_test.$(OBJEXT) +tools_requirements_test_OBJECTS = \ + $(am_tools_requirements_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_requirements_test_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) +am__tools_several_tcs_helper_SOURCES_DIST = \ + tools/several_tcs_helper.c +@ENABLE_TOOLS_TRUE@am_tools_several_tcs_helper_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/several_tcs_helper.$(OBJEXT) +tools_several_tcs_helper_OBJECTS = \ + $(am_tools_several_tcs_helper_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_several_tcs_helper_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ libatf-c.la +am__tools_signals_test_SOURCES_DIST = tools/signals_test.cpp \ + tools/signals.cpp +@ENABLE_TOOLS_TRUE@am_tools_signals_test_OBJECTS = tools/tools_signals_test-signals_test.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_signals_test-signals.$(OBJEXT) +tools_signals_test_OBJECTS = $(am_tools_signals_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_signals_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_test_program_test_SOURCES_DIST = \ + tools/test_program_test.cpp +@ENABLE_TOOLS_TRUE@am_tools_test_program_test_OBJECTS = tools/tools_test_program_test-test_program_test.$(OBJEXT) +tools_test_program_test_OBJECTS = \ + $(am_tools_test_program_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_test_program_test_DEPENDENCIES = \ +@ENABLE_TOOLS_TRUE@ $(TOOLS_LDADD) $(ATF_CXX_LIBS) +am__tools_text_test_SOURCES_DIST = tools/text_test.cpp tools/text.cpp +@ENABLE_TOOLS_TRUE@am_tools_text_test_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_text_test-text_test.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_text_test-text.$(OBJEXT) +tools_text_test_OBJECTS = $(am_tools_text_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_text_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_ui_test_SOURCES_DIST = tools/ui_test.cpp tools/ui.cpp +@ENABLE_TOOLS_TRUE@am_tools_ui_test_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_ui_test-ui_test.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_ui_test-ui.$(OBJEXT) +tools_ui_test_OBJECTS = $(am_tools_ui_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_ui_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_user_test_SOURCES_DIST = tools/user_test.cpp tools/user.cpp +@ENABLE_TOOLS_TRUE@am_tools_user_test_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/tools_user_test-user_test.$(OBJEXT) \ +@ENABLE_TOOLS_TRUE@ tools/tools_user_test-user.$(OBJEXT) +tools_user_test_OBJECTS = $(am_tools_user_test_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_user_test_DEPENDENCIES = $(TOOLS_LDADD) \ +@ENABLE_TOOLS_TRUE@ $(ATF_CXX_LIBS) +am__tools_zero_tcs_helper_SOURCES_DIST = tools/zero_tcs_helper.c +@ENABLE_TOOLS_TRUE@am_tools_zero_tcs_helper_OBJECTS = \ +@ENABLE_TOOLS_TRUE@ tools/zero_tcs_helper.$(OBJEXT) +tools_zero_tcs_helper_OBJECTS = $(am_tools_zero_tcs_helper_OBJECTS) +@ENABLE_TOOLS_TRUE@tools_zero_tcs_helper_DEPENDENCIES = libatf-c.la SCRIPTS = $(tests_atf_c_SCRIPTS) $(tests_atf_c___SCRIPTS) \ - $(tests_atf_config_SCRIPTS) $(tests_atf_report_SCRIPTS) \ - $(tests_atf_run_SCRIPTS) $(tests_atf_sh_SCRIPTS) \ - $(tests_test_programs_SCRIPTS) + $(tests_atf_sh_SCRIPTS) $(tests_test_programs_SCRIPTS) \ + $(tests_tools_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/admin/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \ +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +SOURCES = $(tools_libtools_a_SOURCES) \ + $(nodist_tools_libtools_a_SOURCES) \ + $(atf_c___detail_libtest_helpers_la_SOURCES) \ $(atf_c_detail_libtest_helpers_la_SOURCES) \ $(libatf_c___la_SOURCES) $(libatf_c_la_SOURCES) \ $(nodist_libatf_c_la_SOURCES) $(atf_c___atf_c___test_SOURCES) \ $(atf_c___build_test_SOURCES) $(atf_c___check_test_SOURCES) \ - $(atf_c___config_test_SOURCES) \ $(atf_c___detail_application_test_SOURCES) \ $(atf_c___detail_auto_array_test_SOURCES) \ $(atf_c___detail_env_test_SOURCES) \ $(atf_c___detail_exceptions_test_SOURCES) \ - $(atf_c___detail_expand_test_SOURCES) \ $(atf_c___detail_fs_test_SOURCES) \ - $(atf_c___detail_parser_test_SOURCES) \ $(atf_c___detail_process_test_SOURCES) \ - $(atf_c___detail_sanity_test_SOURCES) \ $(atf_c___detail_text_test_SOURCES) \ - $(atf_c___detail_ui_test_SOURCES) \ + $(atf_c___detail_version_helper_SOURCES) \ $(atf_c___macros_test_SOURCES) $(atf_c___tests_test_SOURCES) \ $(atf_c___utils_test_SOURCES) $(atf_c_atf_c_test_SOURCES) \ $(atf_c_build_test_SOURCES) $(atf_c_check_test_SOURCES) \ - $(atf_c_config_test_SOURCES) \ $(atf_c_detail_dynstr_test_SOURCES) \ $(atf_c_detail_env_test_SOURCES) \ $(atf_c_detail_fs_test_SOURCES) \ @@ -1149,55 +1078,53 @@ SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \ $(atf_c_detail_process_test_SOURCES) \ $(atf_c_detail_sanity_test_SOURCES) \ $(atf_c_detail_text_test_SOURCES) \ - $(atf_c_detail_user_test_SOURCES) $(atf_c_error_test_SOURCES) \ - $(atf_c_macros_test_SOURCES) $(atf_c_tc_test_SOURCES) \ - $(atf_c_tp_test_SOURCES) $(atf_c_utils_test_SOURCES) \ - $(atf_config_atf_config_SOURCES) \ - $(atf_report_atf_report_SOURCES) \ - $(atf_report_fail_helper_SOURCES) \ - $(atf_report_misc_helpers_SOURCES) \ - $(atf_report_pass_helper_SOURCES) \ - $(atf_report_reader_test_SOURCES) $(atf_run_atf_run_SOURCES) \ - $(atf_run_atffile_test_SOURCES) \ - $(atf_run_bad_metadata_helper_SOURCES) \ - $(atf_run_config_test_SOURCES) \ - $(atf_run_expect_helpers_SOURCES) $(atf_run_fs_test_SOURCES) \ - $(atf_run_io_test_SOURCES) $(atf_run_misc_helpers_SOURCES) \ - $(atf_run_pass_helper_SOURCES) \ - $(atf_run_requirements_test_SOURCES) \ - $(atf_run_several_tcs_helper_SOURCES) \ - $(atf_run_signals_test_SOURCES) \ - $(atf_run_test_program_test_SOURCES) \ - $(atf_run_user_test_SOURCES) \ - $(atf_run_zero_tcs_helper_SOURCES) $(atf_sh_atf_check_SOURCES) \ - $(atf_sh_atf_sh_SOURCES) $(atf_version_atf_version_SOURCES) \ - $(nodist_atf_version_atf_version_SOURCES) \ - $(bootstrap_h_app_empty_SOURCES) \ + $(atf_c_detail_user_test_SOURCES) \ + $(atf_c_detail_version_helper_SOURCES) \ + $(atf_c_error_test_SOURCES) $(atf_c_macros_test_SOURCES) \ + $(atf_c_tc_test_SOURCES) $(atf_c_tp_test_SOURCES) \ + $(atf_c_utils_test_SOURCES) $(atf_sh_atf_check_SOURCES) \ + $(atf_sh_atf_sh_SOURCES) $(bootstrap_h_app_empty_SOURCES) \ $(bootstrap_h_app_opts_args_SOURCES) \ $(bootstrap_h_tp_basic_c_SOURCES) \ $(bootstrap_h_tp_basic_cpp_SOURCES) \ $(test_programs_c_helpers_SOURCES) \ - $(test_programs_cpp_helpers_SOURCES) -DIST_SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \ + $(test_programs_cpp_helpers_SOURCES) \ + $(tools_application_test_SOURCES) $(tools_atf_config_SOURCES) \ + $(tools_atf_report_SOURCES) $(tools_atf_run_SOURCES) \ + $(tools_atf_version_SOURCES) \ + $(nodist_tools_atf_version_SOURCES) \ + $(tools_atffile_test_SOURCES) $(tools_auto_array_test_SOURCES) \ + $(tools_bad_metadata_helper_SOURCES) \ + $(tools_config_file_test_SOURCES) $(tools_config_test_SOURCES) \ + $(tools_env_test_SOURCES) $(tools_expand_test_SOURCES) \ + $(tools_expect_helpers_SOURCES) $(tools_fail_helper_SOURCES) \ + $(tools_fs_test_SOURCES) $(tools_io_test_SOURCES) \ + $(tools_misc_helpers_SOURCES) $(tools_parser_test_SOURCES) \ + $(tools_pass_helper_SOURCES) $(tools_process_helpers_SOURCES) \ + $(tools_process_test_SOURCES) $(tools_reader_test_SOURCES) \ + $(tools_requirements_test_SOURCES) \ + $(tools_several_tcs_helper_SOURCES) \ + $(tools_signals_test_SOURCES) \ + $(tools_test_program_test_SOURCES) $(tools_text_test_SOURCES) \ + $(tools_ui_test_SOURCES) $(tools_user_test_SOURCES) \ + $(tools_zero_tcs_helper_SOURCES) +DIST_SOURCES = $(am__tools_libtools_a_SOURCES_DIST) \ + $(atf_c___detail_libtest_helpers_la_SOURCES) \ $(atf_c_detail_libtest_helpers_la_SOURCES) \ $(libatf_c___la_SOURCES) $(libatf_c_la_SOURCES) \ $(atf_c___atf_c___test_SOURCES) $(atf_c___build_test_SOURCES) \ - $(atf_c___check_test_SOURCES) $(atf_c___config_test_SOURCES) \ + $(atf_c___check_test_SOURCES) \ $(atf_c___detail_application_test_SOURCES) \ $(atf_c___detail_auto_array_test_SOURCES) \ $(atf_c___detail_env_test_SOURCES) \ $(atf_c___detail_exceptions_test_SOURCES) \ - $(atf_c___detail_expand_test_SOURCES) \ $(atf_c___detail_fs_test_SOURCES) \ - $(atf_c___detail_parser_test_SOURCES) \ $(atf_c___detail_process_test_SOURCES) \ - $(atf_c___detail_sanity_test_SOURCES) \ $(atf_c___detail_text_test_SOURCES) \ - $(atf_c___detail_ui_test_SOURCES) \ + $(atf_c___detail_version_helper_SOURCES) \ $(atf_c___macros_test_SOURCES) $(atf_c___tests_test_SOURCES) \ $(atf_c___utils_test_SOURCES) $(atf_c_atf_c_test_SOURCES) \ $(atf_c_build_test_SOURCES) $(atf_c_check_test_SOURCES) \ - $(atf_c_config_test_SOURCES) \ $(atf_c_detail_dynstr_test_SOURCES) \ $(atf_c_detail_env_test_SOURCES) \ $(atf_c_detail_fs_test_SOURCES) \ @@ -1207,38 +1134,47 @@ DIST_SOURCES = $(atf_c___detail_libtest_helpers_la_SOURCES) \ $(atf_c_detail_process_test_SOURCES) \ $(atf_c_detail_sanity_test_SOURCES) \ $(atf_c_detail_text_test_SOURCES) \ - $(atf_c_detail_user_test_SOURCES) $(atf_c_error_test_SOURCES) \ - $(atf_c_macros_test_SOURCES) $(atf_c_tc_test_SOURCES) \ - $(atf_c_tp_test_SOURCES) $(atf_c_utils_test_SOURCES) \ - $(am__atf_config_atf_config_SOURCES_DIST) \ - $(am__atf_report_atf_report_SOURCES_DIST) \ - $(am__atf_report_fail_helper_SOURCES_DIST) \ - $(am__atf_report_misc_helpers_SOURCES_DIST) \ - $(am__atf_report_pass_helper_SOURCES_DIST) \ - $(am__atf_report_reader_test_SOURCES_DIST) \ - $(am__atf_run_atf_run_SOURCES_DIST) \ - $(am__atf_run_atffile_test_SOURCES_DIST) \ - $(am__atf_run_bad_metadata_helper_SOURCES_DIST) \ - $(am__atf_run_config_test_SOURCES_DIST) \ - $(am__atf_run_expect_helpers_SOURCES_DIST) \ - $(am__atf_run_fs_test_SOURCES_DIST) \ - $(am__atf_run_io_test_SOURCES_DIST) \ - $(am__atf_run_misc_helpers_SOURCES_DIST) \ - $(am__atf_run_pass_helper_SOURCES_DIST) \ - $(am__atf_run_requirements_test_SOURCES_DIST) \ - $(am__atf_run_several_tcs_helper_SOURCES_DIST) \ - $(am__atf_run_signals_test_SOURCES_DIST) \ - $(am__atf_run_test_program_test_SOURCES_DIST) \ - $(am__atf_run_user_test_SOURCES_DIST) \ - $(am__atf_run_zero_tcs_helper_SOURCES_DIST) \ - $(atf_sh_atf_check_SOURCES) $(atf_sh_atf_sh_SOURCES) \ - $(am__atf_version_atf_version_SOURCES_DIST) \ - $(bootstrap_h_app_empty_SOURCES) \ + $(atf_c_detail_user_test_SOURCES) \ + $(atf_c_detail_version_helper_SOURCES) \ + $(atf_c_error_test_SOURCES) $(atf_c_macros_test_SOURCES) \ + $(atf_c_tc_test_SOURCES) $(atf_c_tp_test_SOURCES) \ + $(atf_c_utils_test_SOURCES) $(atf_sh_atf_check_SOURCES) \ + $(atf_sh_atf_sh_SOURCES) $(bootstrap_h_app_empty_SOURCES) \ $(bootstrap_h_app_opts_args_SOURCES) \ $(bootstrap_h_tp_basic_c_SOURCES) \ $(bootstrap_h_tp_basic_cpp_SOURCES) \ $(test_programs_c_helpers_SOURCES) \ - $(test_programs_cpp_helpers_SOURCES) + $(test_programs_cpp_helpers_SOURCES) \ + $(am__tools_application_test_SOURCES_DIST) \ + $(am__tools_atf_config_SOURCES_DIST) \ + $(am__tools_atf_report_SOURCES_DIST) \ + $(am__tools_atf_run_SOURCES_DIST) \ + $(am__tools_atf_version_SOURCES_DIST) \ + $(am__tools_atffile_test_SOURCES_DIST) \ + $(am__tools_auto_array_test_SOURCES_DIST) \ + $(am__tools_bad_metadata_helper_SOURCES_DIST) \ + $(am__tools_config_file_test_SOURCES_DIST) \ + $(am__tools_config_test_SOURCES_DIST) \ + $(am__tools_env_test_SOURCES_DIST) \ + $(am__tools_expand_test_SOURCES_DIST) \ + $(am__tools_expect_helpers_SOURCES_DIST) \ + $(am__tools_fail_helper_SOURCES_DIST) \ + $(am__tools_fs_test_SOURCES_DIST) \ + $(am__tools_io_test_SOURCES_DIST) \ + $(am__tools_misc_helpers_SOURCES_DIST) \ + $(am__tools_parser_test_SOURCES_DIST) \ + $(am__tools_pass_helper_SOURCES_DIST) \ + $(am__tools_process_helpers_SOURCES_DIST) \ + $(am__tools_process_test_SOURCES_DIST) \ + $(am__tools_reader_test_SOURCES_DIST) \ + $(am__tools_requirements_test_SOURCES_DIST) \ + $(am__tools_several_tcs_helper_SOURCES_DIST) \ + $(am__tools_signals_test_SOURCES_DIST) \ + $(am__tools_test_program_test_SOURCES_DIST) \ + $(am__tools_text_test_SOURCES_DIST) \ + $(am__tools_ui_test_SOURCES_DIST) \ + $(am__tools_user_test_SOURCES_DIST) \ + $(am__tools_zero_tcs_helper_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -1256,14 +1192,51 @@ DATA = $(atf_aclocal_DATA) $(atf_c__dirpkgconfig_DATA) \ $(css_DATA) $(doc_DATA) $(dtd_DATA) $(eg_DATA) $(hooks_DATA) \ $(noinst_DATA) $(pkgtests_DATA) $(tests_atf_c_DATA) \ $(tests_atf_c___DATA) $(tests_atf_c___detail_DATA) \ - $(tests_atf_c_detail_DATA) $(tests_atf_config_DATA) \ - $(tests_atf_report_DATA) $(tests_atf_run_DATA) \ - $(tests_atf_sh_DATA) $(tests_test_programs_DATA) $(xsl_DATA) -HEADERS = $(atf_c_HEADERS) $(atf_c___HEADERS) $(include_HEADERS) + $(tests_atf_c_detail_DATA) $(tests_atf_sh_DATA) \ + $(tests_test_programs_DATA) $(tests_tools_DATA) $(xsl_DATA) +HEADERS = $(atf_c_HEADERS) $(atf_c___HEADERS) $(include_HEADERS) \ + $(nodist_atf_c_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope +am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ + $(srcdir)/admin/Makefile.am.inc \ + $(srcdir)/atf-c++/Makefile.am.inc \ + $(srcdir)/atf-c++/detail/Makefile.am.inc \ + $(srcdir)/atf-c/Makefile.am.inc \ + $(srcdir)/atf-c/detail/Makefile.am.inc \ + $(srcdir)/atf-sh/Makefile.am.inc \ + $(srcdir)/bootstrap/Makefile.am.inc $(srcdir)/config.h.in \ + $(srcdir)/doc/Makefile.am.inc \ + $(srcdir)/test-programs/Makefile.am.inc \ + $(srcdir)/tools/Makefile.am.inc $(top_srcdir)/admin/ar-lib \ + $(top_srcdir)/admin/compile $(top_srcdir)/admin/config.guess \ + $(top_srcdir)/admin/config.sub $(top_srcdir)/admin/depcomp \ + $(top_srcdir)/admin/install-sh $(top_srcdir)/admin/ltmain.sh \ + $(top_srcdir)/admin/missing $(top_srcdir)/atf-c/defs.h.in \ + $(top_srcdir)/tools/defs.hpp.in AUTHORS COPYING INSTALL NEWS \ + README admin/ar-lib admin/compile admin/config.guess \ + admin/config.sub admin/depcomp admin/install-sh \ + admin/ltmain.sh admin/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -1283,6 +1256,7 @@ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ATF_BUILD_CC = @ATF_BUILD_CC@ ATF_BUILD_CFLAGS = @ATF_BUILD_CFLAGS@ @@ -1312,6 +1286,7 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -1338,7 +1313,9 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -1364,6 +1341,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@ @@ -1406,7 +1384,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -1429,17 +1406,25 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ atf_aclocal_DATA = atf-c/atf-common.m4 atf-c/atf-c.m4 \ atf-c++/atf-c++.m4 atf-sh/atf-sh.m4 -BUILT_SOURCES = $(am__append_8) +BUILT_SOURCES = $(am__append_5) CLEANFILES = atf-c/atf-c.pc atf-c/pkg_config_test atf-c++/atf-c++.pc \ atf-c++/pkg_config_test atf-sh/atf-sh.pc atf-sh/misc_helpers \ atf-sh/atf_check_test atf-sh/atf-check_test atf-sh/config_test \ atf-sh/integration_test atf-sh/normalize_test atf-sh/tc_test \ atf-sh/tp_test bootstrap/h_tp_basic_sh \ bootstrap/h_tp_atf_check_sh bootstrap/h_tp_fail \ - bootstrap/h_tp_pass $(am__append_2) test-programs/sh_helpers \ + bootstrap/h_tp_pass doc/atf.7 test-programs/sh_helpers \ test-programs/config_test test-programs/expect_test \ test-programs/meta_data_test test-programs/result_test \ - test-programs/srcdir_test $(am__append_7) + test-programs/srcdir_test $(am__append_6) + +# XXX For some reason, the nodist line above does not work as expected. +# Work this problem around. + +# +# Custom targets. +# +DIST_HOOKS = kill-defs-h $(am__append_1) forbid-dist EXTRA_DIST = admin/check-style-common.awk admin/check-style-c.awk \ admin/check-style-cpp.awk admin/check-style-man.awk \ admin/check-style-shell.awk admin/check-style.sh \ @@ -1456,62 +1441,60 @@ EXTRA_DIST = admin/check-style-common.awk admin/check-style-c.awk \ bootstrap/h_tp_basic_sh.sh bootstrap/h_tp_atf_check_sh.sh \ bootstrap/h_tp_fail.sh bootstrap/h_tp_pass.sh \ bootstrap/testsuite bootstrap/package.m4 \ - bootstrap/testsuite.at $(testsuite_incs) $(am__append_3) \ + bootstrap/testsuite.at $(testsuite_incs) doc/atf.7.in \ $(tests_test_programs_DATA) test-programs/common.sh \ test-programs/sh_helpers.sh test-programs/config_test.sh \ test-programs/expect_test.sh test-programs/meta_data_test.sh \ test-programs/result_test.sh test-programs/srcdir_test.sh \ - $(am__append_6) $(doc_DATA) INSTALL README $(pkgtests_DATA) -dist_man_MANS = atf-c/atf-c-api.3 atf-c++/atf-c++-api.3 \ - atf-sh/atf-check.1 atf-sh/atf-sh.1 atf-sh/atf-sh-api.3 \ - doc/atf-test-case.4 doc/atf-test-program.1 $(am__append_4) + $(am__append_4) $(doc_DATA) INSTALL README $(pkgtests_DATA) +dist_man_MANS = atf-c/atf-c.3 atf-c++/atf-c++.3 atf-sh/atf-check.1 \ + atf-sh/atf-sh.1 atf-sh/atf-sh.3 doc/atf-test-case.4 \ + doc/atf-test-program.1 $(am__append_3) include_HEADERS = atf-c.h atf-c++.hpp lib_LTLIBRARIES = libatf-c.la libatf-c++.la -man_MANS = $(am__append_1) +man_MANS = doc/atf.7 noinst_DATA = INSTALL README noinst_LTLIBRARIES = atf-c/detail/libtest_helpers.la \ atf-c++/detail/libtest_helpers.la -INSTALLCHECK_TARGETS = installcheck-bootstrap $(am__append_10) \ - $(am__append_11) -PHONY_TARGETS = check-style installcheck-bootstrap $(am__append_9) \ - installcheck-kyua clean-all release release-test +INSTALLCHECK_TARGETS = installcheck-bootstrap $(am__append_8) \ + $(am__append_9) +PHONY_TARGETS = check-style installcheck-bootstrap $(am__append_7) \ + installcheck-kyua clean-all ACLOCAL_AMFLAGS = -I m4 AM_DISTCHECK_CONFIGURE_FLAGS = --enable-tools libatf_c_la_SOURCES = atf-c/build.c atf-c/build.h atf-c/check.c \ - atf-c/check.h atf-c/config.c atf-c/config.h atf-c/error.c \ - atf-c/error.h atf-c/error_fwd.h atf-c/macros.h atf-c/tc.c \ - atf-c/tc.h atf-c/tp.c atf-c/tp.h atf-c/utils.c atf-c/utils.h \ - atf-c/detail/dynstr.c atf-c/detail/dynstr.h atf-c/detail/env.c \ - atf-c/detail/env.h atf-c/detail/fs.c atf-c/detail/fs.h \ - atf-c/detail/list.c atf-c/detail/list.h atf-c/detail/map.c \ - atf-c/detail/map.h atf-c/detail/process.c \ - atf-c/detail/process.h atf-c/detail/sanity.c \ - atf-c/detail/sanity.h atf-c/detail/text.c atf-c/detail/text.h \ - atf-c/detail/tp_main.c atf-c/detail/user.c atf-c/detail/user.h + atf-c/check.h atf-c/error.c atf-c/error.h atf-c/error_fwd.h \ + atf-c/macros.h atf-c/tc.c atf-c/tc.h atf-c/tp.c atf-c/tp.h \ + atf-c/utils.c atf-c/utils.h atf-c/detail/dynstr.c \ + atf-c/detail/dynstr.h atf-c/detail/env.c atf-c/detail/env.h \ + atf-c/detail/fs.c atf-c/detail/fs.h atf-c/detail/list.c \ + atf-c/detail/list.h atf-c/detail/map.c atf-c/detail/map.h \ + atf-c/detail/process.c atf-c/detail/process.h \ + atf-c/detail/sanity.c atf-c/detail/sanity.h \ + atf-c/detail/text.c atf-c/detail/text.h atf-c/detail/tp_main.c \ + atf-c/detail/user.c atf-c/detail/user.h nodist_libatf_c_la_SOURCES = atf-c/defs.h -libatf_c_la_CPPFLAGS = "-DATF_ARCH=\"$(atf_arch)\"" \ - "-DATF_BUILD_CC=\"$(ATF_BUILD_CC)\"" \ +#libatf_c_la_CPPFLAGS = "-DATF_BUILD_CC=\"$(ATF_BUILD_CC)\"" \ +# "-DATF_BUILD_CFLAGS=\"$(ATF_BUILD_CFLAGS)\"" \ +# "-DATF_BUILD_CPP=\"$(ATF_BUILD_CPP)\"" \ +# "-DATF_BUILD_CPPFLAGS=\"$(ATF_BUILD_CPPFLAGS)\"" \ +# "-DATF_BUILD_CXX=\"$(ATF_BUILD_CXX)\"" \ +# "-DATF_BUILD_CXXFLAGS=\"$(ATF_BUILD_CXXFLAGS)\"" \ +# "-DATF_INCLUDEDIR=\"$(includedir)\"" \ +# "-DATF_LIBEXECDIR=\"$(libexecdir)\"" \ +# "-DATF_PKGDATADIR=\"$(pkgdatadir)\"" \ +# "-DATF_SHELL=\"$(ATF_SHELL)\"" \ +# "-DATF_WORKDIR=\"$(ATF_WORKDIR)\"" +libatf_c_la_CPPFLAGS = "-DATF_BUILD_CC=\"$(ATF_BUILD_CC)\"" \ "-DATF_BUILD_CFLAGS=\"$(ATF_BUILD_CFLAGS)\"" \ "-DATF_BUILD_CPP=\"$(ATF_BUILD_CPP)\"" \ "-DATF_BUILD_CPPFLAGS=\"$(ATF_BUILD_CPPFLAGS)\"" \ "-DATF_BUILD_CXX=\"$(ATF_BUILD_CXX)\"" \ - "-DATF_BUILD_CXXFLAGS=\"$(ATF_BUILD_CXXFLAGS)\"" \ - "-DATF_CONFDIR=\"$(atf_confdir)\"" \ - "-DATF_INCLUDEDIR=\"$(includedir)\"" \ - "-DATF_LIBDIR=\"$(libdir)\"" \ - "-DATF_LIBEXECDIR=\"$(libexecdir)\"" \ - "-DATF_MACHINE=\"$(atf_machine)\"" \ - "-DATF_M4=\"$(ATF_M4)\"" \ - "-DATF_PKGDATADIR=\"$(pkgdatadir)\"" \ - "-DATF_SHELL=\"$(ATF_SHELL)\"" \ - "-DATF_WORKDIR=\"$(ATF_WORKDIR)\"" \ - -I$(srcdir)/atf-c + "-DATF_BUILD_CXXFLAGS=\"$(ATF_BUILD_CXXFLAGS)\"" -libatf_c_la_LDFLAGS = -version-info 0:0:0 +libatf_c_la_LDFLAGS = -version-info 1:0:0 atf_c_HEADERS = atf-c/build.h \ atf-c/check.h \ - atf-c/config.h \ - atf-c/defs.h \ atf-c/error.h \ atf-c/error_fwd.h \ atf-c/macros.h \ @@ -1519,6 +1502,7 @@ atf_c_HEADERS = atf-c/build.h \ atf-c/tp.h \ atf-c/utils.h +nodist_atf_c_HEADERS = atf-c/defs.h atf_cdir = $(includedir)/atf-c atf_cpkgconfigdir = $(atf_pkgconfigdir) atf_cpkgconfig_DATA = atf-c/atf-c.pc @@ -1534,8 +1518,6 @@ atf_c_build_test_SOURCES = atf-c/build_test.c atf-c/h_build.h atf_c_build_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la atf_c_check_test_SOURCES = atf-c/check_test.c atf_c_check_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la -atf_c_config_test_SOURCES = atf-c/config_test.c -atf_c_config_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la atf_c_error_test_SOURCES = atf-c/error_test.c atf_c_error_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la atf_c_macros_test_SOURCES = atf-c/macros_test.c @@ -1554,7 +1536,9 @@ tests_atf_c_detaildir = $(pkgtestsdir)/atf-c/detail atf_c_detail_libtest_helpers_la_SOURCES = atf-c/detail/test_helpers.c \ atf-c/detail/test_helpers.h -atf_c_detail_libtest_helpers_la_CPPFLAGS = -I$(srcdir)/atf-c +atf_c_detail_libtest_helpers_la_CPPFLAGS = -I$(srcdir)/atf-c \ + -DATF_INCLUDEDIR=\"$(includedir)\" + atf_c_detail_dynstr_test_SOURCES = atf-c/detail/dynstr_test.c atf_c_detail_dynstr_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la atf_c_detail_env_test_SOURCES = atf-c/detail/env_test.c @@ -1574,29 +1558,24 @@ atf_c_detail_text_test_SOURCES = atf-c/detail/text_test.c atf_c_detail_text_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la atf_c_detail_user_test_SOURCES = atf-c/detail/user_test.c atf_c_detail_user_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la +atf_c_detail_version_helper_SOURCES = atf-c/detail/version_helper.c ATF_CXX_LIBS = libatf-c++.la libatf-c.la libatf_c___la_LIBADD = libatf-c.la libatf_c___la_SOURCES = atf-c++/build.cpp atf-c++/build.hpp \ - atf-c++/check.cpp atf-c++/check.hpp atf-c++/config.cpp \ - atf-c++/config.hpp atf-c++/macros.hpp atf-c++/noncopyable.hpp \ + atf-c++/check.cpp atf-c++/check.hpp atf-c++/macros.hpp \ atf-c++/tests.cpp atf-c++/tests.hpp atf-c++/utils.cpp \ atf-c++/utils.hpp atf-c++/detail/application.cpp \ atf-c++/detail/application.hpp atf-c++/detail/auto_array.hpp \ atf-c++/detail/env.cpp atf-c++/detail/env.hpp \ atf-c++/detail/exceptions.cpp atf-c++/detail/exceptions.hpp \ - atf-c++/detail/expand.cpp atf-c++/detail/expand.hpp \ atf-c++/detail/fs.cpp atf-c++/detail/fs.hpp \ - atf-c++/detail/parser.cpp atf-c++/detail/parser.hpp \ atf-c++/detail/process.cpp atf-c++/detail/process.hpp \ atf-c++/detail/sanity.hpp atf-c++/detail/text.cpp \ - atf-c++/detail/text.hpp atf-c++/detail/ui.cpp \ - atf-c++/detail/ui.hpp -libatf_c___la_LDFLAGS = -version-info 0:0:0 + atf-c++/detail/text.hpp +libatf_c___la_LDFLAGS = -version-info 2:0:0 atf_c___HEADERS = atf-c++/build.hpp \ atf-c++/check.hpp \ - atf-c++/config.hpp \ atf-c++/macros.hpp \ - atf-c++/noncopyable.hpp \ atf-c++/tests.hpp \ atf-c++/utils.hpp @@ -1615,8 +1594,6 @@ atf_c___build_test_SOURCES = atf-c++/build_test.cpp atf-c/h_build.h atf_c___build_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) atf_c___check_test_SOURCES = atf-c++/check_test.cpp atf_c___check_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -atf_c___config_test_SOURCES = atf-c++/config_test.cpp -atf_c___config_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) atf_c___macros_test_SOURCES = atf-c++/macros_test.cpp atf_c___macros_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) tests_atf_c___SCRIPTS = atf-c++/pkg_config_test @@ -1631,6 +1608,7 @@ tests_atf_c___detaildir = $(pkgtestsdir)/atf-c++/detail atf_c___detail_libtest_helpers_la_SOURCES = atf-c++/detail/test_helpers.cpp \ atf-c++/detail/test_helpers.hpp +atf_c___detail_libtest_helpers_la_CPPFLAGS = -DATF_INCLUDEDIR=\"$(includedir)\" atf_c___detail_application_test_SOURCES = atf-c++/detail/application_test.cpp atf_c___detail_application_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) atf_c___detail_auto_array_test_SOURCES = atf-c++/detail/auto_array_test.cpp @@ -1639,23 +1617,21 @@ atf_c___detail_env_test_SOURCES = atf-c++/detail/env_test.cpp atf_c___detail_env_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) atf_c___detail_exceptions_test_SOURCES = atf-c++/detail/exceptions_test.cpp atf_c___detail_exceptions_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -atf_c___detail_expand_test_SOURCES = atf-c++/detail/expand_test.cpp -atf_c___detail_expand_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) atf_c___detail_fs_test_SOURCES = atf-c++/detail/fs_test.cpp atf_c___detail_fs_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -atf_c___detail_parser_test_SOURCES = atf-c++/detail/parser_test.cpp -atf_c___detail_parser_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) atf_c___detail_process_test_SOURCES = atf-c++/detail/process_test.cpp atf_c___detail_process_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -atf_c___detail_sanity_test_SOURCES = atf-c++/detail/sanity_test.cpp -atf_c___detail_sanity_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) atf_c___detail_text_test_SOURCES = atf-c++/detail/text_test.cpp atf_c___detail_text_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -atf_c___detail_ui_test_SOURCES = atf-c++/detail/ui_test.cpp -atf_c___detail_ui_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) +atf_c___detail_version_helper_SOURCES = atf-c++/detail/version_helper.cpp atf_sh_atf_check_SOURCES = atf-sh/atf-check.cpp atf_sh_atf_check_LDADD = $(ATF_CXX_LIBS) +atf_sh_atf_check_CPPFLAGS = -DATF_SHELL=\"$(ATF_SHELL)\" atf_sh_atf_sh_SOURCES = atf-sh/atf-sh.cpp +atf_sh_atf_sh_CPPFLAGS = -DATF_LIBEXECDIR=\"$(libexecdir)\" \ + -DATF_PKGDATADIR=\"$(pkgdatadir)\" \ + -DATF_SHELL=\"$(ATF_SHELL)\" + atf_sh_atf_sh_LDADD = $(ATF_CXX_LIBS) atf_sh_DATA = atf-sh/libatf-sh.subr atf_shdir = $(pkgdatadir) @@ -1670,9 +1646,9 @@ tests_atf_sh_SCRIPTS = atf-sh/misc_helpers atf-sh/atf_check_test \ atf-sh/integration_test atf-sh/normalize_test atf-sh/tc_test \ atf-sh/tp_test bootstrap_h_app_empty_SOURCES = bootstrap/h_app_empty.cpp -bootstrap_h_app_empty_LDADD = $(ATF_CXX_LIBS) +bootstrap_h_app_empty_LDADD = tools/libtools.a $(ATF_CXX_LIBS) bootstrap_h_app_opts_args_SOURCES = bootstrap/h_app_opts_args.cpp -bootstrap_h_app_opts_args_LDADD = $(ATF_CXX_LIBS) +bootstrap_h_app_opts_args_LDADD = tools/libtools.a $(ATF_CXX_LIBS) bootstrap_h_tp_basic_c_SOURCES = bootstrap/h_tp_basic_c.c bootstrap_h_tp_basic_c_LDADD = libatf-c.la bootstrap_h_tp_basic_cpp_SOURCES = bootstrap/h_tp_basic_cpp.cpp @@ -1707,128 +1683,166 @@ tests_test_programs_SCRIPTS = test-programs/sh_helpers \ test-programs/config_test test-programs/expect_test \ test-programs/meta_data_test test-programs/result_test \ test-programs/srcdir_test -@ENABLE_TOOLS_TRUE@atf_report_atf_report_SOURCES = atf-report/atf-report.cpp \ -@ENABLE_TOOLS_TRUE@ atf-report/reader.cpp \ -@ENABLE_TOOLS_TRUE@ atf-report/reader.hpp +@ENABLE_TOOLS_TRUE@TOOLS_CPPFLAGS = -I$(top_srcdir)/tools -I$(top_builddir)/tools +@ENABLE_TOOLS_TRUE@TOOLS_LDADD = tools/libtools.a +@ENABLE_TOOLS_TRUE@noinst_LIBRARIES = tools/libtools.a +@ENABLE_TOOLS_TRUE@tools_libtools_a_SOURCES = tools/application.cpp \ +@ENABLE_TOOLS_TRUE@ tools/application.hpp \ +@ENABLE_TOOLS_TRUE@ tools/atffile.cpp \ +@ENABLE_TOOLS_TRUE@ tools/atffile.hpp \ +@ENABLE_TOOLS_TRUE@ tools/auto_array.hpp \ +@ENABLE_TOOLS_TRUE@ tools/config.cpp \ +@ENABLE_TOOLS_TRUE@ tools/config.hpp \ +@ENABLE_TOOLS_TRUE@ tools/config_file.cpp \ +@ENABLE_TOOLS_TRUE@ tools/config_file.hpp \ +@ENABLE_TOOLS_TRUE@ tools/env.cpp \ +@ENABLE_TOOLS_TRUE@ tools/env.hpp \ +@ENABLE_TOOLS_TRUE@ tools/exceptions.cpp \ +@ENABLE_TOOLS_TRUE@ tools/exceptions.hpp \ +@ENABLE_TOOLS_TRUE@ tools/expand.cpp \ +@ENABLE_TOOLS_TRUE@ tools/expand.hpp \ +@ENABLE_TOOLS_TRUE@ tools/fs.cpp \ +@ENABLE_TOOLS_TRUE@ tools/fs.hpp \ +@ENABLE_TOOLS_TRUE@ tools/io.cpp \ +@ENABLE_TOOLS_TRUE@ tools/io.hpp \ +@ENABLE_TOOLS_TRUE@ tools/parser.cpp \ +@ENABLE_TOOLS_TRUE@ tools/parser.hpp \ +@ENABLE_TOOLS_TRUE@ tools/process.cpp \ +@ENABLE_TOOLS_TRUE@ tools/process.hpp \ +@ENABLE_TOOLS_TRUE@ tools/reader.cpp \ +@ENABLE_TOOLS_TRUE@ tools/reader.hpp \ +@ENABLE_TOOLS_TRUE@ tools/requirements.cpp \ +@ENABLE_TOOLS_TRUE@ tools/requirements.hpp \ +@ENABLE_TOOLS_TRUE@ tools/signals.cpp \ +@ENABLE_TOOLS_TRUE@ tools/signals.hpp \ +@ENABLE_TOOLS_TRUE@ tools/test-program.cpp \ +@ENABLE_TOOLS_TRUE@ tools/test-program.hpp \ +@ENABLE_TOOLS_TRUE@ tools/test_helpers.hpp \ +@ENABLE_TOOLS_TRUE@ tools/text.cpp \ +@ENABLE_TOOLS_TRUE@ tools/text.hpp \ +@ENABLE_TOOLS_TRUE@ tools/timers.cpp \ +@ENABLE_TOOLS_TRUE@ tools/timers.hpp \ +@ENABLE_TOOLS_TRUE@ tools/ui.cpp \ +@ENABLE_TOOLS_TRUE@ tools/ui.hpp \ +@ENABLE_TOOLS_TRUE@ tools/user.cpp \ +@ENABLE_TOOLS_TRUE@ tools/user.hpp -@ENABLE_TOOLS_TRUE@atf_report_atf_report_LDADD = $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@nodist_tools_libtools_a_SOURCES = tools/defs.hpp +@ENABLE_TOOLS_TRUE@tools_libtools_a_CPPFLAGS = "-DATF_ARCH=\"$(atf_arch)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_BUILD_CC=\"$(ATF_BUILD_CC)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_BUILD_CFLAGS=\"$(ATF_BUILD_CFLAGS)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_BUILD_CPP=\"$(ATF_BUILD_CPP)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_BUILD_CPPFLAGS=\"$(ATF_BUILD_CPPFLAGS)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_BUILD_CXX=\"$(ATF_BUILD_CXX)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_BUILD_CXXFLAGS=\"$(ATF_BUILD_CXXFLAGS)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_CONFDIR=\"$(atf_confdir)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_INCLUDEDIR=\"$(includedir)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_LIBDIR=\"$(libdir)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_LIBEXECDIR=\"$(libexecdir)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_MACHINE=\"$(atf_machine)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_PKGDATADIR=\"$(pkgdatadir)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_SHELL=\"$(ATF_SHELL)\"" \ +@ENABLE_TOOLS_TRUE@ "-DATF_WORKDIR=\"$(ATF_WORKDIR)\"" \ +@ENABLE_TOOLS_TRUE@ $(TOOLS_CPPFLAGS) + +@ENABLE_TOOLS_TRUE@tools_atf_config_SOURCES = tools/atf-config.cpp +@ENABLE_TOOLS_TRUE@tools_atf_config_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_atf_config_LDADD = $(TOOLS_LDADD) +@ENABLE_TOOLS_TRUE@tools_atf_report_SOURCES = tools/atf-report.cpp +@ENABLE_TOOLS_TRUE@tools_atf_report_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_atf_report_LDADD = $(TOOLS_LDADD) +@ENABLE_TOOLS_TRUE@tools_atf_run_CPPFLAGS = $(TOOLS_CPPFLAGS) "-DGDB=\"$(GDB)\"" +@ENABLE_TOOLS_TRUE@tools_atf_run_SOURCES = tools/atf-run.cpp +@ENABLE_TOOLS_TRUE@tools_atf_run_LDADD = $(TOOLS_LDADD) +@ENABLE_TOOLS_TRUE@tools_atf_version_SOURCES = tools/atf-version.cpp +@ENABLE_TOOLS_TRUE@nodist_tools_atf_version_SOURCES = tools/revision.h +@ENABLE_TOOLS_TRUE@tools_atf_version_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_atf_version_LDADD = $(TOOLS_LDADD) @ENABLE_TOOLS_TRUE@cssdir = $(atf_cssdir) -@ENABLE_TOOLS_TRUE@css_DATA = atf-report/tests-results.css +@ENABLE_TOOLS_TRUE@css_DATA = tools/tests-results.css @ENABLE_TOOLS_TRUE@dtddir = $(atf_dtddir) -@ENABLE_TOOLS_TRUE@dtd_DATA = atf-report/tests-results.dtd -@ENABLE_TOOLS_TRUE@xsldir = $(atf_xsldir) -@ENABLE_TOOLS_TRUE@xsl_DATA = atf-report/tests-results.xsl -@ENABLE_TOOLS_TRUE@tests_atf_report_DATA = atf-report/Atffile \ -@ENABLE_TOOLS_TRUE@ atf-report/Kyuafile - -@ENABLE_TOOLS_TRUE@tests_atf_reportdir = $(pkgtestsdir)/atf-report -@ENABLE_TOOLS_TRUE@atf_report_fail_helper_SOURCES = atf-report/fail_helper.cpp -@ENABLE_TOOLS_TRUE@atf_report_fail_helper_LDADD = $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@atf_report_misc_helpers_SOURCES = atf-report/misc_helpers.cpp -@ENABLE_TOOLS_TRUE@atf_report_misc_helpers_LDADD = $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@atf_report_pass_helper_SOURCES = atf-report/pass_helper.cpp -@ENABLE_TOOLS_TRUE@atf_report_pass_helper_LDADD = $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@tests_atf_report_SCRIPTS = atf-report/integration_test -@ENABLE_TOOLS_TRUE@atf_report_reader_test_SOURCES = atf-report/reader_test.cpp \ -@ENABLE_TOOLS_TRUE@ atf-report/reader.cpp - -@ENABLE_TOOLS_TRUE@atf_report_reader_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail -@ENABLE_TOOLS_TRUE@atf_report_reader_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@atf_config_atf_config_SOURCES = atf-config/atf-config.cpp -@ENABLE_TOOLS_TRUE@atf_config_atf_config_LDADD = $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@tests_atf_config_DATA = atf-config/Atffile \ -@ENABLE_TOOLS_TRUE@ atf-config/Kyuafile - -@ENABLE_TOOLS_TRUE@tests_atf_configdir = $(pkgtestsdir)/atf-config -@ENABLE_TOOLS_TRUE@tests_atf_config_SCRIPTS = atf-config/integration_test -@ENABLE_TOOLS_TRUE@atf_run_atf_run_CPPFLAGS = "-DGDB=\"$(GDB)\"" -@ENABLE_TOOLS_TRUE@atf_run_atf_run_SOURCES = atf-run/atf-run.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/atffile.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/atffile.hpp \ -@ENABLE_TOOLS_TRUE@ atf-run/config.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/config.hpp \ -@ENABLE_TOOLS_TRUE@ atf-run/fs.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/fs.hpp \ -@ENABLE_TOOLS_TRUE@ atf-run/io.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/io.hpp \ -@ENABLE_TOOLS_TRUE@ atf-run/requirements.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/requirements.hpp \ -@ENABLE_TOOLS_TRUE@ atf-run/signals.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/signals.hpp \ -@ENABLE_TOOLS_TRUE@ atf-run/test-program.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/test-program.hpp \ -@ENABLE_TOOLS_TRUE@ atf-run/timer.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/timer.hpp \ -@ENABLE_TOOLS_TRUE@ atf-run/user.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/user.hpp - -@ENABLE_TOOLS_TRUE@atf_run_atf_run_LDADD = $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@tests_atf_run_DATA = atf-run/Atffile \ -@ENABLE_TOOLS_TRUE@ atf-run/Kyuafile - -@ENABLE_TOOLS_TRUE@tests_atf_rundir = $(pkgtestsdir)/atf-run -@ENABLE_TOOLS_TRUE@atf_run_atffile_test_SOURCES = atf-run/atffile_test.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/atffile.cpp - -@ENABLE_TOOLS_TRUE@atf_run_atffile_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail -@ENABLE_TOOLS_TRUE@atf_run_atffile_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@atf_run_bad_metadata_helper_SOURCES = atf-run/bad_metadata_helper.c -@ENABLE_TOOLS_TRUE@atf_run_bad_metadata_helper_LDADD = libatf-c.la -@ENABLE_TOOLS_TRUE@atf_run_config_test_SOURCES = atf-run/config_test.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/config.cpp - -@ENABLE_TOOLS_TRUE@atf_run_config_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail -@ENABLE_TOOLS_TRUE@atf_run_config_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@atf_run_expect_helpers_SOURCES = atf-run/expect_helpers.c -@ENABLE_TOOLS_TRUE@atf_run_expect_helpers_LDADD = libatf-c.la -@ENABLE_TOOLS_TRUE@atf_run_fs_test_SOURCES = atf-run/fs_test.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/fs.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/user.cpp - -@ENABLE_TOOLS_TRUE@atf_run_fs_test_LDADD = $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@atf_run_io_test_SOURCES = atf-run/io_test.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/io.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/signals.cpp - -@ENABLE_TOOLS_TRUE@atf_run_io_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@atf_run_misc_helpers_SOURCES = atf-run/misc_helpers.cpp -@ENABLE_TOOLS_TRUE@atf_run_misc_helpers_LDADD = $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@atf_run_pass_helper_SOURCES = atf-run/pass_helper.cpp -@ENABLE_TOOLS_TRUE@atf_run_pass_helper_LDADD = $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@atf_run_several_tcs_helper_SOURCES = atf-run/several_tcs_helper.c -@ENABLE_TOOLS_TRUE@atf_run_several_tcs_helper_LDADD = libatf-c.la -@ENABLE_TOOLS_TRUE@atf_run_requirements_test_SOURCES = atf-run/requirements_test.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/requirements.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/user.cpp - -@ENABLE_TOOLS_TRUE@atf_run_requirements_test_LDADD = $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@atf_run_signals_test_SOURCES = atf-run/signals_test.cpp atf-run/signals.cpp -@ENABLE_TOOLS_TRUE@atf_run_signals_test_LDADD = $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@atf_run_test_program_test_SOURCES = atf-run/test_program_test.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/fs.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/io.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/requirements.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/signals.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/test-program.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/timer.cpp \ -@ENABLE_TOOLS_TRUE@ atf-run/user.cpp - -@ENABLE_TOOLS_TRUE@atf_run_test_program_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail -@ENABLE_TOOLS_TRUE@atf_run_test_program_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@atf_run_user_test_SOURCES = atf-run/user_test.cpp atf-run/user.cpp -@ENABLE_TOOLS_TRUE@atf_run_user_test_LDADD = $(ATF_CXX_LIBS) -@ENABLE_TOOLS_TRUE@atf_run_zero_tcs_helper_SOURCES = atf-run/zero_tcs_helper.c -@ENABLE_TOOLS_TRUE@atf_run_zero_tcs_helper_LDADD = libatf-c.la -@ENABLE_TOOLS_TRUE@tests_atf_run_SCRIPTS = atf-run/integration_test -@ENABLE_TOOLS_TRUE@hooksdir = $(pkgdatadir) -@ENABLE_TOOLS_TRUE@hooks_DATA = atf-run/share/atf-run.hooks +@ENABLE_TOOLS_TRUE@dtd_DATA = tools/tests-results.dtd @ENABLE_TOOLS_TRUE@egdir = $(atf_egdir) -@ENABLE_TOOLS_TRUE@eg_DATA = atf-run/sample/atf-run.hooks \ -@ENABLE_TOOLS_TRUE@ atf-run/sample/common.conf -@ENABLE_TOOLS_TRUE@atf_version_atf_version_SOURCES = atf-version/atf-version.cpp -@ENABLE_TOOLS_TRUE@nodist_atf_version_atf_version_SOURCES = atf-version/revision.h -@ENABLE_TOOLS_TRUE@atf_version_atf_version_CPPFLAGS = -Iatf-version -@ENABLE_TOOLS_TRUE@atf_version_atf_version_LDADD = $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@eg_DATA = tools/sample/atf-run.hooks \ +@ENABLE_TOOLS_TRUE@ tools/sample/common.conf +@ENABLE_TOOLS_TRUE@hooksdir = $(pkgdatadir) +@ENABLE_TOOLS_TRUE@hooks_DATA = tools/share/atf-run.hooks +@ENABLE_TOOLS_TRUE@xsldir = $(atf_xsldir) +@ENABLE_TOOLS_TRUE@xsl_DATA = tools/tests-results.xsl +@ENABLE_TOOLS_TRUE@tests_tools_DATA = tools/Atffile tools/Kyuafile +@ENABLE_TOOLS_TRUE@tests_toolsdir = $(pkgtestsdir)/tools +@ENABLE_TOOLS_TRUE@tests_tools_SCRIPTS = tools/atf-config_test \ +@ENABLE_TOOLS_TRUE@ tools/atf-report_test tools/atf-run_test +@ENABLE_TOOLS_TRUE@tools_application_test_SOURCES = tools/application_test.cpp +@ENABLE_TOOLS_TRUE@tools_application_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_application_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_atffile_test_SOURCES = tools/atffile_test.cpp +@ENABLE_TOOLS_TRUE@tools_atffile_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_atffile_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_auto_array_test_SOURCES = tools/auto_array_test.cpp +@ENABLE_TOOLS_TRUE@tools_auto_array_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_auto_array_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_bad_metadata_helper_SOURCES = tools/bad_metadata_helper.c +@ENABLE_TOOLS_TRUE@tools_bad_metadata_helper_LDADD = libatf-c.la +@ENABLE_TOOLS_TRUE@tools_config_test_SOURCES = tools/config_test.cpp +@ENABLE_TOOLS_TRUE@tools_config_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_config_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_config_file_test_SOURCES = tools/config_file_test.cpp +@ENABLE_TOOLS_TRUE@tools_config_file_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_config_file_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_env_test_SOURCES = tools/env_test.cpp +@ENABLE_TOOLS_TRUE@tools_env_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_env_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_expand_test_SOURCES = tools/expand_test.cpp +@ENABLE_TOOLS_TRUE@tools_expand_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_expand_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_expect_helpers_SOURCES = tools/expect_helpers.c +@ENABLE_TOOLS_TRUE@tools_expect_helpers_LDADD = libatf-c.la +@ENABLE_TOOLS_TRUE@tools_fail_helper_SOURCES = tools/fail_helper.cpp +@ENABLE_TOOLS_TRUE@tools_fail_helper_LDADD = $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_fs_test_SOURCES = tools/fs_test.cpp +@ENABLE_TOOLS_TRUE@tools_fs_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_fs_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_io_test_SOURCES = tools/io_test.cpp +@ENABLE_TOOLS_TRUE@tools_io_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_io_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_misc_helpers_SOURCES = tools/misc_helpers.cpp +@ENABLE_TOOLS_TRUE@tools_misc_helpers_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_misc_helpers_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_parser_test_SOURCES = tools/parser_test.cpp +@ENABLE_TOOLS_TRUE@tools_parser_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_parser_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_process_test_SOURCES = tools/process_test.cpp +@ENABLE_TOOLS_TRUE@tools_process_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_process_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_pass_helper_SOURCES = tools/pass_helper.cpp +@ENABLE_TOOLS_TRUE@tools_pass_helper_LDADD = $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_process_helpers_SOURCES = tools/process_helpers.c +@ENABLE_TOOLS_TRUE@tools_reader_test_SOURCES = tools/reader_test.cpp +@ENABLE_TOOLS_TRUE@tools_reader_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_reader_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_requirements_test_SOURCES = tools/requirements_test.cpp +@ENABLE_TOOLS_TRUE@tools_requirements_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_requirements_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_several_tcs_helper_SOURCES = tools/several_tcs_helper.c +@ENABLE_TOOLS_TRUE@tools_several_tcs_helper_LDADD = libatf-c.la +@ENABLE_TOOLS_TRUE@tools_signals_test_SOURCES = tools/signals_test.cpp tools/signals.cpp +@ENABLE_TOOLS_TRUE@tools_signals_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_signals_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_test_program_test_SOURCES = tools/test_program_test.cpp +@ENABLE_TOOLS_TRUE@tools_test_program_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_test_program_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_text_test_SOURCES = tools/text_test.cpp tools/text.cpp +@ENABLE_TOOLS_TRUE@tools_text_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_text_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_ui_test_SOURCES = tools/ui_test.cpp tools/ui.cpp +@ENABLE_TOOLS_TRUE@tools_ui_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_ui_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_user_test_SOURCES = tools/user_test.cpp tools/user.cpp +@ENABLE_TOOLS_TRUE@tools_user_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +@ENABLE_TOOLS_TRUE@tools_user_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) +@ENABLE_TOOLS_TRUE@tools_zero_tcs_helper_SOURCES = tools/zero_tcs_helper.c +@ENABLE_TOOLS_TRUE@tools_zero_tcs_helper_LDADD = libatf-c.la # # Top-level distfile documents. @@ -1841,23 +1855,31 @@ doc_DATA = AUTHORS COPYING NEWS README TESTS_ENVIRONMENT = PATH=$(prefix)/bin:$${PATH} \ PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig + +# Allow the caller to override the configuration file to passed to our +# test runs below. +KYUA_TEST_CONFIG_FILE = none testsdir = $(exec_prefix)/tests pkgtestsdir = $(testsdir)/$(PACKAGE) -pkgtests_DATA = Kyuafile $(am__append_12) +pkgtests_DATA = Kyuafile $(am__append_10) BUILD_SH_TP = \ - echo "Creating $${dst}"; \ - echo "\#! $(bindir)/atf-sh" >$${dst}; \ - cat $${src} >>$${dst}; \ - chmod +x $${dst} + test -d "$$(dirname "$${dst}")" || mkdir -p "$$(dirname "$${dst}")"; \ + echo "\#! $(bindir)/atf-sh" >"$${dst}"; \ + if [ -n "$${substs}" ]; then \ + cat $${src} | sed $${substs} >>"$${dst}"; \ + else \ + cat $${src} >>"$${dst}"; \ + fi; \ + chmod +x "$${dst}" -all: $(BUILT_SOURCES) bconfig.h +all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj am--refresh: Makefile @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/admin/Makefile.am.inc $(srcdir)/atf-c/Makefile.am.inc $(srcdir)/atf-c/detail/Makefile.am.inc $(srcdir)/atf-c++/Makefile.am.inc $(srcdir)/atf-c++/detail/Makefile.am.inc $(srcdir)/atf-sh/Makefile.am.inc $(srcdir)/bootstrap/Makefile.am.inc $(srcdir)/doc/Makefile.am.inc $(srcdir)/test-programs/Makefile.am.inc $(srcdir)/atf-report/Makefile.am.inc $(srcdir)/atf-config/Makefile.am.inc $(srcdir)/atf-run/Makefile.am.inc $(srcdir)/atf-version/Makefile.am.inc $(am__configure_deps) +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/admin/Makefile.am.inc $(srcdir)/atf-c/Makefile.am.inc $(srcdir)/atf-c/detail/Makefile.am.inc $(srcdir)/atf-c++/Makefile.am.inc $(srcdir)/atf-c++/detail/Makefile.am.inc $(srcdir)/atf-sh/Makefile.am.inc $(srcdir)/bootstrap/Makefile.am.inc $(srcdir)/doc/Makefile.am.inc $(srcdir)/test-programs/Makefile.am.inc $(srcdir)/tools/Makefile.am.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -1870,7 +1892,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/admin/Makefile.am.inc $( echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1880,7 +1901,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; -$(srcdir)/admin/Makefile.am.inc $(srcdir)/atf-c/Makefile.am.inc $(srcdir)/atf-c/detail/Makefile.am.inc $(srcdir)/atf-c++/Makefile.am.inc $(srcdir)/atf-c++/detail/Makefile.am.inc $(srcdir)/atf-sh/Makefile.am.inc $(srcdir)/bootstrap/Makefile.am.inc $(srcdir)/doc/Makefile.am.inc $(srcdir)/test-programs/Makefile.am.inc $(srcdir)/atf-report/Makefile.am.inc $(srcdir)/atf-config/Makefile.am.inc $(srcdir)/atf-run/Makefile.am.inc $(srcdir)/atf-version/Makefile.am.inc: +$(srcdir)/admin/Makefile.am.inc $(srcdir)/atf-c/Makefile.am.inc $(srcdir)/atf-c/detail/Makefile.am.inc $(srcdir)/atf-c++/Makefile.am.inc $(srcdir)/atf-c++/detail/Makefile.am.inc $(srcdir)/atf-sh/Makefile.am.inc $(srcdir)/bootstrap/Makefile.am.inc $(srcdir)/doc/Makefile.am.inc $(srcdir)/test-programs/Makefile.am.inc $(srcdir)/tools/Makefile.am.inc $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck @@ -1891,22 +1912,77 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): -bconfig.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 -stamp-h1: $(srcdir)/bconfig.h.in $(top_builddir)/config.status +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status bconfig.h -$(srcdir)/bconfig.h.in: $(am__configure_deps) + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: - -rm -f bconfig.h stamp-h1 + -rm -f config.h stamp-h1 atf-c/defs.h: $(top_builddir)/config.status $(top_srcdir)/atf-c/defs.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ +tools/defs.hpp: $(top_builddir)/config.status $(top_srcdir)/tools/defs.hpp.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +tools/$(am__dirstamp): + @$(MKDIR_P) tools + @: > tools/$(am__dirstamp) +tools/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tools/$(DEPDIR) + @: > tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-application.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-atffile.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-config.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-config_file.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-env.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-exceptions.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-expand.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-fs.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-io.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-parser.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-process.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-reader.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-requirements.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-signals.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-test-program.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-text.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-timers.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-ui.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_libtools_a-user.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/libtools.a: $(tools_libtools_a_OBJECTS) $(tools_libtools_a_DEPENDENCIES) $(EXTRA_tools_libtools_a_DEPENDENCIES) tools/$(am__dirstamp) + $(AM_V_at)-rm -f tools/libtools.a + $(AM_V_AR)$(tools_libtools_a_AR) tools/libtools.a $(tools_libtools_a_OBJECTS) $(tools_libtools_a_LIBADD) + $(AM_V_at)$(RANLIB) tools/libtools.a + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -1958,10 +2034,12 @@ atf-c++/detail/$(am__dirstamp): atf-c++/detail/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) atf-c++/detail/$(DEPDIR) @: > atf-c++/detail/$(DEPDIR)/$(am__dirstamp) -atf-c++/detail/test_helpers.lo: atf-c++/detail/$(am__dirstamp) \ +atf-c++/detail/atf_c___detail_libtest_helpers_la-test_helpers.lo: \ + atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) + atf-c++/detail/libtest_helpers.la: $(atf_c___detail_libtest_helpers_la_OBJECTS) $(atf_c___detail_libtest_helpers_la_DEPENDENCIES) $(EXTRA_atf_c___detail_libtest_helpers_la_DEPENDENCIES) atf-c++/detail/$(am__dirstamp) - $(CXXLINK) $(atf_c___detail_libtest_helpers_la_OBJECTS) $(atf_c___detail_libtest_helpers_la_LIBADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___detail_libtest_helpers_la_OBJECTS) $(atf_c___detail_libtest_helpers_la_LIBADD) $(LIBS) atf-c/detail/$(am__dirstamp): @$(MKDIR_P) atf-c/detail @: > atf-c/detail/$(am__dirstamp) @@ -1971,8 +2049,9 @@ atf-c/detail/$(DEPDIR)/$(am__dirstamp): atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo: \ atf-c/detail/$(am__dirstamp) \ atf-c/detail/$(DEPDIR)/$(am__dirstamp) + atf-c/detail/libtest_helpers.la: $(atf_c_detail_libtest_helpers_la_OBJECTS) $(atf_c_detail_libtest_helpers_la_DEPENDENCIES) $(EXTRA_atf_c_detail_libtest_helpers_la_DEPENDENCIES) atf-c/detail/$(am__dirstamp) - $(LINK) $(atf_c_detail_libtest_helpers_la_OBJECTS) $(atf_c_detail_libtest_helpers_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_detail_libtest_helpers_la_OBJECTS) $(atf_c_detail_libtest_helpers_la_LIBADD) $(LIBS) atf-c++/$(am__dirstamp): @$(MKDIR_P) atf-c++ @: > atf-c++/$(am__dirstamp) @@ -1983,8 +2062,6 @@ atf-c++/build.lo: atf-c++/$(am__dirstamp) \ atf-c++/$(DEPDIR)/$(am__dirstamp) atf-c++/check.lo: atf-c++/$(am__dirstamp) \ atf-c++/$(DEPDIR)/$(am__dirstamp) -atf-c++/config.lo: atf-c++/$(am__dirstamp) \ - atf-c++/$(DEPDIR)/$(am__dirstamp) atf-c++/tests.lo: atf-c++/$(am__dirstamp) \ atf-c++/$(DEPDIR)/$(am__dirstamp) atf-c++/utils.lo: atf-c++/$(am__dirstamp) \ @@ -1995,20 +2072,15 @@ atf-c++/detail/env.lo: atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) atf-c++/detail/exceptions.lo: atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) -atf-c++/detail/expand.lo: atf-c++/detail/$(am__dirstamp) \ - atf-c++/detail/$(DEPDIR)/$(am__dirstamp) atf-c++/detail/fs.lo: atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) -atf-c++/detail/parser.lo: atf-c++/detail/$(am__dirstamp) \ - atf-c++/detail/$(DEPDIR)/$(am__dirstamp) atf-c++/detail/process.lo: atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) atf-c++/detail/text.lo: atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) -atf-c++/detail/ui.lo: atf-c++/detail/$(am__dirstamp) \ - atf-c++/detail/$(DEPDIR)/$(am__dirstamp) + libatf-c++.la: $(libatf_c___la_OBJECTS) $(libatf_c___la_DEPENDENCIES) $(EXTRA_libatf_c___la_DEPENDENCIES) - $(libatf_c___la_LINK) -rpath $(libdir) $(libatf_c___la_OBJECTS) $(libatf_c___la_LIBADD) $(LIBS) + $(AM_V_CXXLD)$(libatf_c___la_LINK) -rpath $(libdir) $(libatf_c___la_OBJECTS) $(libatf_c___la_LIBADD) $(LIBS) atf-c/$(am__dirstamp): @$(MKDIR_P) atf-c @: > atf-c/$(am__dirstamp) @@ -2019,8 +2091,6 @@ atf-c/libatf_c_la-build.lo: atf-c/$(am__dirstamp) \ atf-c/$(DEPDIR)/$(am__dirstamp) atf-c/libatf_c_la-check.lo: atf-c/$(am__dirstamp) \ atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/libatf_c_la-config.lo: atf-c/$(am__dirstamp) \ - atf-c/$(DEPDIR)/$(am__dirstamp) atf-c/libatf_c_la-error.lo: atf-c/$(am__dirstamp) \ atf-c/$(DEPDIR)/$(am__dirstamp) atf-c/libatf_c_la-tc.lo: atf-c/$(am__dirstamp) \ @@ -2049,8 +2119,9 @@ atf-c/detail/libatf_c_la-tp_main.lo: atf-c/detail/$(am__dirstamp) \ atf-c/detail/$(DEPDIR)/$(am__dirstamp) atf-c/detail/libatf_c_la-user.lo: atf-c/detail/$(am__dirstamp) \ atf-c/detail/$(DEPDIR)/$(am__dirstamp) + libatf-c.la: $(libatf_c_la_OBJECTS) $(libatf_c_la_DEPENDENCIES) $(EXTRA_libatf_c_la_DEPENDENCIES) - $(libatf_c_la_LINK) -rpath $(libdir) $(libatf_c_la_OBJECTS) $(libatf_c_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(libatf_c_la_LINK) -rpath $(libdir) $(libatf_c_la_OBJECTS) $(libatf_c_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ @@ -2060,10 +2131,12 @@ install-binPROGRAMS: $(bin_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -2084,7 +2157,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -2115,10 +2189,12 @@ install-libexecPROGRAMS: $(libexec_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -2139,7 +2215,8 @@ uninstall-libexecPROGRAMS: @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files @@ -2161,10 +2238,12 @@ install-tests_atf_cPROGRAMS: $(tests_atf_c_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -2185,7 +2264,8 @@ uninstall-tests_atf_cPROGRAMS: @list='$(tests_atf_c_PROGRAMS)'; test -n "$(tests_atf_cdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(tests_atf_cdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(tests_atf_cdir)" && rm -f $$files @@ -2207,10 +2287,12 @@ install-tests_atf_c__PROGRAMS: $(tests_atf_c___PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -2231,7 +2313,8 @@ uninstall-tests_atf_c__PROGRAMS: @list='$(tests_atf_c___PROGRAMS)'; test -n "$(tests_atf_c__dir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(tests_atf_c__dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(tests_atf_c__dir)" && rm -f $$files @@ -2253,10 +2336,12 @@ install-tests_atf_c___detailPROGRAMS: $(tests_atf_c___detail_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -2277,7 +2362,8 @@ uninstall-tests_atf_c___detailPROGRAMS: @list='$(tests_atf_c___detail_PROGRAMS)'; test -n "$(tests_atf_c___detaildir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(tests_atf_c___detaildir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(tests_atf_c___detaildir)" && rm -f $$files @@ -2299,10 +2385,12 @@ install-tests_atf_c_detailPROGRAMS: $(tests_atf_c_detail_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -2323,7 +2411,8 @@ uninstall-tests_atf_c_detailPROGRAMS: @list='$(tests_atf_c_detail_PROGRAMS)'; test -n "$(tests_atf_c_detaildir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(tests_atf_c_detaildir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(tests_atf_c_detaildir)" && rm -f $$files @@ -2336,98 +2425,6 @@ clean-tests_atf_c_detailPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -install-tests_atf_reportPROGRAMS: $(tests_atf_report_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(tests_atf_report_PROGRAMS)'; test -n "$(tests_atf_reportdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_reportdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(tests_atf_reportdir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(tests_atf_reportdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(tests_atf_reportdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-tests_atf_reportPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(tests_atf_report_PROGRAMS)'; test -n "$(tests_atf_reportdir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(tests_atf_reportdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(tests_atf_reportdir)" && rm -f $$files - -clean-tests_atf_reportPROGRAMS: - @list='$(tests_atf_report_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -install-tests_atf_runPROGRAMS: $(tests_atf_run_PROGRAMS) - @$(NORMAL_INSTALL) - @list='$(tests_atf_run_PROGRAMS)'; test -n "$(tests_atf_rundir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_rundir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(tests_atf_rundir)" || exit 1; \ - fi; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(tests_atf_rundir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(tests_atf_rundir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-tests_atf_runPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(tests_atf_run_PROGRAMS)'; test -n "$(tests_atf_rundir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(tests_atf_rundir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(tests_atf_rundir)" && rm -f $$files - -clean-tests_atf_runPROGRAMS: - @list='$(tests_atf_run_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list install-tests_test_programsPROGRAMS: $(tests_test_programs_PROGRAMS) @$(NORMAL_INSTALL) @list='$(tests_test_programs_PROGRAMS)'; test -n "$(tests_test_programsdir)" || list=; \ @@ -2437,10 +2434,12 @@ install-tests_test_programsPROGRAMS: $(tests_test_programs_PROGRAMS) fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -2461,7 +2460,8 @@ uninstall-tests_test_programsPROGRAMS: @list='$(tests_test_programs_PROGRAMS)'; test -n "$(tests_test_programsdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(tests_test_programsdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(tests_test_programsdir)" && rm -f $$files @@ -2474,397 +2474,275 @@ clean-tests_test_programsPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list +install-tests_toolsPROGRAMS: $(tests_tools_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(tests_tools_PROGRAMS)'; test -n "$(tests_toolsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(tests_toolsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(tests_toolsdir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(tests_toolsdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(tests_toolsdir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-tests_toolsPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(tests_tools_PROGRAMS)'; test -n "$(tests_toolsdir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(tests_toolsdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(tests_toolsdir)" && rm -f $$files + +clean-tests_toolsPROGRAMS: + @list='$(tests_tools_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list atf-c++/atf_c++_test.$(OBJEXT): atf-c++/$(am__dirstamp) \ atf-c++/$(DEPDIR)/$(am__dirstamp) + atf-c++/atf_c++_test$(EXEEXT): $(atf_c___atf_c___test_OBJECTS) $(atf_c___atf_c___test_DEPENDENCIES) $(EXTRA_atf_c___atf_c___test_DEPENDENCIES) atf-c++/$(am__dirstamp) @rm -f atf-c++/atf_c++_test$(EXEEXT) - $(CXXLINK) $(atf_c___atf_c___test_OBJECTS) $(atf_c___atf_c___test_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___atf_c___test_OBJECTS) $(atf_c___atf_c___test_LDADD) $(LIBS) atf-c++/build_test.$(OBJEXT): atf-c++/$(am__dirstamp) \ atf-c++/$(DEPDIR)/$(am__dirstamp) + atf-c++/build_test$(EXEEXT): $(atf_c___build_test_OBJECTS) $(atf_c___build_test_DEPENDENCIES) $(EXTRA_atf_c___build_test_DEPENDENCIES) atf-c++/$(am__dirstamp) @rm -f atf-c++/build_test$(EXEEXT) - $(CXXLINK) $(atf_c___build_test_OBJECTS) $(atf_c___build_test_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___build_test_OBJECTS) $(atf_c___build_test_LDADD) $(LIBS) atf-c++/check_test.$(OBJEXT): atf-c++/$(am__dirstamp) \ atf-c++/$(DEPDIR)/$(am__dirstamp) + atf-c++/check_test$(EXEEXT): $(atf_c___check_test_OBJECTS) $(atf_c___check_test_DEPENDENCIES) $(EXTRA_atf_c___check_test_DEPENDENCIES) atf-c++/$(am__dirstamp) @rm -f atf-c++/check_test$(EXEEXT) - $(CXXLINK) $(atf_c___check_test_OBJECTS) $(atf_c___check_test_LDADD) $(LIBS) -atf-c++/config_test.$(OBJEXT): atf-c++/$(am__dirstamp) \ - atf-c++/$(DEPDIR)/$(am__dirstamp) -atf-c++/config_test$(EXEEXT): $(atf_c___config_test_OBJECTS) $(atf_c___config_test_DEPENDENCIES) $(EXTRA_atf_c___config_test_DEPENDENCIES) atf-c++/$(am__dirstamp) - @rm -f atf-c++/config_test$(EXEEXT) - $(CXXLINK) $(atf_c___config_test_OBJECTS) $(atf_c___config_test_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___check_test_OBJECTS) $(atf_c___check_test_LDADD) $(LIBS) atf-c++/detail/application_test.$(OBJEXT): \ atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) + atf-c++/detail/application_test$(EXEEXT): $(atf_c___detail_application_test_OBJECTS) $(atf_c___detail_application_test_DEPENDENCIES) $(EXTRA_atf_c___detail_application_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp) @rm -f atf-c++/detail/application_test$(EXEEXT) - $(CXXLINK) $(atf_c___detail_application_test_OBJECTS) $(atf_c___detail_application_test_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___detail_application_test_OBJECTS) $(atf_c___detail_application_test_LDADD) $(LIBS) atf-c++/detail/auto_array_test.$(OBJEXT): \ atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) + atf-c++/detail/auto_array_test$(EXEEXT): $(atf_c___detail_auto_array_test_OBJECTS) $(atf_c___detail_auto_array_test_DEPENDENCIES) $(EXTRA_atf_c___detail_auto_array_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp) @rm -f atf-c++/detail/auto_array_test$(EXEEXT) - $(CXXLINK) $(atf_c___detail_auto_array_test_OBJECTS) $(atf_c___detail_auto_array_test_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___detail_auto_array_test_OBJECTS) $(atf_c___detail_auto_array_test_LDADD) $(LIBS) atf-c++/detail/env_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) + atf-c++/detail/env_test$(EXEEXT): $(atf_c___detail_env_test_OBJECTS) $(atf_c___detail_env_test_DEPENDENCIES) $(EXTRA_atf_c___detail_env_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp) @rm -f atf-c++/detail/env_test$(EXEEXT) - $(CXXLINK) $(atf_c___detail_env_test_OBJECTS) $(atf_c___detail_env_test_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___detail_env_test_OBJECTS) $(atf_c___detail_env_test_LDADD) $(LIBS) atf-c++/detail/exceptions_test.$(OBJEXT): \ atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) + atf-c++/detail/exceptions_test$(EXEEXT): $(atf_c___detail_exceptions_test_OBJECTS) $(atf_c___detail_exceptions_test_DEPENDENCIES) $(EXTRA_atf_c___detail_exceptions_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp) @rm -f atf-c++/detail/exceptions_test$(EXEEXT) - $(CXXLINK) $(atf_c___detail_exceptions_test_OBJECTS) $(atf_c___detail_exceptions_test_LDADD) $(LIBS) -atf-c++/detail/expand_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \ - atf-c++/detail/$(DEPDIR)/$(am__dirstamp) -atf-c++/detail/expand_test$(EXEEXT): $(atf_c___detail_expand_test_OBJECTS) $(atf_c___detail_expand_test_DEPENDENCIES) $(EXTRA_atf_c___detail_expand_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp) - @rm -f atf-c++/detail/expand_test$(EXEEXT) - $(CXXLINK) $(atf_c___detail_expand_test_OBJECTS) $(atf_c___detail_expand_test_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___detail_exceptions_test_OBJECTS) $(atf_c___detail_exceptions_test_LDADD) $(LIBS) atf-c++/detail/fs_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) + atf-c++/detail/fs_test$(EXEEXT): $(atf_c___detail_fs_test_OBJECTS) $(atf_c___detail_fs_test_DEPENDENCIES) $(EXTRA_atf_c___detail_fs_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp) @rm -f atf-c++/detail/fs_test$(EXEEXT) - $(CXXLINK) $(atf_c___detail_fs_test_OBJECTS) $(atf_c___detail_fs_test_LDADD) $(LIBS) -atf-c++/detail/parser_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \ - atf-c++/detail/$(DEPDIR)/$(am__dirstamp) -atf-c++/detail/parser_test$(EXEEXT): $(atf_c___detail_parser_test_OBJECTS) $(atf_c___detail_parser_test_DEPENDENCIES) $(EXTRA_atf_c___detail_parser_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp) - @rm -f atf-c++/detail/parser_test$(EXEEXT) - $(CXXLINK) $(atf_c___detail_parser_test_OBJECTS) $(atf_c___detail_parser_test_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___detail_fs_test_OBJECTS) $(atf_c___detail_fs_test_LDADD) $(LIBS) atf-c++/detail/process_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) + atf-c++/detail/process_test$(EXEEXT): $(atf_c___detail_process_test_OBJECTS) $(atf_c___detail_process_test_DEPENDENCIES) $(EXTRA_atf_c___detail_process_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp) @rm -f atf-c++/detail/process_test$(EXEEXT) - $(CXXLINK) $(atf_c___detail_process_test_OBJECTS) $(atf_c___detail_process_test_LDADD) $(LIBS) -atf-c++/detail/sanity_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \ - atf-c++/detail/$(DEPDIR)/$(am__dirstamp) -atf-c++/detail/sanity_test$(EXEEXT): $(atf_c___detail_sanity_test_OBJECTS) $(atf_c___detail_sanity_test_DEPENDENCIES) $(EXTRA_atf_c___detail_sanity_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp) - @rm -f atf-c++/detail/sanity_test$(EXEEXT) - $(CXXLINK) $(atf_c___detail_sanity_test_OBJECTS) $(atf_c___detail_sanity_test_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___detail_process_test_OBJECTS) $(atf_c___detail_process_test_LDADD) $(LIBS) atf-c++/detail/text_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) + atf-c++/detail/text_test$(EXEEXT): $(atf_c___detail_text_test_OBJECTS) $(atf_c___detail_text_test_DEPENDENCIES) $(EXTRA_atf_c___detail_text_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp) @rm -f atf-c++/detail/text_test$(EXEEXT) - $(CXXLINK) $(atf_c___detail_text_test_OBJECTS) $(atf_c___detail_text_test_LDADD) $(LIBS) -atf-c++/detail/ui_test.$(OBJEXT): atf-c++/detail/$(am__dirstamp) \ + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___detail_text_test_OBJECTS) $(atf_c___detail_text_test_LDADD) $(LIBS) +atf-c++/detail/version_helper.$(OBJEXT): \ + atf-c++/detail/$(am__dirstamp) \ atf-c++/detail/$(DEPDIR)/$(am__dirstamp) -atf-c++/detail/ui_test$(EXEEXT): $(atf_c___detail_ui_test_OBJECTS) $(atf_c___detail_ui_test_DEPENDENCIES) $(EXTRA_atf_c___detail_ui_test_DEPENDENCIES) atf-c++/detail/$(am__dirstamp) - @rm -f atf-c++/detail/ui_test$(EXEEXT) - $(CXXLINK) $(atf_c___detail_ui_test_OBJECTS) $(atf_c___detail_ui_test_LDADD) $(LIBS) + +atf-c++/detail/version_helper$(EXEEXT): $(atf_c___detail_version_helper_OBJECTS) $(atf_c___detail_version_helper_DEPENDENCIES) $(EXTRA_atf_c___detail_version_helper_DEPENDENCIES) atf-c++/detail/$(am__dirstamp) + @rm -f atf-c++/detail/version_helper$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___detail_version_helper_OBJECTS) $(atf_c___detail_version_helper_LDADD) $(LIBS) atf-c++/macros_test.$(OBJEXT): atf-c++/$(am__dirstamp) \ atf-c++/$(DEPDIR)/$(am__dirstamp) + atf-c++/macros_test$(EXEEXT): $(atf_c___macros_test_OBJECTS) $(atf_c___macros_test_DEPENDENCIES) $(EXTRA_atf_c___macros_test_DEPENDENCIES) atf-c++/$(am__dirstamp) @rm -f atf-c++/macros_test$(EXEEXT) - $(CXXLINK) $(atf_c___macros_test_OBJECTS) $(atf_c___macros_test_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___macros_test_OBJECTS) $(atf_c___macros_test_LDADD) $(LIBS) atf-c++/tests_test.$(OBJEXT): atf-c++/$(am__dirstamp) \ atf-c++/$(DEPDIR)/$(am__dirstamp) + atf-c++/tests_test$(EXEEXT): $(atf_c___tests_test_OBJECTS) $(atf_c___tests_test_DEPENDENCIES) $(EXTRA_atf_c___tests_test_DEPENDENCIES) atf-c++/$(am__dirstamp) @rm -f atf-c++/tests_test$(EXEEXT) - $(CXXLINK) $(atf_c___tests_test_OBJECTS) $(atf_c___tests_test_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___tests_test_OBJECTS) $(atf_c___tests_test_LDADD) $(LIBS) atf-c++/utils_test.$(OBJEXT): atf-c++/$(am__dirstamp) \ atf-c++/$(DEPDIR)/$(am__dirstamp) + atf-c++/utils_test$(EXEEXT): $(atf_c___utils_test_OBJECTS) $(atf_c___utils_test_DEPENDENCIES) $(EXTRA_atf_c___utils_test_DEPENDENCIES) atf-c++/$(am__dirstamp) @rm -f atf-c++/utils_test$(EXEEXT) - $(CXXLINK) $(atf_c___utils_test_OBJECTS) $(atf_c___utils_test_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_c___utils_test_OBJECTS) $(atf_c___utils_test_LDADD) $(LIBS) atf-c/atf_c_test.$(OBJEXT): atf-c/$(am__dirstamp) \ atf-c/$(DEPDIR)/$(am__dirstamp) + atf-c/atf_c_test$(EXEEXT): $(atf_c_atf_c_test_OBJECTS) $(atf_c_atf_c_test_DEPENDENCIES) $(EXTRA_atf_c_atf_c_test_DEPENDENCIES) atf-c/$(am__dirstamp) @rm -f atf-c/atf_c_test$(EXEEXT) - $(LINK) $(atf_c_atf_c_test_OBJECTS) $(atf_c_atf_c_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_atf_c_test_OBJECTS) $(atf_c_atf_c_test_LDADD) $(LIBS) atf-c/build_test.$(OBJEXT): atf-c/$(am__dirstamp) \ atf-c/$(DEPDIR)/$(am__dirstamp) + atf-c/build_test$(EXEEXT): $(atf_c_build_test_OBJECTS) $(atf_c_build_test_DEPENDENCIES) $(EXTRA_atf_c_build_test_DEPENDENCIES) atf-c/$(am__dirstamp) @rm -f atf-c/build_test$(EXEEXT) - $(LINK) $(atf_c_build_test_OBJECTS) $(atf_c_build_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_build_test_OBJECTS) $(atf_c_build_test_LDADD) $(LIBS) atf-c/check_test.$(OBJEXT): atf-c/$(am__dirstamp) \ atf-c/$(DEPDIR)/$(am__dirstamp) + atf-c/check_test$(EXEEXT): $(atf_c_check_test_OBJECTS) $(atf_c_check_test_DEPENDENCIES) $(EXTRA_atf_c_check_test_DEPENDENCIES) atf-c/$(am__dirstamp) @rm -f atf-c/check_test$(EXEEXT) - $(LINK) $(atf_c_check_test_OBJECTS) $(atf_c_check_test_LDADD) $(LIBS) -atf-c/config_test.$(OBJEXT): atf-c/$(am__dirstamp) \ - atf-c/$(DEPDIR)/$(am__dirstamp) -atf-c/config_test$(EXEEXT): $(atf_c_config_test_OBJECTS) $(atf_c_config_test_DEPENDENCIES) $(EXTRA_atf_c_config_test_DEPENDENCIES) atf-c/$(am__dirstamp) - @rm -f atf-c/config_test$(EXEEXT) - $(LINK) $(atf_c_config_test_OBJECTS) $(atf_c_config_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_check_test_OBJECTS) $(atf_c_check_test_LDADD) $(LIBS) atf-c/detail/dynstr_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \ atf-c/detail/$(DEPDIR)/$(am__dirstamp) + atf-c/detail/dynstr_test$(EXEEXT): $(atf_c_detail_dynstr_test_OBJECTS) $(atf_c_detail_dynstr_test_DEPENDENCIES) $(EXTRA_atf_c_detail_dynstr_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp) @rm -f atf-c/detail/dynstr_test$(EXEEXT) - $(LINK) $(atf_c_detail_dynstr_test_OBJECTS) $(atf_c_detail_dynstr_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_detail_dynstr_test_OBJECTS) $(atf_c_detail_dynstr_test_LDADD) $(LIBS) atf-c/detail/env_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \ atf-c/detail/$(DEPDIR)/$(am__dirstamp) + atf-c/detail/env_test$(EXEEXT): $(atf_c_detail_env_test_OBJECTS) $(atf_c_detail_env_test_DEPENDENCIES) $(EXTRA_atf_c_detail_env_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp) @rm -f atf-c/detail/env_test$(EXEEXT) - $(LINK) $(atf_c_detail_env_test_OBJECTS) $(atf_c_detail_env_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_detail_env_test_OBJECTS) $(atf_c_detail_env_test_LDADD) $(LIBS) atf-c/detail/fs_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \ atf-c/detail/$(DEPDIR)/$(am__dirstamp) + atf-c/detail/fs_test$(EXEEXT): $(atf_c_detail_fs_test_OBJECTS) $(atf_c_detail_fs_test_DEPENDENCIES) $(EXTRA_atf_c_detail_fs_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp) @rm -f atf-c/detail/fs_test$(EXEEXT) - $(LINK) $(atf_c_detail_fs_test_OBJECTS) $(atf_c_detail_fs_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_detail_fs_test_OBJECTS) $(atf_c_detail_fs_test_LDADD) $(LIBS) atf-c/detail/list_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \ atf-c/detail/$(DEPDIR)/$(am__dirstamp) + atf-c/detail/list_test$(EXEEXT): $(atf_c_detail_list_test_OBJECTS) $(atf_c_detail_list_test_DEPENDENCIES) $(EXTRA_atf_c_detail_list_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp) @rm -f atf-c/detail/list_test$(EXEEXT) - $(LINK) $(atf_c_detail_list_test_OBJECTS) $(atf_c_detail_list_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_detail_list_test_OBJECTS) $(atf_c_detail_list_test_LDADD) $(LIBS) atf-c/detail/map_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \ atf-c/detail/$(DEPDIR)/$(am__dirstamp) + atf-c/detail/map_test$(EXEEXT): $(atf_c_detail_map_test_OBJECTS) $(atf_c_detail_map_test_DEPENDENCIES) $(EXTRA_atf_c_detail_map_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp) @rm -f atf-c/detail/map_test$(EXEEXT) - $(LINK) $(atf_c_detail_map_test_OBJECTS) $(atf_c_detail_map_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_detail_map_test_OBJECTS) $(atf_c_detail_map_test_LDADD) $(LIBS) atf-c/detail/process_helpers.$(OBJEXT): atf-c/detail/$(am__dirstamp) \ atf-c/detail/$(DEPDIR)/$(am__dirstamp) + atf-c/detail/process_helpers$(EXEEXT): $(atf_c_detail_process_helpers_OBJECTS) $(atf_c_detail_process_helpers_DEPENDENCIES) $(EXTRA_atf_c_detail_process_helpers_DEPENDENCIES) atf-c/detail/$(am__dirstamp) @rm -f atf-c/detail/process_helpers$(EXEEXT) - $(LINK) $(atf_c_detail_process_helpers_OBJECTS) $(atf_c_detail_process_helpers_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_detail_process_helpers_OBJECTS) $(atf_c_detail_process_helpers_LDADD) $(LIBS) atf-c/detail/process_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \ atf-c/detail/$(DEPDIR)/$(am__dirstamp) + atf-c/detail/process_test$(EXEEXT): $(atf_c_detail_process_test_OBJECTS) $(atf_c_detail_process_test_DEPENDENCIES) $(EXTRA_atf_c_detail_process_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp) @rm -f atf-c/detail/process_test$(EXEEXT) - $(LINK) $(atf_c_detail_process_test_OBJECTS) $(atf_c_detail_process_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_detail_process_test_OBJECTS) $(atf_c_detail_process_test_LDADD) $(LIBS) atf-c/detail/sanity_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \ atf-c/detail/$(DEPDIR)/$(am__dirstamp) + atf-c/detail/sanity_test$(EXEEXT): $(atf_c_detail_sanity_test_OBJECTS) $(atf_c_detail_sanity_test_DEPENDENCIES) $(EXTRA_atf_c_detail_sanity_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp) @rm -f atf-c/detail/sanity_test$(EXEEXT) - $(LINK) $(atf_c_detail_sanity_test_OBJECTS) $(atf_c_detail_sanity_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_detail_sanity_test_OBJECTS) $(atf_c_detail_sanity_test_LDADD) $(LIBS) atf-c/detail/text_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \ atf-c/detail/$(DEPDIR)/$(am__dirstamp) + atf-c/detail/text_test$(EXEEXT): $(atf_c_detail_text_test_OBJECTS) $(atf_c_detail_text_test_DEPENDENCIES) $(EXTRA_atf_c_detail_text_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp) @rm -f atf-c/detail/text_test$(EXEEXT) - $(LINK) $(atf_c_detail_text_test_OBJECTS) $(atf_c_detail_text_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_detail_text_test_OBJECTS) $(atf_c_detail_text_test_LDADD) $(LIBS) atf-c/detail/user_test.$(OBJEXT): atf-c/detail/$(am__dirstamp) \ atf-c/detail/$(DEPDIR)/$(am__dirstamp) + atf-c/detail/user_test$(EXEEXT): $(atf_c_detail_user_test_OBJECTS) $(atf_c_detail_user_test_DEPENDENCIES) $(EXTRA_atf_c_detail_user_test_DEPENDENCIES) atf-c/detail/$(am__dirstamp) @rm -f atf-c/detail/user_test$(EXEEXT) - $(LINK) $(atf_c_detail_user_test_OBJECTS) $(atf_c_detail_user_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_detail_user_test_OBJECTS) $(atf_c_detail_user_test_LDADD) $(LIBS) +atf-c/detail/version_helper.$(OBJEXT): atf-c/detail/$(am__dirstamp) \ + atf-c/detail/$(DEPDIR)/$(am__dirstamp) + +atf-c/detail/version_helper$(EXEEXT): $(atf_c_detail_version_helper_OBJECTS) $(atf_c_detail_version_helper_DEPENDENCIES) $(EXTRA_atf_c_detail_version_helper_DEPENDENCIES) atf-c/detail/$(am__dirstamp) + @rm -f atf-c/detail/version_helper$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(atf_c_detail_version_helper_OBJECTS) $(atf_c_detail_version_helper_LDADD) $(LIBS) atf-c/error_test.$(OBJEXT): atf-c/$(am__dirstamp) \ atf-c/$(DEPDIR)/$(am__dirstamp) + atf-c/error_test$(EXEEXT): $(atf_c_error_test_OBJECTS) $(atf_c_error_test_DEPENDENCIES) $(EXTRA_atf_c_error_test_DEPENDENCIES) atf-c/$(am__dirstamp) @rm -f atf-c/error_test$(EXEEXT) - $(LINK) $(atf_c_error_test_OBJECTS) $(atf_c_error_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_error_test_OBJECTS) $(atf_c_error_test_LDADD) $(LIBS) atf-c/macros_test.$(OBJEXT): atf-c/$(am__dirstamp) \ atf-c/$(DEPDIR)/$(am__dirstamp) + atf-c/macros_test$(EXEEXT): $(atf_c_macros_test_OBJECTS) $(atf_c_macros_test_DEPENDENCIES) $(EXTRA_atf_c_macros_test_DEPENDENCIES) atf-c/$(am__dirstamp) @rm -f atf-c/macros_test$(EXEEXT) - $(LINK) $(atf_c_macros_test_OBJECTS) $(atf_c_macros_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_macros_test_OBJECTS) $(atf_c_macros_test_LDADD) $(LIBS) atf-c/tc_test.$(OBJEXT): atf-c/$(am__dirstamp) \ atf-c/$(DEPDIR)/$(am__dirstamp) + atf-c/tc_test$(EXEEXT): $(atf_c_tc_test_OBJECTS) $(atf_c_tc_test_DEPENDENCIES) $(EXTRA_atf_c_tc_test_DEPENDENCIES) atf-c/$(am__dirstamp) @rm -f atf-c/tc_test$(EXEEXT) - $(LINK) $(atf_c_tc_test_OBJECTS) $(atf_c_tc_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_tc_test_OBJECTS) $(atf_c_tc_test_LDADD) $(LIBS) atf-c/tp_test.$(OBJEXT): atf-c/$(am__dirstamp) \ atf-c/$(DEPDIR)/$(am__dirstamp) + atf-c/tp_test$(EXEEXT): $(atf_c_tp_test_OBJECTS) $(atf_c_tp_test_DEPENDENCIES) $(EXTRA_atf_c_tp_test_DEPENDENCIES) atf-c/$(am__dirstamp) @rm -f atf-c/tp_test$(EXEEXT) - $(LINK) $(atf_c_tp_test_OBJECTS) $(atf_c_tp_test_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_tp_test_OBJECTS) $(atf_c_tp_test_LDADD) $(LIBS) atf-c/utils_test.$(OBJEXT): atf-c/$(am__dirstamp) \ atf-c/$(DEPDIR)/$(am__dirstamp) + atf-c/utils_test$(EXEEXT): $(atf_c_utils_test_OBJECTS) $(atf_c_utils_test_DEPENDENCIES) $(EXTRA_atf_c_utils_test_DEPENDENCIES) atf-c/$(am__dirstamp) @rm -f atf-c/utils_test$(EXEEXT) - $(LINK) $(atf_c_utils_test_OBJECTS) $(atf_c_utils_test_LDADD) $(LIBS) -atf-config/$(am__dirstamp): - @$(MKDIR_P) atf-config - @: > atf-config/$(am__dirstamp) -atf-config/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) atf-config/$(DEPDIR) - @: > atf-config/$(DEPDIR)/$(am__dirstamp) -atf-config/atf-config.$(OBJEXT): atf-config/$(am__dirstamp) \ - atf-config/$(DEPDIR)/$(am__dirstamp) -atf-config/atf-config$(EXEEXT): $(atf_config_atf_config_OBJECTS) $(atf_config_atf_config_DEPENDENCIES) $(EXTRA_atf_config_atf_config_DEPENDENCIES) atf-config/$(am__dirstamp) - @rm -f atf-config/atf-config$(EXEEXT) - $(CXXLINK) $(atf_config_atf_config_OBJECTS) $(atf_config_atf_config_LDADD) $(LIBS) -atf-report/$(am__dirstamp): - @$(MKDIR_P) atf-report - @: > atf-report/$(am__dirstamp) -atf-report/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) atf-report/$(DEPDIR) - @: > atf-report/$(DEPDIR)/$(am__dirstamp) -atf-report/atf-report.$(OBJEXT): atf-report/$(am__dirstamp) \ - atf-report/$(DEPDIR)/$(am__dirstamp) -atf-report/reader.$(OBJEXT): atf-report/$(am__dirstamp) \ - atf-report/$(DEPDIR)/$(am__dirstamp) -atf-report/atf-report$(EXEEXT): $(atf_report_atf_report_OBJECTS) $(atf_report_atf_report_DEPENDENCIES) $(EXTRA_atf_report_atf_report_DEPENDENCIES) atf-report/$(am__dirstamp) - @rm -f atf-report/atf-report$(EXEEXT) - $(CXXLINK) $(atf_report_atf_report_OBJECTS) $(atf_report_atf_report_LDADD) $(LIBS) -atf-report/fail_helper.$(OBJEXT): atf-report/$(am__dirstamp) \ - atf-report/$(DEPDIR)/$(am__dirstamp) -atf-report/fail_helper$(EXEEXT): $(atf_report_fail_helper_OBJECTS) $(atf_report_fail_helper_DEPENDENCIES) $(EXTRA_atf_report_fail_helper_DEPENDENCIES) atf-report/$(am__dirstamp) - @rm -f atf-report/fail_helper$(EXEEXT) - $(CXXLINK) $(atf_report_fail_helper_OBJECTS) $(atf_report_fail_helper_LDADD) $(LIBS) -atf-report/misc_helpers.$(OBJEXT): atf-report/$(am__dirstamp) \ - atf-report/$(DEPDIR)/$(am__dirstamp) -atf-report/misc_helpers$(EXEEXT): $(atf_report_misc_helpers_OBJECTS) $(atf_report_misc_helpers_DEPENDENCIES) $(EXTRA_atf_report_misc_helpers_DEPENDENCIES) atf-report/$(am__dirstamp) - @rm -f atf-report/misc_helpers$(EXEEXT) - $(CXXLINK) $(atf_report_misc_helpers_OBJECTS) $(atf_report_misc_helpers_LDADD) $(LIBS) -atf-report/pass_helper.$(OBJEXT): atf-report/$(am__dirstamp) \ - atf-report/$(DEPDIR)/$(am__dirstamp) -atf-report/pass_helper$(EXEEXT): $(atf_report_pass_helper_OBJECTS) $(atf_report_pass_helper_DEPENDENCIES) $(EXTRA_atf_report_pass_helper_DEPENDENCIES) atf-report/$(am__dirstamp) - @rm -f atf-report/pass_helper$(EXEEXT) - $(CXXLINK) $(atf_report_pass_helper_OBJECTS) $(atf_report_pass_helper_LDADD) $(LIBS) -atf-report/atf_report_reader_test-reader_test.$(OBJEXT): \ - atf-report/$(am__dirstamp) \ - atf-report/$(DEPDIR)/$(am__dirstamp) -atf-report/atf_report_reader_test-reader.$(OBJEXT): \ - atf-report/$(am__dirstamp) \ - atf-report/$(DEPDIR)/$(am__dirstamp) -atf-report/reader_test$(EXEEXT): $(atf_report_reader_test_OBJECTS) $(atf_report_reader_test_DEPENDENCIES) $(EXTRA_atf_report_reader_test_DEPENDENCIES) atf-report/$(am__dirstamp) - @rm -f atf-report/reader_test$(EXEEXT) - $(CXXLINK) $(atf_report_reader_test_OBJECTS) $(atf_report_reader_test_LDADD) $(LIBS) -atf-run/$(am__dirstamp): - @$(MKDIR_P) atf-run - @: > atf-run/$(am__dirstamp) -atf-run/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) atf-run/$(DEPDIR) - @: > atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_atf_run-atf-run.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_atf_run-atffile.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_atf_run-config.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_atf_run-fs.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_atf_run-io.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_atf_run-requirements.$(OBJEXT): \ - atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_atf_run-signals.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_atf_run-test-program.$(OBJEXT): \ - atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_atf_run-timer.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_atf_run-user.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf-run$(EXEEXT): $(atf_run_atf_run_OBJECTS) $(atf_run_atf_run_DEPENDENCIES) $(EXTRA_atf_run_atf_run_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/atf-run$(EXEEXT) - $(CXXLINK) $(atf_run_atf_run_OBJECTS) $(atf_run_atf_run_LDADD) $(LIBS) -atf-run/atf_run_atffile_test-atffile_test.$(OBJEXT): \ - atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_atffile_test-atffile.$(OBJEXT): \ - atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atffile_test$(EXEEXT): $(atf_run_atffile_test_OBJECTS) $(atf_run_atffile_test_DEPENDENCIES) $(EXTRA_atf_run_atffile_test_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/atffile_test$(EXEEXT) - $(CXXLINK) $(atf_run_atffile_test_OBJECTS) $(atf_run_atffile_test_LDADD) $(LIBS) -atf-run/bad_metadata_helper.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/bad_metadata_helper$(EXEEXT): $(atf_run_bad_metadata_helper_OBJECTS) $(atf_run_bad_metadata_helper_DEPENDENCIES) $(EXTRA_atf_run_bad_metadata_helper_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/bad_metadata_helper$(EXEEXT) - $(LINK) $(atf_run_bad_metadata_helper_OBJECTS) $(atf_run_bad_metadata_helper_LDADD) $(LIBS) -atf-run/atf_run_config_test-config_test.$(OBJEXT): \ - atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_config_test-config.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/config_test$(EXEEXT): $(atf_run_config_test_OBJECTS) $(atf_run_config_test_DEPENDENCIES) $(EXTRA_atf_run_config_test_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/config_test$(EXEEXT) - $(CXXLINK) $(atf_run_config_test_OBJECTS) $(atf_run_config_test_LDADD) $(LIBS) -atf-run/expect_helpers.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/expect_helpers$(EXEEXT): $(atf_run_expect_helpers_OBJECTS) $(atf_run_expect_helpers_DEPENDENCIES) $(EXTRA_atf_run_expect_helpers_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/expect_helpers$(EXEEXT) - $(LINK) $(atf_run_expect_helpers_OBJECTS) $(atf_run_expect_helpers_LDADD) $(LIBS) -atf-run/fs_test.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/fs.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/user.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/fs_test$(EXEEXT): $(atf_run_fs_test_OBJECTS) $(atf_run_fs_test_DEPENDENCIES) $(EXTRA_atf_run_fs_test_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/fs_test$(EXEEXT) - $(CXXLINK) $(atf_run_fs_test_OBJECTS) $(atf_run_fs_test_LDADD) $(LIBS) -atf-run/io_test.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/io.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/signals.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/io_test$(EXEEXT): $(atf_run_io_test_OBJECTS) $(atf_run_io_test_DEPENDENCIES) $(EXTRA_atf_run_io_test_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/io_test$(EXEEXT) - $(CXXLINK) $(atf_run_io_test_OBJECTS) $(atf_run_io_test_LDADD) $(LIBS) -atf-run/misc_helpers.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/misc_helpers$(EXEEXT): $(atf_run_misc_helpers_OBJECTS) $(atf_run_misc_helpers_DEPENDENCIES) $(EXTRA_atf_run_misc_helpers_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/misc_helpers$(EXEEXT) - $(CXXLINK) $(atf_run_misc_helpers_OBJECTS) $(atf_run_misc_helpers_LDADD) $(LIBS) -atf-run/pass_helper.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/pass_helper$(EXEEXT): $(atf_run_pass_helper_OBJECTS) $(atf_run_pass_helper_DEPENDENCIES) $(EXTRA_atf_run_pass_helper_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/pass_helper$(EXEEXT) - $(CXXLINK) $(atf_run_pass_helper_OBJECTS) $(atf_run_pass_helper_LDADD) $(LIBS) -atf-run/requirements_test.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/requirements.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/requirements_test$(EXEEXT): $(atf_run_requirements_test_OBJECTS) $(atf_run_requirements_test_DEPENDENCIES) $(EXTRA_atf_run_requirements_test_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/requirements_test$(EXEEXT) - $(CXXLINK) $(atf_run_requirements_test_OBJECTS) $(atf_run_requirements_test_LDADD) $(LIBS) -atf-run/several_tcs_helper.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/several_tcs_helper$(EXEEXT): $(atf_run_several_tcs_helper_OBJECTS) $(atf_run_several_tcs_helper_DEPENDENCIES) $(EXTRA_atf_run_several_tcs_helper_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/several_tcs_helper$(EXEEXT) - $(LINK) $(atf_run_several_tcs_helper_OBJECTS) $(atf_run_several_tcs_helper_LDADD) $(LIBS) -atf-run/signals_test.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/signals_test$(EXEEXT): $(atf_run_signals_test_OBJECTS) $(atf_run_signals_test_DEPENDENCIES) $(EXTRA_atf_run_signals_test_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/signals_test$(EXEEXT) - $(CXXLINK) $(atf_run_signals_test_OBJECTS) $(atf_run_signals_test_LDADD) $(LIBS) -atf-run/atf_run_test_program_test-test_program_test.$(OBJEXT): \ - atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_test_program_test-fs.$(OBJEXT): \ - atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_test_program_test-io.$(OBJEXT): \ - atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_test_program_test-requirements.$(OBJEXT): \ - atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_test_program_test-signals.$(OBJEXT): \ - atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_test_program_test-test-program.$(OBJEXT): \ - atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_test_program_test-timer.$(OBJEXT): \ - atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/atf_run_test_program_test-user.$(OBJEXT): \ - atf-run/$(am__dirstamp) atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/test_program_test$(EXEEXT): $(atf_run_test_program_test_OBJECTS) $(atf_run_test_program_test_DEPENDENCIES) $(EXTRA_atf_run_test_program_test_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/test_program_test$(EXEEXT) - $(CXXLINK) $(atf_run_test_program_test_OBJECTS) $(atf_run_test_program_test_LDADD) $(LIBS) -atf-run/user_test.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/user_test$(EXEEXT): $(atf_run_user_test_OBJECTS) $(atf_run_user_test_DEPENDENCIES) $(EXTRA_atf_run_user_test_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/user_test$(EXEEXT) - $(CXXLINK) $(atf_run_user_test_OBJECTS) $(atf_run_user_test_LDADD) $(LIBS) -atf-run/zero_tcs_helper.$(OBJEXT): atf-run/$(am__dirstamp) \ - atf-run/$(DEPDIR)/$(am__dirstamp) -atf-run/zero_tcs_helper$(EXEEXT): $(atf_run_zero_tcs_helper_OBJECTS) $(atf_run_zero_tcs_helper_DEPENDENCIES) $(EXTRA_atf_run_zero_tcs_helper_DEPENDENCIES) atf-run/$(am__dirstamp) - @rm -f atf-run/zero_tcs_helper$(EXEEXT) - $(LINK) $(atf_run_zero_tcs_helper_OBJECTS) $(atf_run_zero_tcs_helper_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(atf_c_utils_test_OBJECTS) $(atf_c_utils_test_LDADD) $(LIBS) atf-sh/$(am__dirstamp): @$(MKDIR_P) atf-sh @: > atf-sh/$(am__dirstamp) atf-sh/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) atf-sh/$(DEPDIR) @: > atf-sh/$(DEPDIR)/$(am__dirstamp) -atf-sh/atf-check.$(OBJEXT): atf-sh/$(am__dirstamp) \ +atf-sh/atf_sh_atf_check-atf-check.$(OBJEXT): atf-sh/$(am__dirstamp) \ atf-sh/$(DEPDIR)/$(am__dirstamp) + atf-sh/atf-check$(EXEEXT): $(atf_sh_atf_check_OBJECTS) $(atf_sh_atf_check_DEPENDENCIES) $(EXTRA_atf_sh_atf_check_DEPENDENCIES) atf-sh/$(am__dirstamp) @rm -f atf-sh/atf-check$(EXEEXT) - $(CXXLINK) $(atf_sh_atf_check_OBJECTS) $(atf_sh_atf_check_LDADD) $(LIBS) -atf-sh/atf-sh.$(OBJEXT): atf-sh/$(am__dirstamp) \ + $(AM_V_CXXLD)$(CXXLINK) $(atf_sh_atf_check_OBJECTS) $(atf_sh_atf_check_LDADD) $(LIBS) +atf-sh/atf_sh_atf_sh-atf-sh.$(OBJEXT): atf-sh/$(am__dirstamp) \ atf-sh/$(DEPDIR)/$(am__dirstamp) + atf-sh/atf-sh$(EXEEXT): $(atf_sh_atf_sh_OBJECTS) $(atf_sh_atf_sh_DEPENDENCIES) $(EXTRA_atf_sh_atf_sh_DEPENDENCIES) atf-sh/$(am__dirstamp) @rm -f atf-sh/atf-sh$(EXEEXT) - $(CXXLINK) $(atf_sh_atf_sh_OBJECTS) $(atf_sh_atf_sh_LDADD) $(LIBS) -atf-version/$(am__dirstamp): - @$(MKDIR_P) atf-version - @: > atf-version/$(am__dirstamp) -atf-version/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) atf-version/$(DEPDIR) - @: > atf-version/$(DEPDIR)/$(am__dirstamp) -atf-version/atf_version_atf_version-atf-version.$(OBJEXT): \ - atf-version/$(am__dirstamp) \ - atf-version/$(DEPDIR)/$(am__dirstamp) -atf-version/atf-version$(EXEEXT): $(atf_version_atf_version_OBJECTS) $(atf_version_atf_version_DEPENDENCIES) $(EXTRA_atf_version_atf_version_DEPENDENCIES) atf-version/$(am__dirstamp) - @rm -f atf-version/atf-version$(EXEEXT) - $(CXXLINK) $(atf_version_atf_version_OBJECTS) $(atf_version_atf_version_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(atf_sh_atf_sh_OBJECTS) $(atf_sh_atf_sh_LDADD) $(LIBS) bootstrap/$(am__dirstamp): @$(MKDIR_P) bootstrap @: > bootstrap/$(am__dirstamp) @@ -2873,24 +2751,28 @@ bootstrap/$(DEPDIR)/$(am__dirstamp): @: > bootstrap/$(DEPDIR)/$(am__dirstamp) bootstrap/h_app_empty.$(OBJEXT): bootstrap/$(am__dirstamp) \ bootstrap/$(DEPDIR)/$(am__dirstamp) + bootstrap/h_app_empty$(EXEEXT): $(bootstrap_h_app_empty_OBJECTS) $(bootstrap_h_app_empty_DEPENDENCIES) $(EXTRA_bootstrap_h_app_empty_DEPENDENCIES) bootstrap/$(am__dirstamp) @rm -f bootstrap/h_app_empty$(EXEEXT) - $(CXXLINK) $(bootstrap_h_app_empty_OBJECTS) $(bootstrap_h_app_empty_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(bootstrap_h_app_empty_OBJECTS) $(bootstrap_h_app_empty_LDADD) $(LIBS) bootstrap/h_app_opts_args.$(OBJEXT): bootstrap/$(am__dirstamp) \ bootstrap/$(DEPDIR)/$(am__dirstamp) + bootstrap/h_app_opts_args$(EXEEXT): $(bootstrap_h_app_opts_args_OBJECTS) $(bootstrap_h_app_opts_args_DEPENDENCIES) $(EXTRA_bootstrap_h_app_opts_args_DEPENDENCIES) bootstrap/$(am__dirstamp) @rm -f bootstrap/h_app_opts_args$(EXEEXT) - $(CXXLINK) $(bootstrap_h_app_opts_args_OBJECTS) $(bootstrap_h_app_opts_args_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(bootstrap_h_app_opts_args_OBJECTS) $(bootstrap_h_app_opts_args_LDADD) $(LIBS) bootstrap/h_tp_basic_c.$(OBJEXT): bootstrap/$(am__dirstamp) \ bootstrap/$(DEPDIR)/$(am__dirstamp) + bootstrap/h_tp_basic_c$(EXEEXT): $(bootstrap_h_tp_basic_c_OBJECTS) $(bootstrap_h_tp_basic_c_DEPENDENCIES) $(EXTRA_bootstrap_h_tp_basic_c_DEPENDENCIES) bootstrap/$(am__dirstamp) @rm -f bootstrap/h_tp_basic_c$(EXEEXT) - $(LINK) $(bootstrap_h_tp_basic_c_OBJECTS) $(bootstrap_h_tp_basic_c_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(bootstrap_h_tp_basic_c_OBJECTS) $(bootstrap_h_tp_basic_c_LDADD) $(LIBS) bootstrap/h_tp_basic_cpp.$(OBJEXT): bootstrap/$(am__dirstamp) \ bootstrap/$(DEPDIR)/$(am__dirstamp) + bootstrap/h_tp_basic_cpp$(EXEEXT): $(bootstrap_h_tp_basic_cpp_OBJECTS) $(bootstrap_h_tp_basic_cpp_DEPENDENCIES) $(EXTRA_bootstrap_h_tp_basic_cpp_DEPENDENCIES) bootstrap/$(am__dirstamp) @rm -f bootstrap/h_tp_basic_cpp$(EXEEXT) - $(CXXLINK) $(bootstrap_h_tp_basic_cpp_OBJECTS) $(bootstrap_h_tp_basic_cpp_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(bootstrap_h_tp_basic_cpp_OBJECTS) $(bootstrap_h_tp_basic_cpp_LDADD) $(LIBS) test-programs/$(am__dirstamp): @$(MKDIR_P) test-programs @: > test-programs/$(am__dirstamp) @@ -2899,14 +2781,204 @@ test-programs/$(DEPDIR)/$(am__dirstamp): @: > test-programs/$(DEPDIR)/$(am__dirstamp) test-programs/c_helpers.$(OBJEXT): test-programs/$(am__dirstamp) \ test-programs/$(DEPDIR)/$(am__dirstamp) + test-programs/c_helpers$(EXEEXT): $(test_programs_c_helpers_OBJECTS) $(test_programs_c_helpers_DEPENDENCIES) $(EXTRA_test_programs_c_helpers_DEPENDENCIES) test-programs/$(am__dirstamp) @rm -f test-programs/c_helpers$(EXEEXT) - $(LINK) $(test_programs_c_helpers_OBJECTS) $(test_programs_c_helpers_LDADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(test_programs_c_helpers_OBJECTS) $(test_programs_c_helpers_LDADD) $(LIBS) test-programs/cpp_helpers.$(OBJEXT): test-programs/$(am__dirstamp) \ test-programs/$(DEPDIR)/$(am__dirstamp) + test-programs/cpp_helpers$(EXEEXT): $(test_programs_cpp_helpers_OBJECTS) $(test_programs_cpp_helpers_DEPENDENCIES) $(EXTRA_test_programs_cpp_helpers_DEPENDENCIES) test-programs/$(am__dirstamp) @rm -f test-programs/cpp_helpers$(EXEEXT) - $(CXXLINK) $(test_programs_cpp_helpers_OBJECTS) $(test_programs_cpp_helpers_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(test_programs_cpp_helpers_OBJECTS) $(test_programs_cpp_helpers_LDADD) $(LIBS) +tools/tools_application_test-application_test.$(OBJEXT): \ + tools/$(am__dirstamp) tools/$(DEPDIR)/$(am__dirstamp) + +tools/application_test$(EXEEXT): $(tools_application_test_OBJECTS) $(tools_application_test_DEPENDENCIES) $(EXTRA_tools_application_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/application_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_application_test_OBJECTS) $(tools_application_test_LDADD) $(LIBS) +tools/tools_atf_config-atf-config.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/atf-config$(EXEEXT): $(tools_atf_config_OBJECTS) $(tools_atf_config_DEPENDENCIES) $(EXTRA_tools_atf_config_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/atf-config$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_atf_config_OBJECTS) $(tools_atf_config_LDADD) $(LIBS) +tools/tools_atf_report-atf-report.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/atf-report$(EXEEXT): $(tools_atf_report_OBJECTS) $(tools_atf_report_DEPENDENCIES) $(EXTRA_tools_atf_report_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/atf-report$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_atf_report_OBJECTS) $(tools_atf_report_LDADD) $(LIBS) +tools/tools_atf_run-atf-run.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/atf-run$(EXEEXT): $(tools_atf_run_OBJECTS) $(tools_atf_run_DEPENDENCIES) $(EXTRA_tools_atf_run_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/atf-run$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_atf_run_OBJECTS) $(tools_atf_run_LDADD) $(LIBS) +tools/tools_atf_version-atf-version.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/atf-version$(EXEEXT): $(tools_atf_version_OBJECTS) $(tools_atf_version_DEPENDENCIES) $(EXTRA_tools_atf_version_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/atf-version$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_atf_version_OBJECTS) $(tools_atf_version_LDADD) $(LIBS) +tools/tools_atffile_test-atffile_test.$(OBJEXT): \ + tools/$(am__dirstamp) tools/$(DEPDIR)/$(am__dirstamp) + +tools/atffile_test$(EXEEXT): $(tools_atffile_test_OBJECTS) $(tools_atffile_test_DEPENDENCIES) $(EXTRA_tools_atffile_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/atffile_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_atffile_test_OBJECTS) $(tools_atffile_test_LDADD) $(LIBS) +tools/tools_auto_array_test-auto_array_test.$(OBJEXT): \ + tools/$(am__dirstamp) tools/$(DEPDIR)/$(am__dirstamp) + +tools/auto_array_test$(EXEEXT): $(tools_auto_array_test_OBJECTS) $(tools_auto_array_test_DEPENDENCIES) $(EXTRA_tools_auto_array_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/auto_array_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_auto_array_test_OBJECTS) $(tools_auto_array_test_LDADD) $(LIBS) +tools/bad_metadata_helper.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/bad_metadata_helper$(EXEEXT): $(tools_bad_metadata_helper_OBJECTS) $(tools_bad_metadata_helper_DEPENDENCIES) $(EXTRA_tools_bad_metadata_helper_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/bad_metadata_helper$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tools_bad_metadata_helper_OBJECTS) $(tools_bad_metadata_helper_LDADD) $(LIBS) +tools/tools_config_file_test-config_file_test.$(OBJEXT): \ + tools/$(am__dirstamp) tools/$(DEPDIR)/$(am__dirstamp) + +tools/config_file_test$(EXEEXT): $(tools_config_file_test_OBJECTS) $(tools_config_file_test_DEPENDENCIES) $(EXTRA_tools_config_file_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/config_file_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_config_file_test_OBJECTS) $(tools_config_file_test_LDADD) $(LIBS) +tools/tools_config_test-config_test.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/config_test$(EXEEXT): $(tools_config_test_OBJECTS) $(tools_config_test_DEPENDENCIES) $(EXTRA_tools_config_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/config_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_config_test_OBJECTS) $(tools_config_test_LDADD) $(LIBS) +tools/tools_env_test-env_test.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/env_test$(EXEEXT): $(tools_env_test_OBJECTS) $(tools_env_test_DEPENDENCIES) $(EXTRA_tools_env_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/env_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_env_test_OBJECTS) $(tools_env_test_LDADD) $(LIBS) +tools/tools_expand_test-expand_test.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/expand_test$(EXEEXT): $(tools_expand_test_OBJECTS) $(tools_expand_test_DEPENDENCIES) $(EXTRA_tools_expand_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/expand_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_expand_test_OBJECTS) $(tools_expand_test_LDADD) $(LIBS) +tools/expect_helpers.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/expect_helpers$(EXEEXT): $(tools_expect_helpers_OBJECTS) $(tools_expect_helpers_DEPENDENCIES) $(EXTRA_tools_expect_helpers_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/expect_helpers$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tools_expect_helpers_OBJECTS) $(tools_expect_helpers_LDADD) $(LIBS) +tools/fail_helper.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/fail_helper$(EXEEXT): $(tools_fail_helper_OBJECTS) $(tools_fail_helper_DEPENDENCIES) $(EXTRA_tools_fail_helper_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/fail_helper$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_fail_helper_OBJECTS) $(tools_fail_helper_LDADD) $(LIBS) +tools/tools_fs_test-fs_test.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/fs_test$(EXEEXT): $(tools_fs_test_OBJECTS) $(tools_fs_test_DEPENDENCIES) $(EXTRA_tools_fs_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/fs_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_fs_test_OBJECTS) $(tools_fs_test_LDADD) $(LIBS) +tools/tools_io_test-io_test.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/io_test$(EXEEXT): $(tools_io_test_OBJECTS) $(tools_io_test_DEPENDENCIES) $(EXTRA_tools_io_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/io_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_io_test_OBJECTS) $(tools_io_test_LDADD) $(LIBS) +tools/tools_misc_helpers-misc_helpers.$(OBJEXT): \ + tools/$(am__dirstamp) tools/$(DEPDIR)/$(am__dirstamp) + +tools/misc_helpers$(EXEEXT): $(tools_misc_helpers_OBJECTS) $(tools_misc_helpers_DEPENDENCIES) $(EXTRA_tools_misc_helpers_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/misc_helpers$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_misc_helpers_OBJECTS) $(tools_misc_helpers_LDADD) $(LIBS) +tools/tools_parser_test-parser_test.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/parser_test$(EXEEXT): $(tools_parser_test_OBJECTS) $(tools_parser_test_DEPENDENCIES) $(EXTRA_tools_parser_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/parser_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_parser_test_OBJECTS) $(tools_parser_test_LDADD) $(LIBS) +tools/pass_helper.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/pass_helper$(EXEEXT): $(tools_pass_helper_OBJECTS) $(tools_pass_helper_DEPENDENCIES) $(EXTRA_tools_pass_helper_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/pass_helper$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_pass_helper_OBJECTS) $(tools_pass_helper_LDADD) $(LIBS) +tools/process_helpers.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/process_helpers$(EXEEXT): $(tools_process_helpers_OBJECTS) $(tools_process_helpers_DEPENDENCIES) $(EXTRA_tools_process_helpers_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/process_helpers$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tools_process_helpers_OBJECTS) $(tools_process_helpers_LDADD) $(LIBS) +tools/tools_process_test-process_test.$(OBJEXT): \ + tools/$(am__dirstamp) tools/$(DEPDIR)/$(am__dirstamp) + +tools/process_test$(EXEEXT): $(tools_process_test_OBJECTS) $(tools_process_test_DEPENDENCIES) $(EXTRA_tools_process_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/process_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_process_test_OBJECTS) $(tools_process_test_LDADD) $(LIBS) +tools/tools_reader_test-reader_test.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/reader_test$(EXEEXT): $(tools_reader_test_OBJECTS) $(tools_reader_test_DEPENDENCIES) $(EXTRA_tools_reader_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/reader_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_reader_test_OBJECTS) $(tools_reader_test_LDADD) $(LIBS) +tools/tools_requirements_test-requirements_test.$(OBJEXT): \ + tools/$(am__dirstamp) tools/$(DEPDIR)/$(am__dirstamp) + +tools/requirements_test$(EXEEXT): $(tools_requirements_test_OBJECTS) $(tools_requirements_test_DEPENDENCIES) $(EXTRA_tools_requirements_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/requirements_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_requirements_test_OBJECTS) $(tools_requirements_test_LDADD) $(LIBS) +tools/several_tcs_helper.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/several_tcs_helper$(EXEEXT): $(tools_several_tcs_helper_OBJECTS) $(tools_several_tcs_helper_DEPENDENCIES) $(EXTRA_tools_several_tcs_helper_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/several_tcs_helper$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tools_several_tcs_helper_OBJECTS) $(tools_several_tcs_helper_LDADD) $(LIBS) +tools/tools_signals_test-signals_test.$(OBJEXT): \ + tools/$(am__dirstamp) tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_signals_test-signals.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/signals_test$(EXEEXT): $(tools_signals_test_OBJECTS) $(tools_signals_test_DEPENDENCIES) $(EXTRA_tools_signals_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/signals_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_signals_test_OBJECTS) $(tools_signals_test_LDADD) $(LIBS) +tools/tools_test_program_test-test_program_test.$(OBJEXT): \ + tools/$(am__dirstamp) tools/$(DEPDIR)/$(am__dirstamp) + +tools/test_program_test$(EXEEXT): $(tools_test_program_test_OBJECTS) $(tools_test_program_test_DEPENDENCIES) $(EXTRA_tools_test_program_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/test_program_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_test_program_test_OBJECTS) $(tools_test_program_test_LDADD) $(LIBS) +tools/tools_text_test-text_test.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_text_test-text.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/text_test$(EXEEXT): $(tools_text_test_OBJECTS) $(tools_text_test_DEPENDENCIES) $(EXTRA_tools_text_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/text_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_text_test_OBJECTS) $(tools_text_test_LDADD) $(LIBS) +tools/tools_ui_test-ui_test.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_ui_test-ui.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/ui_test$(EXEEXT): $(tools_ui_test_OBJECTS) $(tools_ui_test_DEPENDENCIES) $(EXTRA_tools_ui_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/ui_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_ui_test_OBJECTS) $(tools_ui_test_LDADD) $(LIBS) +tools/tools_user_test-user_test.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) +tools/tools_user_test-user.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/user_test$(EXEEXT): $(tools_user_test_OBJECTS) $(tools_user_test_DEPENDENCIES) $(EXTRA_tools_user_test_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/user_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tools_user_test_OBJECTS) $(tools_user_test_LDADD) $(LIBS) +tools/zero_tcs_helper.$(OBJEXT): tools/$(am__dirstamp) \ + tools/$(DEPDIR)/$(am__dirstamp) + +tools/zero_tcs_helper$(EXEEXT): $(tools_zero_tcs_helper_OBJECTS) $(tools_zero_tcs_helper_DEPENDENCIES) $(EXTRA_tools_zero_tcs_helper_DEPENDENCIES) tools/$(am__dirstamp) + @rm -f tools/zero_tcs_helper$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(tools_zero_tcs_helper_OBJECTS) $(tools_zero_tcs_helper_LDADD) $(LIBS) install-tests_atf_cSCRIPTS: $(tests_atf_c_SCRIPTS) @$(NORMAL_INSTALL) @list='$(tests_atf_c_SCRIPTS)'; test -n "$(tests_atf_cdir)" || list=; \ @@ -2977,111 +3049,6 @@ uninstall-tests_atf_c__SCRIPTS: files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(tests_atf_c__dir)'; $(am__uninstall_files_from_dir) -install-tests_atf_configSCRIPTS: $(tests_atf_config_SCRIPTS) - @$(NORMAL_INSTALL) - @list='$(tests_atf_config_SCRIPTS)'; test -n "$(tests_atf_configdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_configdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(tests_atf_configdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n' \ - -e 'h;s|.*|.|' \ - -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) { files[d] = files[d] " " $$1; \ - if (++n[d] == $(am__install_max)) { \ - print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ - else { print "f", d "/" $$4, $$1 } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(tests_atf_configdir)$$dir'"; \ - $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(tests_atf_configdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-tests_atf_configSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(tests_atf_config_SCRIPTS)'; test -n "$(tests_atf_configdir)" || exit 0; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 's,.*/,,;$(transform)'`; \ - dir='$(DESTDIR)$(tests_atf_configdir)'; $(am__uninstall_files_from_dir) -install-tests_atf_reportSCRIPTS: $(tests_atf_report_SCRIPTS) - @$(NORMAL_INSTALL) - @list='$(tests_atf_report_SCRIPTS)'; test -n "$(tests_atf_reportdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_reportdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(tests_atf_reportdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n' \ - -e 'h;s|.*|.|' \ - -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) { files[d] = files[d] " " $$1; \ - if (++n[d] == $(am__install_max)) { \ - print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ - else { print "f", d "/" $$4, $$1 } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(tests_atf_reportdir)$$dir'"; \ - $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(tests_atf_reportdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-tests_atf_reportSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(tests_atf_report_SCRIPTS)'; test -n "$(tests_atf_reportdir)" || exit 0; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 's,.*/,,;$(transform)'`; \ - dir='$(DESTDIR)$(tests_atf_reportdir)'; $(am__uninstall_files_from_dir) -install-tests_atf_runSCRIPTS: $(tests_atf_run_SCRIPTS) - @$(NORMAL_INSTALL) - @list='$(tests_atf_run_SCRIPTS)'; test -n "$(tests_atf_rundir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_rundir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(tests_atf_rundir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n' \ - -e 'h;s|.*|.|' \ - -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) { files[d] = files[d] " " $$1; \ - if (++n[d] == $(am__install_max)) { \ - print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ - else { print "f", d "/" $$4, $$1 } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(tests_atf_rundir)$$dir'"; \ - $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(tests_atf_rundir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-tests_atf_runSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(tests_atf_run_SCRIPTS)'; test -n "$(tests_atf_rundir)" || exit 0; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 's,.*/,,;$(transform)'`; \ - dir='$(DESTDIR)$(tests_atf_rundir)'; $(am__uninstall_files_from_dir) install-tests_atf_shSCRIPTS: $(tests_atf_sh_SCRIPTS) @$(NORMAL_INSTALL) @list='$(tests_atf_sh_SCRIPTS)'; test -n "$(tests_atf_shdir)" || list=; \ @@ -3152,6 +3119,41 @@ uninstall-tests_test_programsSCRIPTS: files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(tests_test_programsdir)'; $(am__uninstall_files_from_dir) +install-tests_toolsSCRIPTS: $(tests_tools_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(tests_tools_SCRIPTS)'; test -n "$(tests_toolsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(tests_toolsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(tests_toolsdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(tests_toolsdir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(tests_toolsdir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-tests_toolsSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(tests_tools_SCRIPTS)'; test -n "$(tests_toolsdir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(tests_toolsdir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -3163,13 +3165,10 @@ mostlyclean-compile: -rm -f atf-c/*.lo -rm -f atf-c/detail/*.$(OBJEXT) -rm -f atf-c/detail/*.lo - -rm -f atf-config/*.$(OBJEXT) - -rm -f atf-report/*.$(OBJEXT) - -rm -f atf-run/*.$(OBJEXT) -rm -f atf-sh/*.$(OBJEXT) - -rm -f atf-version/*.$(OBJEXT) -rm -f bootstrap/*.$(OBJEXT) -rm -f test-programs/*.$(OBJEXT) + -rm -f tools/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -3179,8 +3178,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/build_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/check_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/config.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/config_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/macros_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/tests.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/tests_test.Po@am__quote@ @@ -3188,33 +3185,25 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/$(DEPDIR)/utils_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/application.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/application_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/atf_c___detail_libtest_helpers_la-test_helpers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/auto_array_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/env.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/env_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/exceptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/exceptions_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/expand.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/expand_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/fs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/fs_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/parser.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/parser_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/process.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/process_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/sanity_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/test_helpers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/text.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/text_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/ui.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/ui_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@atf-c++/detail/$(DEPDIR)/version_helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/atf_c_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/build_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/check_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/config_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/error_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/libatf_c_la-build.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/libatf_c_la-check.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/libatf_c_la-config.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/libatf_c_la-error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/libatf_c_la-tc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c/$(DEPDIR)/libatf_c_la-tp.Plo@am__quote@ @@ -3244,585 +3233,914 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@atf-c/detail/$(DEPDIR)/sanity_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c/detail/$(DEPDIR)/text_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@atf-c/detail/$(DEPDIR)/user_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-config/$(DEPDIR)/atf-config.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-report/$(DEPDIR)/atf-report.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-report/$(DEPDIR)/atf_report_reader_test-reader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-report/$(DEPDIR)/fail_helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-report/$(DEPDIR)/misc_helpers.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-report/$(DEPDIR)/pass_helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-report/$(DEPDIR)/reader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-config.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-fs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-io.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-signals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-timer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atf_run-user.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_config_test-config.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_config_test-config_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_test_program_test-io.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/atf_run_test_program_test-user.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/bad_metadata_helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/expect_helpers.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/fs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/fs_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/io.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/io_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/misc_helpers.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/pass_helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/requirements.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/requirements_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/several_tcs_helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/signals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/signals_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/user.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/user_test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-run/$(DEPDIR)/zero_tcs_helper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-sh/$(DEPDIR)/atf-check.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-sh/$(DEPDIR)/atf-sh.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@atf-c/detail/$(DEPDIR)/version_helper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@atf-sh/$(DEPDIR)/atf_sh_atf_check-atf-check.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@atf-sh/$(DEPDIR)/atf_sh_atf_sh-atf-sh.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bootstrap/$(DEPDIR)/h_app_empty.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bootstrap/$(DEPDIR)/h_app_opts_args.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bootstrap/$(DEPDIR)/h_tp_basic_c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@bootstrap/$(DEPDIR)/h_tp_basic_cpp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@test-programs/$(DEPDIR)/c_helpers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@test-programs/$(DEPDIR)/cpp_helpers.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/bad_metadata_helper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/expect_helpers.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/fail_helper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/pass_helper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/process_helpers.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/several_tcs_helper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_application_test-application_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_atf_config-atf-config.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_atf_report-atf-report.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_atf_run-atf-run.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_atf_version-atf-version.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_atffile_test-atffile_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_auto_array_test-auto_array_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_config_file_test-config_file_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_config_test-config_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_env_test-env_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_expand_test-expand_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_fs_test-fs_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_io_test-io_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-application.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-atffile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-config.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-config_file.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-env.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-exceptions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-expand.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-fs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-io.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-process.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-reader.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-requirements.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-signals.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-test-program.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-text.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-timers.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-ui.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_libtools_a-user.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_misc_helpers-misc_helpers.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_parser_test-parser_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_process_test-process_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_reader_test-reader_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_requirements_test-requirements_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_signals_test-signals.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_signals_test-signals_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_test_program_test-test_program_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_text_test-text.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_text_test-text_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_ui_test-ui.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_ui_test-ui_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_user_test-user.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_user_test-user_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/zero_tcs_helper.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo: atf-c/detail/test_helpers.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_c_detail_libtest_helpers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/atf_c_detail_libtest_helpers_la-test_helpers.Tpo -c -o atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo `test -f 'atf-c/detail/test_helpers.c' || echo '$(srcdir)/'`atf-c/detail/test_helpers.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/detail/$(DEPDIR)/atf_c_detail_libtest_helpers_la-test_helpers.Tpo atf-c/detail/$(DEPDIR)/atf_c_detail_libtest_helpers_la-test_helpers.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/detail/test_helpers.c' object='atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_c_detail_libtest_helpers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/atf_c_detail_libtest_helpers_la-test_helpers.Tpo -c -o atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo `test -f 'atf-c/detail/test_helpers.c' || echo '$(srcdir)/'`atf-c/detail/test_helpers.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/detail/$(DEPDIR)/atf_c_detail_libtest_helpers_la-test_helpers.Tpo atf-c/detail/$(DEPDIR)/atf_c_detail_libtest_helpers_la-test_helpers.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/detail/test_helpers.c' object='atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_c_detail_libtest_helpers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo `test -f 'atf-c/detail/test_helpers.c' || echo '$(srcdir)/'`atf-c/detail/test_helpers.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_c_detail_libtest_helpers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/atf_c_detail_libtest_helpers_la-test_helpers.lo `test -f 'atf-c/detail/test_helpers.c' || echo '$(srcdir)/'`atf-c/detail/test_helpers.c atf-c/libatf_c_la-build.lo: atf-c/build.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-build.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-build.Tpo -c -o atf-c/libatf_c_la-build.lo `test -f 'atf-c/build.c' || echo '$(srcdir)/'`atf-c/build.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-build.Tpo atf-c/$(DEPDIR)/libatf_c_la-build.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/build.c' object='atf-c/libatf_c_la-build.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-build.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-build.Tpo -c -o atf-c/libatf_c_la-build.lo `test -f 'atf-c/build.c' || echo '$(srcdir)/'`atf-c/build.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/$(DEPDIR)/libatf_c_la-build.Tpo atf-c/$(DEPDIR)/libatf_c_la-build.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/build.c' object='atf-c/libatf_c_la-build.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-build.lo `test -f 'atf-c/build.c' || echo '$(srcdir)/'`atf-c/build.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-build.lo `test -f 'atf-c/build.c' || echo '$(srcdir)/'`atf-c/build.c atf-c/libatf_c_la-check.lo: atf-c/check.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-check.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-check.Tpo -c -o atf-c/libatf_c_la-check.lo `test -f 'atf-c/check.c' || echo '$(srcdir)/'`atf-c/check.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-check.Tpo atf-c/$(DEPDIR)/libatf_c_la-check.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/check.c' object='atf-c/libatf_c_la-check.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-check.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-check.Tpo -c -o atf-c/libatf_c_la-check.lo `test -f 'atf-c/check.c' || echo '$(srcdir)/'`atf-c/check.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/$(DEPDIR)/libatf_c_la-check.Tpo atf-c/$(DEPDIR)/libatf_c_la-check.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/check.c' object='atf-c/libatf_c_la-check.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-check.lo `test -f 'atf-c/check.c' || echo '$(srcdir)/'`atf-c/check.c - -atf-c/libatf_c_la-config.lo: atf-c/config.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-config.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-config.Tpo -c -o atf-c/libatf_c_la-config.lo `test -f 'atf-c/config.c' || echo '$(srcdir)/'`atf-c/config.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-config.Tpo atf-c/$(DEPDIR)/libatf_c_la-config.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/config.c' object='atf-c/libatf_c_la-config.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-config.lo `test -f 'atf-c/config.c' || echo '$(srcdir)/'`atf-c/config.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-check.lo `test -f 'atf-c/check.c' || echo '$(srcdir)/'`atf-c/check.c atf-c/libatf_c_la-error.lo: atf-c/error.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-error.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-error.Tpo -c -o atf-c/libatf_c_la-error.lo `test -f 'atf-c/error.c' || echo '$(srcdir)/'`atf-c/error.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-error.Tpo atf-c/$(DEPDIR)/libatf_c_la-error.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/error.c' object='atf-c/libatf_c_la-error.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-error.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-error.Tpo -c -o atf-c/libatf_c_la-error.lo `test -f 'atf-c/error.c' || echo '$(srcdir)/'`atf-c/error.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/$(DEPDIR)/libatf_c_la-error.Tpo atf-c/$(DEPDIR)/libatf_c_la-error.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/error.c' object='atf-c/libatf_c_la-error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-error.lo `test -f 'atf-c/error.c' || echo '$(srcdir)/'`atf-c/error.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-error.lo `test -f 'atf-c/error.c' || echo '$(srcdir)/'`atf-c/error.c atf-c/libatf_c_la-tc.lo: atf-c/tc.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-tc.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-tc.Tpo -c -o atf-c/libatf_c_la-tc.lo `test -f 'atf-c/tc.c' || echo '$(srcdir)/'`atf-c/tc.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-tc.Tpo atf-c/$(DEPDIR)/libatf_c_la-tc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/tc.c' object='atf-c/libatf_c_la-tc.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-tc.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-tc.Tpo -c -o atf-c/libatf_c_la-tc.lo `test -f 'atf-c/tc.c' || echo '$(srcdir)/'`atf-c/tc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/$(DEPDIR)/libatf_c_la-tc.Tpo atf-c/$(DEPDIR)/libatf_c_la-tc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/tc.c' object='atf-c/libatf_c_la-tc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-tc.lo `test -f 'atf-c/tc.c' || echo '$(srcdir)/'`atf-c/tc.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-tc.lo `test -f 'atf-c/tc.c' || echo '$(srcdir)/'`atf-c/tc.c atf-c/libatf_c_la-tp.lo: atf-c/tp.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-tp.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-tp.Tpo -c -o atf-c/libatf_c_la-tp.lo `test -f 'atf-c/tp.c' || echo '$(srcdir)/'`atf-c/tp.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-tp.Tpo atf-c/$(DEPDIR)/libatf_c_la-tp.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/tp.c' object='atf-c/libatf_c_la-tp.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-tp.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-tp.Tpo -c -o atf-c/libatf_c_la-tp.lo `test -f 'atf-c/tp.c' || echo '$(srcdir)/'`atf-c/tp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/$(DEPDIR)/libatf_c_la-tp.Tpo atf-c/$(DEPDIR)/libatf_c_la-tp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/tp.c' object='atf-c/libatf_c_la-tp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-tp.lo `test -f 'atf-c/tp.c' || echo '$(srcdir)/'`atf-c/tp.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-tp.lo `test -f 'atf-c/tp.c' || echo '$(srcdir)/'`atf-c/tp.c atf-c/libatf_c_la-utils.lo: atf-c/utils.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-utils.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-utils.Tpo -c -o atf-c/libatf_c_la-utils.lo `test -f 'atf-c/utils.c' || echo '$(srcdir)/'`atf-c/utils.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/$(DEPDIR)/libatf_c_la-utils.Tpo atf-c/$(DEPDIR)/libatf_c_la-utils.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/utils.c' object='atf-c/libatf_c_la-utils.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/libatf_c_la-utils.lo -MD -MP -MF atf-c/$(DEPDIR)/libatf_c_la-utils.Tpo -c -o atf-c/libatf_c_la-utils.lo `test -f 'atf-c/utils.c' || echo '$(srcdir)/'`atf-c/utils.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/$(DEPDIR)/libatf_c_la-utils.Tpo atf-c/$(DEPDIR)/libatf_c_la-utils.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/utils.c' object='atf-c/libatf_c_la-utils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-utils.lo `test -f 'atf-c/utils.c' || echo '$(srcdir)/'`atf-c/utils.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/libatf_c_la-utils.lo `test -f 'atf-c/utils.c' || echo '$(srcdir)/'`atf-c/utils.c atf-c/detail/libatf_c_la-dynstr.lo: atf-c/detail/dynstr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-dynstr.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-dynstr.Tpo -c -o atf-c/detail/libatf_c_la-dynstr.lo `test -f 'atf-c/detail/dynstr.c' || echo '$(srcdir)/'`atf-c/detail/dynstr.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-dynstr.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-dynstr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/detail/dynstr.c' object='atf-c/detail/libatf_c_la-dynstr.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-dynstr.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-dynstr.Tpo -c -o atf-c/detail/libatf_c_la-dynstr.lo `test -f 'atf-c/detail/dynstr.c' || echo '$(srcdir)/'`atf-c/detail/dynstr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-dynstr.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-dynstr.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/detail/dynstr.c' object='atf-c/detail/libatf_c_la-dynstr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-dynstr.lo `test -f 'atf-c/detail/dynstr.c' || echo '$(srcdir)/'`atf-c/detail/dynstr.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-dynstr.lo `test -f 'atf-c/detail/dynstr.c' || echo '$(srcdir)/'`atf-c/detail/dynstr.c atf-c/detail/libatf_c_la-env.lo: atf-c/detail/env.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-env.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-env.Tpo -c -o atf-c/detail/libatf_c_la-env.lo `test -f 'atf-c/detail/env.c' || echo '$(srcdir)/'`atf-c/detail/env.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-env.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-env.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/detail/env.c' object='atf-c/detail/libatf_c_la-env.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-env.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-env.Tpo -c -o atf-c/detail/libatf_c_la-env.lo `test -f 'atf-c/detail/env.c' || echo '$(srcdir)/'`atf-c/detail/env.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-env.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-env.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/detail/env.c' object='atf-c/detail/libatf_c_la-env.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-env.lo `test -f 'atf-c/detail/env.c' || echo '$(srcdir)/'`atf-c/detail/env.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-env.lo `test -f 'atf-c/detail/env.c' || echo '$(srcdir)/'`atf-c/detail/env.c atf-c/detail/libatf_c_la-fs.lo: atf-c/detail/fs.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-fs.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-fs.Tpo -c -o atf-c/detail/libatf_c_la-fs.lo `test -f 'atf-c/detail/fs.c' || echo '$(srcdir)/'`atf-c/detail/fs.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-fs.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-fs.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/detail/fs.c' object='atf-c/detail/libatf_c_la-fs.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-fs.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-fs.Tpo -c -o atf-c/detail/libatf_c_la-fs.lo `test -f 'atf-c/detail/fs.c' || echo '$(srcdir)/'`atf-c/detail/fs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-fs.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-fs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/detail/fs.c' object='atf-c/detail/libatf_c_la-fs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-fs.lo `test -f 'atf-c/detail/fs.c' || echo '$(srcdir)/'`atf-c/detail/fs.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-fs.lo `test -f 'atf-c/detail/fs.c' || echo '$(srcdir)/'`atf-c/detail/fs.c atf-c/detail/libatf_c_la-list.lo: atf-c/detail/list.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-list.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-list.Tpo -c -o atf-c/detail/libatf_c_la-list.lo `test -f 'atf-c/detail/list.c' || echo '$(srcdir)/'`atf-c/detail/list.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-list.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-list.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/detail/list.c' object='atf-c/detail/libatf_c_la-list.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-list.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-list.Tpo -c -o atf-c/detail/libatf_c_la-list.lo `test -f 'atf-c/detail/list.c' || echo '$(srcdir)/'`atf-c/detail/list.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-list.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-list.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/detail/list.c' object='atf-c/detail/libatf_c_la-list.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-list.lo `test -f 'atf-c/detail/list.c' || echo '$(srcdir)/'`atf-c/detail/list.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-list.lo `test -f 'atf-c/detail/list.c' || echo '$(srcdir)/'`atf-c/detail/list.c atf-c/detail/libatf_c_la-map.lo: atf-c/detail/map.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-map.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-map.Tpo -c -o atf-c/detail/libatf_c_la-map.lo `test -f 'atf-c/detail/map.c' || echo '$(srcdir)/'`atf-c/detail/map.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-map.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-map.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/detail/map.c' object='atf-c/detail/libatf_c_la-map.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-map.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-map.Tpo -c -o atf-c/detail/libatf_c_la-map.lo `test -f 'atf-c/detail/map.c' || echo '$(srcdir)/'`atf-c/detail/map.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-map.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-map.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/detail/map.c' object='atf-c/detail/libatf_c_la-map.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-map.lo `test -f 'atf-c/detail/map.c' || echo '$(srcdir)/'`atf-c/detail/map.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-map.lo `test -f 'atf-c/detail/map.c' || echo '$(srcdir)/'`atf-c/detail/map.c atf-c/detail/libatf_c_la-process.lo: atf-c/detail/process.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-process.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-process.Tpo -c -o atf-c/detail/libatf_c_la-process.lo `test -f 'atf-c/detail/process.c' || echo '$(srcdir)/'`atf-c/detail/process.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-process.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-process.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/detail/process.c' object='atf-c/detail/libatf_c_la-process.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-process.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-process.Tpo -c -o atf-c/detail/libatf_c_la-process.lo `test -f 'atf-c/detail/process.c' || echo '$(srcdir)/'`atf-c/detail/process.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-process.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-process.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/detail/process.c' object='atf-c/detail/libatf_c_la-process.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-process.lo `test -f 'atf-c/detail/process.c' || echo '$(srcdir)/'`atf-c/detail/process.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-process.lo `test -f 'atf-c/detail/process.c' || echo '$(srcdir)/'`atf-c/detail/process.c atf-c/detail/libatf_c_la-sanity.lo: atf-c/detail/sanity.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-sanity.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-sanity.Tpo -c -o atf-c/detail/libatf_c_la-sanity.lo `test -f 'atf-c/detail/sanity.c' || echo '$(srcdir)/'`atf-c/detail/sanity.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-sanity.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-sanity.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/detail/sanity.c' object='atf-c/detail/libatf_c_la-sanity.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-sanity.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-sanity.Tpo -c -o atf-c/detail/libatf_c_la-sanity.lo `test -f 'atf-c/detail/sanity.c' || echo '$(srcdir)/'`atf-c/detail/sanity.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-sanity.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-sanity.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/detail/sanity.c' object='atf-c/detail/libatf_c_la-sanity.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-sanity.lo `test -f 'atf-c/detail/sanity.c' || echo '$(srcdir)/'`atf-c/detail/sanity.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-sanity.lo `test -f 'atf-c/detail/sanity.c' || echo '$(srcdir)/'`atf-c/detail/sanity.c atf-c/detail/libatf_c_la-text.lo: atf-c/detail/text.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-text.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-text.Tpo -c -o atf-c/detail/libatf_c_la-text.lo `test -f 'atf-c/detail/text.c' || echo '$(srcdir)/'`atf-c/detail/text.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-text.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-text.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/detail/text.c' object='atf-c/detail/libatf_c_la-text.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-text.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-text.Tpo -c -o atf-c/detail/libatf_c_la-text.lo `test -f 'atf-c/detail/text.c' || echo '$(srcdir)/'`atf-c/detail/text.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-text.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-text.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/detail/text.c' object='atf-c/detail/libatf_c_la-text.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-text.lo `test -f 'atf-c/detail/text.c' || echo '$(srcdir)/'`atf-c/detail/text.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-text.lo `test -f 'atf-c/detail/text.c' || echo '$(srcdir)/'`atf-c/detail/text.c atf-c/detail/libatf_c_la-tp_main.lo: atf-c/detail/tp_main.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-tp_main.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-tp_main.Tpo -c -o atf-c/detail/libatf_c_la-tp_main.lo `test -f 'atf-c/detail/tp_main.c' || echo '$(srcdir)/'`atf-c/detail/tp_main.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-tp_main.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-tp_main.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/detail/tp_main.c' object='atf-c/detail/libatf_c_la-tp_main.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-tp_main.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-tp_main.Tpo -c -o atf-c/detail/libatf_c_la-tp_main.lo `test -f 'atf-c/detail/tp_main.c' || echo '$(srcdir)/'`atf-c/detail/tp_main.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-tp_main.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-tp_main.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/detail/tp_main.c' object='atf-c/detail/libatf_c_la-tp_main.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-tp_main.lo `test -f 'atf-c/detail/tp_main.c' || echo '$(srcdir)/'`atf-c/detail/tp_main.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-tp_main.lo `test -f 'atf-c/detail/tp_main.c' || echo '$(srcdir)/'`atf-c/detail/tp_main.c atf-c/detail/libatf_c_la-user.lo: atf-c/detail/user.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-user.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-user.Tpo -c -o atf-c/detail/libatf_c_la-user.lo `test -f 'atf-c/detail/user.c' || echo '$(srcdir)/'`atf-c/detail/user.c -@am__fastdepCC_TRUE@ $(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-user.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-user.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='atf-c/detail/user.c' object='atf-c/detail/libatf_c_la-user.lo' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT atf-c/detail/libatf_c_la-user.lo -MD -MP -MF atf-c/detail/$(DEPDIR)/libatf_c_la-user.Tpo -c -o atf-c/detail/libatf_c_la-user.lo `test -f 'atf-c/detail/user.c' || echo '$(srcdir)/'`atf-c/detail/user.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) atf-c/detail/$(DEPDIR)/libatf_c_la-user.Tpo atf-c/detail/$(DEPDIR)/libatf_c_la-user.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atf-c/detail/user.c' object='atf-c/detail/libatf_c_la-user.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-user.lo `test -f 'atf-c/detail/user.c' || echo '$(srcdir)/'`atf-c/detail/user.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libatf_c_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atf-c/detail/libatf_c_la-user.lo `test -f 'atf-c/detail/user.c' || echo '$(srcdir)/'`atf-c/detail/user.c .cpp.o: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< -atf-report/atf_report_reader_test-reader_test.o: atf-report/reader_test.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-report/atf_report_reader_test-reader_test.o -MD -MP -MF atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Tpo -c -o atf-report/atf_report_reader_test-reader_test.o `test -f 'atf-report/reader_test.cpp' || echo '$(srcdir)/'`atf-report/reader_test.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Tpo atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-report/reader_test.cpp' object='atf-report/atf_report_reader_test-reader_test.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-application.o: tools/application.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-application.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-application.Tpo -c -o tools/tools_libtools_a-application.o `test -f 'tools/application.cpp' || echo '$(srcdir)/'`tools/application.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-application.Tpo tools/$(DEPDIR)/tools_libtools_a-application.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/application.cpp' object='tools/tools_libtools_a-application.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-report/atf_report_reader_test-reader_test.o `test -f 'atf-report/reader_test.cpp' || echo '$(srcdir)/'`atf-report/reader_test.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-application.o `test -f 'tools/application.cpp' || echo '$(srcdir)/'`tools/application.cpp -atf-report/atf_report_reader_test-reader_test.obj: atf-report/reader_test.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-report/atf_report_reader_test-reader_test.obj -MD -MP -MF atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Tpo -c -o atf-report/atf_report_reader_test-reader_test.obj `if test -f 'atf-report/reader_test.cpp'; then $(CYGPATH_W) 'atf-report/reader_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-report/reader_test.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Tpo atf-report/$(DEPDIR)/atf_report_reader_test-reader_test.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-report/reader_test.cpp' object='atf-report/atf_report_reader_test-reader_test.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-application.obj: tools/application.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-application.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-application.Tpo -c -o tools/tools_libtools_a-application.obj `if test -f 'tools/application.cpp'; then $(CYGPATH_W) 'tools/application.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/application.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-application.Tpo tools/$(DEPDIR)/tools_libtools_a-application.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/application.cpp' object='tools/tools_libtools_a-application.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-report/atf_report_reader_test-reader_test.obj `if test -f 'atf-report/reader_test.cpp'; then $(CYGPATH_W) 'atf-report/reader_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-report/reader_test.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-application.obj `if test -f 'tools/application.cpp'; then $(CYGPATH_W) 'tools/application.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/application.cpp'; fi` -atf-report/atf_report_reader_test-reader.o: atf-report/reader.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-report/atf_report_reader_test-reader.o -MD -MP -MF atf-report/$(DEPDIR)/atf_report_reader_test-reader.Tpo -c -o atf-report/atf_report_reader_test-reader.o `test -f 'atf-report/reader.cpp' || echo '$(srcdir)/'`atf-report/reader.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-report/$(DEPDIR)/atf_report_reader_test-reader.Tpo atf-report/$(DEPDIR)/atf_report_reader_test-reader.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-report/reader.cpp' object='atf-report/atf_report_reader_test-reader.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-atffile.o: tools/atffile.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-atffile.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-atffile.Tpo -c -o tools/tools_libtools_a-atffile.o `test -f 'tools/atffile.cpp' || echo '$(srcdir)/'`tools/atffile.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-atffile.Tpo tools/$(DEPDIR)/tools_libtools_a-atffile.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/atffile.cpp' object='tools/tools_libtools_a-atffile.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-report/atf_report_reader_test-reader.o `test -f 'atf-report/reader.cpp' || echo '$(srcdir)/'`atf-report/reader.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-atffile.o `test -f 'tools/atffile.cpp' || echo '$(srcdir)/'`tools/atffile.cpp -atf-report/atf_report_reader_test-reader.obj: atf-report/reader.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-report/atf_report_reader_test-reader.obj -MD -MP -MF atf-report/$(DEPDIR)/atf_report_reader_test-reader.Tpo -c -o atf-report/atf_report_reader_test-reader.obj `if test -f 'atf-report/reader.cpp'; then $(CYGPATH_W) 'atf-report/reader.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-report/reader.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-report/$(DEPDIR)/atf_report_reader_test-reader.Tpo atf-report/$(DEPDIR)/atf_report_reader_test-reader.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-report/reader.cpp' object='atf-report/atf_report_reader_test-reader.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-atffile.obj: tools/atffile.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-atffile.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-atffile.Tpo -c -o tools/tools_libtools_a-atffile.obj `if test -f 'tools/atffile.cpp'; then $(CYGPATH_W) 'tools/atffile.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/atffile.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-atffile.Tpo tools/$(DEPDIR)/tools_libtools_a-atffile.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/atffile.cpp' object='tools/tools_libtools_a-atffile.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_report_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-report/atf_report_reader_test-reader.obj `if test -f 'atf-report/reader.cpp'; then $(CYGPATH_W) 'atf-report/reader.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-report/reader.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-atffile.obj `if test -f 'tools/atffile.cpp'; then $(CYGPATH_W) 'tools/atffile.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/atffile.cpp'; fi` -atf-run/atf_run_atf_run-atf-run.o: atf-run/atf-run.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-atf-run.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Tpo -c -o atf-run/atf_run_atf_run-atf-run.o `test -f 'atf-run/atf-run.cpp' || echo '$(srcdir)/'`atf-run/atf-run.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/atf-run.cpp' object='atf-run/atf_run_atf_run-atf-run.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-config.o: tools/config.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-config.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-config.Tpo -c -o tools/tools_libtools_a-config.o `test -f 'tools/config.cpp' || echo '$(srcdir)/'`tools/config.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-config.Tpo tools/$(DEPDIR)/tools_libtools_a-config.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/config.cpp' object='tools/tools_libtools_a-config.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-atf-run.o `test -f 'atf-run/atf-run.cpp' || echo '$(srcdir)/'`atf-run/atf-run.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-config.o `test -f 'tools/config.cpp' || echo '$(srcdir)/'`tools/config.cpp -atf-run/atf_run_atf_run-atf-run.obj: atf-run/atf-run.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-atf-run.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Tpo -c -o atf-run/atf_run_atf_run-atf-run.obj `if test -f 'atf-run/atf-run.cpp'; then $(CYGPATH_W) 'atf-run/atf-run.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atf-run.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-atf-run.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/atf-run.cpp' object='atf-run/atf_run_atf_run-atf-run.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-config.obj: tools/config.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-config.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-config.Tpo -c -o tools/tools_libtools_a-config.obj `if test -f 'tools/config.cpp'; then $(CYGPATH_W) 'tools/config.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/config.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-config.Tpo tools/$(DEPDIR)/tools_libtools_a-config.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/config.cpp' object='tools/tools_libtools_a-config.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-atf-run.obj `if test -f 'atf-run/atf-run.cpp'; then $(CYGPATH_W) 'atf-run/atf-run.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atf-run.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-config.obj `if test -f 'tools/config.cpp'; then $(CYGPATH_W) 'tools/config.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/config.cpp'; fi` -atf-run/atf_run_atf_run-atffile.o: atf-run/atffile.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-atffile.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Tpo -c -o atf-run/atf_run_atf_run-atffile.o `test -f 'atf-run/atffile.cpp' || echo '$(srcdir)/'`atf-run/atffile.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/atffile.cpp' object='atf-run/atf_run_atf_run-atffile.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-config_file.o: tools/config_file.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-config_file.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-config_file.Tpo -c -o tools/tools_libtools_a-config_file.o `test -f 'tools/config_file.cpp' || echo '$(srcdir)/'`tools/config_file.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-config_file.Tpo tools/$(DEPDIR)/tools_libtools_a-config_file.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/config_file.cpp' object='tools/tools_libtools_a-config_file.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-atffile.o `test -f 'atf-run/atffile.cpp' || echo '$(srcdir)/'`atf-run/atffile.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-config_file.o `test -f 'tools/config_file.cpp' || echo '$(srcdir)/'`tools/config_file.cpp -atf-run/atf_run_atf_run-atffile.obj: atf-run/atffile.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-atffile.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Tpo -c -o atf-run/atf_run_atf_run-atffile.obj `if test -f 'atf-run/atffile.cpp'; then $(CYGPATH_W) 'atf-run/atffile.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atffile.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-atffile.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/atffile.cpp' object='atf-run/atf_run_atf_run-atffile.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-config_file.obj: tools/config_file.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-config_file.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-config_file.Tpo -c -o tools/tools_libtools_a-config_file.obj `if test -f 'tools/config_file.cpp'; then $(CYGPATH_W) 'tools/config_file.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/config_file.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-config_file.Tpo tools/$(DEPDIR)/tools_libtools_a-config_file.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/config_file.cpp' object='tools/tools_libtools_a-config_file.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-atffile.obj `if test -f 'atf-run/atffile.cpp'; then $(CYGPATH_W) 'atf-run/atffile.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atffile.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-config_file.obj `if test -f 'tools/config_file.cpp'; then $(CYGPATH_W) 'tools/config_file.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/config_file.cpp'; fi` -atf-run/atf_run_atf_run-config.o: atf-run/config.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-config.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-config.Tpo -c -o atf-run/atf_run_atf_run-config.o `test -f 'atf-run/config.cpp' || echo '$(srcdir)/'`atf-run/config.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-config.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-config.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/config.cpp' object='atf-run/atf_run_atf_run-config.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-env.o: tools/env.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-env.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-env.Tpo -c -o tools/tools_libtools_a-env.o `test -f 'tools/env.cpp' || echo '$(srcdir)/'`tools/env.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-env.Tpo tools/$(DEPDIR)/tools_libtools_a-env.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/env.cpp' object='tools/tools_libtools_a-env.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-config.o `test -f 'atf-run/config.cpp' || echo '$(srcdir)/'`atf-run/config.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-env.o `test -f 'tools/env.cpp' || echo '$(srcdir)/'`tools/env.cpp -atf-run/atf_run_atf_run-config.obj: atf-run/config.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-config.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-config.Tpo -c -o atf-run/atf_run_atf_run-config.obj `if test -f 'atf-run/config.cpp'; then $(CYGPATH_W) 'atf-run/config.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/config.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-config.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-config.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/config.cpp' object='atf-run/atf_run_atf_run-config.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-env.obj: tools/env.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-env.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-env.Tpo -c -o tools/tools_libtools_a-env.obj `if test -f 'tools/env.cpp'; then $(CYGPATH_W) 'tools/env.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/env.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-env.Tpo tools/$(DEPDIR)/tools_libtools_a-env.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/env.cpp' object='tools/tools_libtools_a-env.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-config.obj `if test -f 'atf-run/config.cpp'; then $(CYGPATH_W) 'atf-run/config.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/config.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-env.obj `if test -f 'tools/env.cpp'; then $(CYGPATH_W) 'tools/env.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/env.cpp'; fi` -atf-run/atf_run_atf_run-fs.o: atf-run/fs.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-fs.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-fs.Tpo -c -o atf-run/atf_run_atf_run-fs.o `test -f 'atf-run/fs.cpp' || echo '$(srcdir)/'`atf-run/fs.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-fs.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-fs.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/fs.cpp' object='atf-run/atf_run_atf_run-fs.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-exceptions.o: tools/exceptions.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-exceptions.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-exceptions.Tpo -c -o tools/tools_libtools_a-exceptions.o `test -f 'tools/exceptions.cpp' || echo '$(srcdir)/'`tools/exceptions.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-exceptions.Tpo tools/$(DEPDIR)/tools_libtools_a-exceptions.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/exceptions.cpp' object='tools/tools_libtools_a-exceptions.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-fs.o `test -f 'atf-run/fs.cpp' || echo '$(srcdir)/'`atf-run/fs.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-exceptions.o `test -f 'tools/exceptions.cpp' || echo '$(srcdir)/'`tools/exceptions.cpp -atf-run/atf_run_atf_run-fs.obj: atf-run/fs.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-fs.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-fs.Tpo -c -o atf-run/atf_run_atf_run-fs.obj `if test -f 'atf-run/fs.cpp'; then $(CYGPATH_W) 'atf-run/fs.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/fs.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-fs.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-fs.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/fs.cpp' object='atf-run/atf_run_atf_run-fs.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-exceptions.obj: tools/exceptions.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-exceptions.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-exceptions.Tpo -c -o tools/tools_libtools_a-exceptions.obj `if test -f 'tools/exceptions.cpp'; then $(CYGPATH_W) 'tools/exceptions.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/exceptions.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-exceptions.Tpo tools/$(DEPDIR)/tools_libtools_a-exceptions.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/exceptions.cpp' object='tools/tools_libtools_a-exceptions.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-fs.obj `if test -f 'atf-run/fs.cpp'; then $(CYGPATH_W) 'atf-run/fs.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/fs.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-exceptions.obj `if test -f 'tools/exceptions.cpp'; then $(CYGPATH_W) 'tools/exceptions.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/exceptions.cpp'; fi` -atf-run/atf_run_atf_run-io.o: atf-run/io.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-io.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-io.Tpo -c -o atf-run/atf_run_atf_run-io.o `test -f 'atf-run/io.cpp' || echo '$(srcdir)/'`atf-run/io.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-io.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-io.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/io.cpp' object='atf-run/atf_run_atf_run-io.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-expand.o: tools/expand.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-expand.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-expand.Tpo -c -o tools/tools_libtools_a-expand.o `test -f 'tools/expand.cpp' || echo '$(srcdir)/'`tools/expand.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-expand.Tpo tools/$(DEPDIR)/tools_libtools_a-expand.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/expand.cpp' object='tools/tools_libtools_a-expand.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-io.o `test -f 'atf-run/io.cpp' || echo '$(srcdir)/'`atf-run/io.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-expand.o `test -f 'tools/expand.cpp' || echo '$(srcdir)/'`tools/expand.cpp -atf-run/atf_run_atf_run-io.obj: atf-run/io.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-io.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-io.Tpo -c -o atf-run/atf_run_atf_run-io.obj `if test -f 'atf-run/io.cpp'; then $(CYGPATH_W) 'atf-run/io.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/io.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-io.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-io.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/io.cpp' object='atf-run/atf_run_atf_run-io.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-expand.obj: tools/expand.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-expand.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-expand.Tpo -c -o tools/tools_libtools_a-expand.obj `if test -f 'tools/expand.cpp'; then $(CYGPATH_W) 'tools/expand.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/expand.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-expand.Tpo tools/$(DEPDIR)/tools_libtools_a-expand.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/expand.cpp' object='tools/tools_libtools_a-expand.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-io.obj `if test -f 'atf-run/io.cpp'; then $(CYGPATH_W) 'atf-run/io.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/io.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-expand.obj `if test -f 'tools/expand.cpp'; then $(CYGPATH_W) 'tools/expand.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/expand.cpp'; fi` -atf-run/atf_run_atf_run-requirements.o: atf-run/requirements.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-requirements.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Tpo -c -o atf-run/atf_run_atf_run-requirements.o `test -f 'atf-run/requirements.cpp' || echo '$(srcdir)/'`atf-run/requirements.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/requirements.cpp' object='atf-run/atf_run_atf_run-requirements.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-fs.o: tools/fs.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-fs.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-fs.Tpo -c -o tools/tools_libtools_a-fs.o `test -f 'tools/fs.cpp' || echo '$(srcdir)/'`tools/fs.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-fs.Tpo tools/$(DEPDIR)/tools_libtools_a-fs.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/fs.cpp' object='tools/tools_libtools_a-fs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-requirements.o `test -f 'atf-run/requirements.cpp' || echo '$(srcdir)/'`atf-run/requirements.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-fs.o `test -f 'tools/fs.cpp' || echo '$(srcdir)/'`tools/fs.cpp -atf-run/atf_run_atf_run-requirements.obj: atf-run/requirements.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-requirements.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Tpo -c -o atf-run/atf_run_atf_run-requirements.obj `if test -f 'atf-run/requirements.cpp'; then $(CYGPATH_W) 'atf-run/requirements.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/requirements.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-requirements.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/requirements.cpp' object='atf-run/atf_run_atf_run-requirements.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-fs.obj: tools/fs.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-fs.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-fs.Tpo -c -o tools/tools_libtools_a-fs.obj `if test -f 'tools/fs.cpp'; then $(CYGPATH_W) 'tools/fs.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/fs.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-fs.Tpo tools/$(DEPDIR)/tools_libtools_a-fs.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/fs.cpp' object='tools/tools_libtools_a-fs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-requirements.obj `if test -f 'atf-run/requirements.cpp'; then $(CYGPATH_W) 'atf-run/requirements.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/requirements.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-fs.obj `if test -f 'tools/fs.cpp'; then $(CYGPATH_W) 'tools/fs.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/fs.cpp'; fi` -atf-run/atf_run_atf_run-signals.o: atf-run/signals.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-signals.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-signals.Tpo -c -o atf-run/atf_run_atf_run-signals.o `test -f 'atf-run/signals.cpp' || echo '$(srcdir)/'`atf-run/signals.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-signals.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-signals.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/signals.cpp' object='atf-run/atf_run_atf_run-signals.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-io.o: tools/io.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-io.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-io.Tpo -c -o tools/tools_libtools_a-io.o `test -f 'tools/io.cpp' || echo '$(srcdir)/'`tools/io.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-io.Tpo tools/$(DEPDIR)/tools_libtools_a-io.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/io.cpp' object='tools/tools_libtools_a-io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-signals.o `test -f 'atf-run/signals.cpp' || echo '$(srcdir)/'`atf-run/signals.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-io.o `test -f 'tools/io.cpp' || echo '$(srcdir)/'`tools/io.cpp -atf-run/atf_run_atf_run-signals.obj: atf-run/signals.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-signals.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-signals.Tpo -c -o atf-run/atf_run_atf_run-signals.obj `if test -f 'atf-run/signals.cpp'; then $(CYGPATH_W) 'atf-run/signals.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/signals.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-signals.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-signals.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/signals.cpp' object='atf-run/atf_run_atf_run-signals.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-io.obj: tools/io.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-io.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-io.Tpo -c -o tools/tools_libtools_a-io.obj `if test -f 'tools/io.cpp'; then $(CYGPATH_W) 'tools/io.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/io.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-io.Tpo tools/$(DEPDIR)/tools_libtools_a-io.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/io.cpp' object='tools/tools_libtools_a-io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-signals.obj `if test -f 'atf-run/signals.cpp'; then $(CYGPATH_W) 'atf-run/signals.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/signals.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-io.obj `if test -f 'tools/io.cpp'; then $(CYGPATH_W) 'tools/io.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/io.cpp'; fi` -atf-run/atf_run_atf_run-test-program.o: atf-run/test-program.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-test-program.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Tpo -c -o atf-run/atf_run_atf_run-test-program.o `test -f 'atf-run/test-program.cpp' || echo '$(srcdir)/'`atf-run/test-program.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/test-program.cpp' object='atf-run/atf_run_atf_run-test-program.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-parser.o: tools/parser.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-parser.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-parser.Tpo -c -o tools/tools_libtools_a-parser.o `test -f 'tools/parser.cpp' || echo '$(srcdir)/'`tools/parser.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-parser.Tpo tools/$(DEPDIR)/tools_libtools_a-parser.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/parser.cpp' object='tools/tools_libtools_a-parser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-test-program.o `test -f 'atf-run/test-program.cpp' || echo '$(srcdir)/'`atf-run/test-program.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-parser.o `test -f 'tools/parser.cpp' || echo '$(srcdir)/'`tools/parser.cpp -atf-run/atf_run_atf_run-test-program.obj: atf-run/test-program.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-test-program.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Tpo -c -o atf-run/atf_run_atf_run-test-program.obj `if test -f 'atf-run/test-program.cpp'; then $(CYGPATH_W) 'atf-run/test-program.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/test-program.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-test-program.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/test-program.cpp' object='atf-run/atf_run_atf_run-test-program.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-parser.obj: tools/parser.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-parser.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-parser.Tpo -c -o tools/tools_libtools_a-parser.obj `if test -f 'tools/parser.cpp'; then $(CYGPATH_W) 'tools/parser.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/parser.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-parser.Tpo tools/$(DEPDIR)/tools_libtools_a-parser.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/parser.cpp' object='tools/tools_libtools_a-parser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-test-program.obj `if test -f 'atf-run/test-program.cpp'; then $(CYGPATH_W) 'atf-run/test-program.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/test-program.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-parser.obj `if test -f 'tools/parser.cpp'; then $(CYGPATH_W) 'tools/parser.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/parser.cpp'; fi` -atf-run/atf_run_atf_run-timer.o: atf-run/timer.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-timer.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-timer.Tpo -c -o atf-run/atf_run_atf_run-timer.o `test -f 'atf-run/timer.cpp' || echo '$(srcdir)/'`atf-run/timer.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-timer.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-timer.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/timer.cpp' object='atf-run/atf_run_atf_run-timer.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-process.o: tools/process.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-process.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-process.Tpo -c -o tools/tools_libtools_a-process.o `test -f 'tools/process.cpp' || echo '$(srcdir)/'`tools/process.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-process.Tpo tools/$(DEPDIR)/tools_libtools_a-process.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/process.cpp' object='tools/tools_libtools_a-process.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-timer.o `test -f 'atf-run/timer.cpp' || echo '$(srcdir)/'`atf-run/timer.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-process.o `test -f 'tools/process.cpp' || echo '$(srcdir)/'`tools/process.cpp -atf-run/atf_run_atf_run-timer.obj: atf-run/timer.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-timer.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-timer.Tpo -c -o atf-run/atf_run_atf_run-timer.obj `if test -f 'atf-run/timer.cpp'; then $(CYGPATH_W) 'atf-run/timer.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/timer.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-timer.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-timer.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/timer.cpp' object='atf-run/atf_run_atf_run-timer.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-process.obj: tools/process.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-process.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-process.Tpo -c -o tools/tools_libtools_a-process.obj `if test -f 'tools/process.cpp'; then $(CYGPATH_W) 'tools/process.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/process.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-process.Tpo tools/$(DEPDIR)/tools_libtools_a-process.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/process.cpp' object='tools/tools_libtools_a-process.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-timer.obj `if test -f 'atf-run/timer.cpp'; then $(CYGPATH_W) 'atf-run/timer.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/timer.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-process.obj `if test -f 'tools/process.cpp'; then $(CYGPATH_W) 'tools/process.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/process.cpp'; fi` -atf-run/atf_run_atf_run-user.o: atf-run/user.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-user.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-user.Tpo -c -o atf-run/atf_run_atf_run-user.o `test -f 'atf-run/user.cpp' || echo '$(srcdir)/'`atf-run/user.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-user.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-user.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/user.cpp' object='atf-run/atf_run_atf_run-user.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-reader.o: tools/reader.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-reader.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-reader.Tpo -c -o tools/tools_libtools_a-reader.o `test -f 'tools/reader.cpp' || echo '$(srcdir)/'`tools/reader.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-reader.Tpo tools/$(DEPDIR)/tools_libtools_a-reader.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/reader.cpp' object='tools/tools_libtools_a-reader.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-user.o `test -f 'atf-run/user.cpp' || echo '$(srcdir)/'`atf-run/user.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-reader.o `test -f 'tools/reader.cpp' || echo '$(srcdir)/'`tools/reader.cpp -atf-run/atf_run_atf_run-user.obj: atf-run/user.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atf_run-user.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atf_run-user.Tpo -c -o atf-run/atf_run_atf_run-user.obj `if test -f 'atf-run/user.cpp'; then $(CYGPATH_W) 'atf-run/user.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/user.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atf_run-user.Tpo atf-run/$(DEPDIR)/atf_run_atf_run-user.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/user.cpp' object='atf-run/atf_run_atf_run-user.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-reader.obj: tools/reader.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-reader.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-reader.Tpo -c -o tools/tools_libtools_a-reader.obj `if test -f 'tools/reader.cpp'; then $(CYGPATH_W) 'tools/reader.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/reader.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-reader.Tpo tools/$(DEPDIR)/tools_libtools_a-reader.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/reader.cpp' object='tools/tools_libtools_a-reader.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atf_run-user.obj `if test -f 'atf-run/user.cpp'; then $(CYGPATH_W) 'atf-run/user.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/user.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-reader.obj `if test -f 'tools/reader.cpp'; then $(CYGPATH_W) 'tools/reader.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/reader.cpp'; fi` -atf-run/atf_run_atffile_test-atffile_test.o: atf-run/atffile_test.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atffile_test-atffile_test.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Tpo -c -o atf-run/atf_run_atffile_test-atffile_test.o `test -f 'atf-run/atffile_test.cpp' || echo '$(srcdir)/'`atf-run/atffile_test.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Tpo atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/atffile_test.cpp' object='atf-run/atf_run_atffile_test-atffile_test.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-requirements.o: tools/requirements.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-requirements.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-requirements.Tpo -c -o tools/tools_libtools_a-requirements.o `test -f 'tools/requirements.cpp' || echo '$(srcdir)/'`tools/requirements.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-requirements.Tpo tools/$(DEPDIR)/tools_libtools_a-requirements.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/requirements.cpp' object='tools/tools_libtools_a-requirements.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atffile_test-atffile_test.o `test -f 'atf-run/atffile_test.cpp' || echo '$(srcdir)/'`atf-run/atffile_test.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-requirements.o `test -f 'tools/requirements.cpp' || echo '$(srcdir)/'`tools/requirements.cpp -atf-run/atf_run_atffile_test-atffile_test.obj: atf-run/atffile_test.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atffile_test-atffile_test.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Tpo -c -o atf-run/atf_run_atffile_test-atffile_test.obj `if test -f 'atf-run/atffile_test.cpp'; then $(CYGPATH_W) 'atf-run/atffile_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atffile_test.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Tpo atf-run/$(DEPDIR)/atf_run_atffile_test-atffile_test.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/atffile_test.cpp' object='atf-run/atf_run_atffile_test-atffile_test.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-requirements.obj: tools/requirements.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-requirements.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-requirements.Tpo -c -o tools/tools_libtools_a-requirements.obj `if test -f 'tools/requirements.cpp'; then $(CYGPATH_W) 'tools/requirements.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/requirements.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-requirements.Tpo tools/$(DEPDIR)/tools_libtools_a-requirements.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/requirements.cpp' object='tools/tools_libtools_a-requirements.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atffile_test-atffile_test.obj `if test -f 'atf-run/atffile_test.cpp'; then $(CYGPATH_W) 'atf-run/atffile_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atffile_test.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-requirements.obj `if test -f 'tools/requirements.cpp'; then $(CYGPATH_W) 'tools/requirements.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/requirements.cpp'; fi` -atf-run/atf_run_atffile_test-atffile.o: atf-run/atffile.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atffile_test-atffile.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Tpo -c -o atf-run/atf_run_atffile_test-atffile.o `test -f 'atf-run/atffile.cpp' || echo '$(srcdir)/'`atf-run/atffile.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Tpo atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/atffile.cpp' object='atf-run/atf_run_atffile_test-atffile.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-signals.o: tools/signals.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-signals.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-signals.Tpo -c -o tools/tools_libtools_a-signals.o `test -f 'tools/signals.cpp' || echo '$(srcdir)/'`tools/signals.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-signals.Tpo tools/$(DEPDIR)/tools_libtools_a-signals.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/signals.cpp' object='tools/tools_libtools_a-signals.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atffile_test-atffile.o `test -f 'atf-run/atffile.cpp' || echo '$(srcdir)/'`atf-run/atffile.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-signals.o `test -f 'tools/signals.cpp' || echo '$(srcdir)/'`tools/signals.cpp -atf-run/atf_run_atffile_test-atffile.obj: atf-run/atffile.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_atffile_test-atffile.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Tpo -c -o atf-run/atf_run_atffile_test-atffile.obj `if test -f 'atf-run/atffile.cpp'; then $(CYGPATH_W) 'atf-run/atffile.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atffile.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Tpo atf-run/$(DEPDIR)/atf_run_atffile_test-atffile.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/atffile.cpp' object='atf-run/atf_run_atffile_test-atffile.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-signals.obj: tools/signals.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-signals.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-signals.Tpo -c -o tools/tools_libtools_a-signals.obj `if test -f 'tools/signals.cpp'; then $(CYGPATH_W) 'tools/signals.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/signals.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-signals.Tpo tools/$(DEPDIR)/tools_libtools_a-signals.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/signals.cpp' object='tools/tools_libtools_a-signals.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_atffile_test-atffile.obj `if test -f 'atf-run/atffile.cpp'; then $(CYGPATH_W) 'atf-run/atffile.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/atffile.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-signals.obj `if test -f 'tools/signals.cpp'; then $(CYGPATH_W) 'tools/signals.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/signals.cpp'; fi` -atf-run/atf_run_config_test-config_test.o: atf-run/config_test.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_config_test-config_test.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_config_test-config_test.Tpo -c -o atf-run/atf_run_config_test-config_test.o `test -f 'atf-run/config_test.cpp' || echo '$(srcdir)/'`atf-run/config_test.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_config_test-config_test.Tpo atf-run/$(DEPDIR)/atf_run_config_test-config_test.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/config_test.cpp' object='atf-run/atf_run_config_test-config_test.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-test-program.o: tools/test-program.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-test-program.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-test-program.Tpo -c -o tools/tools_libtools_a-test-program.o `test -f 'tools/test-program.cpp' || echo '$(srcdir)/'`tools/test-program.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-test-program.Tpo tools/$(DEPDIR)/tools_libtools_a-test-program.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/test-program.cpp' object='tools/tools_libtools_a-test-program.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_config_test-config_test.o `test -f 'atf-run/config_test.cpp' || echo '$(srcdir)/'`atf-run/config_test.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-test-program.o `test -f 'tools/test-program.cpp' || echo '$(srcdir)/'`tools/test-program.cpp -atf-run/atf_run_config_test-config_test.obj: atf-run/config_test.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_config_test-config_test.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_config_test-config_test.Tpo -c -o atf-run/atf_run_config_test-config_test.obj `if test -f 'atf-run/config_test.cpp'; then $(CYGPATH_W) 'atf-run/config_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/config_test.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_config_test-config_test.Tpo atf-run/$(DEPDIR)/atf_run_config_test-config_test.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/config_test.cpp' object='atf-run/atf_run_config_test-config_test.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-test-program.obj: tools/test-program.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-test-program.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-test-program.Tpo -c -o tools/tools_libtools_a-test-program.obj `if test -f 'tools/test-program.cpp'; then $(CYGPATH_W) 'tools/test-program.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/test-program.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-test-program.Tpo tools/$(DEPDIR)/tools_libtools_a-test-program.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/test-program.cpp' object='tools/tools_libtools_a-test-program.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_config_test-config_test.obj `if test -f 'atf-run/config_test.cpp'; then $(CYGPATH_W) 'atf-run/config_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/config_test.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-test-program.obj `if test -f 'tools/test-program.cpp'; then $(CYGPATH_W) 'tools/test-program.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/test-program.cpp'; fi` -atf-run/atf_run_config_test-config.o: atf-run/config.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_config_test-config.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_config_test-config.Tpo -c -o atf-run/atf_run_config_test-config.o `test -f 'atf-run/config.cpp' || echo '$(srcdir)/'`atf-run/config.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_config_test-config.Tpo atf-run/$(DEPDIR)/atf_run_config_test-config.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/config.cpp' object='atf-run/atf_run_config_test-config.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-text.o: tools/text.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-text.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-text.Tpo -c -o tools/tools_libtools_a-text.o `test -f 'tools/text.cpp' || echo '$(srcdir)/'`tools/text.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-text.Tpo tools/$(DEPDIR)/tools_libtools_a-text.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/text.cpp' object='tools/tools_libtools_a-text.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_config_test-config.o `test -f 'atf-run/config.cpp' || echo '$(srcdir)/'`atf-run/config.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-text.o `test -f 'tools/text.cpp' || echo '$(srcdir)/'`tools/text.cpp -atf-run/atf_run_config_test-config.obj: atf-run/config.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_config_test-config.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_config_test-config.Tpo -c -o atf-run/atf_run_config_test-config.obj `if test -f 'atf-run/config.cpp'; then $(CYGPATH_W) 'atf-run/config.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/config.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_config_test-config.Tpo atf-run/$(DEPDIR)/atf_run_config_test-config.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/config.cpp' object='atf-run/atf_run_config_test-config.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-text.obj: tools/text.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-text.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-text.Tpo -c -o tools/tools_libtools_a-text.obj `if test -f 'tools/text.cpp'; then $(CYGPATH_W) 'tools/text.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/text.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-text.Tpo tools/$(DEPDIR)/tools_libtools_a-text.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/text.cpp' object='tools/tools_libtools_a-text.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_config_test-config.obj `if test -f 'atf-run/config.cpp'; then $(CYGPATH_W) 'atf-run/config.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/config.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-text.obj `if test -f 'tools/text.cpp'; then $(CYGPATH_W) 'tools/text.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/text.cpp'; fi` -atf-run/atf_run_test_program_test-test_program_test.o: atf-run/test_program_test.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-test_program_test.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Tpo -c -o atf-run/atf_run_test_program_test-test_program_test.o `test -f 'atf-run/test_program_test.cpp' || echo '$(srcdir)/'`atf-run/test_program_test.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/test_program_test.cpp' object='atf-run/atf_run_test_program_test-test_program_test.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-timers.o: tools/timers.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-timers.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-timers.Tpo -c -o tools/tools_libtools_a-timers.o `test -f 'tools/timers.cpp' || echo '$(srcdir)/'`tools/timers.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-timers.Tpo tools/$(DEPDIR)/tools_libtools_a-timers.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/timers.cpp' object='tools/tools_libtools_a-timers.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-test_program_test.o `test -f 'atf-run/test_program_test.cpp' || echo '$(srcdir)/'`atf-run/test_program_test.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-timers.o `test -f 'tools/timers.cpp' || echo '$(srcdir)/'`tools/timers.cpp -atf-run/atf_run_test_program_test-test_program_test.obj: atf-run/test_program_test.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-test_program_test.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Tpo -c -o atf-run/atf_run_test_program_test-test_program_test.obj `if test -f 'atf-run/test_program_test.cpp'; then $(CYGPATH_W) 'atf-run/test_program_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/test_program_test.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-test_program_test.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/test_program_test.cpp' object='atf-run/atf_run_test_program_test-test_program_test.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-timers.obj: tools/timers.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-timers.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-timers.Tpo -c -o tools/tools_libtools_a-timers.obj `if test -f 'tools/timers.cpp'; then $(CYGPATH_W) 'tools/timers.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/timers.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-timers.Tpo tools/$(DEPDIR)/tools_libtools_a-timers.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/timers.cpp' object='tools/tools_libtools_a-timers.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-test_program_test.obj `if test -f 'atf-run/test_program_test.cpp'; then $(CYGPATH_W) 'atf-run/test_program_test.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/test_program_test.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-timers.obj `if test -f 'tools/timers.cpp'; then $(CYGPATH_W) 'tools/timers.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/timers.cpp'; fi` -atf-run/atf_run_test_program_test-fs.o: atf-run/fs.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-fs.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Tpo -c -o atf-run/atf_run_test_program_test-fs.o `test -f 'atf-run/fs.cpp' || echo '$(srcdir)/'`atf-run/fs.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/fs.cpp' object='atf-run/atf_run_test_program_test-fs.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-ui.o: tools/ui.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-ui.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-ui.Tpo -c -o tools/tools_libtools_a-ui.o `test -f 'tools/ui.cpp' || echo '$(srcdir)/'`tools/ui.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-ui.Tpo tools/$(DEPDIR)/tools_libtools_a-ui.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ui.cpp' object='tools/tools_libtools_a-ui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-fs.o `test -f 'atf-run/fs.cpp' || echo '$(srcdir)/'`atf-run/fs.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-ui.o `test -f 'tools/ui.cpp' || echo '$(srcdir)/'`tools/ui.cpp -atf-run/atf_run_test_program_test-fs.obj: atf-run/fs.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-fs.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Tpo -c -o atf-run/atf_run_test_program_test-fs.obj `if test -f 'atf-run/fs.cpp'; then $(CYGPATH_W) 'atf-run/fs.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/fs.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-fs.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/fs.cpp' object='atf-run/atf_run_test_program_test-fs.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-ui.obj: tools/ui.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-ui.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-ui.Tpo -c -o tools/tools_libtools_a-ui.obj `if test -f 'tools/ui.cpp'; then $(CYGPATH_W) 'tools/ui.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ui.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-ui.Tpo tools/$(DEPDIR)/tools_libtools_a-ui.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ui.cpp' object='tools/tools_libtools_a-ui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-fs.obj `if test -f 'atf-run/fs.cpp'; then $(CYGPATH_W) 'atf-run/fs.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/fs.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-ui.obj `if test -f 'tools/ui.cpp'; then $(CYGPATH_W) 'tools/ui.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ui.cpp'; fi` -atf-run/atf_run_test_program_test-io.o: atf-run/io.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-io.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-io.Tpo -c -o atf-run/atf_run_test_program_test-io.o `test -f 'atf-run/io.cpp' || echo '$(srcdir)/'`atf-run/io.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-io.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-io.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/io.cpp' object='atf-run/atf_run_test_program_test-io.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-user.o: tools/user.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-user.o -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-user.Tpo -c -o tools/tools_libtools_a-user.o `test -f 'tools/user.cpp' || echo '$(srcdir)/'`tools/user.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-user.Tpo tools/$(DEPDIR)/tools_libtools_a-user.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/user.cpp' object='tools/tools_libtools_a-user.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-io.o `test -f 'atf-run/io.cpp' || echo '$(srcdir)/'`atf-run/io.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-user.o `test -f 'tools/user.cpp' || echo '$(srcdir)/'`tools/user.cpp -atf-run/atf_run_test_program_test-io.obj: atf-run/io.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-io.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-io.Tpo -c -o atf-run/atf_run_test_program_test-io.obj `if test -f 'atf-run/io.cpp'; then $(CYGPATH_W) 'atf-run/io.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/io.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-io.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-io.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/io.cpp' object='atf-run/atf_run_test_program_test-io.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_libtools_a-user.obj: tools/user.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_libtools_a-user.obj -MD -MP -MF tools/$(DEPDIR)/tools_libtools_a-user.Tpo -c -o tools/tools_libtools_a-user.obj `if test -f 'tools/user.cpp'; then $(CYGPATH_W) 'tools/user.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/user.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_libtools_a-user.Tpo tools/$(DEPDIR)/tools_libtools_a-user.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/user.cpp' object='tools/tools_libtools_a-user.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-io.obj `if test -f 'atf-run/io.cpp'; then $(CYGPATH_W) 'atf-run/io.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/io.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_libtools_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_libtools_a-user.obj `if test -f 'tools/user.cpp'; then $(CYGPATH_W) 'tools/user.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/user.cpp'; fi` -atf-run/atf_run_test_program_test-requirements.o: atf-run/requirements.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-requirements.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Tpo -c -o atf-run/atf_run_test_program_test-requirements.o `test -f 'atf-run/requirements.cpp' || echo '$(srcdir)/'`atf-run/requirements.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/requirements.cpp' object='atf-run/atf_run_test_program_test-requirements.o' libtool=no @AMDEPBACKSLASH@ +atf-c++/detail/atf_c___detail_libtest_helpers_la-test_helpers.lo: atf-c++/detail/test_helpers.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_c___detail_libtest_helpers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-c++/detail/atf_c___detail_libtest_helpers_la-test_helpers.lo -MD -MP -MF atf-c++/detail/$(DEPDIR)/atf_c___detail_libtest_helpers_la-test_helpers.Tpo -c -o atf-c++/detail/atf_c___detail_libtest_helpers_la-test_helpers.lo `test -f 'atf-c++/detail/test_helpers.cpp' || echo '$(srcdir)/'`atf-c++/detail/test_helpers.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) atf-c++/detail/$(DEPDIR)/atf_c___detail_libtest_helpers_la-test_helpers.Tpo atf-c++/detail/$(DEPDIR)/atf_c___detail_libtest_helpers_la-test_helpers.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='atf-c++/detail/test_helpers.cpp' object='atf-c++/detail/atf_c___detail_libtest_helpers_la-test_helpers.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-requirements.o `test -f 'atf-run/requirements.cpp' || echo '$(srcdir)/'`atf-run/requirements.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_c___detail_libtest_helpers_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-c++/detail/atf_c___detail_libtest_helpers_la-test_helpers.lo `test -f 'atf-c++/detail/test_helpers.cpp' || echo '$(srcdir)/'`atf-c++/detail/test_helpers.cpp -atf-run/atf_run_test_program_test-requirements.obj: atf-run/requirements.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-requirements.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Tpo -c -o atf-run/atf_run_test_program_test-requirements.obj `if test -f 'atf-run/requirements.cpp'; then $(CYGPATH_W) 'atf-run/requirements.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/requirements.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-requirements.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/requirements.cpp' object='atf-run/atf_run_test_program_test-requirements.obj' libtool=no @AMDEPBACKSLASH@ +atf-sh/atf_sh_atf_check-atf-check.o: atf-sh/atf-check.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_sh_atf_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-sh/atf_sh_atf_check-atf-check.o -MD -MP -MF atf-sh/$(DEPDIR)/atf_sh_atf_check-atf-check.Tpo -c -o atf-sh/atf_sh_atf_check-atf-check.o `test -f 'atf-sh/atf-check.cpp' || echo '$(srcdir)/'`atf-sh/atf-check.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) atf-sh/$(DEPDIR)/atf_sh_atf_check-atf-check.Tpo atf-sh/$(DEPDIR)/atf_sh_atf_check-atf-check.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='atf-sh/atf-check.cpp' object='atf-sh/atf_sh_atf_check-atf-check.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-requirements.obj `if test -f 'atf-run/requirements.cpp'; then $(CYGPATH_W) 'atf-run/requirements.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/requirements.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_sh_atf_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-sh/atf_sh_atf_check-atf-check.o `test -f 'atf-sh/atf-check.cpp' || echo '$(srcdir)/'`atf-sh/atf-check.cpp -atf-run/atf_run_test_program_test-signals.o: atf-run/signals.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-signals.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Tpo -c -o atf-run/atf_run_test_program_test-signals.o `test -f 'atf-run/signals.cpp' || echo '$(srcdir)/'`atf-run/signals.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/signals.cpp' object='atf-run/atf_run_test_program_test-signals.o' libtool=no @AMDEPBACKSLASH@ +atf-sh/atf_sh_atf_check-atf-check.obj: atf-sh/atf-check.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_sh_atf_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-sh/atf_sh_atf_check-atf-check.obj -MD -MP -MF atf-sh/$(DEPDIR)/atf_sh_atf_check-atf-check.Tpo -c -o atf-sh/atf_sh_atf_check-atf-check.obj `if test -f 'atf-sh/atf-check.cpp'; then $(CYGPATH_W) 'atf-sh/atf-check.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-sh/atf-check.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) atf-sh/$(DEPDIR)/atf_sh_atf_check-atf-check.Tpo atf-sh/$(DEPDIR)/atf_sh_atf_check-atf-check.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='atf-sh/atf-check.cpp' object='atf-sh/atf_sh_atf_check-atf-check.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-signals.o `test -f 'atf-run/signals.cpp' || echo '$(srcdir)/'`atf-run/signals.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_sh_atf_check_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-sh/atf_sh_atf_check-atf-check.obj `if test -f 'atf-sh/atf-check.cpp'; then $(CYGPATH_W) 'atf-sh/atf-check.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-sh/atf-check.cpp'; fi` -atf-run/atf_run_test_program_test-signals.obj: atf-run/signals.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-signals.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Tpo -c -o atf-run/atf_run_test_program_test-signals.obj `if test -f 'atf-run/signals.cpp'; then $(CYGPATH_W) 'atf-run/signals.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/signals.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-signals.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/signals.cpp' object='atf-run/atf_run_test_program_test-signals.obj' libtool=no @AMDEPBACKSLASH@ +atf-sh/atf_sh_atf_sh-atf-sh.o: atf-sh/atf-sh.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_sh_atf_sh_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-sh/atf_sh_atf_sh-atf-sh.o -MD -MP -MF atf-sh/$(DEPDIR)/atf_sh_atf_sh-atf-sh.Tpo -c -o atf-sh/atf_sh_atf_sh-atf-sh.o `test -f 'atf-sh/atf-sh.cpp' || echo '$(srcdir)/'`atf-sh/atf-sh.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) atf-sh/$(DEPDIR)/atf_sh_atf_sh-atf-sh.Tpo atf-sh/$(DEPDIR)/atf_sh_atf_sh-atf-sh.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='atf-sh/atf-sh.cpp' object='atf-sh/atf_sh_atf_sh-atf-sh.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-signals.obj `if test -f 'atf-run/signals.cpp'; then $(CYGPATH_W) 'atf-run/signals.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/signals.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_sh_atf_sh_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-sh/atf_sh_atf_sh-atf-sh.o `test -f 'atf-sh/atf-sh.cpp' || echo '$(srcdir)/'`atf-sh/atf-sh.cpp -atf-run/atf_run_test_program_test-test-program.o: atf-run/test-program.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-test-program.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Tpo -c -o atf-run/atf_run_test_program_test-test-program.o `test -f 'atf-run/test-program.cpp' || echo '$(srcdir)/'`atf-run/test-program.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/test-program.cpp' object='atf-run/atf_run_test_program_test-test-program.o' libtool=no @AMDEPBACKSLASH@ +atf-sh/atf_sh_atf_sh-atf-sh.obj: atf-sh/atf-sh.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_sh_atf_sh_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-sh/atf_sh_atf_sh-atf-sh.obj -MD -MP -MF atf-sh/$(DEPDIR)/atf_sh_atf_sh-atf-sh.Tpo -c -o atf-sh/atf_sh_atf_sh-atf-sh.obj `if test -f 'atf-sh/atf-sh.cpp'; then $(CYGPATH_W) 'atf-sh/atf-sh.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-sh/atf-sh.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) atf-sh/$(DEPDIR)/atf_sh_atf_sh-atf-sh.Tpo atf-sh/$(DEPDIR)/atf_sh_atf_sh-atf-sh.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='atf-sh/atf-sh.cpp' object='atf-sh/atf_sh_atf_sh-atf-sh.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-test-program.o `test -f 'atf-run/test-program.cpp' || echo '$(srcdir)/'`atf-run/test-program.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_sh_atf_sh_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-sh/atf_sh_atf_sh-atf-sh.obj `if test -f 'atf-sh/atf-sh.cpp'; then $(CYGPATH_W) 'atf-sh/atf-sh.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-sh/atf-sh.cpp'; fi` -atf-run/atf_run_test_program_test-test-program.obj: atf-run/test-program.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-test-program.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Tpo -c -o atf-run/atf_run_test_program_test-test-program.obj `if test -f 'atf-run/test-program.cpp'; then $(CYGPATH_W) 'atf-run/test-program.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/test-program.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-test-program.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/test-program.cpp' object='atf-run/atf_run_test_program_test-test-program.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_application_test-application_test.o: tools/application_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_application_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_application_test-application_test.o -MD -MP -MF tools/$(DEPDIR)/tools_application_test-application_test.Tpo -c -o tools/tools_application_test-application_test.o `test -f 'tools/application_test.cpp' || echo '$(srcdir)/'`tools/application_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_application_test-application_test.Tpo tools/$(DEPDIR)/tools_application_test-application_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/application_test.cpp' object='tools/tools_application_test-application_test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-test-program.obj `if test -f 'atf-run/test-program.cpp'; then $(CYGPATH_W) 'atf-run/test-program.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/test-program.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_application_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_application_test-application_test.o `test -f 'tools/application_test.cpp' || echo '$(srcdir)/'`tools/application_test.cpp -atf-run/atf_run_test_program_test-timer.o: atf-run/timer.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-timer.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Tpo -c -o atf-run/atf_run_test_program_test-timer.o `test -f 'atf-run/timer.cpp' || echo '$(srcdir)/'`atf-run/timer.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/timer.cpp' object='atf-run/atf_run_test_program_test-timer.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_application_test-application_test.obj: tools/application_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_application_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_application_test-application_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_application_test-application_test.Tpo -c -o tools/tools_application_test-application_test.obj `if test -f 'tools/application_test.cpp'; then $(CYGPATH_W) 'tools/application_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/application_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_application_test-application_test.Tpo tools/$(DEPDIR)/tools_application_test-application_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/application_test.cpp' object='tools/tools_application_test-application_test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-timer.o `test -f 'atf-run/timer.cpp' || echo '$(srcdir)/'`atf-run/timer.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_application_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_application_test-application_test.obj `if test -f 'tools/application_test.cpp'; then $(CYGPATH_W) 'tools/application_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/application_test.cpp'; fi` -atf-run/atf_run_test_program_test-timer.obj: atf-run/timer.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-timer.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Tpo -c -o atf-run/atf_run_test_program_test-timer.obj `if test -f 'atf-run/timer.cpp'; then $(CYGPATH_W) 'atf-run/timer.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/timer.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-timer.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/timer.cpp' object='atf-run/atf_run_test_program_test-timer.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_atf_config-atf-config.o: tools/atf-config.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_config_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_atf_config-atf-config.o -MD -MP -MF tools/$(DEPDIR)/tools_atf_config-atf-config.Tpo -c -o tools/tools_atf_config-atf-config.o `test -f 'tools/atf-config.cpp' || echo '$(srcdir)/'`tools/atf-config.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_atf_config-atf-config.Tpo tools/$(DEPDIR)/tools_atf_config-atf-config.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/atf-config.cpp' object='tools/tools_atf_config-atf-config.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-timer.obj `if test -f 'atf-run/timer.cpp'; then $(CYGPATH_W) 'atf-run/timer.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/timer.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_config_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_atf_config-atf-config.o `test -f 'tools/atf-config.cpp' || echo '$(srcdir)/'`tools/atf-config.cpp -atf-run/atf_run_test_program_test-user.o: atf-run/user.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-user.o -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-user.Tpo -c -o atf-run/atf_run_test_program_test-user.o `test -f 'atf-run/user.cpp' || echo '$(srcdir)/'`atf-run/user.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-user.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-user.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/user.cpp' object='atf-run/atf_run_test_program_test-user.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_atf_config-atf-config.obj: tools/atf-config.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_config_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_atf_config-atf-config.obj -MD -MP -MF tools/$(DEPDIR)/tools_atf_config-atf-config.Tpo -c -o tools/tools_atf_config-atf-config.obj `if test -f 'tools/atf-config.cpp'; then $(CYGPATH_W) 'tools/atf-config.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/atf-config.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_atf_config-atf-config.Tpo tools/$(DEPDIR)/tools_atf_config-atf-config.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/atf-config.cpp' object='tools/tools_atf_config-atf-config.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-user.o `test -f 'atf-run/user.cpp' || echo '$(srcdir)/'`atf-run/user.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_config_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_atf_config-atf-config.obj `if test -f 'tools/atf-config.cpp'; then $(CYGPATH_W) 'tools/atf-config.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/atf-config.cpp'; fi` -atf-run/atf_run_test_program_test-user.obj: atf-run/user.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-run/atf_run_test_program_test-user.obj -MD -MP -MF atf-run/$(DEPDIR)/atf_run_test_program_test-user.Tpo -c -o atf-run/atf_run_test_program_test-user.obj `if test -f 'atf-run/user.cpp'; then $(CYGPATH_W) 'atf-run/user.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/user.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-run/$(DEPDIR)/atf_run_test_program_test-user.Tpo atf-run/$(DEPDIR)/atf_run_test_program_test-user.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-run/user.cpp' object='atf-run/atf_run_test_program_test-user.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_atf_report-atf-report.o: tools/atf-report.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_report_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_atf_report-atf-report.o -MD -MP -MF tools/$(DEPDIR)/tools_atf_report-atf-report.Tpo -c -o tools/tools_atf_report-atf-report.o `test -f 'tools/atf-report.cpp' || echo '$(srcdir)/'`tools/atf-report.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_atf_report-atf-report.Tpo tools/$(DEPDIR)/tools_atf_report-atf-report.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/atf-report.cpp' object='tools/tools_atf_report-atf-report.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_run_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-run/atf_run_test_program_test-user.obj `if test -f 'atf-run/user.cpp'; then $(CYGPATH_W) 'atf-run/user.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-run/user.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_report_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_atf_report-atf-report.o `test -f 'tools/atf-report.cpp' || echo '$(srcdir)/'`tools/atf-report.cpp -atf-version/atf_version_atf_version-atf-version.o: atf-version/atf-version.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_version_atf_version_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-version/atf_version_atf_version-atf-version.o -MD -MP -MF atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Tpo -c -o atf-version/atf_version_atf_version-atf-version.o `test -f 'atf-version/atf-version.cpp' || echo '$(srcdir)/'`atf-version/atf-version.cpp -@am__fastdepCXX_TRUE@ $(am__mv) atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Tpo atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-version/atf-version.cpp' object='atf-version/atf_version_atf_version-atf-version.o' libtool=no @AMDEPBACKSLASH@ +tools/tools_atf_report-atf-report.obj: tools/atf-report.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_report_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_atf_report-atf-report.obj -MD -MP -MF tools/$(DEPDIR)/tools_atf_report-atf-report.Tpo -c -o tools/tools_atf_report-atf-report.obj `if test -f 'tools/atf-report.cpp'; then $(CYGPATH_W) 'tools/atf-report.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/atf-report.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_atf_report-atf-report.Tpo tools/$(DEPDIR)/tools_atf_report-atf-report.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/atf-report.cpp' object='tools/tools_atf_report-atf-report.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_version_atf_version_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-version/atf_version_atf_version-atf-version.o `test -f 'atf-version/atf-version.cpp' || echo '$(srcdir)/'`atf-version/atf-version.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_report_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_atf_report-atf-report.obj `if test -f 'tools/atf-report.cpp'; then $(CYGPATH_W) 'tools/atf-report.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/atf-report.cpp'; fi` -atf-version/atf_version_atf_version-atf-version.obj: atf-version/atf-version.cpp -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_version_atf_version_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT atf-version/atf_version_atf_version-atf-version.obj -MD -MP -MF atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Tpo -c -o atf-version/atf_version_atf_version-atf-version.obj `if test -f 'atf-version/atf-version.cpp'; then $(CYGPATH_W) 'atf-version/atf-version.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-version/atf-version.cpp'; fi` -@am__fastdepCXX_TRUE@ $(am__mv) atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Tpo atf-version/$(DEPDIR)/atf_version_atf_version-atf-version.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='atf-version/atf-version.cpp' object='atf-version/atf_version_atf_version-atf-version.obj' libtool=no @AMDEPBACKSLASH@ +tools/tools_atf_run-atf-run.o: tools/atf-run.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_atf_run-atf-run.o -MD -MP -MF tools/$(DEPDIR)/tools_atf_run-atf-run.Tpo -c -o tools/tools_atf_run-atf-run.o `test -f 'tools/atf-run.cpp' || echo '$(srcdir)/'`tools/atf-run.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_atf_run-atf-run.Tpo tools/$(DEPDIR)/tools_atf_run-atf-run.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/atf-run.cpp' object='tools/tools_atf_run-atf-run.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(atf_version_atf_version_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o atf-version/atf_version_atf_version-atf-version.obj `if test -f 'atf-version/atf-version.cpp'; then $(CYGPATH_W) 'atf-version/atf-version.cpp'; else $(CYGPATH_W) '$(srcdir)/atf-version/atf-version.cpp'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_atf_run-atf-run.o `test -f 'tools/atf-run.cpp' || echo '$(srcdir)/'`tools/atf-run.cpp + +tools/tools_atf_run-atf-run.obj: tools/atf-run.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_atf_run-atf-run.obj -MD -MP -MF tools/$(DEPDIR)/tools_atf_run-atf-run.Tpo -c -o tools/tools_atf_run-atf-run.obj `if test -f 'tools/atf-run.cpp'; then $(CYGPATH_W) 'tools/atf-run.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/atf-run.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_atf_run-atf-run.Tpo tools/$(DEPDIR)/tools_atf_run-atf-run.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/atf-run.cpp' object='tools/tools_atf_run-atf-run.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_run_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_atf_run-atf-run.obj `if test -f 'tools/atf-run.cpp'; then $(CYGPATH_W) 'tools/atf-run.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/atf-run.cpp'; fi` + +tools/tools_atf_version-atf-version.o: tools/atf-version.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_version_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_atf_version-atf-version.o -MD -MP -MF tools/$(DEPDIR)/tools_atf_version-atf-version.Tpo -c -o tools/tools_atf_version-atf-version.o `test -f 'tools/atf-version.cpp' || echo '$(srcdir)/'`tools/atf-version.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_atf_version-atf-version.Tpo tools/$(DEPDIR)/tools_atf_version-atf-version.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/atf-version.cpp' object='tools/tools_atf_version-atf-version.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_version_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_atf_version-atf-version.o `test -f 'tools/atf-version.cpp' || echo '$(srcdir)/'`tools/atf-version.cpp + +tools/tools_atf_version-atf-version.obj: tools/atf-version.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_version_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_atf_version-atf-version.obj -MD -MP -MF tools/$(DEPDIR)/tools_atf_version-atf-version.Tpo -c -o tools/tools_atf_version-atf-version.obj `if test -f 'tools/atf-version.cpp'; then $(CYGPATH_W) 'tools/atf-version.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/atf-version.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_atf_version-atf-version.Tpo tools/$(DEPDIR)/tools_atf_version-atf-version.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/atf-version.cpp' object='tools/tools_atf_version-atf-version.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atf_version_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_atf_version-atf-version.obj `if test -f 'tools/atf-version.cpp'; then $(CYGPATH_W) 'tools/atf-version.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/atf-version.cpp'; fi` + +tools/tools_atffile_test-atffile_test.o: tools/atffile_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_atffile_test-atffile_test.o -MD -MP -MF tools/$(DEPDIR)/tools_atffile_test-atffile_test.Tpo -c -o tools/tools_atffile_test-atffile_test.o `test -f 'tools/atffile_test.cpp' || echo '$(srcdir)/'`tools/atffile_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_atffile_test-atffile_test.Tpo tools/$(DEPDIR)/tools_atffile_test-atffile_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/atffile_test.cpp' object='tools/tools_atffile_test-atffile_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_atffile_test-atffile_test.o `test -f 'tools/atffile_test.cpp' || echo '$(srcdir)/'`tools/atffile_test.cpp + +tools/tools_atffile_test-atffile_test.obj: tools/atffile_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_atffile_test-atffile_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_atffile_test-atffile_test.Tpo -c -o tools/tools_atffile_test-atffile_test.obj `if test -f 'tools/atffile_test.cpp'; then $(CYGPATH_W) 'tools/atffile_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/atffile_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_atffile_test-atffile_test.Tpo tools/$(DEPDIR)/tools_atffile_test-atffile_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/atffile_test.cpp' object='tools/tools_atffile_test-atffile_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_atffile_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_atffile_test-atffile_test.obj `if test -f 'tools/atffile_test.cpp'; then $(CYGPATH_W) 'tools/atffile_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/atffile_test.cpp'; fi` + +tools/tools_auto_array_test-auto_array_test.o: tools/auto_array_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_auto_array_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_auto_array_test-auto_array_test.o -MD -MP -MF tools/$(DEPDIR)/tools_auto_array_test-auto_array_test.Tpo -c -o tools/tools_auto_array_test-auto_array_test.o `test -f 'tools/auto_array_test.cpp' || echo '$(srcdir)/'`tools/auto_array_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_auto_array_test-auto_array_test.Tpo tools/$(DEPDIR)/tools_auto_array_test-auto_array_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/auto_array_test.cpp' object='tools/tools_auto_array_test-auto_array_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_auto_array_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_auto_array_test-auto_array_test.o `test -f 'tools/auto_array_test.cpp' || echo '$(srcdir)/'`tools/auto_array_test.cpp + +tools/tools_auto_array_test-auto_array_test.obj: tools/auto_array_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_auto_array_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_auto_array_test-auto_array_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_auto_array_test-auto_array_test.Tpo -c -o tools/tools_auto_array_test-auto_array_test.obj `if test -f 'tools/auto_array_test.cpp'; then $(CYGPATH_W) 'tools/auto_array_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/auto_array_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_auto_array_test-auto_array_test.Tpo tools/$(DEPDIR)/tools_auto_array_test-auto_array_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/auto_array_test.cpp' object='tools/tools_auto_array_test-auto_array_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_auto_array_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_auto_array_test-auto_array_test.obj `if test -f 'tools/auto_array_test.cpp'; then $(CYGPATH_W) 'tools/auto_array_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/auto_array_test.cpp'; fi` + +tools/tools_config_file_test-config_file_test.o: tools/config_file_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_config_file_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_config_file_test-config_file_test.o -MD -MP -MF tools/$(DEPDIR)/tools_config_file_test-config_file_test.Tpo -c -o tools/tools_config_file_test-config_file_test.o `test -f 'tools/config_file_test.cpp' || echo '$(srcdir)/'`tools/config_file_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_config_file_test-config_file_test.Tpo tools/$(DEPDIR)/tools_config_file_test-config_file_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/config_file_test.cpp' object='tools/tools_config_file_test-config_file_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_config_file_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_config_file_test-config_file_test.o `test -f 'tools/config_file_test.cpp' || echo '$(srcdir)/'`tools/config_file_test.cpp + +tools/tools_config_file_test-config_file_test.obj: tools/config_file_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_config_file_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_config_file_test-config_file_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_config_file_test-config_file_test.Tpo -c -o tools/tools_config_file_test-config_file_test.obj `if test -f 'tools/config_file_test.cpp'; then $(CYGPATH_W) 'tools/config_file_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/config_file_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_config_file_test-config_file_test.Tpo tools/$(DEPDIR)/tools_config_file_test-config_file_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/config_file_test.cpp' object='tools/tools_config_file_test-config_file_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_config_file_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_config_file_test-config_file_test.obj `if test -f 'tools/config_file_test.cpp'; then $(CYGPATH_W) 'tools/config_file_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/config_file_test.cpp'; fi` + +tools/tools_config_test-config_test.o: tools/config_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_config_test-config_test.o -MD -MP -MF tools/$(DEPDIR)/tools_config_test-config_test.Tpo -c -o tools/tools_config_test-config_test.o `test -f 'tools/config_test.cpp' || echo '$(srcdir)/'`tools/config_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_config_test-config_test.Tpo tools/$(DEPDIR)/tools_config_test-config_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/config_test.cpp' object='tools/tools_config_test-config_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_config_test-config_test.o `test -f 'tools/config_test.cpp' || echo '$(srcdir)/'`tools/config_test.cpp + +tools/tools_config_test-config_test.obj: tools/config_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_config_test-config_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_config_test-config_test.Tpo -c -o tools/tools_config_test-config_test.obj `if test -f 'tools/config_test.cpp'; then $(CYGPATH_W) 'tools/config_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/config_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_config_test-config_test.Tpo tools/$(DEPDIR)/tools_config_test-config_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/config_test.cpp' object='tools/tools_config_test-config_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_config_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_config_test-config_test.obj `if test -f 'tools/config_test.cpp'; then $(CYGPATH_W) 'tools/config_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/config_test.cpp'; fi` + +tools/tools_env_test-env_test.o: tools/env_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_env_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_env_test-env_test.o -MD -MP -MF tools/$(DEPDIR)/tools_env_test-env_test.Tpo -c -o tools/tools_env_test-env_test.o `test -f 'tools/env_test.cpp' || echo '$(srcdir)/'`tools/env_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_env_test-env_test.Tpo tools/$(DEPDIR)/tools_env_test-env_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/env_test.cpp' object='tools/tools_env_test-env_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_env_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_env_test-env_test.o `test -f 'tools/env_test.cpp' || echo '$(srcdir)/'`tools/env_test.cpp + +tools/tools_env_test-env_test.obj: tools/env_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_env_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_env_test-env_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_env_test-env_test.Tpo -c -o tools/tools_env_test-env_test.obj `if test -f 'tools/env_test.cpp'; then $(CYGPATH_W) 'tools/env_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/env_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_env_test-env_test.Tpo tools/$(DEPDIR)/tools_env_test-env_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/env_test.cpp' object='tools/tools_env_test-env_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_env_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_env_test-env_test.obj `if test -f 'tools/env_test.cpp'; then $(CYGPATH_W) 'tools/env_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/env_test.cpp'; fi` + +tools/tools_expand_test-expand_test.o: tools/expand_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_expand_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_expand_test-expand_test.o -MD -MP -MF tools/$(DEPDIR)/tools_expand_test-expand_test.Tpo -c -o tools/tools_expand_test-expand_test.o `test -f 'tools/expand_test.cpp' || echo '$(srcdir)/'`tools/expand_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_expand_test-expand_test.Tpo tools/$(DEPDIR)/tools_expand_test-expand_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/expand_test.cpp' object='tools/tools_expand_test-expand_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_expand_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_expand_test-expand_test.o `test -f 'tools/expand_test.cpp' || echo '$(srcdir)/'`tools/expand_test.cpp + +tools/tools_expand_test-expand_test.obj: tools/expand_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_expand_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_expand_test-expand_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_expand_test-expand_test.Tpo -c -o tools/tools_expand_test-expand_test.obj `if test -f 'tools/expand_test.cpp'; then $(CYGPATH_W) 'tools/expand_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/expand_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_expand_test-expand_test.Tpo tools/$(DEPDIR)/tools_expand_test-expand_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/expand_test.cpp' object='tools/tools_expand_test-expand_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_expand_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_expand_test-expand_test.obj `if test -f 'tools/expand_test.cpp'; then $(CYGPATH_W) 'tools/expand_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/expand_test.cpp'; fi` + +tools/tools_fs_test-fs_test.o: tools/fs_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_fs_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_fs_test-fs_test.o -MD -MP -MF tools/$(DEPDIR)/tools_fs_test-fs_test.Tpo -c -o tools/tools_fs_test-fs_test.o `test -f 'tools/fs_test.cpp' || echo '$(srcdir)/'`tools/fs_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_fs_test-fs_test.Tpo tools/$(DEPDIR)/tools_fs_test-fs_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/fs_test.cpp' object='tools/tools_fs_test-fs_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_fs_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_fs_test-fs_test.o `test -f 'tools/fs_test.cpp' || echo '$(srcdir)/'`tools/fs_test.cpp + +tools/tools_fs_test-fs_test.obj: tools/fs_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_fs_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_fs_test-fs_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_fs_test-fs_test.Tpo -c -o tools/tools_fs_test-fs_test.obj `if test -f 'tools/fs_test.cpp'; then $(CYGPATH_W) 'tools/fs_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/fs_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_fs_test-fs_test.Tpo tools/$(DEPDIR)/tools_fs_test-fs_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/fs_test.cpp' object='tools/tools_fs_test-fs_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_fs_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_fs_test-fs_test.obj `if test -f 'tools/fs_test.cpp'; then $(CYGPATH_W) 'tools/fs_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/fs_test.cpp'; fi` + +tools/tools_io_test-io_test.o: tools/io_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_io_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_io_test-io_test.o -MD -MP -MF tools/$(DEPDIR)/tools_io_test-io_test.Tpo -c -o tools/tools_io_test-io_test.o `test -f 'tools/io_test.cpp' || echo '$(srcdir)/'`tools/io_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_io_test-io_test.Tpo tools/$(DEPDIR)/tools_io_test-io_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/io_test.cpp' object='tools/tools_io_test-io_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_io_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_io_test-io_test.o `test -f 'tools/io_test.cpp' || echo '$(srcdir)/'`tools/io_test.cpp + +tools/tools_io_test-io_test.obj: tools/io_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_io_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_io_test-io_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_io_test-io_test.Tpo -c -o tools/tools_io_test-io_test.obj `if test -f 'tools/io_test.cpp'; then $(CYGPATH_W) 'tools/io_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/io_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_io_test-io_test.Tpo tools/$(DEPDIR)/tools_io_test-io_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/io_test.cpp' object='tools/tools_io_test-io_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_io_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_io_test-io_test.obj `if test -f 'tools/io_test.cpp'; then $(CYGPATH_W) 'tools/io_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/io_test.cpp'; fi` + +tools/tools_misc_helpers-misc_helpers.o: tools/misc_helpers.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_misc_helpers_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_misc_helpers-misc_helpers.o -MD -MP -MF tools/$(DEPDIR)/tools_misc_helpers-misc_helpers.Tpo -c -o tools/tools_misc_helpers-misc_helpers.o `test -f 'tools/misc_helpers.cpp' || echo '$(srcdir)/'`tools/misc_helpers.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_misc_helpers-misc_helpers.Tpo tools/$(DEPDIR)/tools_misc_helpers-misc_helpers.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/misc_helpers.cpp' object='tools/tools_misc_helpers-misc_helpers.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_misc_helpers_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_misc_helpers-misc_helpers.o `test -f 'tools/misc_helpers.cpp' || echo '$(srcdir)/'`tools/misc_helpers.cpp + +tools/tools_misc_helpers-misc_helpers.obj: tools/misc_helpers.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_misc_helpers_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_misc_helpers-misc_helpers.obj -MD -MP -MF tools/$(DEPDIR)/tools_misc_helpers-misc_helpers.Tpo -c -o tools/tools_misc_helpers-misc_helpers.obj `if test -f 'tools/misc_helpers.cpp'; then $(CYGPATH_W) 'tools/misc_helpers.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/misc_helpers.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_misc_helpers-misc_helpers.Tpo tools/$(DEPDIR)/tools_misc_helpers-misc_helpers.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/misc_helpers.cpp' object='tools/tools_misc_helpers-misc_helpers.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_misc_helpers_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_misc_helpers-misc_helpers.obj `if test -f 'tools/misc_helpers.cpp'; then $(CYGPATH_W) 'tools/misc_helpers.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/misc_helpers.cpp'; fi` + +tools/tools_parser_test-parser_test.o: tools/parser_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_parser_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_parser_test-parser_test.o -MD -MP -MF tools/$(DEPDIR)/tools_parser_test-parser_test.Tpo -c -o tools/tools_parser_test-parser_test.o `test -f 'tools/parser_test.cpp' || echo '$(srcdir)/'`tools/parser_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_parser_test-parser_test.Tpo tools/$(DEPDIR)/tools_parser_test-parser_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/parser_test.cpp' object='tools/tools_parser_test-parser_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_parser_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_parser_test-parser_test.o `test -f 'tools/parser_test.cpp' || echo '$(srcdir)/'`tools/parser_test.cpp + +tools/tools_parser_test-parser_test.obj: tools/parser_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_parser_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_parser_test-parser_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_parser_test-parser_test.Tpo -c -o tools/tools_parser_test-parser_test.obj `if test -f 'tools/parser_test.cpp'; then $(CYGPATH_W) 'tools/parser_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/parser_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_parser_test-parser_test.Tpo tools/$(DEPDIR)/tools_parser_test-parser_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/parser_test.cpp' object='tools/tools_parser_test-parser_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_parser_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_parser_test-parser_test.obj `if test -f 'tools/parser_test.cpp'; then $(CYGPATH_W) 'tools/parser_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/parser_test.cpp'; fi` + +tools/tools_process_test-process_test.o: tools/process_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_process_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_process_test-process_test.o -MD -MP -MF tools/$(DEPDIR)/tools_process_test-process_test.Tpo -c -o tools/tools_process_test-process_test.o `test -f 'tools/process_test.cpp' || echo '$(srcdir)/'`tools/process_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_process_test-process_test.Tpo tools/$(DEPDIR)/tools_process_test-process_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/process_test.cpp' object='tools/tools_process_test-process_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_process_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_process_test-process_test.o `test -f 'tools/process_test.cpp' || echo '$(srcdir)/'`tools/process_test.cpp + +tools/tools_process_test-process_test.obj: tools/process_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_process_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_process_test-process_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_process_test-process_test.Tpo -c -o tools/tools_process_test-process_test.obj `if test -f 'tools/process_test.cpp'; then $(CYGPATH_W) 'tools/process_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/process_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_process_test-process_test.Tpo tools/$(DEPDIR)/tools_process_test-process_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/process_test.cpp' object='tools/tools_process_test-process_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_process_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_process_test-process_test.obj `if test -f 'tools/process_test.cpp'; then $(CYGPATH_W) 'tools/process_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/process_test.cpp'; fi` + +tools/tools_reader_test-reader_test.o: tools/reader_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_reader_test-reader_test.o -MD -MP -MF tools/$(DEPDIR)/tools_reader_test-reader_test.Tpo -c -o tools/tools_reader_test-reader_test.o `test -f 'tools/reader_test.cpp' || echo '$(srcdir)/'`tools/reader_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_reader_test-reader_test.Tpo tools/$(DEPDIR)/tools_reader_test-reader_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/reader_test.cpp' object='tools/tools_reader_test-reader_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_reader_test-reader_test.o `test -f 'tools/reader_test.cpp' || echo '$(srcdir)/'`tools/reader_test.cpp + +tools/tools_reader_test-reader_test.obj: tools/reader_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_reader_test-reader_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_reader_test-reader_test.Tpo -c -o tools/tools_reader_test-reader_test.obj `if test -f 'tools/reader_test.cpp'; then $(CYGPATH_W) 'tools/reader_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/reader_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_reader_test-reader_test.Tpo tools/$(DEPDIR)/tools_reader_test-reader_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/reader_test.cpp' object='tools/tools_reader_test-reader_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_reader_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_reader_test-reader_test.obj `if test -f 'tools/reader_test.cpp'; then $(CYGPATH_W) 'tools/reader_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/reader_test.cpp'; fi` + +tools/tools_requirements_test-requirements_test.o: tools/requirements_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_requirements_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_requirements_test-requirements_test.o -MD -MP -MF tools/$(DEPDIR)/tools_requirements_test-requirements_test.Tpo -c -o tools/tools_requirements_test-requirements_test.o `test -f 'tools/requirements_test.cpp' || echo '$(srcdir)/'`tools/requirements_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_requirements_test-requirements_test.Tpo tools/$(DEPDIR)/tools_requirements_test-requirements_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/requirements_test.cpp' object='tools/tools_requirements_test-requirements_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_requirements_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_requirements_test-requirements_test.o `test -f 'tools/requirements_test.cpp' || echo '$(srcdir)/'`tools/requirements_test.cpp + +tools/tools_requirements_test-requirements_test.obj: tools/requirements_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_requirements_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_requirements_test-requirements_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_requirements_test-requirements_test.Tpo -c -o tools/tools_requirements_test-requirements_test.obj `if test -f 'tools/requirements_test.cpp'; then $(CYGPATH_W) 'tools/requirements_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/requirements_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_requirements_test-requirements_test.Tpo tools/$(DEPDIR)/tools_requirements_test-requirements_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/requirements_test.cpp' object='tools/tools_requirements_test-requirements_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_requirements_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_requirements_test-requirements_test.obj `if test -f 'tools/requirements_test.cpp'; then $(CYGPATH_W) 'tools/requirements_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/requirements_test.cpp'; fi` + +tools/tools_signals_test-signals_test.o: tools/signals_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_signals_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_signals_test-signals_test.o -MD -MP -MF tools/$(DEPDIR)/tools_signals_test-signals_test.Tpo -c -o tools/tools_signals_test-signals_test.o `test -f 'tools/signals_test.cpp' || echo '$(srcdir)/'`tools/signals_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_signals_test-signals_test.Tpo tools/$(DEPDIR)/tools_signals_test-signals_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/signals_test.cpp' object='tools/tools_signals_test-signals_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_signals_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_signals_test-signals_test.o `test -f 'tools/signals_test.cpp' || echo '$(srcdir)/'`tools/signals_test.cpp + +tools/tools_signals_test-signals_test.obj: tools/signals_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_signals_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_signals_test-signals_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_signals_test-signals_test.Tpo -c -o tools/tools_signals_test-signals_test.obj `if test -f 'tools/signals_test.cpp'; then $(CYGPATH_W) 'tools/signals_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/signals_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_signals_test-signals_test.Tpo tools/$(DEPDIR)/tools_signals_test-signals_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/signals_test.cpp' object='tools/tools_signals_test-signals_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_signals_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_signals_test-signals_test.obj `if test -f 'tools/signals_test.cpp'; then $(CYGPATH_W) 'tools/signals_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/signals_test.cpp'; fi` + +tools/tools_signals_test-signals.o: tools/signals.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_signals_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_signals_test-signals.o -MD -MP -MF tools/$(DEPDIR)/tools_signals_test-signals.Tpo -c -o tools/tools_signals_test-signals.o `test -f 'tools/signals.cpp' || echo '$(srcdir)/'`tools/signals.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_signals_test-signals.Tpo tools/$(DEPDIR)/tools_signals_test-signals.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/signals.cpp' object='tools/tools_signals_test-signals.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_signals_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_signals_test-signals.o `test -f 'tools/signals.cpp' || echo '$(srcdir)/'`tools/signals.cpp + +tools/tools_signals_test-signals.obj: tools/signals.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_signals_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_signals_test-signals.obj -MD -MP -MF tools/$(DEPDIR)/tools_signals_test-signals.Tpo -c -o tools/tools_signals_test-signals.obj `if test -f 'tools/signals.cpp'; then $(CYGPATH_W) 'tools/signals.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/signals.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_signals_test-signals.Tpo tools/$(DEPDIR)/tools_signals_test-signals.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/signals.cpp' object='tools/tools_signals_test-signals.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_signals_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_signals_test-signals.obj `if test -f 'tools/signals.cpp'; then $(CYGPATH_W) 'tools/signals.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/signals.cpp'; fi` + +tools/tools_test_program_test-test_program_test.o: tools/test_program_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_test_program_test-test_program_test.o -MD -MP -MF tools/$(DEPDIR)/tools_test_program_test-test_program_test.Tpo -c -o tools/tools_test_program_test-test_program_test.o `test -f 'tools/test_program_test.cpp' || echo '$(srcdir)/'`tools/test_program_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_test_program_test-test_program_test.Tpo tools/$(DEPDIR)/tools_test_program_test-test_program_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/test_program_test.cpp' object='tools/tools_test_program_test-test_program_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_test_program_test-test_program_test.o `test -f 'tools/test_program_test.cpp' || echo '$(srcdir)/'`tools/test_program_test.cpp + +tools/tools_test_program_test-test_program_test.obj: tools/test_program_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_test_program_test-test_program_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_test_program_test-test_program_test.Tpo -c -o tools/tools_test_program_test-test_program_test.obj `if test -f 'tools/test_program_test.cpp'; then $(CYGPATH_W) 'tools/test_program_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/test_program_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_test_program_test-test_program_test.Tpo tools/$(DEPDIR)/tools_test_program_test-test_program_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/test_program_test.cpp' object='tools/tools_test_program_test-test_program_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_test_program_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_test_program_test-test_program_test.obj `if test -f 'tools/test_program_test.cpp'; then $(CYGPATH_W) 'tools/test_program_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/test_program_test.cpp'; fi` + +tools/tools_text_test-text_test.o: tools/text_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_text_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_text_test-text_test.o -MD -MP -MF tools/$(DEPDIR)/tools_text_test-text_test.Tpo -c -o tools/tools_text_test-text_test.o `test -f 'tools/text_test.cpp' || echo '$(srcdir)/'`tools/text_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_text_test-text_test.Tpo tools/$(DEPDIR)/tools_text_test-text_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/text_test.cpp' object='tools/tools_text_test-text_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_text_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_text_test-text_test.o `test -f 'tools/text_test.cpp' || echo '$(srcdir)/'`tools/text_test.cpp + +tools/tools_text_test-text_test.obj: tools/text_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_text_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_text_test-text_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_text_test-text_test.Tpo -c -o tools/tools_text_test-text_test.obj `if test -f 'tools/text_test.cpp'; then $(CYGPATH_W) 'tools/text_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/text_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_text_test-text_test.Tpo tools/$(DEPDIR)/tools_text_test-text_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/text_test.cpp' object='tools/tools_text_test-text_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_text_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_text_test-text_test.obj `if test -f 'tools/text_test.cpp'; then $(CYGPATH_W) 'tools/text_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/text_test.cpp'; fi` + +tools/tools_text_test-text.o: tools/text.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_text_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_text_test-text.o -MD -MP -MF tools/$(DEPDIR)/tools_text_test-text.Tpo -c -o tools/tools_text_test-text.o `test -f 'tools/text.cpp' || echo '$(srcdir)/'`tools/text.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_text_test-text.Tpo tools/$(DEPDIR)/tools_text_test-text.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/text.cpp' object='tools/tools_text_test-text.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_text_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_text_test-text.o `test -f 'tools/text.cpp' || echo '$(srcdir)/'`tools/text.cpp + +tools/tools_text_test-text.obj: tools/text.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_text_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_text_test-text.obj -MD -MP -MF tools/$(DEPDIR)/tools_text_test-text.Tpo -c -o tools/tools_text_test-text.obj `if test -f 'tools/text.cpp'; then $(CYGPATH_W) 'tools/text.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/text.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_text_test-text.Tpo tools/$(DEPDIR)/tools_text_test-text.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/text.cpp' object='tools/tools_text_test-text.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_text_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_text_test-text.obj `if test -f 'tools/text.cpp'; then $(CYGPATH_W) 'tools/text.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/text.cpp'; fi` + +tools/tools_ui_test-ui_test.o: tools/ui_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_ui_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_ui_test-ui_test.o -MD -MP -MF tools/$(DEPDIR)/tools_ui_test-ui_test.Tpo -c -o tools/tools_ui_test-ui_test.o `test -f 'tools/ui_test.cpp' || echo '$(srcdir)/'`tools/ui_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_ui_test-ui_test.Tpo tools/$(DEPDIR)/tools_ui_test-ui_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ui_test.cpp' object='tools/tools_ui_test-ui_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_ui_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_ui_test-ui_test.o `test -f 'tools/ui_test.cpp' || echo '$(srcdir)/'`tools/ui_test.cpp + +tools/tools_ui_test-ui_test.obj: tools/ui_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_ui_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_ui_test-ui_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_ui_test-ui_test.Tpo -c -o tools/tools_ui_test-ui_test.obj `if test -f 'tools/ui_test.cpp'; then $(CYGPATH_W) 'tools/ui_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ui_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_ui_test-ui_test.Tpo tools/$(DEPDIR)/tools_ui_test-ui_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ui_test.cpp' object='tools/tools_ui_test-ui_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_ui_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_ui_test-ui_test.obj `if test -f 'tools/ui_test.cpp'; then $(CYGPATH_W) 'tools/ui_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ui_test.cpp'; fi` + +tools/tools_ui_test-ui.o: tools/ui.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_ui_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_ui_test-ui.o -MD -MP -MF tools/$(DEPDIR)/tools_ui_test-ui.Tpo -c -o tools/tools_ui_test-ui.o `test -f 'tools/ui.cpp' || echo '$(srcdir)/'`tools/ui.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_ui_test-ui.Tpo tools/$(DEPDIR)/tools_ui_test-ui.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ui.cpp' object='tools/tools_ui_test-ui.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_ui_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_ui_test-ui.o `test -f 'tools/ui.cpp' || echo '$(srcdir)/'`tools/ui.cpp + +tools/tools_ui_test-ui.obj: tools/ui.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_ui_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_ui_test-ui.obj -MD -MP -MF tools/$(DEPDIR)/tools_ui_test-ui.Tpo -c -o tools/tools_ui_test-ui.obj `if test -f 'tools/ui.cpp'; then $(CYGPATH_W) 'tools/ui.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ui.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_ui_test-ui.Tpo tools/$(DEPDIR)/tools_ui_test-ui.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ui.cpp' object='tools/tools_ui_test-ui.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_ui_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_ui_test-ui.obj `if test -f 'tools/ui.cpp'; then $(CYGPATH_W) 'tools/ui.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ui.cpp'; fi` + +tools/tools_user_test-user_test.o: tools/user_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_user_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_user_test-user_test.o -MD -MP -MF tools/$(DEPDIR)/tools_user_test-user_test.Tpo -c -o tools/tools_user_test-user_test.o `test -f 'tools/user_test.cpp' || echo '$(srcdir)/'`tools/user_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_user_test-user_test.Tpo tools/$(DEPDIR)/tools_user_test-user_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/user_test.cpp' object='tools/tools_user_test-user_test.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_user_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_user_test-user_test.o `test -f 'tools/user_test.cpp' || echo '$(srcdir)/'`tools/user_test.cpp + +tools/tools_user_test-user_test.obj: tools/user_test.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_user_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_user_test-user_test.obj -MD -MP -MF tools/$(DEPDIR)/tools_user_test-user_test.Tpo -c -o tools/tools_user_test-user_test.obj `if test -f 'tools/user_test.cpp'; then $(CYGPATH_W) 'tools/user_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/user_test.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_user_test-user_test.Tpo tools/$(DEPDIR)/tools_user_test-user_test.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/user_test.cpp' object='tools/tools_user_test-user_test.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_user_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_user_test-user_test.obj `if test -f 'tools/user_test.cpp'; then $(CYGPATH_W) 'tools/user_test.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/user_test.cpp'; fi` + +tools/tools_user_test-user.o: tools/user.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_user_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_user_test-user.o -MD -MP -MF tools/$(DEPDIR)/tools_user_test-user.Tpo -c -o tools/tools_user_test-user.o `test -f 'tools/user.cpp' || echo '$(srcdir)/'`tools/user.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_user_test-user.Tpo tools/$(DEPDIR)/tools_user_test-user.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/user.cpp' object='tools/tools_user_test-user.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_user_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_user_test-user.o `test -f 'tools/user.cpp' || echo '$(srcdir)/'`tools/user.cpp + +tools/tools_user_test-user.obj: tools/user.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_user_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT tools/tools_user_test-user.obj -MD -MP -MF tools/$(DEPDIR)/tools_user_test-user.Tpo -c -o tools/tools_user_test-user.obj `if test -f 'tools/user.cpp'; then $(CYGPATH_W) 'tools/user.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/user.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_user_test-user.Tpo tools/$(DEPDIR)/tools_user_test-user.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/user.cpp' object='tools/tools_user_test-user.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_user_test_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o tools/tools_user_test-user.obj `if test -f 'tools/user.cpp'; then $(CYGPATH_W) 'tools/user.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/user.cpp'; fi` mostlyclean-libtool: -rm -f *.lo @@ -3833,13 +4151,10 @@ clean-libtool: -rm -rf atf-c++/.libs atf-c++/_libs -rm -rf atf-c++/detail/.libs atf-c++/detail/_libs -rm -rf atf-c/detail/.libs atf-c/detail/_libs - -rm -rf atf-config/.libs atf-config/_libs - -rm -rf atf-report/.libs atf-report/_libs - -rm -rf atf-run/.libs atf-run/_libs -rm -rf atf-sh/.libs atf-sh/_libs - -rm -rf atf-version/.libs atf-version/_libs -rm -rf bootstrap/.libs bootstrap/_libs -rm -rf test-programs/.libs test-programs/_libs + -rm -rf tools/.libs tools/_libs distclean-libtool: -rm -f libtool config.lt @@ -4373,69 +4688,6 @@ uninstall-tests_atf_c_detailDATA: @list='$(tests_atf_c_detail_DATA)'; test -n "$(tests_atf_c_detaildir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(tests_atf_c_detaildir)'; $(am__uninstall_files_from_dir) -install-tests_atf_configDATA: $(tests_atf_config_DATA) - @$(NORMAL_INSTALL) - @list='$(tests_atf_config_DATA)'; test -n "$(tests_atf_configdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_configdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(tests_atf_configdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tests_atf_configdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(tests_atf_configdir)" || exit $$?; \ - done - -uninstall-tests_atf_configDATA: - @$(NORMAL_UNINSTALL) - @list='$(tests_atf_config_DATA)'; test -n "$(tests_atf_configdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(tests_atf_configdir)'; $(am__uninstall_files_from_dir) -install-tests_atf_reportDATA: $(tests_atf_report_DATA) - @$(NORMAL_INSTALL) - @list='$(tests_atf_report_DATA)'; test -n "$(tests_atf_reportdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_reportdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(tests_atf_reportdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tests_atf_reportdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(tests_atf_reportdir)" || exit $$?; \ - done - -uninstall-tests_atf_reportDATA: - @$(NORMAL_UNINSTALL) - @list='$(tests_atf_report_DATA)'; test -n "$(tests_atf_reportdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(tests_atf_reportdir)'; $(am__uninstall_files_from_dir) -install-tests_atf_runDATA: $(tests_atf_run_DATA) - @$(NORMAL_INSTALL) - @list='$(tests_atf_run_DATA)'; test -n "$(tests_atf_rundir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(tests_atf_rundir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(tests_atf_rundir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tests_atf_rundir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(tests_atf_rundir)" || exit $$?; \ - done - -uninstall-tests_atf_runDATA: - @$(NORMAL_UNINSTALL) - @list='$(tests_atf_run_DATA)'; test -n "$(tests_atf_rundir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(tests_atf_rundir)'; $(am__uninstall_files_from_dir) install-tests_atf_shDATA: $(tests_atf_sh_DATA) @$(NORMAL_INSTALL) @list='$(tests_atf_sh_DATA)'; test -n "$(tests_atf_shdir)" || list=; \ @@ -4478,6 +4730,27 @@ uninstall-tests_test_programsDATA: @list='$(tests_test_programs_DATA)'; test -n "$(tests_test_programsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(tests_test_programsdir)'; $(am__uninstall_files_from_dir) +install-tests_toolsDATA: $(tests_tools_DATA) + @$(NORMAL_INSTALL) + @list='$(tests_tools_DATA)'; test -n "$(tests_toolsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(tests_toolsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(tests_toolsdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tests_toolsdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(tests_toolsdir)" || exit $$?; \ + done + +uninstall-tests_toolsDATA: + @$(NORMAL_UNINSTALL) + @list='$(tests_tools_DATA)'; test -n "$(tests_toolsdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(tests_toolsdir)'; $(am__uninstall_files_from_dir) install-xslDATA: $(xsl_DATA) @$(NORMAL_INSTALL) @list='$(xsl_DATA)'; test -n "$(xsldir)" || list=; \ @@ -4562,27 +4835,37 @@ uninstall-includeHEADERS: @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) +install-nodist_atf_cHEADERS: $(nodist_atf_c_HEADERS) + @$(NORMAL_INSTALL) + @list='$(nodist_atf_c_HEADERS)'; test -n "$(atf_cdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(atf_cdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(atf_cdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(atf_cdir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(atf_cdir)" || exit $$?; \ + done -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS +uninstall-nodist_atf_cHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nodist_atf_c_HEADERS)'; test -n "$(atf_cdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(atf_cdir)'; $(am__uninstall_files_from_dir) -TAGS: $(HEADERS) $(SOURCES) bconfig.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) bconfig.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -4594,15 +4877,11 @@ TAGS: $(HEADERS) $(SOURCES) bconfig.h.in $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) bconfig.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) bconfig.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -4611,18 +4890,16 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" - cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) - clean-cscope: -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-am -cscope.files: clean-cscope cscopelist - -cscopelist: $(HEADERS) $(SOURCES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP)'; \ +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ @@ -4646,19 +4923,6 @@ distdir: $(DISTFILES) echo "NEWS not updated; not releasing" 1>&2; \ exit 1;; \ esac - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically 'make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -4701,7 +4965,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -4717,11 +4981,17 @@ dist-xz: distdir $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -4739,7 +5009,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -4749,22 +5019,23 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod u+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -4821,12 +5092,12 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \ - $(HEADERS) bconfig.h +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) \ + $(MANS) $(DATA) $(HEADERS) config.h install-binPROGRAMS: install-libLTLIBRARIES installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_c___detaildir)" "$(DESTDIR)$(tests_atf_c_detaildir)" "$(DESTDIR)$(tests_atf_reportdir)" "$(DESTDIR)$(tests_atf_rundir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_configdir)" "$(DESTDIR)$(tests_atf_reportdir)" "$(DESTDIR)$(tests_atf_rundir)" "$(DESTDIR)$(tests_atf_shdir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(atf_aclocaldir)" "$(DESTDIR)$(atf_c__dirpkgconfigdir)" "$(DESTDIR)$(atf_cpkgconfigdir)" "$(DESTDIR)$(atf_shdir)" "$(DESTDIR)$(atf_shpkgconfigdir)" "$(DESTDIR)$(cssdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(dtddir)" "$(DESTDIR)$(egdir)" "$(DESTDIR)$(hooksdir)" "$(DESTDIR)$(pkgtestsdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_c___detaildir)" "$(DESTDIR)$(tests_atf_c_detaildir)" "$(DESTDIR)$(tests_atf_configdir)" "$(DESTDIR)$(tests_atf_reportdir)" "$(DESTDIR)$(tests_atf_rundir)" "$(DESTDIR)$(tests_atf_shdir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(xsldir)" "$(DESTDIR)$(atf_cdir)" "$(DESTDIR)$(atf_c__dir)" "$(DESTDIR)$(includedir)"; do \ + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_c___detaildir)" "$(DESTDIR)$(tests_atf_c_detaildir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(tests_toolsdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_shdir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(tests_toolsdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man4dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(atf_aclocaldir)" "$(DESTDIR)$(atf_c__dirpkgconfigdir)" "$(DESTDIR)$(atf_cpkgconfigdir)" "$(DESTDIR)$(atf_shdir)" "$(DESTDIR)$(atf_shpkgconfigdir)" "$(DESTDIR)$(cssdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(dtddir)" "$(DESTDIR)$(egdir)" "$(DESTDIR)$(hooksdir)" "$(DESTDIR)$(pkgtestsdir)" "$(DESTDIR)$(tests_atf_cdir)" "$(DESTDIR)$(tests_atf_c__dir)" "$(DESTDIR)$(tests_atf_c___detaildir)" "$(DESTDIR)$(tests_atf_c_detaildir)" "$(DESTDIR)$(tests_atf_shdir)" "$(DESTDIR)$(tests_test_programsdir)" "$(DESTDIR)$(tests_toolsdir)" "$(DESTDIR)$(xsldir)" "$(DESTDIR)$(atf_cdir)" "$(DESTDIR)$(atf_c__dir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(atf_cdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -4865,20 +5136,14 @@ distclean-generic: -rm -f atf-c/$(am__dirstamp) -rm -f atf-c/detail/$(DEPDIR)/$(am__dirstamp) -rm -f atf-c/detail/$(am__dirstamp) - -rm -f atf-config/$(DEPDIR)/$(am__dirstamp) - -rm -f atf-config/$(am__dirstamp) - -rm -f atf-report/$(DEPDIR)/$(am__dirstamp) - -rm -f atf-report/$(am__dirstamp) - -rm -f atf-run/$(DEPDIR)/$(am__dirstamp) - -rm -f atf-run/$(am__dirstamp) -rm -f atf-sh/$(DEPDIR)/$(am__dirstamp) -rm -f atf-sh/$(am__dirstamp) - -rm -f atf-version/$(DEPDIR)/$(am__dirstamp) - -rm -f atf-version/$(am__dirstamp) -rm -f bootstrap/$(DEPDIR)/$(am__dirstamp) -rm -f bootstrap/$(am__dirstamp) -rm -f test-programs/$(DEPDIR)/$(am__dirstamp) -rm -f test-programs/$(am__dirstamp) + -rm -f tools/$(DEPDIR)/$(am__dirstamp) + -rm -f tools/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @@ -4889,15 +5154,16 @@ clean: clean-am clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ clean-libLTLIBRARIES clean-libexecPROGRAMS clean-libtool \ - clean-noinstLTLIBRARIES clean-tests_atf_cPROGRAMS \ - clean-tests_atf_c__PROGRAMS clean-tests_atf_c___detailPROGRAMS \ + clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ + clean-tests_atf_cPROGRAMS clean-tests_atf_c__PROGRAMS \ + clean-tests_atf_c___detailPROGRAMS \ clean-tests_atf_c_detailPROGRAMS \ - clean-tests_atf_reportPROGRAMS clean-tests_atf_runPROGRAMS \ - clean-tests_test_programsPROGRAMS mostlyclean-am + clean-tests_test_programsPROGRAMS clean-tests_toolsPROGRAMS \ + mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf atf-c++/$(DEPDIR) atf-c++/detail/$(DEPDIR) atf-c/$(DEPDIR) atf-c/detail/$(DEPDIR) atf-config/$(DEPDIR) atf-report/$(DEPDIR) atf-run/$(DEPDIR) atf-sh/$(DEPDIR) atf-version/$(DEPDIR) bootstrap/$(DEPDIR) test-programs/$(DEPDIR) + -rm -rf atf-c++/$(DEPDIR) atf-c++/detail/$(DEPDIR) atf-c/$(DEPDIR) atf-c/detail/$(DEPDIR) atf-sh/$(DEPDIR) bootstrap/$(DEPDIR) test-programs/$(DEPDIR) tools/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-local distclean-tags @@ -4919,23 +5185,21 @@ install-data-am: install-atf_aclocalDATA install-atf_cHEADERS \ install-atf_cpkgconfigDATA install-atf_shDATA \ install-atf_shpkgconfigDATA install-cssDATA install-docDATA \ install-dtdDATA install-egDATA install-hooksDATA \ - install-includeHEADERS install-man install-pkgtestsDATA \ - install-tests_atf_cDATA install-tests_atf_cPROGRAMS \ - install-tests_atf_cSCRIPTS install-tests_atf_c__DATA \ - install-tests_atf_c__PROGRAMS install-tests_atf_c__SCRIPTS \ - install-tests_atf_c___detailDATA \ + install-includeHEADERS install-man install-nodist_atf_cHEADERS \ + install-pkgtestsDATA install-tests_atf_cDATA \ + install-tests_atf_cPROGRAMS install-tests_atf_cSCRIPTS \ + install-tests_atf_c__DATA install-tests_atf_c__PROGRAMS \ + install-tests_atf_c__SCRIPTS install-tests_atf_c___detailDATA \ install-tests_atf_c___detailPROGRAMS \ install-tests_atf_c_detailDATA \ - install-tests_atf_c_detailPROGRAMS \ - install-tests_atf_configDATA install-tests_atf_configSCRIPTS \ - install-tests_atf_reportDATA install-tests_atf_reportPROGRAMS \ - install-tests_atf_reportSCRIPTS install-tests_atf_runDATA \ - install-tests_atf_runPROGRAMS install-tests_atf_runSCRIPTS \ - install-tests_atf_shDATA install-tests_atf_shSCRIPTS \ - install-tests_test_programsDATA \ + install-tests_atf_c_detailPROGRAMS install-tests_atf_shDATA \ + install-tests_atf_shSCRIPTS install-tests_test_programsDATA \ install-tests_test_programsPROGRAMS \ - install-tests_test_programsSCRIPTS install-xslDATA - + install-tests_test_programsSCRIPTS install-tests_toolsDATA \ + install-tests_toolsPROGRAMS install-tests_toolsSCRIPTS \ + install-xslDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: @@ -4967,7 +5231,7 @@ installcheck-am: installcheck-local maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf atf-c++/$(DEPDIR) atf-c++/detail/$(DEPDIR) atf-c/$(DEPDIR) atf-c/detail/$(DEPDIR) atf-config/$(DEPDIR) atf-report/$(DEPDIR) atf-run/$(DEPDIR) atf-sh/$(DEPDIR) atf-version/$(DEPDIR) bootstrap/$(DEPDIR) test-programs/$(DEPDIR) + -rm -rf atf-c++/$(DEPDIR) atf-c++/detail/$(DEPDIR) atf-c/$(DEPDIR) atf-c/detail/$(DEPDIR) atf-sh/$(DEPDIR) bootstrap/$(DEPDIR) test-programs/$(DEPDIR) tools/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -4991,7 +5255,8 @@ uninstall-am: uninstall-atf_aclocalDATA uninstall-atf_cHEADERS \ uninstall-cssDATA uninstall-docDATA uninstall-dtdDATA \ uninstall-egDATA uninstall-hooksDATA uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-libexecPROGRAMS \ - uninstall-man uninstall-pkgtestsDATA uninstall-tests_atf_cDATA \ + uninstall-man uninstall-nodist_atf_cHEADERS \ + uninstall-pkgtestsDATA uninstall-tests_atf_cDATA \ uninstall-tests_atf_cPROGRAMS uninstall-tests_atf_cSCRIPTS \ uninstall-tests_atf_c__DATA uninstall-tests_atf_c__PROGRAMS \ uninstall-tests_atf_c__SCRIPTS \ @@ -4999,77 +5264,71 @@ uninstall-am: uninstall-atf_aclocalDATA uninstall-atf_cHEADERS \ uninstall-tests_atf_c___detailPROGRAMS \ uninstall-tests_atf_c_detailDATA \ uninstall-tests_atf_c_detailPROGRAMS \ - uninstall-tests_atf_configDATA \ - uninstall-tests_atf_configSCRIPTS \ - uninstall-tests_atf_reportDATA \ - uninstall-tests_atf_reportPROGRAMS \ - uninstall-tests_atf_reportSCRIPTS uninstall-tests_atf_runDATA \ - uninstall-tests_atf_runPROGRAMS uninstall-tests_atf_runSCRIPTS \ uninstall-tests_atf_shDATA uninstall-tests_atf_shSCRIPTS \ uninstall-tests_test_programsDATA \ uninstall-tests_test_programsPROGRAMS \ - uninstall-tests_test_programsSCRIPTS uninstall-xslDATA + uninstall-tests_test_programsSCRIPTS uninstall-tests_toolsDATA \ + uninstall-tests_toolsPROGRAMS uninstall-tests_toolsSCRIPTS \ + uninstall-xslDATA uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \ uninstall-man5 uninstall-man7 -.MAKE: all check check-am install install-am install-strip +.MAKE: all check check-am install install-am install-data-am \ + install-strip -.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-checkPROGRAMS clean-cscope \ clean-generic clean-libLTLIBRARIES clean-libexecPROGRAMS \ - clean-libtool clean-noinstLTLIBRARIES \ + clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ clean-tests_atf_cPROGRAMS clean-tests_atf_c__PROGRAMS \ clean-tests_atf_c___detailPROGRAMS \ clean-tests_atf_c_detailPROGRAMS \ - clean-tests_atf_reportPROGRAMS clean-tests_atf_runPROGRAMS \ - clean-tests_test_programsPROGRAMS cscope cscopelist ctags dist \ - dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ - dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-local distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am \ - install-atf_aclocalDATA install-atf_cHEADERS \ - install-atf_c__HEADERS install-atf_c__dirpkgconfigDATA \ - install-atf_cpkgconfigDATA install-atf_shDATA \ - install-atf_shpkgconfigDATA install-binPROGRAMS \ - install-cssDATA install-data install-data-am install-docDATA \ + clean-tests_test_programsPROGRAMS clean-tests_toolsPROGRAMS \ + cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-local distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-atf_aclocalDATA \ + install-atf_cHEADERS install-atf_c__HEADERS \ + install-atf_c__dirpkgconfigDATA install-atf_cpkgconfigDATA \ + install-atf_shDATA install-atf_shpkgconfigDATA \ + install-binPROGRAMS install-cssDATA install-data \ + install-data-am install-data-hook install-docDATA \ install-dtdDATA install-dvi install-dvi-am install-egDATA \ install-exec install-exec-am install-hooksDATA install-html \ install-html-am install-includeHEADERS install-info \ install-info-am install-libLTLIBRARIES install-libexecPROGRAMS \ install-man install-man1 install-man3 install-man4 \ - install-man5 install-man7 install-pdf install-pdf-am \ - install-pkgtestsDATA install-ps install-ps-am install-strip \ - install-tests_atf_cDATA install-tests_atf_cPROGRAMS \ - install-tests_atf_cSCRIPTS install-tests_atf_c__DATA \ - install-tests_atf_c__PROGRAMS install-tests_atf_c__SCRIPTS \ - install-tests_atf_c___detailDATA \ + install-man5 install-man7 install-nodist_atf_cHEADERS \ + install-pdf install-pdf-am install-pkgtestsDATA install-ps \ + install-ps-am install-strip install-tests_atf_cDATA \ + install-tests_atf_cPROGRAMS install-tests_atf_cSCRIPTS \ + install-tests_atf_c__DATA install-tests_atf_c__PROGRAMS \ + install-tests_atf_c__SCRIPTS install-tests_atf_c___detailDATA \ install-tests_atf_c___detailPROGRAMS \ install-tests_atf_c_detailDATA \ - install-tests_atf_c_detailPROGRAMS \ - install-tests_atf_configDATA install-tests_atf_configSCRIPTS \ - install-tests_atf_reportDATA install-tests_atf_reportPROGRAMS \ - install-tests_atf_reportSCRIPTS install-tests_atf_runDATA \ - install-tests_atf_runPROGRAMS install-tests_atf_runSCRIPTS \ - install-tests_atf_shDATA install-tests_atf_shSCRIPTS \ - install-tests_test_programsDATA \ + install-tests_atf_c_detailPROGRAMS install-tests_atf_shDATA \ + install-tests_atf_shSCRIPTS install-tests_test_programsDATA \ install-tests_test_programsPROGRAMS \ - install-tests_test_programsSCRIPTS install-xslDATA \ - installcheck installcheck-am installcheck-local installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-atf_aclocalDATA uninstall-atf_cHEADERS \ - uninstall-atf_c__HEADERS uninstall-atf_c__dirpkgconfigDATA \ - uninstall-atf_cpkgconfigDATA uninstall-atf_shDATA \ - uninstall-atf_shpkgconfigDATA uninstall-binPROGRAMS \ - uninstall-cssDATA uninstall-docDATA uninstall-dtdDATA \ - uninstall-egDATA uninstall-hooksDATA uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-libexecPROGRAMS \ - uninstall-man uninstall-man1 uninstall-man3 uninstall-man4 \ - uninstall-man5 uninstall-man7 uninstall-pkgtestsDATA \ + install-tests_test_programsSCRIPTS install-tests_toolsDATA \ + install-tests_toolsPROGRAMS install-tests_toolsSCRIPTS \ + install-xslDATA installcheck installcheck-am \ + installcheck-local installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-atf_aclocalDATA \ + uninstall-atf_cHEADERS uninstall-atf_c__HEADERS \ + uninstall-atf_c__dirpkgconfigDATA uninstall-atf_cpkgconfigDATA \ + uninstall-atf_shDATA uninstall-atf_shpkgconfigDATA \ + uninstall-binPROGRAMS uninstall-cssDATA uninstall-docDATA \ + uninstall-dtdDATA uninstall-egDATA uninstall-hooksDATA \ + uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-libexecPROGRAMS uninstall-man uninstall-man1 \ + uninstall-man3 uninstall-man4 uninstall-man5 uninstall-man7 \ + uninstall-nodist_atf_cHEADERS uninstall-pkgtestsDATA \ uninstall-tests_atf_cDATA uninstall-tests_atf_cPROGRAMS \ uninstall-tests_atf_cSCRIPTS uninstall-tests_atf_c__DATA \ uninstall-tests_atf_c__PROGRAMS uninstall-tests_atf_c__SCRIPTS \ @@ -5077,16 +5336,14 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \ uninstall-tests_atf_c___detailPROGRAMS \ uninstall-tests_atf_c_detailDATA \ uninstall-tests_atf_c_detailPROGRAMS \ - uninstall-tests_atf_configDATA \ - uninstall-tests_atf_configSCRIPTS \ - uninstall-tests_atf_reportDATA \ - uninstall-tests_atf_reportPROGRAMS \ - uninstall-tests_atf_reportSCRIPTS uninstall-tests_atf_runDATA \ - uninstall-tests_atf_runPROGRAMS uninstall-tests_atf_runSCRIPTS \ uninstall-tests_atf_shDATA uninstall-tests_atf_shSCRIPTS \ uninstall-tests_test_programsDATA \ uninstall-tests_test_programsPROGRAMS \ - uninstall-tests_test_programsSCRIPTS uninstall-xslDATA + uninstall-tests_test_programsSCRIPTS uninstall-tests_toolsDATA \ + uninstall-tests_toolsPROGRAMS uninstall-tests_toolsSCRIPTS \ + uninstall-xslDATA + +.PRECIOUS: Makefile dist-hook: check-style @@ -5094,97 +5351,80 @@ check-style: $(srcdir)/admin/check-style.sh # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 - -# XXX For some reason, the nodist line above does not work as expected. -# Work this problem around. -dist-hook: kill-defs-h kill-defs-h: rm -f $(distdir)/atf-c/defs.h atf-c/atf-c.pc: $(srcdir)/atf-c/atf-c.pc.in Makefile - test -d atf-c || mkdir -p atf-c + $(AM_V_GEN)test -d atf-c || mkdir -p atf-c; \ sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \ -e 's#__CC__#$(CC)#g' \ -e 's#__INCLUDEDIR__#$(includedir)#g' \ -e 's#__LIBDIR__#$(libdir)#g' \ - <$(srcdir)/atf-c/atf-c.pc.in >atf-c/atf-c.pc.tmp + <$(srcdir)/atf-c/atf-c.pc.in >atf-c/atf-c.pc.tmp; \ mv atf-c/atf-c.pc.tmp atf-c/atf-c.pc atf-c/pkg_config_test: $(srcdir)/atf-c/pkg_config_test.sh - test -d atf-c || mkdir -p atf-c - @src="$(srcdir)/atf-c/pkg_config_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-c/pkg_config_test.sh"; \ dst="atf-c/pkg_config_test"; $(BUILD_SH_TP) # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 atf-c++/atf-c++.pc: $(srcdir)/atf-c++/atf-c++.pc.in Makefile - test -d atf-c++ || mkdir -p atf-c++ + $(AM_V_GEN)test -d atf-c++ || mkdir -p atf-c++; \ sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \ -e 's#__CXX__#$(CXX)#g' \ -e 's#__INCLUDEDIR__#$(includedir)#g' \ -e 's#__LIBDIR__#$(libdir)#g' \ - <$(srcdir)/atf-c++/atf-c++.pc.in >atf-c++/atf-c++.pc.tmp + <$(srcdir)/atf-c++/atf-c++.pc.in >atf-c++/atf-c++.pc.tmp; \ mv atf-c++/atf-c++.pc.tmp atf-c++/atf-c++.pc atf-c++/pkg_config_test: $(srcdir)/atf-c++/pkg_config_test.sh - test -d atf-c++ || mkdir -p atf-c++ - @src="$(srcdir)/atf-c++/pkg_config_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-c++/pkg_config_test.sh"; \ dst="atf-c++/pkg_config_test"; $(BUILD_SH_TP) # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 atf-sh/atf-sh.pc: $(srcdir)/atf-sh/atf-sh.pc.in Makefile - test -d atf-sh || mkdir -p atf-sh + $(AM_V_GEN)test -d atf-sh || mkdir -p atf-sh; \ sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \ -e 's#__EXEC_PREFIX__#$(exec_prefix)#g' \ - <$(srcdir)/atf-sh/atf-sh.pc.in >atf-sh/atf-sh.pc.tmp + <$(srcdir)/atf-sh/atf-sh.pc.in >atf-sh/atf-sh.pc.tmp; \ mv atf-sh/atf-sh.pc.tmp atf-sh/atf-sh.pc atf-sh/misc_helpers: $(srcdir)/atf-sh/misc_helpers.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/misc_helpers.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/misc_helpers.sh"; \ dst="atf-sh/misc_helpers"; $(BUILD_SH_TP) atf-sh/atf_check_test: $(srcdir)/atf-sh/atf_check_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/atf_check_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/atf_check_test.sh"; \ dst="atf-sh/atf_check_test"; $(BUILD_SH_TP) atf-sh/atf-check_test: $(srcdir)/atf-sh/atf-check_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/atf-check_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/atf-check_test.sh"; \ dst="atf-sh/atf-check_test"; $(BUILD_SH_TP) atf-sh/config_test: $(srcdir)/atf-sh/config_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/config_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/config_test.sh"; \ dst="atf-sh/config_test"; $(BUILD_SH_TP) atf-sh/integration_test: $(srcdir)/atf-sh/integration_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/integration_test.sh"; \ - dst="atf-sh/integration_test"; $(BUILD_SH_TP) + $(AM_V_GEN)src="$(srcdir)/atf-sh/integration_test.sh"; \ + dst="atf-sh/integration_test"; \ + substs="s,__ATF_SH__,$(exec_prefix)/bin/atf-sh,g"; $(BUILD_SH_TP) atf-sh/normalize_test: $(srcdir)/atf-sh/normalize_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/normalize_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/normalize_test.sh"; \ dst="atf-sh/normalize_test"; $(BUILD_SH_TP) atf-sh/tc_test: $(srcdir)/atf-sh/tc_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/tc_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/tc_test.sh"; \ dst="atf-sh/tc_test"; $(BUILD_SH_TP) atf-sh/tp_test: $(srcdir)/atf-sh/tp_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/tp_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/tp_test.sh"; \ dst="atf-sh/tp_test"; $(BUILD_SH_TP) # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 bootstrap/h_tp_basic_sh: $(srcdir)/bootstrap/h_tp_basic_sh.sh - test -d bootstrap || mkdir -p bootstrap - @src=$(srcdir)/bootstrap/h_tp_basic_sh.sh; dst=$@; $(BUILD_SH_TP) + $(AM_V_GEN)src=$(srcdir)/bootstrap/h_tp_basic_sh.sh; dst=$@; $(BUILD_SH_TP) bootstrap/h_tp_atf_check_sh: \ $(srcdir)/bootstrap/h_tp_atf_check_sh.sh - test -d bootstrap || mkdir -p bootstrap - @src=$(srcdir)/bootstrap/h_tp_atf_check_sh.sh; dst=$@; $(BUILD_SH_TP) + $(AM_V_GEN)src=$(srcdir)/bootstrap/h_tp_atf_check_sh.sh; dst=$@; $(BUILD_SH_TP) bootstrap/h_tp_fail: $(srcdir)/bootstrap/h_tp_fail.sh - test -d bootstrap || mkdir -p bootstrap - @src=$(srcdir)/bootstrap/h_tp_fail.sh; dst=$@; $(BUILD_SH_TP) + $(AM_V_GEN)src=$(srcdir)/bootstrap/h_tp_fail.sh; dst=$@; $(BUILD_SH_TP) bootstrap/h_tp_pass: $(srcdir)/bootstrap/h_tp_pass.sh - test -d bootstrap || mkdir -p bootstrap - @src=$(srcdir)/bootstrap/h_tp_pass.sh; dst=$@; $(BUILD_SH_TP) + $(AM_V_GEN)src=$(srcdir)/bootstrap/h_tp_pass.sh; dst=$@; $(BUILD_SH_TP) distclean-local: -rm -rf testsuite.dir @@ -5212,68 +5452,65 @@ installcheck-bootstrap: @target_srcdir@bootstrap/testsuite check # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 -@ENABLE_TOOLS_TRUE@doc/atf.7: $(srcdir)/doc/atf.7.in -@ENABLE_TOOLS_TRUE@ test -d doc || mkdir -p doc -@ENABLE_TOOLS_TRUE@ sed -e 's#__DOCDIR__#$(docdir)#g' \ -@ENABLE_TOOLS_TRUE@ -e 's#__TESTSDIR__#$(testsdir)#g' \ -@ENABLE_TOOLS_TRUE@ <$(srcdir)/doc/atf.7.in >doc/atf.7.tmp -@ENABLE_TOOLS_TRUE@ mv doc/atf.7.tmp doc/atf.7 +doc/atf.7: $(srcdir)/doc/atf.7.in + $(AM_V_GEN)test -d doc || mkdir -p doc; \ + sed -e 's#__DOCDIR__#$(docdir)#g' \ + -e 's#__TESTSDIR__#$(testsdir)#g' \ + <$(srcdir)/doc/atf.7.in >doc/atf.7.tmp; \ + mv doc/atf.7.tmp doc/atf.7 # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 test-programs/sh_helpers: $(srcdir)/test-programs/sh_helpers.sh - test -d test-programs || mkdir -p test-programs - @src="$(srcdir)/test-programs/sh_helpers.sh $(common_sh)"; \ + $(AM_V_GEN)src="$(srcdir)/test-programs/sh_helpers.sh $(common_sh)"; \ dst="test-programs/sh_helpers"; $(BUILD_SH_TP) test-programs/config_test: $(srcdir)/test-programs/config_test.sh - test -d test-programs || mkdir -p test-programs - @src="$(srcdir)/test-programs/config_test.sh $(common_sh)"; \ + $(AM_V_GEN)src="$(srcdir)/test-programs/config_test.sh $(common_sh)"; \ dst="test-programs/config_test"; $(BUILD_SH_TP) test-programs/expect_test: $(srcdir)/test-programs/expect_test.sh - test -d test-programs || mkdir -p test-programs - @src="$(srcdir)/test-programs/expect_test.sh $(common_sh)"; \ + $(AM_V_GEN)src="$(srcdir)/test-programs/expect_test.sh $(common_sh)"; \ dst="test-programs/expect_test"; $(BUILD_SH_TP) test-programs/meta_data_test: $(srcdir)/test-programs/meta_data_test.sh - test -d test-programs || mkdir -p test-programs - @src="$(srcdir)/test-programs/meta_data_test.sh $(common_sh)"; \ + $(AM_V_GEN)src="$(srcdir)/test-programs/meta_data_test.sh $(common_sh)"; \ dst="test-programs/meta_data_test"; $(BUILD_SH_TP) test-programs/result_test: $(srcdir)/test-programs/result_test.sh - test -d test-programs || mkdir -p test-programs - @src="$(srcdir)/test-programs/result_test.sh $(common_sh)"; \ + $(AM_V_GEN)src="$(srcdir)/test-programs/result_test.sh $(common_sh)"; \ dst="test-programs/result_test"; $(BUILD_SH_TP) test-programs/srcdir_test: $(srcdir)/test-programs/srcdir_test.sh - test -d test-programs || mkdir -p test-programs - @src="$(srcdir)/test-programs/srcdir_test.sh $(common_sh)"; \ + $(AM_V_GEN)src="$(srcdir)/test-programs/srcdir_test.sh $(common_sh)"; \ dst="test-programs/srcdir_test"; $(BUILD_SH_TP) # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 -@ENABLE_TOOLS_TRUE@atf-report/integration_test: $(srcdir)/atf-report/integration_test.sh -@ENABLE_TOOLS_TRUE@ test -d atf-report || mkdir -p atf-report -@ENABLE_TOOLS_TRUE@ @src="$(srcdir)/atf-report/integration_test.sh"; \ -@ENABLE_TOOLS_TRUE@ dst="atf-report/integration_test"; $(BUILD_SH_TP) - -# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 -@ENABLE_TOOLS_TRUE@atf-config/integration_test: $(srcdir)/atf-config/integration_test.sh -@ENABLE_TOOLS_TRUE@ test -d atf-config || mkdir -p atf-config -@ENABLE_TOOLS_TRUE@ @src="$(srcdir)/atf-config/integration_test.sh"; \ -@ENABLE_TOOLS_TRUE@ dst="atf-config/integration_test"; $(BUILD_SH_TP) - -# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 -@ENABLE_TOOLS_TRUE@atf-run/integration_test: $(srcdir)/atf-run/integration_test.sh -@ENABLE_TOOLS_TRUE@ test -d atf-run || mkdir -p atf-run -@ENABLE_TOOLS_TRUE@ @src="$(srcdir)/atf-run/integration_test.sh"; \ -@ENABLE_TOOLS_TRUE@ dst="atf-run/integration_test"; $(BUILD_SH_TP) - -# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 -@ENABLE_TOOLS_TRUE@atf-version/revision.h: atf-version/revision.h.stamp -@ENABLE_TOOLS_TRUE@ @test -d atf-version || mkdir -p atf-version -@ENABLE_TOOLS_TRUE@ @cmp -s atf-version/revision.h atf-version/revision.h.stamp || \ -@ENABLE_TOOLS_TRUE@ cp -p atf-version/revision.h.stamp atf-version/revision.h -@ENABLE_TOOLS_TRUE@atf-version/revision.h.stamp: -@ENABLE_TOOLS_TRUE@ @test -d atf-version || mkdir -p atf-version -@ENABLE_TOOLS_TRUE@ @$(top_srcdir)/atf-version/generate-revision.sh \ -@ENABLE_TOOLS_TRUE@ -g "$(GIT)" -r $(top_srcdir) -o atf-version/revision.h.stamp \ +@ENABLE_TOOLS_TRUE@kill-defs-hpp: +@ENABLE_TOOLS_TRUE@ rm -f $(distdir)/tools/defs.hpp +@ENABLE_TOOLS_TRUE@tools/revision.h: tools/revision.h.stamp +@ENABLE_TOOLS_TRUE@ @test -d tools || mkdir -p tools +@ENABLE_TOOLS_TRUE@ @cmp -s tools/revision.h tools/revision.h.stamp || \ +@ENABLE_TOOLS_TRUE@ cp -p tools/revision.h.stamp tools/revision.h +@ENABLE_TOOLS_TRUE@tools/revision.h.stamp: +@ENABLE_TOOLS_TRUE@ @test -d tools || mkdir -p tools +@ENABLE_TOOLS_TRUE@ @$(top_srcdir)/tools/generate-revision.sh \ +@ENABLE_TOOLS_TRUE@ -g "$(GIT)" -r $(top_srcdir) -o tools/revision.h.stamp \ @ENABLE_TOOLS_TRUE@ -v $(PACKAGE_VERSION) +@ENABLE_TOOLS_TRUE@tools/atf.7: $(srcdir)/tools/atf.7.in +@ENABLE_TOOLS_TRUE@ test -d tools || mkdir -p tools +@ENABLE_TOOLS_TRUE@ sed -e 's#__DOCDIR__#$(docdir)#g' \ +@ENABLE_TOOLS_TRUE@ -e 's#__TESTSDIR__#$(testsdir)#g' \ +@ENABLE_TOOLS_TRUE@ <$(srcdir)/tools/atf.7.in >tools/atf.7.tmp +@ENABLE_TOOLS_TRUE@ mv tools/atf.7.tmp tools/atf.7 +@ENABLE_TOOLS_TRUE@tools/atf-config_test: $(srcdir)/tools/atf-config_test.sh +@ENABLE_TOOLS_TRUE@ @test -d tools || mkdir -p tools +@ENABLE_TOOLS_TRUE@ @src="$(srcdir)/tools/atf-config_test.sh"; \ +@ENABLE_TOOLS_TRUE@ dst="tools/atf-config_test"; $(BUILD_SH_TP) +@ENABLE_TOOLS_TRUE@tools/atf-report_test: $(srcdir)/tools/atf-report_test.sh +@ENABLE_TOOLS_TRUE@ @test -d tools || mkdir -p tools +@ENABLE_TOOLS_TRUE@ @src="$(srcdir)/tools/atf-report_test.sh"; \ +@ENABLE_TOOLS_TRUE@ dst="tools/atf-report_test"; $(BUILD_SH_TP) +@ENABLE_TOOLS_TRUE@tools/atf-run_test: $(srcdir)/tools/atf-run_test.sh +@ENABLE_TOOLS_TRUE@ @test -d tools || mkdir -p tools +@ENABLE_TOOLS_TRUE@ @src="$(srcdir)/tools/atf-run_test.sh"; \ +@ENABLE_TOOLS_TRUE@ dst="tools/atf-run_test"; $(BUILD_SH_TP) + # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 @ENABLE_TOOLS_TRUE@installcheck-atf: @ENABLE_TOOLS_TRUE@ logfile=$$(pwd)/installcheck.log; \ @@ -5291,15 +5528,10 @@ test-programs/srcdir_test: $(srcdir)/test-programs/srcdir_test.sh @ENABLE_TOOLS_TRUE@ "installcheck.log; exit was $${res}"; \ @ENABLE_TOOLS_TRUE@ test $${res} -eq 0 @HAVE_KYUA_TRUE@installcheck-kyua: -@HAVE_KYUA_TRUE@ cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) $(KYUA) test +@HAVE_KYUA_TRUE@ cd $(pkgtestsdir) && $(TESTS_ENVIRONMENT) \ +@HAVE_KYUA_TRUE@ $(KYUA) --config='$(KYUA_TEST_CONFIG_FILE)' test installcheck-local: $(INSTALLCHECK_TARGETS) - -# -# Custom targets. -# - -dist-hook: forbid-dist @ENABLE_TOOLS_TRUE@forbid-dist: @ENABLE_TOOLS_TRUE@ @true @ENABLE_TOOLS_FALSE@forbid-dist: @@ -5308,13 +5540,19 @@ dist-hook: forbid-dist @ENABLE_TOOLS_FALSE@ @false clean-all: GIT="$(GIT)" $(SH) $(srcdir)/admin/clean-all.sh -release: - $(SH) $(srcdir)/admin/release.sh $(PACKAGE_VERSION) $(DIST_ARCHIVES) -release-test: - $(SH) $(srcdir)/admin/release-test.sh $(DIST_ARCHIVES) .PHONY: $(PHONY_TARGETS) +# TODO(jmmv): Remove after atf 0.22. +install-data-hook: + cd $(DESTDIR)$(man3dir) && \ + for binding in c c++ sh; do \ + rm -f "atf-$${binding}-api.3"; \ + $(LN_S) "atf-$${binding}.3" "atf-$${binding}-api.3"; \ + done + +dist-hook: $(DIST_HOOKS) + # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/unit/atf-src/NEWS b/unit/atf-src/NEWS index 5d05a28579..916f4e8b5e 100644 --- a/unit/atf-src/NEWS +++ b/unit/atf-src/NEWS @@ -1,6 +1,112 @@ Major changes between releases Automated Testing Framework =========================================================================== +Changes in version 0.21 +*********************** + +Released on October 23rd, 2014. + +* Restored the atf(7) manual page to serve as a reference to all the other + manual pages shipped by ATF. + +* Added the -s flag to atf-sh to support specifying the shell interpreter + to be used. + +* Removed ATF_WORKDIR. The only remaining consumers have been converted to + use the standard TMPDIR environment variable. As a benefit, and because + Kyua forces the TMPDIR to live within the test case's work directory, + any stale files left behind by ATF will be automatically cleaned up. + +* Documented the environment variables recognized by each component in the + relevant manual pages. This information was lost with the atf-config(1) + removal. + +* Added a new "require.diskspace" metadata property to test cases so that + they can specify the minimum amount of disk space required for the test + to run. + +* Renamed the atf-{c,c++,sh}-api(3) manual pages to atf-{c,c++,sh}(3) for + discoverability purposes. Symbolic links are provided for the time + being to still make the old names visible. + +* Issue #5: Recommend the (expected, actual) idiom for calls to the test + macros in the manual pages. + +* Issue #7: Stopped catching unhandled exceptions in atf-c++ tests. This + propagates the crash to the caller, which in turn allows it to obtain + proper debugging information. In particular, Kyua should now be able to + extract a stacktrace pinpointing the problem. + +* Issue #8: Fixed atf-c/macros_test:use test failures spotted by the clang + that ships with FreeBSD 11.0-CURRENT. + +* Issue #12: Improved documentation of atf-sh(3) and atf-check(1) by better + explaining how they relate to each other. + +* Issue #14: Stopped setting 'set -e' in atf-sh. This setting was + initially added as a way to enable a "strict" mode in the library and to + make test cases fail fast when they run unprotected commands. However, + doing so in the library is surprising as the responsibility of enabling + 'set -e' should be on the user's code. Also, 'set -e' introduces + inconsistent behavior on subshells and users do not expect that. + +* Issue #15: Fixed atf_utils_{fork,wait} to support nested calls. + +* Issue #16: Fixed test failures (by removing a long-standing hack) on + systems that lack \e support in printf(1). + +* Issue #19: Removed stale references to atf-config and atf-run. + + +Changes in version 0.19 +*********************** + +Experimental version released on February 7th, 2014. + +This is the last release to bundle the code for the deprecated tools. +The next release will drop their code and will stop worrying about +backwards compatibility between the ATF libraries and what the old tools +may or may not support. + +If you still require the old tools for some reason, grab a copy of the +'tools' directory now. The code in this directory is standalone and +does not depend on any internal details of atf-c++ any longer. + +* Various fixes and improvements to support running as part of the FreeBSD + test suite. + +* Project hosting moved from Google Code (as a subproject of Kyua) to + GitHub (as a first-class project). The main reason for the change is + the suppression of binary downloads in Google Code on Jan 15th, 2014. + See https://github.com/jmmv/atf/ + +* Removed builtin help from atf-sh(1) and atf-check(1) for simplicity + reasons. In other words, their -h option is gone. + +* Moved the code of the deprecated tools into a 'tools' directory and + completely decoupled their code from the internals of atf-c++. The + reason for this is to painlessly allow a third-party to maintain a + copy of these tools after we delete them because upcoming changes to + atf-c++ would break the stale tools. + + +Changes in version 0.18 +*********************** + +Experimental version released on November 16th, 2013. + +* Issue 45: Added require.memory support in atf-run for FreeBSD. + +* Fixed an issue with the handling of cin with libc++. + +* Issue 64: Fixed various mandoc formatting warnings. + +* NetBSD PR bin/48284: Made atf-check flush its progress message to + stdout so that an interrupted test case always shows the last message + being executed. + +* NetBSD PR bin/48285: Fixed atf_check examples in atf-sh-api(3). + Changes in version 0.17 *********************** diff --git a/unit/atf-src/README.md b/unit/atf-src/README.md new file mode 100644 index 0000000000..fa96639cf4 --- /dev/null +++ b/unit/atf-src/README.md @@ -0,0 +1,45 @@ +# Welcome to the ATF project! + +ATF, or Automated Testing Framework, is a **collection of libraries** to +write test programs in **C, C++ and POSIX shell**. + +The ATF libraries offer a simple API. The API is orthogonal through the +various bindings, allowing developers to quickly learn how to write test +programs in different languages. + +ATF-based test programs offer a **consistent end-user command-line +interface** to allow both humans and automation to run the tests. + +ATF-based test programs **rely on an execution engine** to be run and +this execution engine is *not* shipped with ATF. +**[Kyua](https://github.com/jmmv/kyua/) is the engine of choice.** + +## Download + +Formal releases for source files are available for download from GitHub: + +* [atf 0.20](../../releases/tag/atf-0.20), released on February 7th, 2014. + +## Installation + +You are encouraged to install binary packages for your operating system +wherever available: + +* Fedora 20 and above: install the `atf` package with `yum install atf`. + +* FreeBSD 10.0 and above: install the `atf` package with `pkg install atf`. + +* NetBSD with pkgsrc: install the `pkgsrc/devel/atf` package. + +Should you want to build and install ATF from the source tree provided +here, follow the instructions in the [INSTALL file](INSTALL). + +## Support + +Please use the +[atf-discuss mailing list](https://groups.google.com/forum/#!forum/atf-discuss) +for any support inquiries related to `atf-c`, `atf-c++` or `atf-sh`. + +If you have any questions on Kyua proper, please use the +[kyua-discuss mailing list](https://groups.google.com/forum/#!forum/kyua-discuss) +instead. diff --git a/unit/atf-src/TODO b/unit/atf-src/TODO deleted file mode 100644 index 556baba6ec..0000000000 --- a/unit/atf-src/TODO +++ /dev/null @@ -1,184 +0,0 @@ -Things to do Automated Testing Framework -=========================================================================== - - -Last revised: November 30th, 2010 - - -This document includes the list of things that need to be done in ATF that -are most requested by the users. This information used to be available in -an ad-hoc bug tracker but that proved to be a bad idea. I have collected -all worthy comments in here. - -Please note that most work these days is going into Kyua (see -http://code.google.com/p/kyua/). The ideas listed here apply to the -components of ATF that have *not* been migrated to the new codebase yet. -For bug reports or ideas that apply to the components that already have -been migrated, please use the bug tracker in the URL above. Similarly, -whenever a component is migrated, the ideas in this file should be revised -and migrated to the new bug tracker where appropriate. - - ---------------------------------------------------------------------------- -Add build-time checks to atf-sh - -The 0.7 release introduced build-time tests to atf-c and atf-c++, but not -to atf-sh. Expose the functionality to the shell interface. - -This will probably require writing an atf-build utility that exposes the C -code and can be called from the shell. - ---------------------------------------------------------------------------- -Revisit what to do when an Atffile lists a non-existent file - ---------------------------------------------------------------------------- -Add ATF_CHECK* versions to atf-c++ to support non-fatal tests - ---------------------------------------------------------------------------- -Implement race-condition tests - -gcooper: - -I would think that stress/negative tests would be of more value than race -condition tests (they're similar, but not exactly the same in my mind). - -In particular, - -1. Feed through as much data as possible to determine where reporting - breaks down. -2. Feed through data quickly and terminate ASAP. The data should be - captured. Terminate child applications with unexpected exit codes and - signals (in particular, SIGCHLD, SIGPIPE, exit codes that terminate, - etc). -3. Open up a file descriptor in the test application, don't close the file - descriptor. -4. fork(2) a process; don't wait(2) for the application to complete. - -There are other scenarios that could be exercised, but these are the ones -I could think of off the topic of my head. - --- - -jmmv: - -1. The thing is: how do you express any of this in a portable/abstract - interface? How do you express that a test case "receives data"? What - does that exactly mean? I don't think the framework should care about - this: each test should be free to decide where its data is and how to - deal with it. - -2. Ditto. - -3. Not sure I understand your request, but testing for "unexpected exit - codes" is already supported. See wiki:DesignXFail for the feature - design details. - -4. What's the problem with this case? The test case exits right away after - terminating the execution of its body; any open file descriptors, - leaked memory, etc. die with it. - -5. forking and not waiting for a subprocess was a problem already - addressed. - -I kinda have an idea of what Antti means with "race condition tests", but -every time I have tried to describe my understanding of matters I seem to -be wrong. Would be nice to have a clear description of what this involves; -in particular, what are the expectations from the framework and how should -the feature be exposed. - -As of now, what I understand by "race condition test" is: a test case that -exercises a race condition. The test case may finish without triggering -the race, in which case it just exists with a successful status. -Otherwise, if the race triggers, the test case gets stuck and times out. -The result should be reported as an "expected failure" different from -timeout. - --- - -pooka: - -Yup. Plus some atf-wide mechanism for the operator to supply some kind of -guideline if the test should try to trigger the race for a second or for -an hour. - --- - -jmmv: - -Alright. While mocking up some code for this, I think that your two -requests are complementary. - -On the one hand, when you are talking about a "race condition" test you -really mean an "expected race condition" test. Correct? If so, we need to -extend the xfail mechanism to add one more case, which is to report any -failures as a race condition error and, if there is no failure, report the -test as successful. - -On the other hand, the atf-wide mechanism to support how long the test -should run for can be thought as a "stress test" mechanism. I.e. run this -test for X time / iterations and report its results regularly without -involving xfail at all. - -So, with this in mind: - -* For a test that triggers an unfixed race condition, you set xfail to - race mode and define the test as a stress test. Any failures are - reported as expected failures. - -* For a test that verifies a supposedly-fixed race condition, you do *not* - set xfail to race mode, and only set the test to stress test. Any - failures are reported as real failures. - -These stress test cases implement a single iteration of the test and -atf-run is in charge of running the test several times, stopping on the -first failure. - -Does that make sense? - ---------------------------------------------------------------------------- -Implement ATF_REQUIRE_ERRNO - -pooka: - -Most of the lines in tests against system functionality are: - -if (syscall(args) == -1) - atf_tc_fail_errno("flop") - -Some shorthand would be helpful, like ATF_REQUIRE_ERRNO(syscall(args)) -Also, a variant which allows arbitrary return value checks (e.g. "!= 0" or -"< 124" or "!= size") would be nice. - --- - -gcooper: - -There's a problem with this request; not all functions fail in the same -way ... in particular compare the pthread family of functions (which -return errno) vs many native syscalls. Furthermore, compare some -fcntl-like syscalls vs other syscalls. One size fits all solutions may not -be a wise idea in this case, so I think that the problem statement needs -to be better defined, because the above request is too loose. - -FWIW, there's also a TEST macro in LTP, which tests for non-zero status, -and sets an appropriate set of global variables for errnos and return -codes, respectively. It was a good idea, but has been mostly abandoned -because it's too difficult to define a success and failure in a universal -manner, so I think that we need to be careful with what's implemented in -ATF to not repeat the mistakes that others have made. - --- - -jmmv: - -I think you've got a good point. - -This was mostly intended to simplify the handling of the stupid errno -global variable. I think this is valuable to have, but maybe the -macro/function name should be different because _ERRNO can be confusing. -Probably something like an ATF_CHECK_LIBC / ATF_CHECK_PTHREAD approach -would be more flexible and simple. - - -=========================================================================== -vim: filetype=text:textwidth=75:expandtab:shiftwidth=2:softtabstop=2 diff --git a/unit/atf-src/aclocal.m4 b/unit/atf-src/aclocal.m4 index d3d395bb4f..e9db496338 100644 --- a/unit/atf-src/aclocal.m4 +++ b/unit/atf-src/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.12.2 -*- Autoconf -*- +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -11,6 +11,7 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, @@ -19,24 +20,22 @@ 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'.])]) -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 - # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.12' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.12.2], [], +m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -52,20 +51,78 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.12.2])dnl +[AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2011-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 +# AM_PROG_AR([ACT-IF-FAIL]) +# ------------------------- +# Try to determine the archiver interface, and trigger the ar-lib wrapper +# if it is needed. If the detection of archiver interface fails, run +# ACT-IF-FAIL (default is to abort configure with a proper error message). +AC_DEFUN([AM_PROG_AR], +[AC_BEFORE([$0], [LT_INIT])dnl +AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([ar-lib])dnl +AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) +: ${AR=ar} + +AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], + [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + ]) + AC_LANG_POP([C])]) + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + m4_default([$1], + [AC_MSG_ERROR([could not determine $AR interface])]) + ;; +esac +AC_SUBST([AR])dnl +]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to @@ -106,22 +163,19 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. @@ -147,13 +201,12 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 17 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -339,19 +392,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -380,7 +432,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the @@ -416,17 +468,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 19 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -439,7 +495,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -469,8 +525,7 @@ AC_SUBST([CYGPATH_W]) dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], -[$0: two- and three-arguments forms are deprecated. For more info, see: -http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) + [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], @@ -503,8 +558,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -524,21 +579,63 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl -dnl Support for Objective C++ was only introduced in Autoconf 2.65, -dnl but we still cater to Autoconf 2.62. -m4_ifdef([AC_PROG_OBJCXX], -[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], - m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the -dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -547,7 +644,6 @@ dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -569,20 +665,18 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 - # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -592,14 +686,12 @@ if test x"${install_sh}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2012 Free Software Foundation, Inc. +# Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -615,14 +707,12 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -665,50 +755,14 @@ AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) -# Copyright (C) 1999-2012 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -716,11 +770,10 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -733,8 +786,8 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) @@ -743,14 +796,12 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], @@ -774,15 +825,77 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- @@ -859,13 +972,71 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- @@ -889,14 +1060,12 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2012 Free Software Foundation, Inc. +# Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -910,14 +1079,12 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2012 Free Software Foundation, Inc. +# Copyright (C) 2004-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. @@ -931,76 +1098,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of '-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - # tar/untar a dummy directory, and stop if the command works + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR @@ -1017,6 +1222,5 @@ m4_include([m4/module-application.m4]) m4_include([m4/module-defs.m4]) m4_include([m4/module-env.m4]) m4_include([m4/module-fs.m4]) -m4_include([m4/module-sanity.m4]) m4_include([m4/module-signals.m4]) m4_include([m4/runtime-tool.m4]) diff --git a/unit/atf-src/admin/Makefile.am.inc b/unit/atf-src/admin/Makefile.am.inc index 42c3672cd1..12b02b8994 100644 --- a/unit/atf-src/admin/Makefile.am.inc +++ b/unit/atf-src/admin/Makefile.am.inc @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# dist-hook: check-style PHONY_TARGETS += check-style diff --git a/unit/atf-src/admin/ar-lib b/unit/atf-src/admin/ar-lib new file mode 100755 index 0000000000..05094d34c6 --- /dev/null +++ b/unit/atf-src/admin/ar-lib @@ -0,0 +1,270 @@ +#! /bin/sh +# Wrapper for Microsoft lib.exe + +me=ar-lib +scriptversion=2012-03-01.08; # UTC + +# Copyright (C) 2010-2017 Free Software Foundation, Inc. +# Written by Peter Rosin . +# +# This program 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, or (at your option) +# any later version. +# +# This program 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 this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + + +# func_error message +func_error () +{ + echo "$me: $1" 1>&2 + exit 1 +} + +file_conv= + +# func_file_conv build_file +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. +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 in + 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_at_file at_file operation archive +# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE +# for each of them. +# When interpreting the content of the @FILE, do NOT use func_file_conv, +# since the user would need to supply preconverted file names to +# binutils ar, at least for MinGW. +func_at_file () +{ + operation=$2 + archive=$3 + at_file_contents=`cat "$1"` + eval set x "$at_file_contents" + shift + + for member + do + $AR -NOLOGO $operation:"$member" "$archive" || exit $? + done +} + +case $1 in + '') + func_error "no command. Try '$0 --help' for more information." + ;; + -h | --h*) + cat < "/dev/stderr" diff --git a/unit/atf-src/admin/check-style-common.awk b/unit/atf-src/admin/check-style-common.awk index 7b6e72ad65..196d70ceae 100644 --- a/unit/atf-src/admin/check-style-common.awk +++ b/unit/atf-src/admin/check-style-common.awk @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# function warn(msg) { print FILENAME "[" FNR "]: " msg > "/dev/stderr" diff --git a/unit/atf-src/admin/check-style-cpp.awk b/unit/atf-src/admin/check-style-cpp.awk index 4a797e7f98..889b5b9eea 100644 --- a/unit/atf-src/admin/check-style-cpp.awk +++ b/unit/atf-src/admin/check-style-cpp.awk @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# function warn(msg) { print FILENAME "[" FNR "]: " msg > "/dev/stderr" diff --git a/unit/atf-src/admin/check-style-man.awk b/unit/atf-src/admin/check-style-man.awk index 4751aaac7a..067ef6f87e 100644 --- a/unit/atf-src/admin/check-style-man.awk +++ b/unit/atf-src/admin/check-style-man.awk @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# function warn(msg) { print FILENAME "[" FNR "]: " msg > "/dev/stderr" diff --git a/unit/atf-src/admin/check-style-shell.awk b/unit/atf-src/admin/check-style-shell.awk index ac80db4018..caddedb690 100644 --- a/unit/atf-src/admin/check-style-shell.awk +++ b/unit/atf-src/admin/check-style-shell.awk @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# function warn(msg) { print FILENAME "[" FNR "]: " msg > "/dev/stderr" diff --git a/unit/atf-src/admin/check-style.sh b/unit/atf-src/admin/check-style.sh index a4f2410ddc..f3de13c2e6 100755 --- a/unit/atf-src/admin/check-style.sh +++ b/unit/atf-src/admin/check-style.sh @@ -1,7 +1,4 @@ #! /bin/sh -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -26,7 +23,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# # # A utility to sanity check the coding style of all source files in the @@ -100,14 +96,15 @@ find_sources() { \! -path "*autom4te*" -a \ -type f -a \ \! -name "aclocal.m4" \ - \! -name "bconfig.h" \ + \! -name "config.h" \ \! -name "defs.h" \ + \! -name "defs.hpp" \ \! -name "libtool.m4" \ \! -name "ltoptions.m4" \ \! -name "ltsugar.m4" \ \! -name "lt~obsolete.m4" \ \! -name "*.so.*" \ - \) + \) | grep -v tools/ } # diff --git a/unit/atf-src/admin/compile b/unit/atf-src/admin/compile index 7b4a9a7e1e..2ab71e4ea1 100755 --- a/unit/atf-src/admin/compile +++ b/unit/atf-src/admin/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-03-05.13; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -112,6 +112,11 @@ func_cl_dashl () lib=$dir/$lib.lib break fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi done IFS=$save_IFS @@ -250,7 +255,8 @@ EOF echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -337,6 +343,6 @@ exit $ret # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/unit/atf-src/admin/config.guess b/unit/atf-src/admin/config.guess index c2246a4f7f..2193702b12 100755 --- a/unit/atf-src/admin/config.guess +++ b/unit/atf-src/admin/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2009-12-30' +timestamp='2017-05-27' # 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 -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -17,26 +15,22 @@ timestamp='2009-12-30' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +Copyright 1992-2017 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." @@ -140,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -155,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. + # to ELF recently (or will in the future) and ABI. case "${UNAME_MACHINE_ARCH}" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -181,7 +204,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd + ;; + esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; esac # The OS release @@ -194,18 +224,26 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; @@ -218,13 +256,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -234,43 +275,46 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -296,12 +340,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -339,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build - SUN_ARCH="i386" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` @@ -373,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} @@ -395,23 +439,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -481,8 +525,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -495,7 +539,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -552,15 +596,16 @@ 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 else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -595,58 +640,58 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include + #define _HPUX_SOURCE + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ ${HP_ARCH} = hppa2.0w ] then eval $set_cc_for_build @@ -659,12 +704,12 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} @@ -731,22 +776,22 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -769,15 +814,15 @@ EOF echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -789,30 +834,36 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + *:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; @@ -849,15 +900,22 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -867,52 +925,62 @@ EOF EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; - esac + esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -931,51 +999,69 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu + mips64el:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -984,11 +1070,11 @@ EOF echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1020,7 +1106,7 @@ EOF fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1048,13 +1134,13 @@ EOF exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1089,8 +1175,8 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ @@ -1133,10 +1219,10 @@ EOF echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1162,11 +1248,11 @@ EOF exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1179,6 +1265,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1197,6 +1286,9 @@ EOF SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1205,24 +1297,43 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi @@ -1231,12 +1342,18 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; - NSR-?:NONSTOP_KERNEL:*:*) + NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk${UNAME_RELEASE} + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; @@ -1250,7 +1367,7 @@ EOF # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" @@ -1276,13 +1393,13 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1292,7 +1409,7 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos @@ -1300,174 +1417,28 @@ EOF i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp diff --git a/unit/atf-src/admin/config.sub b/unit/atf-src/admin/config.sub index 85186096a9..40ea5dfe11 100755 --- a/unit/atf-src/admin/config.sub +++ b/unit/atf-src/admin/config.sub @@ -1,38 +1,31 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2009-12-31' +timestamp='2017-04-02' -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# 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 -# the Free Software Foundation; either version 2 of the License, or +# 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 +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # -# This program 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. +# This program 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 this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -40,7 +33,7 @@ timestamp='2009-12-31' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -60,8 +53,7 @@ timestamp='2009-12-31' me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. @@ -75,9 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +Copyright 1992-2017 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." @@ -124,13 +114,18 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -153,12 +148,12 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; - -bluegene*) - os=-cnk + -bluegene*) + os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= @@ -174,10 +169,10 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -222,6 +217,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -246,20 +247,29 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ + | hexagon \ + | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -273,38 +283,57 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ - | nios | nios2 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ | pyramid \ - | rx \ + | riscv32 | riscv64 \ + | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | wasm32 \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -314,6 +343,21 @@ case $basic_machine in basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -328,25 +372,32 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -360,33 +411,45 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ - | nios-* | nios2-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | wasm32-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) @@ -411,7 +474,7 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -461,6 +524,9 @@ case $basic_machine in basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -481,11 +547,20 @@ case $basic_machine in basic_machine=powerpc-ibm os=-cnk ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; - cegcc) + cegcc) basic_machine=arm-unknown os=-cegcc ;; @@ -517,7 +592,7 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -572,6 +647,14 @@ case $basic_machine in basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -675,7 +758,6 @@ case $basic_machine in i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -714,6 +796,9 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -733,11 +818,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -765,6 +854,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -772,10 +865,18 @@ case $basic_machine in ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i686-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -840,9 +941,18 @@ 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 ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -922,11 +1032,12 @@ case $basic_machine in ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) @@ -936,7 +1047,7 @@ case $basic_machine in ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) @@ -949,7 +1060,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1018,6 +1133,9 @@ case $basic_machine in basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -1074,20 +1192,8 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1142,6 +1248,9 @@ case $basic_machine in basic_machine=a29k-wrs os=-vxworks ;; + wasm32) + basic_machine=wasm32-unknown + ;; w65*) basic_machine=w65-wdc os=-none @@ -1157,6 +1266,9 @@ case $basic_machine in xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1254,11 +1366,11 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + -auroraux) + os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` @@ -1282,28 +1394,30 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1342,7 +1456,7 @@ case $os in -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1391,7 +1505,7 @@ case $os in -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1427,17 +1541,16 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; - -nacl*) - ;; + -nacl*) + ;; + -ios) + ;; -none) ;; *) @@ -1460,10 +1573,10 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1475,8 +1588,23 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1496,14 +1624,11 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1521,6 +1646,9 @@ case $basic_machine in sparc-* | *-sun) os=-sunos4.1.1 ;; + pru-*) + os=-elf + ;; *-be) os=-beos ;; @@ -1530,7 +1658,7 @@ case $basic_machine in *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) diff --git a/unit/atf-src/admin/depcomp b/unit/atf-src/admin/depcomp index debb6ffa3e..b39f98f9ae 100755 --- a/unit/atf-src/admin/depcomp +++ b/unit/atf-src/admin/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2012-03-27.16; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -27,9 +27,9 @@ scriptversion=2012-03-27.16; # UTC case $1 in '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -56,11 +56,65 @@ EOF ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + # A tabulation character. tab=' ' # A newline character. nl=' ' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 @@ -74,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" +# Avoid interferences from the environment. +gccflag= dashmflag= + # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case @@ -85,32 +142,32 @@ if test "$depmode" = hp; then fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 fi if test "$depmode" = xlc; then - # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. - gccflag=-qmakedep=gcc,-MF - depmode=gcc + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -133,8 +190,7 @@ gcc3) done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -142,13 +198,17 @@ gcc3) ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -156,15 +216,14 @@ gcc) fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. + # The second -e expression handles DOS-style file names with drive + # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. @@ -173,15 +232,15 @@ gcc) ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' "$nl" < "$tmpdepfile" | ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -199,8 +258,7 @@ sgi) "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -208,7 +266,6 @@ sgi) if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in @@ -216,19 +273,15 @@ sgi) # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr "$nl" ' ' >> "$depfile" + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" - # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" ;; @@ -246,9 +299,8 @@ aix) # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -261,9 +313,7 @@ aix) "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -272,65 +322,113 @@ aix) do test -f "$tmpdepfile" && break done - if test -f "$tmpdepfile"; then - # Each line is of the form 'foo.o: dependent.h'. - # Do two passes, one to just change these to - # '$object: dependent.h' and one to simply 'dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" + aix_post_process_depfile ;; -icc) - # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. - # However on - # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using '\': - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - # tcc 0.9.26 (FIXME still under development at the moment of writing) - # will emit a similar output, but also prepend the continuation lines - # with horizontal tabulation characters. +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" - # Each line is of the form 'foo.o: dependent.h', - # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to - # '$object: dependent.h' and one to simply 'dependent.h:'. - sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ - < "$tmpdepfile" > "$depfile" - sed ' - s/[ '"$tab"'][ '"$tab"']*/ /g - s/^ *// - s/ *\\*$// - s/^[^:]*: *// - /^$/d - /:$/d - s/$/ :/ - ' < "$tmpdepfile" >> "$depfile" + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -341,9 +439,8 @@ hp2) # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -354,8 +451,7 @@ hp2) "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -365,76 +461,61 @@ hp2) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in 'foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; msvc7) if test "$libtool" = yes; then @@ -445,8 +526,7 @@ msvc7) "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" - if test "$stat" = 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -472,6 +552,7 @@ $ { G p }' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; @@ -523,13 +604,14 @@ dashmstdout) # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' "$nl" < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -582,10 +664,12 @@ makedepend) # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -621,10 +705,10 @@ cpp) esac done - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -656,15 +740,15 @@ msvisualcpp) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | @@ -702,6 +786,6 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/unit/atf-src/admin/install-sh b/unit/atf-src/admin/install-sh index b12c0f7189..0360b79e7d 100755 --- a/unit/atf-src/admin/install-sh +++ b/unit/atf-src/admin/install-sh @@ -1,301 +1,501 @@ #!/bin/sh -# -# $NetBSD: install-sh.in,v 1.6 2012/01/11 13:07:31 hans Exp $ -# This script now also installs multiple files, but might choke on installing -# multiple files with spaces in the file names. -# # install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). + +scriptversion=2016-01-11.22; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. # -# Copyright 1991 by the Massachusetts Institute of Technology +# Copyright (C) 1994 X Consortium # -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -awkprog="${AWKPROG-awk}" -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -instcmd="$cpprog" -instflags="" -pathcompchmodcmd="$chmodprog 755" -chmodcmd="$chmodprog 755" -chowncmd="" -chgrpcmd="" -stripcmd="" -stripflags="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -msrc="" -dst="" -dir_arg="" -suffix="" -suffixfmt="" - -while [ x"$1" != x ]; do - case $1 in - -b) suffix=".old" - shift - continue;; - - -B) suffixfmt="$2" - shift - shift - continue;; - - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -m*) - chmodcmd="$chmodprog ${1#-m}" - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -S) stripcmd="$stripprog" - stripflags="-S $2 $stripflags" - shift - shift - continue;; - - -p) instflags="-p" - shift - continue;; - - *) if [ x"$msrc" = x ] - then - msrc="$dst" - else - msrc="$msrc $dst" - fi - src="$dst" - dst="$1" - shift - continue;; - esac -done - -if [ x"$dir_arg" = x ] -then - dstisfile="" - if [ ! -d "$dst" ] - then - if [ x"$msrc" = x"$src" ] - then - dstisfile=true - else - echo "install: destination is not a directory" - exit 1 - fi - fi -else - msrc="$msrc $dst" -fi - -if [ x"$msrc" = x ] -then - echo "install: no destination specified" - exit 1 -fi - -for srcarg in $msrc; do - -if [ x"$dir_arg" != x ]; then - - dstarg="$srcarg" -else - dstarg="$dst" - -# Waiting for this to be detected by the "$instcmd $srcarg $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f "$srcarg" ] - then - doinst="$instcmd $instflags" - elif [ -d "$srcarg" ] - then - echo "install: $srcarg: not a regular file" - exit 1 - elif [ "$srcarg" = "/dev/null" ] - then - doinst="$cpprog" - else - echo "install: $srcarg does not exist" - exit 1 - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d "$dstarg" ] - then - dstarg="$dstarg"/`basename "$srcarg"` - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo "$dstarg" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' +tab=' ' +nl=' ' -IFS="${IFS-${defaultIFS}}" +IFS=" $tab$nl" -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" +# Set DOITPROG to "echo" to test this script. -pathcomp='' +doit=${DOITPROG-} +doit_exec=${doit:-exec} -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift +# Put in absolute file names if you don't have them in your path; +# or use environment vars. - if [ ! -d "${pathcomp}" ] ; - then - $doit $mkdirprog "${pathcomp}" - if [ x"$chowncmd" != x ]; then $doit $chowncmd "${pathcomp}"; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "${pathcomp}"; else true ; fi && - if [ x"$pathcompchmodcmd" != x ]; then $doit $pathcompchmodcmd "${pathcomp}"; else true ; fi +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} - else - true - fi +posix_mkdir= - pathcomp="${pathcomp}/" +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +is_target_a_directory=possibly + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) is_target_a_directory=never;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift done + +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi fi - if [ x"$dir_arg" != x ] - then - if [ -d "$dstarg" ]; then - true - else - $doit $mkdirprog "$dstarg" && +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi - if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dstarg"; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dstarg"; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dstarg"; else true ; fi - fi - else +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi - if [ x"$dstisfile" = x ] - then - file=$srcarg - else - file=$dst - fi +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi - dstfile=`basename "$file"` - dstfinal="$dstdir/$dstfile" +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 -# Make a temp file name in the proper directory. + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; - dsttmp=$dstdir/#inst.$$# + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi -# Make a backup file name in the proper directory. - case x$suffixfmt in - *%*) suffix=`echo x | - $awkprog -v bname="$dstfinal" -v fmt="$suffixfmt" ' - { cnt = 0; - do { - sfx = sprintf(fmt, cnt++); - name = bname sfx; - } while (system("test -f " name) == 0); - print sfx; }' -`;; - x) ;; - *) suffix="$suffixfmt";; - esac - dstbackup="$dstfinal$suffix" +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac -# Move or copy the file name to the temp name + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else - $doit $doinst $srcarg "$dsttmp" && + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi - trap "rm -f ${dsttmp}" 0 && + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg -# and set any options; do chmod last to preserve setuid bits + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? + fi + fi -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. + obsolete_mkdir_used=false - if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $stripflags "$dsttmp"; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else true;fi && + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; -# Now rename the file to the real destination. + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac - if [ x"$suffix" != x ] && [ -f "$dstfinal" ] - then - $doit $mvcmd "$dstfinal" "$dstbackup" - else - $doit $rmcmd -f "$dstfinal" - fi && - $doit $mvcmd "$dsttmp" "$dstfinal" - fi + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi -done && + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac -exit 0 + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir + shift + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --git a/unit/atf-src/admin/ltmain.sh b/unit/atf-src/admin/ltmain.sh old mode 100755 new mode 100644 index c3098b537f..b6f3fcbb28 --- a/unit/atf-src/admin/ltmain.sh +++ b/unit/atf-src/admin/ltmain.sh @@ -1,9 +1,12 @@ -# Generated from ltmain.m4sh. +#! /bin/sh +## DO NOT EDIT - This file generated from ./build-aux/ltmain.in +## by inline-source v2014-01-03.01 -# ltmain.sh (GNU libtool) 2.2.6b +# libtool (GNU libtool) 2.4.6 +# Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# Copyright (C) 1996-2015 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. @@ -23,129 +26,670 @@ # 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. +# along with this program. If not, see . -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . -PROGRAM=ltmain.sh +PROGRAM=libtool PACKAGE=libtool -VERSION=2.2.6b -TIMESTAMP="" -package_revision=1.3017 +VERSION=2.4.6 +package_revision=2.4.6 -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2015-01-20.17; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2015 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. + +# This program 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 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES 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 this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh -# NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done -$lt_unset CDPATH +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" + +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi -unset CP -unset MV -unset RM + +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + +# We want to be able to use the functions in this file before configure +# has figured out where the best binaries are kept, which means we have +# to search for them ourselves - except when the results are already set +# where we skip the searches. + +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + rm -f conftest.sed + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the grep that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. + : ${CP="cp -f"} -: ${ECHO="echo"} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} +: ${ECHO="printf %s\n"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} -# Global variables: + +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## + +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Same as above, but do not quote variable references. +sed_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 +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" + + +## ----------------- ## +## Global variables. ## +## ----------------- ## + +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. + EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: + +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. exit_status=$EXIT_SUCCESS -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" +# 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 -dirname="s,/[^/]*$,," -basename="s,^.*/,," +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function +# Make sure we have an absolute progpath for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` + progdir=`cd "$progdir" && pwd` + progpath=$progdir/$progname + ;; + *) + _G_IFS=$IFS + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS=$_G_IFS + test -x "$progdir/$progname" && break + done + IFS=$_G_IFS + test -n "$progdir" || progdir=`pwd` + progpath=$progdir/$progname + ;; +esac + + +## ----------------- ## +## Standard options. ## +## ----------------- ## + +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. + +opt_dry_run=false +opt_quiet=false +opt_verbose=false + +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= + +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue + +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all + + +## -------------------- ## +## Resource management. ## +## -------------------- ## + +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. + + +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () +{ + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='' + tc_bold=''; tc_standout='' + tc_red=''; tc_green='' + tc_blue=''; tc_cyan='' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } + + require_term_colors=: +} + + +## ----------------- ## +## Function library. ## +## ----------------- ## + +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. + + +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. + + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () +{ + $debug_cmd + + eval _G_current_value='`$ECHO $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac +} + + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () +{ + $debug_cmd + + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +eval 'func_dirname () +{ + $debug_cmd + + '"$_d"' +}' + + +# 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 @@ -153,104 +697,327 @@ basename="s,^.*/,," # 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 () +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () { - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -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 "X${1}" | $Xsed -e "$basename"` -} + $debug_cmd -# Generated shell functions inserted here. + '"$_b"' + '"$_d"' +}' -# 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: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: -func_dirname_and_basename "$progpath" -progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/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. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. func_echo () { - $ECHO "$progname${mode+: }$mode: $*" + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname: $_G_line" + done + IFS=$func_echo_IFS } -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () + +# func_echo_all ARG... +# -------------------- +# Invoke $ECHO with all args, space-separated. +func_echo_all () { - $opt_verbose && func_echo ${1+"$@"} + $ECHO "$*" +} + + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () +{ + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` + _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS +} + + +# func_error ARG... +# ----------------- +# Echo program name prefixed message to standard error. +func_error () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 +} + + +# func_fatal_error ARG... +# ----------------------- +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + $debug_cmd + + func_error "$*" + exit $EXIT_FAILURE +} + + +# func_grep EXPRESSION FILENAME +# ----------------------------- +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $debug_cmd + + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= + + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then + + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$_G_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + _G_dir_list=$_G_directory_path:$_G_dir_list + + # If the last portion added has no slash in it, the list is done + case $_G_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` + done + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` + + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$_G_dir" 2>/dev/null || : + done + IFS=$func_mkdir_p_IFS + + # Bail out if we (or some other process) failed to create a directory. + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" + fi +} + + +# func_mktempdir [BASENAME] +# ------------------------- +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, BASENAME is the basename for that directory. +func_mktempdir () +{ + $debug_cmd + + _G_template=${TMPDIR-/tmp}/${1-$progname} + + if test : = "$opt_dry_run"; then + # Return a directory name, but don't create it in dry-run mode + _G_tmpdir=$_G_template-$$ + else + + # If mktemp works, use that first and foremost + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` + + if test ! -d "$_G_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + _G_tmpdir=$_G_template-${RANDOM-0}$$ + + func_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" + fi + + $ECHO "$_G_tmpdir" +} + + +# func_normal_abspath PATH +# ------------------------ +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +func_normal_abspath () +{ + $debug_cmd + + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + + +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () +{ + $debug_cmd + + $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to @@ -258,363 +1025,1113 @@ func_verbose () : } -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 -} -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () { - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + $debug_cmd + + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. - # bash bug again: : } -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` - done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "X$my_tmpdir" | $Xsed -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. func_quote_for_eval () { - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac + $debug_cmd - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in + *[\\\`\"\$]*) + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi + + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" + ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; + esac + + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done } -# func_quote_for_expand arg +# func_quote_for_expand ARG +# ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { + $debug_cmd + case $1 in *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) - my_arg="$1" ;; + _G_arg=$1 ;; esac - case $my_arg in + case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" + _G_arg=\"$_G_arg\" ;; esac - func_quote_for_expand_result="$my_arg" + func_quote_for_expand_result=$_G_arg } -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# 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). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; + esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } + _G_cmd=$1 + _G_fail_exp=${2-':'} - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" + + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" fi - fi + } } -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" + _G_cmd=$1 + _G_fail_exp=${2-':'} + + $opt_quiet || { + func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" fi - fi + } } - - - -# func_version -# Echo version message to standard output and exit. -func_version () +# 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 () { - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? + $debug_cmd + + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac } -# func_usage -# Echo short help message to standard output and exit. -func_usage () + +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () { - $SED -n '/^# Usage:/,/# -h/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - $ECHO - $ECHO "run \`$progname --help | more' for full usage" - exit $? + $debug_cmd + + $opt_verbose && func_echo "$*" + + : } + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () +{ + $debug_cmd + + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 +} + + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () +{ + $debug_cmd + + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + printf '%s\n%s\n' "$1" "$2" \ + | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n +} + +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2014-01-07.03; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2015 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. + +# This program 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 3 of the License, or +# (at your option) any later version. + +# This program 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 this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" +} + + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; + esac + + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result +} + + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; +# esac +# done +# +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll alse need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + + +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd + + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} + + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} + + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result +} + + +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. +func_hookable func_options_prep +func_options_prep () +{ + $debug_cmd + + # Option defaults: + opt_verbose=false + opt_warning_types= + + func_run_hooks func_options_prep ${1+"$@"} + + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result +} + + +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () +{ + $debug_cmd + + func_parse_options_result= + + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + func_run_hooks func_parse_options ${1+"$@"} + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift + + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break + + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; + + --warnings|--warning|-W) + test $# = 0 && func_missing_arg $_G_opt && break + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result +} + + +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () +{ + $debug_cmd + + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + func_run_hooks func_validate_options ${1+"$@"} + + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result +} + + + +## ----------------- ## +## Helper functions. ## +## ----------------- ## + +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + eval \$ECHO \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + + # func_help +# --------- # Echo long help message to standard output and exit. func_help () { - $SED -n '/^# Usage:/,/# Report bugs to/ { - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - }' < "$progpath" - exit $? + $debug_cmd + + func_usage_message + $ECHO "$long_help_message" + exit 0 } -# func_missing_arg argname + +# func_missing_arg ARGNAME +# ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { - func_error "missing argument for $1" + $debug_cmd + + func_error "Missing argument for '$1'." exit_cmd=exit } -exit_cmd=: +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd - - -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals + + +# 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. +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt + + +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () +{ + $debug_cmd + + func_usage_message + $ECHO "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} + + +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} + + +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + + printf '%s\n' "$progname $scriptversion" + $SED -n ' + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + + exit $? +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: + +# Set a version string. +scriptversion='(GNU libtool) 2.4.6' + + +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} + + +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () +{ + $debug_cmd + + $warning_func ${1+"$@"} +} + + +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" + +# Additional text appended to 'usage_message' in response to '--help'. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +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. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname (GNU libtool) 2.4.6 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to . +GNU libtool home page: . +General help using GNU software: ." + exit 0 +} + + +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. + +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' + + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } fi -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - 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=: - ;; - - --verbose| -v) preserve_args="$preserve_args $opt" - opt_silent=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=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break - ;; + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; esac - done - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps - ;; - esac + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac } + # 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 + 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 + 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 + 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 +} + + +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () +{ + $debug_mode + + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false + + nonopt= + preserve_args= + + # 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 + + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result +} +func_add_hook func_options_prep libtool_options_prep + + +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd + + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + 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 $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; + + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + esac + done + + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result +} +func_add_hook func_parse_options libtool_parse_options + + + +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift fi - exit $EXIT_MISMATCH - fi + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; 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." + } + + # Pass back the unparsed argument list + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result } +func_add_hook func_validate_options libtool_validate_options + + +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift + ## ----------- ## ## Main. ## ## ----------- ## -$opt_help || { - # Sanity checks first: - func_check_version_match +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi +# Global variables. +extracted_archives= +extracted_serial=0 - test -z "$mode" && func_fatal_error "error: you must specify a MODE." +# 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= - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - - # 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." +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' } +# func_generated_by_libtool +# True iff stdin has been generated by Libtool. This function is only +# a basic sanity check; it will hardly flush out determined imposters. +func_generated_by_libtool_p () +{ + $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} # func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 + $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. +# fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no @@ -912,13 +2521,13 @@ func_lalib_unsafe_p () for lalib_p_l in 1 2 3 4 do read lalib_p_line - case "$lalib_p_line" in + case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi - test "$lalib_p" = yes + test yes = "$lalib_p" } # func_ltwrapper_script_p file @@ -927,7 +2536,8 @@ func_lalib_unsafe_p () # determined imposters. func_ltwrapper_script_p () { - func_lalib_p "$1" + test -f "$1" && + $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file @@ -950,12 +2560,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 @@ -974,11 +2581,13 @@ func_ltwrapper_p () # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { - $opt_debug + $debug_cmd + save_ifs=$IFS; IFS='~' for cmd in $1; do - IFS=$save_ifs + IFS=$sp$nl eval cmd=\"$cmd\" + IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs @@ -990,10 +2599,11 @@ func_execute_cmds () # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. +# 'FILE.' does not work on cygwin managed mounts. func_source () { - $opt_debug + $debug_cmd + case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; @@ -1001,6 +2611,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. @@ -1009,32 +2650,37 @@ func_source () # arg is usually of the form 'gcc ...' func_infer_tag () { - $opt_debug + $debug_cmd + 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` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" 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` case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. @@ -1049,7 +2695,7 @@ func_infer_tag () # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" + func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi @@ -1065,15 +2711,15 @@ func_infer_tag () # 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}\' + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' else write_lobj=none fi - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' else write_oldobj=none fi @@ -1081,7 +2727,7 @@ func_write_libtool_object () $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 "$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 () +{ + $debug_cmd + + # 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + $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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + # func_mode_compile arg... func_mode_compile () { - $opt_debug + $debug_cmd + # Get the compilation command and the source file. base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" + srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal @@ -1116,12 +3281,12 @@ func_mode_compile () case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile - lastarg="$arg" + lastarg=$arg arg_mode=normal ;; target ) - libobj="$arg" + libobj=$arg arg_mode=normal continue ;; @@ -1131,18 +3296,18 @@ func_mode_compile () case $arg in -o) test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" + func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -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 ;; @@ -1160,18 +3325,17 @@ func_mode_compile () func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for arg in $args; do - IFS="$save_ifs" - func_quote_for_eval "$arg" - lastarg="$lastarg $func_quote_for_eval_result" + IFS=$save_ifs + func_append_quoted lastarg "$arg" done - IFS="$save_ifs" + 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 ;; @@ -1179,16 +3343,15 @@ func_mode_compile () # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # - lastarg="$srcfile" - srcfile="$arg" + lastarg=$srcfile + srcfile=$arg ;; esac # case $arg ;; 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 @@ -1196,13 +3359,13 @@ func_mode_compile () func_fatal_error "you must specify an argument for -Xcompile" ;; target) - func_fatal_error "you must specify a target with \`-o'" + func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" - libobj="$func_basename_result" + libobj=$func_basename_result } ;; esac @@ -1213,7 +3376,7 @@ func_mode_compile () *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -1222,7 +3385,7 @@ func_mode_compile () case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) - func_fatal_error "cannot determine name of library object from \`$libobj'" + func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac @@ -1231,8 +3394,8 @@ func_mode_compile () for arg in $later; do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; @@ -1258,17 +3421,17 @@ func_mode_compile () func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." + && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" @@ -1280,16 +3443,16 @@ func_mode_compile () pic_mode=default ;; esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock else output_obj= need_locks=no @@ -1298,12 +3461,12 @@ func_mode_compile () # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then + if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done - elif test "$need_locks" = warn; then + elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: @@ -1311,7 +3474,7 @@ func_mode_compile () This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -1319,26 +3482,25 @@ 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 # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile - if test "$pic_mode" != no; then + if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code @@ -1349,13 +3511,13 @@ 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" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -1366,7 +3528,7 @@ $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -1382,29 +3544,29 @@ compiler." fi # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then + if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi - if test "$compiler_c_o" = yes; then - command="$command -o $obj" + if test yes = "$compiler_c_o"; then + 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' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -1415,7 +3577,7 @@ $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -1435,7 +3597,7 @@ compiler." func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked - if test "$need_locks" != no; then + if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi @@ -1445,13 +3607,13 @@ compiler." } $opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} + test compile = "$opt_mode" && 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. @@ -1465,7 +3627,7 @@ func_mode_help () Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated @@ -1482,17 +3644,18 @@ This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler -COMPILE-COMMAND is a command to be used in creating a \`standard' object file +COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." ;; execute) @@ -1505,7 +3668,7 @@ This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path -This mode sets the library path environment variable according to \`-dlopen' +This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated @@ -1524,7 +3687,7 @@ Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." +the '--dry-run' option if you just want to see what would be executed." ;; install) @@ -1534,11 +3697,11 @@ the \`--dry-run' option if you just want to see what would be executed." Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. +either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." @@ -1558,7 +3721,9 @@ The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE @@ -1572,7 +3737,8 @@ The following components of LINK-COMMAND are treated specially: -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects + -objectlist FILE use a list of object files found in FILE to specify objects + -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information @@ -1586,21 +3752,26 @@ The following components of LINK-COMMAND are treated specially: -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) -All other options (arguments beginning with \`-') are ignored. +All other options (arguments beginning with '-') are ignored. -Every other argument is treated as a filename. Files ending in \`.la' are +Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; @@ -1611,7 +3782,7 @@ is created, otherwise an executable program is created." Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. @@ -1619,40 +3790,70 @@ Otherwise, only FILE itself is deleted using RM." ;; *) - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode '$opt_mode'" ;; esac - $ECHO - $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? + echo + $ECHO "Try '$progname --help' for more information about other modes." } - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test : = "$opt_help"; then + func_mode_help + else + { + func_help noexit + 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 opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + $SED '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi # func_mode_execute arg... func_mode_execute () { - $opt_debug + $debug_cmd + # The first argument is the command name. - cmd="$nonopt" + cmd=$nonopt test -z "$cmd" && \ 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" + || 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" + || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= @@ -1663,18 +3864,18 @@ func_mode_execute () if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" + func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." - dir="$func_dirname_result" + 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'" + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; @@ -1682,18 +3883,18 @@ func_mode_execute () *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result ;; *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" + test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then @@ -1705,34 +3906,41 @@ func_mode_execute () # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. - libtool_execute_magic="$magic" + libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in - -*) ;; + -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program fi ;; 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 + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" @@ -1749,34 +3957,64 @@ func_mode_execute () done # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS + exec_cmd=\$cmd$args fi } -test "$mode" = execute && func_mode_execute ${1+"$@"} +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { - $opt_debug - libdirs="$nonopt" + $debug_cmd + + 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. @@ -1786,73 +4024,77 @@ 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 fi # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS + $opt_quiet && exit $EXIT_SUCCESS - $ECHO "X----------------------------------------------------------------------" | $Xsed - $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 "X----------------------------------------------------------------------" | $Xsed + 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 finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { - $opt_debug + $debug_cmd + # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then + case $nonopt in *shtool*) :;; *) false;; esac + then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " @@ -1866,7 +4108,12 @@ 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=: ;; + *) install_cp=false ;; + esac # We need to accept at least all the BSD install flags. dest= @@ -1874,23 +4121,24 @@ func_mode_install () opts= prev= install_type= - isdir=no + isdir=false stripme= + no_mode=: for arg do + arg2= if test -n "$dest"; then - files="$files $dest" + func_append files " $dest" dest=$arg continue fi case $arg in - -d) isdir=yes ;; + -d) isdir=: ;; -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac + if $install_cp; then :; else + prev=$arg + fi ;; -g | -m | -o) prev=$arg @@ -1904,6 +4152,10 @@ func_mode_install () *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi prev= else dest=$arg @@ -1914,14 +4166,25 @@ 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 + func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" + func_fatal_help "the '$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi if test -z "$files"; then if test -z "$dest"; then @@ -1936,19 +4199,19 @@ func_mode_install () dest=$func_stripname_result # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" + destdir=$func_dirname_result + destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" + func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -1957,7 +4220,7 @@ func_mode_install () case $file in *.lo) ;; *) - func_fatal_help "\`$destdir' must be an absolute directory name" + func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done @@ -1966,7 +4229,7 @@ func_mode_install () # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic staticlibs= future_libdirs= @@ -1977,13 +4240,16 @@ 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" + || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= @@ -1994,23 +4260,23 @@ 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" + dir=$func_dirname_result + func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that @@ -2019,38 +4285,45 @@ func_mode_install () # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi - func_warning "relinking \`$file'" + func_warning "relinking '$file'" func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then - realname="$1" + realname=$1 shift - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T + srcname=$realname + test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' - tstripme="$stripme" + tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) - tstripme="" + tstripme= + ;; + esac + ;; + os2*) + case $realname in + *_dll.a) + tstripme= ;; esac ;; @@ -2061,7 +4334,7 @@ func_mode_install () if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on + # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname @@ -2072,18 +4345,18 @@ func_mode_install () fi # Do each command in the postinstall commands. - lib="$destdir/$realname" + lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i + name=$func_basename_result + instname=$dir/${name}i 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) @@ -2091,11 +4364,11 @@ func_mode_install () # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. @@ -2105,11 +4378,11 @@ func_mode_install () staticdest=$func_lo2o_result ;; *.$objext) - staticdest="$destfile" + staticdest=$destfile destfile= ;; *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" + func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac @@ -2118,7 +4391,7 @@ func_mode_install () func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result @@ -2130,23 +4403,23 @@ func_mode_install () *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install - stripped_ext="" + stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result - stripped_ext=".exe" + stripped_ext=.exe fi ;; esac @@ -2174,19 +4447,19 @@ func_mode_install () # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" + func_fatal_error "invalid libtool wrapper script '$wrapper'" - finalize=yes + finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false fi done @@ -2194,34 +4467,34 @@ func_mode_install () func_source "$wrapper" outputname= - if test "$fast_install" = no && test -n "$relink_command"; then + if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { - if test "$finalize" = yes; then + if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" + file=$func_basename_result + outputname=$tmpdir/$file # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - $opt_silent || { + $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else - func_error "error: relink \`$file' with the above command before installing it" + func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi - file="$outputname" + file=$outputname else - func_warning "cannot relink \`$file'" + func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi @@ -2253,15 +4526,17 @@ func_mode_install () for file in $staticlibs; do func_basename "$file" - name="$func_basename_result" + name=$func_basename_result # Set up the ranlib parameters. - oldlib="$destdir/$name" + oldlib=$destdir/$name + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -2269,18 +4544,18 @@ func_mode_install () done test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" + func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } -test "$mode" = install && func_mode_install ${1+"$@"} +test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -2288,16 +4563,17 @@ test "$mode" = install && func_mode_install ${1+"$@"} # a dlpreopen symbol table. func_generate_dlsyms () { - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} + my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" + my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi @@ -2308,7 +4584,7 @@ func_generate_dlsyms () "") ;; *.c) # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" + nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" @@ -2316,26 +4592,45 @@ func_generate_dlsyms () func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#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 can'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 + +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* External symbol declarations for the compiler. */\ " - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + 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 @@ -2354,10 +4649,10 @@ extern \"C\" { # Prepare the list of exported symbols if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" + export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' @@ -2367,11 +4662,11 @@ extern \"C\" { } else $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in - *cygwin | *mingw* | *cegcc* ) + *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; @@ -2381,13 +4676,55 @@ extern \"C\" { fi for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" + 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'" - } + name=$func_basename_result + 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 || { @@ -2415,39 +4752,46 @@ extern \"C\" { if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi - $ECHO >> "$output_objdir/$my_dlsyms" "\ + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + + echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[];\ " - 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 -lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" + echo >> "$output_objdir/$my_dlsyms" "\ + } +}" + fi + echo >> "$output_objdir/$my_dlsyms" "\ +LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi case $need_lib_prefix in no) @@ -2457,7 +4801,7 @@ lt_${my_prefix}_LTX_preloaded_symbols[] = eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ + echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; @@ -2484,14 +4828,12 @@ static const void *lt_preloaded_setup() { # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi + $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; @@ -2500,7 +4842,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 @@ -2508,28 +4850,28 @@ static const void *lt_preloaded_setup() { func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" + symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" + func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else @@ -2538,38 +4880,81 @@ static const void *lt_preloaded_setup() { # really was required. # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } +# 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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. func_win32_libid () { - $opt_debug - win32_libid_type="unknown" + $debug_cmd + + win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static + # 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 pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | - $SED -n -e ' + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + 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 /{ - s,.*,import, + s|.*|import| p q } }'` + ;; + esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -2590,15 +4975,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 () +{ + $debug_cmd + + 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 () +{ + $debug_cmd + + 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 that possess that section. Heuristic: eliminate + # all those that 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_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 () +{ + $debug_cmd + + 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 func_extract_an_archive () { - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test yes = "$lock_old_archive_extraction"; then + $opt_dry_run || rm -f "$lockfile" + fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else @@ -2610,22 +5111,23 @@ func_extract_an_archive () # func_extract_archives gentop oldlib ... func_extract_archives () { - $opt_debug - my_gentop="$1"; shift + $debug_cmd + + my_gentop=$1; shift my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" - my_xlib="$func_basename_result" + my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in @@ -2637,7 +5139,7 @@ func_extract_archives () esac done extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" @@ -2650,26 +5152,27 @@ func_extract_archives () cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ @@ -2684,31 +5187,36 @@ func_extract_archives () func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done - func_extract_archives_result="$my_oldobjs" + func_extract_archives_result=$my_oldobjs } - -# func_emit_wrapper_part1 [arg=no] +# func_emit_wrapper [arg=no] # -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory where it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () { - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi + func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. @@ -2718,7 +5226,6 @@ func_emit_wrapper_part1 () # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible @@ -2749,31 +5256,135 @@ if test \"\$libtool_install_magic\" = \"$magic\"; then else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ that is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options that match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ " - $ECHO "\ + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then @@ -2783,30 +5394,13 @@ else esac fi - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then @@ -2814,7 +5408,7 @@ func_emit_wrapper_part2 () fi # remove .libs from thisdir case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi @@ -2824,13 +5418,13 @@ func_emit_wrapper_part2 () test -n \"\$absdir\" && thisdir=\"\$absdir\" " - if test "$fast_install" = yes; then + if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" @@ -2847,7 +5441,7 @@ func_emit_wrapper_part2 () if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else - $ECHO \"\$relink_command_output\" >&2 + \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi @@ -2869,21 +5463,11 @@ func_emit_wrapper_part2 () if test -f \"\$progdir/\$program\"; then" - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - # 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 @@ -2891,240 +5475,37 @@ func_emit_wrapper_part2 () " fi + # Export our shlibpath_var if we have one. + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 + func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } -# end: func_emit_wrapper_part2 -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# 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 - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $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_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $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_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - 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_to_host_pathlist_result="$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 @@ -3134,38 +5515,30 @@ func_emit_cwrapperexe_src () cat < #include #ifdef _MSC_VER # include # include # include -# define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif # endif #endif #include @@ -3177,9 +5550,45 @@ int setenv (const char *, const char *, int); #include #include -#if defined(PATH_MAX) +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + +/* declarations of non-ANSI functions */ +#if defined __MINGW32__ +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined __CYGWIN__ +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined other_platform || defined ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined _MSC_VER +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +#elif defined __MINGW32__ +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined __CYGWIN__ +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined other platforms ... */ +#endif + +#if defined PATH_MAX # define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) +#elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 @@ -3192,21 +5601,14 @@ int setenv (const char *, const char *, int); # define S_IXGRP 0 #endif -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - +/* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 @@ -3230,10 +5632,6 @@ int setenv (const char *, const char *, int); # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - #ifndef FOPEN_WB # define FOPEN_WB "w" #endif @@ -3243,25 +5641,16 @@ int setenv (const char *, const char *, int); #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ + if (stale) { free (stale); stale = 0; } \ } while (0) -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} +#if defined LT_DEBUGWRAPPER +static int lt_debug = 1; #else -# define LTWRAPPER_DEBUGPRINTF(args) +static int lt_debug = 0; #endif -const char *program_name = NULL; +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); @@ -3271,41 +5660,32 @@ char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); EOF - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" cat <"))); + lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", + nonnull (lt_argv_zero)); for (i = 0; i < newargc; i++) { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", + i, nonnull (newargz[i])); } EOF @@ -3560,11 +5901,14 @@ EOF mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ - rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); + newargz = prepare_spawn (newargz); + rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + lt_debugprintf (__FILE__, __LINE__, + "(main) failed to launch target \"%s\": %s\n", + lt_argv_zero, nonnull (strerror (errno))); return 127; } return rval; @@ -3586,7 +5930,7 @@ xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) - lt_fatal ("Memory exhausted"); + lt_fatal (__FILE__, __LINE__, "memory exhausted"); return p; } @@ -3603,7 +5947,7 @@ base_name (const char *name) { const char *base; -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) +#if defined HAVE_DOS_BASED_FILE_SYSTEM /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; @@ -3620,8 +5964,8 @@ check_executable (const char *path) { struct stat st; - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3638,8 +5982,8 @@ make_executable (const char *path) int rval = 0; struct stat st; - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3662,17 +6006,17 @@ find_executable (const char *wrapper) const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; - int tmp_len; + size_t tmp_len; char *concat_name; - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) +#if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); @@ -3690,7 +6034,7 @@ find_executable (const char *wrapper) return concat_name; XFREE (concat_name); } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) +#if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif @@ -3713,13 +6057,14 @@ find_executable (const char *wrapper) for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; - p_len = q - p; + p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); @@ -3744,7 +6089,8 @@ find_executable (const char *wrapper) } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); @@ -3770,8 +6116,9 @@ chase_symlinks (const char *pathspec) int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) @@ -3793,8 +6140,9 @@ chase_symlinks (const char *pathspec) } else { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); @@ -3807,7 +6155,8 @@ chase_symlinks (const char *pathspec) tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { - lt_fatal ("Could not follow symlinks for %s", pathspec); + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif @@ -3827,17 +6176,31 @@ strendzap (char *str, const char *pat) if (patlen <= len) { str += len - patlen; - if (strcmp (str, pat) == 0) + if (STREQ (str, pat)) *str = '\0'; } return str; } +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + static void -lt_error_core (int exit_status, const char *mode, +lt_error_core (int exit_status, const char *file, + int line, const char *mode, const char *message, va_list ap) { - fprintf (stderr, "%s: %s: ", program_name, mode); + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); @@ -3846,27 +6209,39 @@ lt_error_core (int exit_status, const char *mode, } void -lt_fatal (const char *message, ...) +lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + void lt_setenv (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else - int len = strlen (name) + 1 + strlen (value) + 1; + size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) @@ -3883,8 +6258,8 @@ lt_extend_str (const char *orig_value, const char *add, int to_end) char *new_value; if (orig_value && *orig_value) { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); + size_t orig_value_len = strlen (orig_value); + size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { @@ -3904,104 +6279,21 @@ lt_extend_str (const char *orig_value, const char *add, int to_end) return new_value; } -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - void lt_update_exe_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { - new_value[len-1] = '\0'; + new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); @@ -4011,9 +6303,9 @@ lt_update_exe_path (const char *name, const char *value) void lt_update_lib_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { @@ -4023,25 +6315,192 @@ lt_update_lib_path (const char *name, const char *value) } } +EOF + case $host_os in + mingw*) + cat <<"EOF" +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} EOF } # end: func_emit_cwrapperexe_src +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $debug_cmd + + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_suncc_cstd_abi +# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! +# Several compiler flags select an ABI that is incompatible with the +# Cstd library. Avoid specifying it if any are in CXXFLAGS. +func_suncc_cstd_abi () +{ + $debug_cmd + + case " $compile_command " in + *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) + suncc_use_cstd_abi=no + ;; + *) + suncc_use_cstd_abi=yes + ;; + esac +} + # func_mode_link arg... func_mode_link () { - $opt_debug + $debug_cmd + case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra + # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not + # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. @@ -4072,6 +6531,7 @@ func_mode_link () new_inherited_linker_flags= avoid_version=no + bindir= dlfiles= dlprefiles= dlself=no @@ -4084,10 +6544,11 @@ func_mode_link () module=no no_install=no objs= + os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no - preload=no + preload=false prev= prevarg= release= @@ -4099,7 +6560,7 @@ func_mode_link () vinfo= vinfo_number=no weak_libs= - single_module="${wl}-single_module" + single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. @@ -4107,15 +6568,15 @@ func_mode_link () do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then @@ -4148,7 +6609,7 @@ func_mode_link () # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do - arg="$1" + arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result @@ -4164,17 +6625,22 @@ func_mode_link () esac case $prev in + bindir) + bindir=$arg + prev= + continue + ;; dlfiles|dlprefiles) - if test "$preload" = no; then + $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" - preload=yes - fi + preload=: + } case $arg in *.la | *.lo) ;; # We handle these cases below. force) - if test "$dlself" = no; then + if test no = "$dlself"; then dlself=needless export_dynamic=yes fi @@ -4182,9 +6648,9 @@ func_mode_link () continue ;; self) - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless @@ -4194,10 +6660,10 @@ func_mode_link () continue ;; *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" + if test dlfiles = "$prev"; then + func_append dlfiles " $arg" else - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $arg" fi prev= continue @@ -4205,14 +6671,14 @@ func_mode_link () esac ;; expsyms) - export_symbols="$arg" + export_symbols=$arg test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" + || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) - export_symbols_regex="$arg" + export_symbols_regex=$arg prev= continue ;; @@ -4221,7 +6687,7 @@ func_mode_link () *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; @@ -4230,7 +6696,13 @@ func_mode_link () continue ;; inst_prefix) - inst_prefix_dir="$arg" + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. prev= continue ;; @@ -4240,7 +6712,7 @@ func_mode_link () moreargs= for fil in `cat "$save_arg"` do -# moreargs="$moreargs $fil" +# func_append moreargs " $fil" arg=$fil # A libtool-controlled object. @@ -4254,22 +6726,22 @@ func_mode_link () if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" prev= continue else @@ -4279,31 +6751,31 @@ func_mode_link () fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" + arg=$pic_object fi # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -4311,7 +6783,7 @@ func_mode_link () if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -4319,24 +6791,29 @@ func_mode_link () func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi done else - func_fatal_error "link input file \`$arg' does not exist" + func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; + os2dllname) + os2dllname=$arg + prev= + continue + ;; precious_regex) - precious_files_regex="$arg" + precious_files_regex=$arg prev= continue ;; release) - release="-$arg" + release=-$arg prev= continue ;; @@ -4348,48 +6825,48 @@ func_mode_link () func_fatal_error "only absolute run-paths are allowed" ;; esac - if test "$prev" = rpath; then + if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; - *) rpath="$rpath $arg" ;; + *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; + *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) - shrext_cmds="$arg" + shrext_cmds=$arg prev= continue ;; weak) - weak_libs="$weak_libs $arg" + func_append weak_libs " $arg" prev= continue ;; xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) - compiler_flags="$compiler_flags $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" @@ -4403,7 +6880,7 @@ func_mode_link () esac fi # test -n "$prev" - prevarg="$arg" + prevarg=$arg case $arg in -all-static) @@ -4417,7 +6894,7 @@ func_mode_link () -allow-undefined) # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" + func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) @@ -4425,6 +6902,11 @@ func_mode_link () continue ;; + -bindir) + prev=bindir + continue + ;; + -dlopen) prev=dlfiles continue @@ -4444,7 +6926,7 @@ func_mode_link () if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi - if test "X$arg" = "X-export-symbols"; then + if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex @@ -4475,44 +6957,51 @@ func_mode_link () ;; -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" + func_fatal_error "require no space between '-L' and '$1'" else - func_fatal_error "need path for \`-L' option" + func_fatal_error "need path for '-L' option" fi fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir ;; esac case "$deplibs " in - *" -L$dir "*) ;; + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; + *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -4520,7 +7009,7 @@ func_mode_link () ;; -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) @@ -4528,35 +7017,40 @@ func_mode_link () ;; *-*-os2*) # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; esac - elif test "X$arg" = "X-lc_r"; then + elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi - deplibs="$deplibs $arg" + func_append deplibs " $arg" + continue + ;; + + -mllvm) + prev=mllvm continue ;; @@ -4568,27 +7062,28 @@ func_mode_link () # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) - single_module="${wl}-multi_module" + single_module=$wl-multi_module continue ;; @@ -4602,8 +7097,8 @@ func_mode_link () *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; @@ -4621,6 +7116,11 @@ func_mode_link () continue ;; + -os2dllname) + prev=os2dllname + continue + ;; + -o) prev=output ;; -precious-files-regex) @@ -4649,13 +7149,17 @@ func_mode_link () # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac continue ;; @@ -4704,14 +7208,14 @@ func_mode_link () func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -4720,15 +7224,15 @@ func_mode_link () func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -4751,38 +7255,65 @@ func_mode_link () # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # -fstack-protector* stack protector flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -stdlib=* select c++ std lib with clang + # -fsanitize=* Clang memory and address sanitizer -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -fsanitize=*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" + func_append compiler_flags " $arg" continue ;; + -Z*) + if test os2 = "`expr $host : '.*\(os2\)'`"; then + # OS/2 uses -Zxxx to specify OS/2-specific options + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case $arg in + -Zlinker | -Zstack) + prev=xcompiler + ;; + esac + continue + else + # Otherwise treat like 'Some other compiler flag' below + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + fi + ;; + # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. - objs="$objs $arg" + func_append objs " $arg" ;; *.lo) @@ -4798,22 +7329,22 @@ func_mode_link () if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + test none = "$pic_object" || { # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then + func_append dlfiles " $pic_object" prev= continue else @@ -4823,31 +7354,31 @@ func_mode_link () fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" - fi + arg=$pic_object + } # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -4855,7 +7386,7 @@ func_mode_link () if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -4863,31 +7394,32 @@ func_mode_link () func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" + func_append deplibs " $arg" + func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. - if test "$prev" = dlfiles; then + func_resolve_sysroot "$arg" + if test dlfiles = "$prev"; then # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" + func_append dlfiles " $func_resolve_sysroot_result" prev= - elif test "$prev" = dlprefiles; then + elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $func_resolve_sysroot_result" prev= else - deplibs="$deplibs $arg" + func_append deplibs " $func_resolve_sysroot_result" fi continue ;; @@ -4897,7 +7429,7 @@ func_mode_link () # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + arg=$func_quote_for_eval_result ;; esac # arg @@ -4909,9 +7441,9 @@ func_mode_link () done # argument parsing loop test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" + func_fatal_help "the '$prevarg' option requires an argument" - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -4920,20 +7452,25 @@ func_mode_link () oldlibs= # calculate the name of the file, without its directory func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" + outputname=$func_basename_result + libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" + func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" + output_objdir=$func_dirname_result$objdir + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" @@ -4954,15 +7491,15 @@ func_mode_link () # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps; then case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - libs="$libs $deplib" + func_append libs " $deplib" done - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps @@ -4972,9 +7509,9 @@ func_mode_link () if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac - pre_post_deps="$pre_post_deps $pre_post_dep" + func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= @@ -4994,7 +7531,7 @@ func_mode_link () case $file in *.la) ;; *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done @@ -5002,7 +7539,7 @@ func_mode_link () prog) compile_deplibs= finalize_deplibs= - alldeplibs=no + alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" @@ -5014,82 +7551,85 @@ func_mode_link () for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then + if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs fi - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs deplibs= fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then + if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= + func_resolve_sysroot "$lib" case $lib in - *.la) func_source "$lib" ;; + *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + func_basename "$deplib" + deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; + *) func_append deplibs " $deplib" ;; esac done done - libs="$dlprefiles" + libs=$dlprefiles fi - if test "$pass" = dlopen; then + if test dlopen = "$pass"; then # Collect dlpreopened libraries - save_deplibs="$deplibs" + save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= - found=no + found=false case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - compiler_flags="$compiler_flags $deplib" - if test "$linkmode" = lib ; then + func_append compiler_flags " $deplib" + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" @@ -5097,31 +7637,22 @@ func_mode_link () for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" + lib=$searchdir/lib$name$search_ext if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes + if test .la = "$search_ext"; then + found=: else - found=no + found=false fi break 2 fi done done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library + if $found; then + # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then @@ -5129,19 +7660,19 @@ func_mode_link () old_library= func_source "$lib" for l in $old_library $library_names; do - ll="$l" + ll=$l done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no + if test "X$ll" = "X$old_library"; then # only static version available + found=false func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi @@ -5150,18 +7681,28 @@ func_mode_link () *) ;; esac fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue fi ;; # -l *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi @@ -5171,47 +7712,53 @@ func_mode_link () case $linkmode in lib) deplibs="$deplib $deplibs" - test "$pass" = conv && continue + test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi - if test "$pass" = scan; then + if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) - func_warning "\`-L' is ignored for archives/objects" + func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) - if test "$pass" = link; then + if test link = "$pass"; then func_stripname '-R' '' "$deplib" - dir=$func_stripname_result + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; - *.la) lib="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; *.$libext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi @@ -5222,40 +7769,40 @@ func_mode_link () case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) - valid_a_lib=no + valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes + valid_a_lib=: fi ;; pass_all) - valid_a_lib=yes + valid_a_lib=: ;; esac - if test "$valid_a_lib" != yes; then - $ECHO - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." - else - $ECHO + if $valid_a_lib; then + echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" + else + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) - if test "$pass" != link; then + if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -5266,38 +7813,36 @@ func_mode_link () esac # linkmode ;; # *.$libext *.lo | *.$objext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. - newdlprefiles="$newdlprefiles $deplib" + func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - newdlfiles="$newdlfiles $deplib" + func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) - alldeplibs=yes + alldeplibs=: continue ;; esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" + || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result dlname= dlopen= @@ -5318,44 +7863,44 @@ func_mode_link () # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi - if test "$pass" = conv; then + if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $deplib" done continue fi # $pass = conv @@ -5363,101 +7908,133 @@ func_mode_link () # Get the name of the library we link against. linklib= - for l in $old_library $library_names; do - linklib="$l" - done + if test -n "$old_library" && + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib=$l + done + fi if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" + func_append dlprefiles " $lib $dependency_libs" else - newdlfiles="$newdlfiles $lib" + func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" + abs_ladir=$ladir fi ;; esac func_basename "$lib" - laname="$func_basename_result" + laname=$func_basename_result # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" + if test yes = "$installed"; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir else - dir="$libdir" - absdir="$libdir" + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" + dir=$ladir + absdir=$abs_ladir # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi + case $host in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then + elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else @@ -5467,52 +8044,53 @@ func_mode_link () fi - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" + if test prog = "$linkmode" && test link != "$pass"; then + func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then + if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in + case $temp_rpath: in *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; + *) func_append temp_rpath "$absdir:" ;; esac fi @@ -5524,7 +8102,7 @@ func_mode_link () *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5533,15 +8111,15 @@ func_mode_link () *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue @@ -5550,20 +8128,20 @@ func_mode_link () link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then + if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then + { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in - *cygwin* | *mingw* | *cegcc*) + *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" + func_append notinst_deplibs " $lib" need_relink=no ;; *) - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" + if test no = "$installed"; then + func_append notinst_deplibs " $lib" need_relink=yes fi ;; @@ -5572,24 +8150,24 @@ func_mode_link () # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" + dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" + dlopenmodule=$dlpremoduletest break fi done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO - if test "$linkmode" = prog; then + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then + echo + if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. @@ -5598,7 +8176,7 @@ func_mode_link () *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5607,7 +8185,7 @@ func_mode_link () *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac @@ -5617,43 +8195,43 @@ func_mode_link () # figure out the soname set dummy $library_names shift - realname="$1" + realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then - soname="$dlname" + soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in - *cygwin* | mingw* | *cegcc*) + *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; esac eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" + soroot=$soname func_basename "$soroot" - soname="$func_basename_result" + soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else - func_verbose "extracting exported symbol list from \`$soname'" + func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" + func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library @@ -5661,70 +8239,70 @@ func_mode_link () linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$mode" != relink; then + if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" + if test no = "$hardcode_direct"; then + add=$dir/$linklib case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; + *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not + # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then + $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" + if test -z "$old_library"; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" else - add="$dir/$old_library" + add=$dir/$old_library fi elif test -n "$old_library"; then - add="$dir/$old_library" + add=$dir/$old_library fi fi esac - elif test "$hardcode_minus_L" = no; then + elif test no = "$hardcode_minus_L"; then case $host in - *-*-sunos*) add_shlibpath="$dir" ;; + *-*-sunos*) add_shlibpath=$dir ;; esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi ;; relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi @@ -5732,72 +8310,72 @@ func_mode_link () *) lib_linked=no ;; esac - if test "$lib_linked" != yes; then + if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi - if test "$linkmode" = prog || test "$mode" = relink; then + if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then + add=-l$name + elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib else - add="$libdir/$linklib" + add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" + add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi - add="-l$name" + add=-l$name fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else @@ -5805,43 +8383,43 @@ func_mode_link () test -n "$add" && deplibs="$add $deplibs" fi fi - elif test "$linkmode" = prog; then + elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi - elif test "$build_libtool_libs" = yes; then + elif test yes = "$build_libtool_libs"; then # Not a shared library - if test "$deplibs_check_method" != pass_all; then + if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. - $ECHO - $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + echo + $ECHO "*** Warning: This system cannot link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test yes = "$module"; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then + if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else @@ -5854,11 +8432,11 @@ func_mode_link () fi fi # link shared/static library? - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do @@ -5867,45 +8445,54 @@ func_mode_link () temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; + *) func_append xrpath " $temp_xrpath";; esac;; - *) temp_deplibs="$temp_deplibs $libdir";; + *) func_append temp_deplibs " $libdir";; esac done - dependency_libs="$temp_deplibs" + dependency_libs=$temp_deplibs fi - newlib_search_path="$newlib_search_path $absdir" + func_append newlib_search_path " $absdir" # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $func_resolve_sysroot_result" done - if test "$link_all_deplibs" != no; then + if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do + path= case $deplib in - -L*) path="$deplib" ;; + -L*) path=$deplib ;; *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result # We need an absolute path. case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir fi ;; esac @@ -5913,35 +8500,35 @@ func_mode_link () case $host in *-*-darwin*) depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do depdepl=$tmp done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) - path="-L$absdir/$objdir" + path=-L$absdir/$objdir ;; esac else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" + func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" + func_warning "'$deplib' seems to be moved" - path="-L$absdir" + path=-L$absdir fi ;; esac @@ -5953,38 +8540,38 @@ func_mode_link () fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then + if test link = "$pass"; then + if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then + if test dlopen != "$pass"; then + test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; + *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= - fi + } - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else + if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" + else + vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order @@ -6033,71 +8620,102 @@ func_mode_link () -L*) case " $tmp_libs " in *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi + + # Add Sun CC postdeps if required: + test CXX = "$tagname" && { + case $host_os in + linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C++ 5.9 + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + + solaris*) + func_cc_basename "$CC" + case $func_cc_basename_result in + CC* | sunCC*) + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + esac + } + # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= - for i in $dependency_libs ; do + for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) - i="" + i= ;; esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" + if test -n "$i"; then + func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" + if test prog = "$linkmode"; then + dlfiles=$newdlfiles fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles fi case $linkmode in oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; + func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" + func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" + func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" + func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ - func_warning "\`-release' is ignored for archives" + func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" + func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" + oldlibs=$output + func_append objs "$old_deplibs" ;; lib) - # Make sure we only generate libraries of the form `libNAME.la'. + # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" @@ -6106,10 +8724,10 @@ func_mode_link () eval libname=\"$libname_spec\" ;; *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" - if test "$need_lib_prefix" != no; then + if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result @@ -6123,31 +8741,31 @@ func_mode_link () esac if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else - $ECHO + echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" + func_append libobjs " $objs" fi fi - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" - install_libdir="$1" + install_libdir=$1 oldlibs= if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so + # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" @@ -6156,20 +8774,20 @@ func_mode_link () fi test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" + func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. - save_ifs="$IFS"; IFS=':' + save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift - IFS="$save_ifs" + IFS=$save_ifs test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" + func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts @@ -6177,41 +8795,42 @@ func_mode_link () case $vinfo_number in yes) - number_major="$1" - number_minor="$2" - number_revision="$3" + number_major=$1 + number_minor=$2 + number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix - # which has an extra 1 added just for fun + # that has an extra 1 added just for fun # case $version_type in - darwin|linux|osf|windows|none) + # correct linux to gnu/linux during the next big refactor + darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_revision" + age=$number_minor + revision=$number_revision ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" + freebsd-aout|qnx|sunos) + current=$number_major + revision=$number_minor + age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_minor" + age=$number_minor + revision=$number_minor lt_irix_increment=no ;; esac ;; no) - current="$1" - revision="$2" - age="$3" + current=$1 + revision=$2 + age=$3 ;; esac @@ -6219,30 +8838,30 @@ func_mode_link () case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. @@ -6257,26 +8876,36 @@ func_mode_link () # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $CC in + nagfor*) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac ;; freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; + major=.$current + versuffix=.$current.$revision ;; freebsd-elf) - major=".$current" - versuffix=".$current" + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision ;; irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then + if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 @@ -6287,70 +8916,74 @@ func_mode_link () nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac - verstring="$verstring_prefix$major.$revision" + verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" + verstring=$verstring_prefix$major.$iface:$verstring done - # Before this point, $major must not contain `.'. + # Before this point, $major must not contain '.'. major=.$major - versuffix="$major.$revision" + versuffix=$major.$revision ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" - versuffix2="$major.$age" + versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring:${iface}.0" + verstring=$verstring:$iface.0 done # Make executables depend on our current version. - verstring="$verstring:${current}.0" + func_append verstring ":$current.0" ;; qnx) - major=".$current" - versuffix=".$current" + major=.$current + versuffix=.$current + ;; + + sco) + major=.$current + versuffix=.$current ;; sunos) - major=".$current" - versuffix=".$current.$revision" + major=.$current + versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. + # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; *) - func_fatal_configuration "unknown library version type \`$version_type'" + func_fatal_configuration "unknown library version type '$version_type'" ;; esac @@ -6364,45 +8997,45 @@ func_mode_link () verstring= ;; *) - verstring="0.0" + verstring=0.0 ;; esac - if test "$need_version" = no; then + if test no = "$need_version"; then versuffix= - versuffix2= else - versuffix=".0.0" - versuffix2=".0.0" + versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then + if test yes,no = "$avoid_version,$need_version"; then major= versuffix= - versuffix2= - verstring="" + verstring= fi # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi fi else # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" + allow_undefined_flag=$no_undefined_flag fi fi - func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" - test "X$libobjs" = "X " && libobjs= + func_generate_dlsyms "$libname" "$libname" : + func_append libobjs " $symfileobj" + test " " = "$libobjs" && libobjs= - if test "$mode" != relink; then + if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -6411,14 +9044,14 @@ func_mode_link () case $p in *.$objext | *.gcno) ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi - removelist="$removelist $p" + func_append removelist " $p" ;; *) ;; esac @@ -6428,56 +9061,57 @@ func_mode_link () fi # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then + func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" + old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; + *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" + old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; + *) func_append dlprefiles " $lib" ;; esac done - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) @@ -6485,7 +9119,7 @@ func_mode_link () ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. @@ -6501,8 +9135,8 @@ func_mode_link () ;; *) # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" + if test yes = "$build_libtool_need_lc"; then + func_append deplibs " -lc" fi ;; esac @@ -6517,9 +9151,9 @@ func_mode_link () # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? - release="" - versuffix="" - major="" + release= + versuffix= + major= newdeplibs= droppeddeps=no case $deplibs_check_method in @@ -6548,35 +9182,35 @@ EOF -l*) func_stripname -l '' "$i" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" - i="" + func_append newdeplibs " $i" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then + func_append newdeplibs " $i" else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which I believe you do not have" - $ECHO "*** because a test_compile did reveal that the linker did not use it for" - $ECHO "*** its dynamic dependency list that programs get resolved with at runtime." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which I believe you do not have" + echo "*** because a test_compile did reveal that the linker did not use it for" + echo "*** its dynamic dependency list that programs get resolved with at runtime." fi fi ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6591,43 +9225,43 @@ EOF $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" - i="" + func_append newdeplibs " $i" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then + func_append newdeplibs " $i" else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because a test_compile did reveal that the linker did not use this one" - $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because a test_compile did reveal that the linker did not use this one" + echo "*** as a dynamic dependency that programs can get resolved with at runtime." fi fi else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning! Library $i is needed by this library but I was not able to" - $ECHO "*** make it link in! You will probably need to install it or some" - $ECHO "*** library that it depends on before this library will be fully" - $ECHO "*** functional. Installing it before continuing would be even better." + echo "*** make it link in! You will probably need to install it or some" + echo "*** library that it depends on before this library will be fully" + echo "*** functional. Installing it before continuing would be even better." fi ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6641,18 +9275,30 @@ EOF -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" + func_append newdeplibs " $a_deplib" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` + if test -n "$file_magic_glob"; then + libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` + else + libnameglob=$libname + fi + test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + if test yes = "$want_nocaseglob"; 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 | @@ -6664,33 +9310,33 @@ EOF # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? - potlib="$potent_lib" + potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" + func_append newdeplibs " $a_deplib" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -6700,7 +9346,7 @@ EOF ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. @@ -6713,38 +9359,38 @@ EOF -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" + func_append newdeplibs " $a_deplib" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + 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" - a_deplib="" + func_append newdeplibs " $a_deplib" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -6754,32 +9400,32 @@ EOF ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do + newdeplibs= + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO - if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test none = "$deplibs_check_method"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." + echo "*** Warning: inter-library dependencies are not known to be supported." fi - $ECHO "*** All declared inter-library dependencies are being dropped." + echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes - fi + ;; + esac ;; esac versuffix=$versuffix_save @@ -6791,44 +9437,44 @@ EOF case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + if test yes = "$droppeddeps"; then + if test yes = "$module"; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." - if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$allow_undefined"; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -6843,9 +9489,9 @@ EOF # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -6858,7 +9504,7 @@ EOF *) case " $deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -6868,13 +9514,13 @@ 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" + deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= @@ -6882,62 +9528,65 @@ EOF dlname= # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then + if test yes = "$build_libtool_libs"; then + # Remove $wl instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" + rpath=$finalize_rpath + test relink = "$opt_mode" || 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" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$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_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + libdir=$hardcode_libdirs + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # 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 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -6947,34 +9596,34 @@ EOF eval library_names=\"$library_names_spec\" set dummy $library_names shift - realname="$1" + realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi if test -z "$dlname"; then dlname=$soname fi - lib="$output_objdir/$realname" + lib=$output_objdir/$realname linknames= for link do - linknames="$linknames $link" + func_append linknames " $link" done # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= 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" + export_symbols=$output_objdir/$libname.uexp + func_append delfiles " $export_symbols" fi orig_export_symbols= @@ -6982,37 +9631,69 @@ EOF cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. - orig_export_symbols="$export_symbols" + orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes - fi + } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd 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 + save_ifs=$IFS; IFS='~' + for cmd1 in $cmds; do + IFS=$save_ifs + # 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 yes = "$try_normal_branch" \ + && { 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..." @@ -7022,8 +9703,8 @@ EOF break fi done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi @@ -7031,21 +9712,21 @@ EOF fi if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # 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 @@ -7055,15 +9736,15 @@ EOF case " $convenience " in *" $test_deplib "*) ;; *) - tmp_deplibs="$tmp_deplibs $test_deplib" + func_append tmp_deplibs " $test_deplib" ;; esac done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && + test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. @@ -7074,27 +9755,27 @@ EOF eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + gentop=$output_objdir/${outputname}x + 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 + if test yes = "$thread_safe" && 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 relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds @@ -7112,7 +9793,7 @@ EOF fi fi - if test "X$skipped_export" != "X:" && + if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then @@ -7134,7 +9815,8 @@ EOF save_libobjs=$libobjs fi save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` + func_basename "$output" + output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. @@ -7144,37 +9826,42 @@ EOF last_robj= k=1 - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output + 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" - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= - if test "$compiler_needs_object" = yes; then + if test yes = "$compiler_needs_object"; then firstobj="$1 " shift 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..." - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result @@ -7186,25 +9873,27 @@ EOF func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result - if test "X$objlist" = X || + if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. - if test "$k" -eq 1 ; then + if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi - last_robj=$output_objdir/$output_la-${k}.$objext + last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj + output=$output_objdir/$output_la-$k.$objext + objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result @@ -7214,19 +9903,20 @@ EOF # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi - delfiles="$delfiles $output" + func_append delfiles " $output" else output= fi - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. @@ -7235,16 +9925,16 @@ EOF if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi - fi + } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { + IFS=$save_ifs + $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -7252,7 +9942,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7261,7 +9951,7 @@ EOF exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' @@ -7269,27 +9959,27 @@ EOF fi fi - if ${skipped_export-false}; then + ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # 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 - fi + } libobjs=$output # Restore the value of output. @@ -7303,7 +9993,7 @@ EOF # value of $libobjs for piecewise linking. # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else @@ -7325,19 +10015,20 @@ EOF # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + gentop=$output_objdir/${outputname}x + 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 - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $cmds; do - IFS="$save_ifs" + IFS=$sp$nl eval cmd=\"$cmd\" - $opt_silent || { + IFS=$save_ifs + $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } @@ -7345,7 +10036,7 @@ EOF lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7354,10 +10045,10 @@ EOF exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test relink = "$opt_mode"; 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 @@ -7377,39 +10068,39 @@ EOF done # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then + if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. - dlname="$soname" + dlname=$soname fi fi ;; obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; + func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" + func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" + func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" + func_warning "'-version-info' is ignored for objects" test -n "$release" && \ - func_warning "\`-release' is ignored for objects" + func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" + func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" @@ -7417,7 +10108,7 @@ EOF ;; *) libobj= - obj="$output" + obj=$output ;; esac @@ -7430,28 +10121,33 @@ EOF # the extraction. reload_conv_objs= gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - + # if reload_cmds runs $LD directly, get rid of -Wl from + # whole_archive_flag_spec and hope we can get by with turning comma + # into space. + case $reload_cmds in + *\$LD[\ \$]*) wl= ;; + esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" + gentop=$output_objdir/${obj}x + func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + # If we're not building shared, we need to use non_pic_objs + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects - output="$obj" + # Create the old-style object. + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs + + output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. @@ -7463,7 +10159,7 @@ EOF exit $EXIT_SUCCESS fi - if test "$build_libtool_libs" != yes; then + test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi @@ -7473,12 +10169,12 @@ EOF # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS - fi + } - if test -n "$pic_flag" || test "$pic_mode" != default; then + if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" - output="$libobj" + output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi @@ -7495,22 +10191,20 @@ EOF output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" + func_warning "'-version-info' is ignored for programs" test -n "$release" && \ - func_warning "\`-release' is ignored for programs" + func_warning "'-release' is ignored for programs" - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac @@ -7518,17 +10212,17 @@ EOF *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then + if test CXX = "$tagname"; 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 # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -7542,7 +10236,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 @@ -7552,17 +10246,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_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. @@ -7570,7 +10264,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 @@ -7582,39 +10276,39 @@ EOF if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$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 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` 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 @@ -7622,10 +10316,10 @@ EOF # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - compile_rpath="$rpath" + compile_rpath=$rpath rpath= hardcode_libdirs= @@ -7633,82 +10327,86 @@ EOF if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$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 # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - finalize_rpath="$rpath" + finalize_rpath=$rpath - if test -n "$libobjs" && test "$build_old_libs" = yes; then + if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi - wrappers_required=yes + wrappers_required=: case $host in - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=false ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no + *cygwin* | *mingw* ) + test yes = "$build_libtool_libs" || wrappers_required=false ;; *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false fi ;; esac - if test "$wrappers_required" = no; then + $wrappers_required || { # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. 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}"' + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status - fi + } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" @@ -7724,7 +10422,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 @@ -7732,54 +10430,68 @@ 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 fi - if test "$no_install" = yes; then + if test yes = "$no_install"; then # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" + link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $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 - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname 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" @@ -7797,18 +10509,7 @@ EOF fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. @@ -7832,8 +10533,8 @@ EOF func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 @@ -7854,7 +10555,7 @@ EOF trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then + if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result @@ -7877,43 +10578,45 @@ EOF # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience build_libtool_libs=no - else + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" - fi - fi - addlibs="$old_convenience" - fi + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + gentop=$output_objdir/${outputname}x + 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. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + gentop=$output_objdir/${outputname}x + 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 @@ -7929,9 +10632,9 @@ EOF done | sort | sort -uc >/dev/null 2>&1); then : else - $ECHO "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + echo "copying selected object files to avoid basename conflicts..." + gentop=$output_objdir/${outputname}x + func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= @@ -7939,7 +10642,7 @@ EOF for obj in $save_oldobjs do func_basename "$obj" - objbase="$func_basename_result" + objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) @@ -7955,18 +10658,30 @@ 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 + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" 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..." @@ -7996,18 +10711,18 @@ EOF else # the above command should be used before it gets too long oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then + if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist - if test "X$oldobjs" = "X" ; then + if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" @@ -8024,7 +10739,7 @@ EOF case $output in *.la) old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" + test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior @@ -8039,52 +10754,63 @@ EOF fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do - if test "$installed" = yes; then + if test yes = "$installed"; then if test -z "$install_libdir"; then break fi - output="$output_objdir/$outputname"i + output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + name=$func_basename_result + func_resolve_sysroot "$deplib" + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" + func_fatal_error "'$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; + -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" + ;; + *) func_append newdependency_libs " $deplib" ;; esac done - dependency_libs="$newdependency_libs" + dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + 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_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; - *) newdlfiles="$newdlfiles $lib" ;; + *) func_append newdlfiles " $lib" ;; esac done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in @@ -8094,44 +10820,61 @@ EOF # didn't already link the preopened objects directly into # the library: func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + 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_fatal_error "'$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac - newdlfiles="$newdlfiles $abs" + func_append newdlfiles " $abs" done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac - newdlprefiles="$newdlprefiles $abs" + func_append newdlprefiles " $abs" done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test -n "$bindir"; then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result/$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; esac $ECHO > $output "\ # $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -8145,7 +10888,7 @@ library_names='$library_names' # The name of the static archive. old_library='$old_library' -# Linker flags that can not go in dependency_libs. +# Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. @@ -8171,7 +10914,7 @@ dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then + if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi @@ -8186,29 +10929,31 @@ relink_command=\"$relink_command\"" exit $EXIT_SUCCESS } -{ test "$mode" = link || test "$mode" = relink; } && - func_mode_link ${1+"$@"} +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi # func_mode_uninstall arg... func_mode_uninstall () { - $opt_debug - RM="$nonopt" + $debug_cmd + + RM=$nonopt files= - rmforce= + rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic for arg do case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; + -f) func_append RM " $arg"; rmforce=: ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; esac done @@ -8217,24 +10962,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" + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir else - objdir="$dir/$origobjdir" + odir=$dir/$objdir fi func_basename "$file" - name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" + name=$func_basename_result + test uninstall = "$opt_mode" && 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 clean = "$opt_mode"; then case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; esac fi @@ -8246,11 +10990,11 @@ func_mode_uninstall () elif test -d "$file"; then exit_status=1 continue - elif test "$rmforce" = yes; then + elif $rmforce; then continue fi - rmfiles="$file" + rmfiles=$file case $name in *.la) @@ -8260,28 +11004,27 @@ 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 # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; @@ -8297,21 +11040,19 @@ func_mode_uninstall () func_source $dir/$name # 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" + if test -n "$pic_object" && test none != "$pic_object"; then + 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" + if test -n "$non_pic_object" && test none != "$non_pic_object"; then + func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$mode" = clean ; then + if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) @@ -8321,7 +11062,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. @@ -8330,7 +11071,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 @@ -8338,12 +11079,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}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" fi fi fi @@ -8351,9 +11092,8 @@ 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 + # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" @@ -8363,16 +11103,17 @@ func_mode_uninstall () exit $exit_status } -{ test "$mode" = uninstall || test "$mode" = clean; } && - func_mode_uninstall ${1+"$@"} +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi -test -z "$mode" && { - help="$generic_help" +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" @@ -8383,7 +11124,7 @@ exit $exit_status # The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting +# where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support @@ -8406,5 +11147,3 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # mode:shell-script # sh-indentation:2 # End: -# vi:sw=2 - diff --git a/unit/atf-src/admin/missing b/unit/atf-src/admin/missing index 9a5564823d..c6e379584b 100755 --- a/unit/atf-src/admin/missing +++ b/unit/atf-src/admin/missing @@ -1,10 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. +# Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-01-06.18; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1996-2012 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,61 +29,33 @@ if test $# -eq 0; then exit 1 fi -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, 'missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file 'aclocal.m4' - autoconf touch file 'configure' - autoheader touch file 'config.h.in' - autom4te touch the output file, or create a stub one - automake touch all 'Makefile.in' files - bison create 'y.tab.[ch]', if possible, from existing .[ch] - flex create 'lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create 'lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create 'y.tab.[ch]', if possible, from existing .[ch] + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. @@ -98,233 +70,146 @@ Send bug reports to ." ;; -*) - echo 1>&2 "$0: Unknown '$1' option" + echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` +# Run the given program, remember its exit status. +"$@"; st=$? -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running '$TOOL --version' or '$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified 'acinclude.m4' or '${configure_ac}'. You might want - to install the Automake and Perl packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified '${configure_ac}'. You might want to install the - Autoconf and GNU m4 packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified 'acconfig.h' or '${configure_ac}'. You might want - to install the Autoconf and GNU m4 packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'. - You might want to install the Automake and Perl packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: '$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get '$1' as part of Autoconf from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: '$1' $msg. You should only need it if - you modified a '.y' file. You may need the Bison package - in order for those modifications to take effect. You can get - Bison from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified a '.l' file. You may need the Flex package - in order for those modifications to take effect. You can get - Flex from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - Help2man package in order for those modifications to take - effect. You can get Help2man from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: '$1' is $msg. You should only need it if - you modified a '.texi' or '.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy 'make' (AIX, - DU, IRIX). You might want to install the Texinfo package or - the GNU make package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - *) - echo 1>&2 "\ -WARNING: '$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the 'README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing '$1' program." - exit 1 - ;; -esac - -exit 0 +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/unit/atf-src/admin/travis-build.sh b/unit/atf-src/admin/travis-build.sh new file mode 100644 index 0000000000..9831b34e01 --- /dev/null +++ b/unit/atf-src/admin/travis-build.sh @@ -0,0 +1,50 @@ +#! /bin/sh +# Copyright 2014 Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Google Inc. nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -e -x + +if [ -d /usr/local/share/aclocal ]; then + autoreconf -isv -I/usr/local/share/aclocal +else + autoreconf -isv +fi +./configure + +if [ "${AS_ROOT:-no}" = yes ]; then + cat >root-kyua.conf < #include -#endif // !defined(_ATF_CXX_HPP_) +#endif // !defined(ATF_CXX_HPP) diff --git a/unit/atf-src/atf-c++/Atffile b/unit/atf-src/atf-c++/Atffile index ba11f2181c..5e1d25fd7b 100644 --- a/unit/atf-src/atf-c++/Atffile +++ b/unit/atf-src/atf-c++/Atffile @@ -7,7 +7,6 @@ tp: detail tp: atf_c++_test tp: build_test tp: check_test -tp: config_test tp: macros_test tp: pkg_config_test tp: tests_test diff --git a/unit/atf-src/atf-c++/Kyuafile b/unit/atf-src/atf-c++/Kyuafile index 6df836f278..9fd43af76c 100644 --- a/unit/atf-src/atf-c++/Kyuafile +++ b/unit/atf-src/atf-c++/Kyuafile @@ -5,7 +5,6 @@ test_suite("atf") atf_test_program{name="atf_c++_test"} atf_test_program{name="build_test"} atf_test_program{name="check_test"} -atf_test_program{name="config_test"} atf_test_program{name="macros_test"} atf_test_program{name="pkg_config_test"} atf_test_program{name="tests_test"} diff --git a/unit/atf-src/atf-c++/Makefile.am.inc b/unit/atf-src/atf-c++/Makefile.am.inc index 2d968026b3..58f9945904 100644 --- a/unit/atf-src/atf-c++/Makefile.am.inc +++ b/unit/atf-src/atf-c++/Makefile.am.inc @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# ATF_CXX_LIBS = libatf-c++.la libatf-c.la @@ -35,27 +31,22 @@ libatf_c___la_SOURCES = atf-c++/build.cpp \ atf-c++/build.hpp \ atf-c++/check.cpp \ atf-c++/check.hpp \ - atf-c++/config.cpp \ - atf-c++/config.hpp \ atf-c++/macros.hpp \ - atf-c++/noncopyable.hpp \ atf-c++/tests.cpp \ atf-c++/tests.hpp \ atf-c++/utils.cpp \ atf-c++/utils.hpp -libatf_c___la_LDFLAGS = -version-info 0:0:0 +libatf_c___la_LDFLAGS = -version-info 2:0:0 include_HEADERS += atf-c++.hpp atf_c___HEADERS = atf-c++/build.hpp \ atf-c++/check.hpp \ - atf-c++/config.hpp \ atf-c++/macros.hpp \ - atf-c++/noncopyable.hpp \ atf-c++/tests.hpp \ atf-c++/utils.hpp atf_c__dir = $(includedir)/atf-c++ -dist_man_MANS += atf-c++/atf-c++-api.3 +dist_man_MANS += atf-c++/atf-c++.3 atf_aclocal_DATA += atf-c++/atf-c++.m4 EXTRA_DIST += atf-c++/atf-c++.m4 @@ -65,12 +56,12 @@ atf_c__dirpkgconfig_DATA = atf-c++/atf-c++.pc CLEANFILES += atf-c++/atf-c++.pc EXTRA_DIST += atf-c++/atf-c++.pc.in atf-c++/atf-c++.pc: $(srcdir)/atf-c++/atf-c++.pc.in Makefile - test -d atf-c++ || mkdir -p atf-c++ + $(AM_V_GEN)test -d atf-c++ || mkdir -p atf-c++; \ sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \ -e 's#__CXX__#$(CXX)#g' \ -e 's#__INCLUDEDIR__#$(includedir)#g' \ -e 's#__LIBDIR__#$(libdir)#g' \ - <$(srcdir)/atf-c++/atf-c++.pc.in >atf-c++/atf-c++.pc.tmp + <$(srcdir)/atf-c++/atf-c++.pc.in >atf-c++/atf-c++.pc.tmp; \ mv atf-c++/atf-c++.pc.tmp atf-c++/atf-c++.pc tests_atf_c___DATA = atf-c++/Atffile \ @@ -89,9 +80,6 @@ atf_c___build_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) tests_atf_c___PROGRAMS += atf-c++/check_test atf_c___check_test_SOURCES = atf-c++/check_test.cpp atf_c___check_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -tests_atf_c___PROGRAMS += atf-c++/config_test -atf_c___config_test_SOURCES = atf-c++/config_test.cpp -atf_c___config_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) tests_atf_c___PROGRAMS += atf-c++/macros_test atf_c___macros_test_SOURCES = atf-c++/macros_test.cpp atf_c___macros_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) @@ -99,8 +87,7 @@ tests_atf_c___SCRIPTS = atf-c++/pkg_config_test CLEANFILES += atf-c++/pkg_config_test EXTRA_DIST += atf-c++/pkg_config_test.sh atf-c++/pkg_config_test: $(srcdir)/atf-c++/pkg_config_test.sh - test -d atf-c++ || mkdir -p atf-c++ - @src="$(srcdir)/atf-c++/pkg_config_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-c++/pkg_config_test.sh"; \ dst="atf-c++/pkg_config_test"; $(BUILD_SH_TP) tests_atf_c___PROGRAMS += atf-c++/tests_test diff --git a/unit/atf-src/atf-c++/atf-c++-api.3 b/unit/atf-src/atf-c++/atf-c++.3 similarity index 91% rename from unit/atf-src/atf-c++/atf-c++-api.3 rename to unit/atf-src/atf-c++/atf-c++.3 index d0579a9a75..984ec93644 100644 --- a/unit/atf-src/atf-c++/atf-c++-api.3 +++ b/unit/atf-src/atf-c++/atf-c++.3 @@ -1,6 +1,3 @@ -.\" -.\" Automated Testing Framework (atf) -.\" .\" Copyright (c) 2008 The NetBSD Foundation, Inc. .\" All rights reserved. .\" @@ -25,12 +22,11 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd November 30, 2012 -.Dt ATF-C++-API 3 +.Dd October 13, 2014 +.Dt ATF-C++ 3 .Os .Sh NAME -.Nm atf-c++-api , +.Nm atf-c++ , .Nm ATF_ADD_TEST_CASE , .Nm ATF_CHECK_ERRNO , .Nm ATF_FAIL , @@ -68,13 +64,13 @@ .Sh SYNOPSIS .In atf-c++.hpp .Fn ATF_ADD_TEST_CASE "tcs" "name" -.Fn ATF_CHECK_ERRNO "exp_errno" "bool_expression" +.Fn ATF_CHECK_ERRNO "expected_errno" "bool_expression" .Fn ATF_FAIL "reason" .Fn ATF_INIT_TEST_CASES "tcs" .Fn ATF_PASS .Fn ATF_REQUIRE "expression" -.Fn ATF_REQUIRE_EQ "expression_1" "expression_2" -.Fn ATF_REQUIRE_ERRNO "exp_errno" "bool_expression" +.Fn ATF_REQUIRE_EQ "expected_expression" "actual_expression" +.Fn ATF_REQUIRE_ERRNO "expected_errno" "bool_expression" .Fn ATF_REQUIRE_IN "element" "collection" .Fn ATF_REQUIRE_MATCH "regexp" "string_expression" .Fn ATF_REQUIRE_NOT_IN "element" "collection" @@ -145,17 +141,8 @@ .Fa "const std::string& expected_stderr" .Fc .Sh DESCRIPTION -ATF provides a mostly-macro-based programming interface to implement test -programs in C or C++. -This interface is backed by a C++ implementation, but this fact is -hidden from the developer as much as possible through the use of -macros to simplify programming. -However, the use of C++ is not hidden everywhere and while you can -implement test cases without knowing anything at all about the object model -underneath the provided calls, you might need some minimum notions of the -language in very specific circumstances. -.Pp -C++-based test programs always follow this template: +ATF provides a C++ programming interface to implement test programs. +C++-based test programs follow this template: .Bd -literal -offset indent extern "C" { .Ns ... C-specific includes go here ... @@ -339,9 +326,8 @@ If .Va exitcode is not .Sq -1 , -.Xr atf-run 1 -will validate that the exit code of the test case matches the one provided -in this call. +the runtime engine will validate that the exit code of the test case +matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn expect_fail "reason" Any failure (be it fatal or non-fatal) raised in this mode is recorded. @@ -377,9 +363,8 @@ If .Va signo is not .Sq -1 , -.Xr atf-run 1 -will validate that the signal that terminated the test case matches the one -provided in this call. +the runtime engine will validate that the signal that terminated the test +case matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn expect_timeout "reason" Expects the test case to execute for longer than its timeout. @@ -399,6 +384,8 @@ takes an expression and raises a failure if it evaluates to false. .Fn ATF_REQUIRE_EQ takes two expressions and raises a failure if the two do not evaluate to the same exact value. +The common style is to put the expected value in the first parameter and the +actual value in the second parameter. .Pp .Fn ATF_REQUIRE_IN takes an element and a collection and validates that the element is present in @@ -440,7 +427,7 @@ In particular, these are useful to write tests for command-line interfaces. .Fa "const std::string& path" .Fa "const std::string& prefix" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Prints the contents of .Fa path to the standard output, prefixing every line with the string in @@ -452,7 +439,7 @@ to the standard output, prefixing every line with the string in .Fa "const std::string& path" .Fa "const std::string& contents" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Returns true if the given .Fa path matches exactly the expected inlined @@ -464,7 +451,7 @@ matches exactly the expected inlined .Fa "const std::string& source" .Fa "const std::string& destination" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Copies the file .Fa source to @@ -477,7 +464,7 @@ The permissions of the file are preserved during the code. .Fa "const std::string& path" .Fa "const std::string& contents" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Creates .Fa file with the text given in @@ -488,7 +475,7 @@ with the text given in .Fo atf::utils::file_exists .Fa "const std::string& path" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Checks if .Fa path exists. @@ -498,7 +485,7 @@ exists. .Fo atf::utils::fork .Fa "void" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Forks a process and redirects the standard output and standard error of the child to files for later validation with .Fn atf::utils::wait . @@ -510,7 +497,7 @@ Fails the test case if the fork fails, so this does not return an error. .Fa "const std::string& regexp" .Fa "const Collection& collection" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Searches for the regular expression .Fa regexp in any of the strings contained in the @@ -523,7 +510,7 @@ This is a template that accepts any one-dimensional container of strings. .Fa "const std::string& regexp" .Fa "const std::string& path" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Searches for the regular expression .Fa regexp in the file @@ -536,7 +523,7 @@ The variable arguments are used to construct the regular expression. .Fa "const std::string& regexp" .Fa "const std::string& str" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Searches for the regular expression .Fa regexp in the string @@ -547,7 +534,7 @@ in the string .Fa "const int fd" .Fa "const std::string& path" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Redirects the given file descriptor .Fa fd to the file @@ -566,7 +553,7 @@ those spawned by .Fa "const std::string& expected_stdout" .Fa "const std::string& expected_stderr" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Waits and validates the result of a subprocess spawned with .Fn atf::utils::wait . The validation involves checking that the subprocess exited cleanly and returned @@ -586,6 +573,25 @@ strings are prefixed with then they specify the name of the file into which to store the stdout or stderr of the subprocess, and no comparison is performed. .Ed +.Sh ENVIRONMENT +The following variables are recognized by +.Nm +but should not be overridden other than for testing purposes: +.Pp +.Bl -tag -width ATFXBUILDXCXXFLAGSXX -compact +.It Va ATF_BUILD_CC +Path to the C compiler. +.It Va ATF_BUILD_CFLAGS +C compiler flags. +.It Va ATF_BUILD_CPP +Path to the C/C++ preprocessor. +.It Va ATF_BUILD_CPPFLAGS +C/C++ preprocessor flags. +.It Va ATF_BUILD_CXX +Path to the C++ compiler. +.It Va ATF_BUILD_CXXFLAGS +C++ compiler flags. +.El .Sh EXAMPLES The following shows a complete test program with a single test case that validates the addition operator: @@ -599,13 +605,13 @@ ATF_TEST_CASE_HEAD(addition) } ATF_TEST_CASE_BODY(addition) { - ATF_REQUIRE_EQ(0 + 0, 0); - ATF_REQUIRE_EQ(0 + 1, 1); - ATF_REQUIRE_EQ(1 + 0, 1); + ATF_REQUIRE_EQ(0, 0 + 0); + ATF_REQUIRE_EQ(1, 0 + 1); + ATF_REQUIRE_EQ(1, 1 + 0); - ATF_REQUIRE_EQ(1 + 1, 2); + ATF_REQUIRE_EQ(2, 1 + 1); - ATF_REQUIRE_EQ(100 + 200, 300); + ATF_REQUIRE_EQ(300, 100 + 200); } ATF_TEST_CASE(open_failure); @@ -640,5 +646,4 @@ ATF_INIT_TEST_CASES(tcs) .Ed .Sh SEE ALSO .Xr atf-test-program 1 , -.Xr atf-test-case 4 , -.Xr atf 7 +.Xr atf-test-case 4 diff --git a/unit/atf-src/atf-c++/atf-c++.m4 b/unit/atf-src/atf-c++/atf-c++.m4 index 0763d04865..e142b564ab 100644 --- a/unit/atf-src/atf-c++/atf-c++.m4 +++ b/unit/atf-src/atf-c++/atf-c++.m4 @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright 2011 Google Inc. dnl All rights reserved. dnl @@ -28,7 +25,6 @@ dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl dnl ATF_CHECK_CXX([version-spec]) dnl diff --git a/unit/atf-src/atf-c++/atf_c++_test.cpp b/unit/atf-src/atf-c++/atf_c++_test.cpp index c09e4b1019..cc708863f6 100644 --- a/unit/atf-src/atf-c++/atf_c++_test.cpp +++ b/unit/atf-src/atf-c++/atf_c++_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2009 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,11 +22,10 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#include "macros.hpp" +#include -#include "detail/test_helpers.hpp" +#include "atf-c++/detail/test_helpers.hpp" // ------------------------------------------------------------------------ // Tests cases for the header file. diff --git a/unit/atf-src/atf-c++/build.cpp b/unit/atf-src/atf-c++/build.cpp index 9ce134c8e9..f2f80f4eb4 100644 --- a/unit/atf-src/atf-c++/build.cpp +++ b/unit/atf-src/atf-c++/build.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2009 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,8 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/build.hpp" extern "C" { #include "atf-c/build.h" @@ -33,10 +31,8 @@ extern "C" { #include "atf-c/utils.h" } -#include "build.hpp" - -#include "detail/exceptions.hpp" -#include "detail/process.hpp" +#include "atf-c++/detail/exceptions.hpp" +#include "atf-c++/detail/process.hpp" namespace impl = atf::build; #define IMPL_NAME "atf::build" diff --git a/unit/atf-src/atf-c++/build.hpp b/unit/atf-src/atf-c++/build.hpp index 5a291b4cc8..7aa5a978d9 100644 --- a/unit/atf-src/atf-c++/build.hpp +++ b/unit/atf-src/atf-c++/build.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2009 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,9 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if !defined(_ATF_CXX_BUILD_HPP_) -#define _ATF_CXX_BUILD_HPP_ +#if !defined(ATF_CXX_BUILD_HPP) +#define ATF_CXX_BUILD_HPP #include @@ -54,4 +50,4 @@ process::argv_array cxx_o(const std::string&, const std::string&, } // namespace build } // namespace atf -#endif // !defined(_ATF_CXX_BUILD_HPP_) +#endif // !defined(ATF_CXX_BUILD_HPP) diff --git a/unit/atf-src/atf-c++/build_test.cpp b/unit/atf-src/atf-c++/build_test.cpp index 6852905394..0a5ab9668a 100644 --- a/unit/atf-src/atf-c++/build_test.cpp +++ b/unit/atf-src/atf-c++/build_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2009 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,31 +22,25 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/build.hpp" #include #include -#include "../atf-c/h_build.h" +#include -#include "build.hpp" -#include "config.hpp" -#include "macros.hpp" +extern "C" { +#include "atf-c/h_build.h" +} -#include "detail/env.hpp" -#include "detail/process.hpp" -#include "detail/test_helpers.hpp" +#include "atf-c++/detail/env.hpp" +#include "atf-c++/detail/process.hpp" // ------------------------------------------------------------------------ // Auxiliary functions. // ------------------------------------------------------------------------ -namespace atf { - namespace config { - void __reinit(void); - } -} - template< class C > void print_col(const char* prefix, const C& c) @@ -168,7 +159,6 @@ ATF_TEST_CASE_BODY(c_o) verbose_set_env("ATF_BUILD_CC", test->cc); verbose_set_env("ATF_BUILD_CFLAGS", test->cflags); verbose_set_env("ATF_BUILD_CPPFLAGS", test->cppflags); - atf::config::__reinit(); atf::process::argv_array argv = atf::build::c_o(test->sfile, test->ofile, @@ -190,7 +180,6 @@ ATF_TEST_CASE_BODY(cpp) verbose_set_env("ATF_BUILD_CPP", test->cpp); verbose_set_env("ATF_BUILD_CPPFLAGS", test->cppflags); - atf::config::__reinit(); atf::process::argv_array argv = atf::build::cpp(test->sfile, test->ofile, @@ -213,7 +202,6 @@ ATF_TEST_CASE_BODY(cxx_o) verbose_set_env("ATF_BUILD_CXX", test->cxx); verbose_set_env("ATF_BUILD_CXXFLAGS", test->cxxflags); verbose_set_env("ATF_BUILD_CPPFLAGS", test->cppflags); - atf::config::__reinit(); atf::process::argv_array argv = atf::build::cxx_o(test->sfile, test->ofile, @@ -222,12 +210,6 @@ ATF_TEST_CASE_BODY(cxx_o) } } -// ------------------------------------------------------------------------ -// Tests cases for the header file. -// ------------------------------------------------------------------------ - -HEADER_TC(include, "atf-c++/build.hpp"); - // ------------------------------------------------------------------------ // Main. // ------------------------------------------------------------------------ @@ -241,7 +223,4 @@ ATF_INIT_TEST_CASES(tcs) ATF_ADD_TEST_CASE(tcs, c_o); ATF_ADD_TEST_CASE(tcs, cpp); ATF_ADD_TEST_CASE(tcs, cxx_o); - - // Add the test cases for the header file. - ATF_ADD_TEST_CASE(tcs, include); } diff --git a/unit/atf-src/atf-c++/check.cpp b/unit/atf-src/atf-c++/check.cpp index b099b07a75..e4d7db4d49 100644 --- a/unit/atf-src/atf-c++/check.cpp +++ b/unit/atf-src/atf-c++/check.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,8 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/check.hpp" #include @@ -34,11 +32,9 @@ extern "C" { #include "atf-c/error.h" } -#include "check.hpp" - -#include "detail/exceptions.hpp" -#include "detail/process.hpp" -#include "detail/sanity.hpp" +#include "atf-c++/detail/exceptions.hpp" +#include "atf-c++/detail/process.hpp" +#include "atf-c++/detail/sanity.hpp" namespace impl = atf::check; #define IMPL_NAME "atf::check" diff --git a/unit/atf-src/atf-c++/check.hpp b/unit/atf-src/atf-c++/check.hpp index 0623529c74..0144dedb28 100644 --- a/unit/atf-src/atf-c++/check.hpp +++ b/unit/atf-src/atf-c++/check.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,9 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if !defined(_ATF_CXX_CHECK_HPP_) -#define _ATF_CXX_CHECK_HPP_ +#if !defined(ATF_CXX_CHECK_HPP) +#define ATF_CXX_CHECK_HPP extern "C" { #include @@ -39,8 +35,6 @@ extern "C" { #include #include -#include - namespace atf { namespace process { @@ -60,7 +54,11 @@ namespace check { //! of executing arbitrary command and manages files containing //! its output. //! -class check_result : noncopyable { +class check_result { + // Non-copyable. + check_result(const check_result&); + check_result& operator=(const check_result&); + //! //! \brief Internal representation of a result. //! @@ -130,4 +128,4 @@ check_result test_constructor(void); } // namespace check } // namespace atf -#endif // !defined(_ATF_CXX_CHECK_HPP_) +#endif // !defined(ATF_CXX_CHECK_HPP) diff --git a/unit/atf-src/atf-c++/check_test.cpp b/unit/atf-src/atf-c++/check_test.cpp index 8e5983fdc6..7baf3fa196 100644 --- a/unit/atf-src/atf-c++/check_test.cpp +++ b/unit/atf-src/atf-c++/check_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,8 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/check.hpp" extern "C" { #include @@ -43,14 +41,11 @@ extern "C" { #include -#include "check.hpp" -#include "config.hpp" -#include "utils.hpp" - -#include "detail/fs.hpp" -#include "detail/process.hpp" -#include "detail/test_helpers.hpp" -#include "detail/text.hpp" +#include "atf-c++/detail/fs.hpp" +#include "atf-c++/detail/process.hpp" +#include "atf-c++/detail/test_helpers.hpp" +#include "atf-c++/detail/text.hpp" +#include "atf-c++/utils.hpp" // ------------------------------------------------------------------------ // Auxiliary functions. @@ -61,7 +56,7 @@ std::auto_ptr< atf::check::check_result > do_exec(const atf::tests::tc* tc, const char* helper_name) { std::vector< std::string > argv; - argv.push_back(get_process_helpers_path(*tc).str()); + argv.push_back(get_process_helpers_path(*tc, false).str()); argv.push_back(helper_name); std::cout << "Executing " << argv[0] << " " << argv[1] << "\n"; @@ -74,7 +69,7 @@ std::auto_ptr< atf::check::check_result > do_exec(const atf::tests::tc* tc, const char* helper_name, const char *carg2) { std::vector< std::string > argv; - argv.push_back(get_process_helpers_path(*tc).str()); + argv.push_back(get_process_helpers_path(*tc, false).str()); argv.push_back(helper_name); argv.push_back(carg2); std::cout << "Executing " << argv[0] << " " << argv[1] << " " @@ -374,7 +369,7 @@ ATF_TEST_CASE_HEAD(exec_unknown) ATF_TEST_CASE_BODY(exec_unknown) { std::vector< std::string > argv; - argv.push_back(atf::config::get("atf_workdir") + "/non-existent"); + argv.push_back("/foo/bar/non-existent"); atf::process::argv_array argva(argv); std::auto_ptr< atf::check::check_result > r = atf::check::exec(argva); @@ -382,12 +377,6 @@ ATF_TEST_CASE_BODY(exec_unknown) ATF_REQUIRE_EQ(r->exitcode(), 127); } -// ------------------------------------------------------------------------ -// Tests cases for the header file. -// ------------------------------------------------------------------------ - -HEADER_TC(include, "atf-c++/check.hpp"); - // ------------------------------------------------------------------------ // Main. // ------------------------------------------------------------------------ @@ -402,7 +391,4 @@ ATF_INIT_TEST_CASES(tcs) ATF_ADD_TEST_CASE(tcs, exec_exitstatus); ATF_ADD_TEST_CASE(tcs, exec_stdout_stderr); ATF_ADD_TEST_CASE(tcs, exec_unknown); - - // Add the test cases for the header file. - ATF_ADD_TEST_CASE(tcs, include); } diff --git a/unit/atf-src/atf-c++/detail/Atffile b/unit/atf-src/atf-c++/detail/Atffile index 2d53514bdf..5cd6c57829 100644 --- a/unit/atf-src/atf-c++/detail/Atffile +++ b/unit/atf-src/atf-c++/detail/Atffile @@ -6,9 +6,5 @@ tp: application_test tp: auto_array_test tp: env_test tp: exceptions_test -tp: expand_test tp: fs_test -tp: parser_test -tp: sanity_test tp: text_test -tp: ui_test diff --git a/unit/atf-src/atf-c++/detail/Kyuafile b/unit/atf-src/atf-c++/detail/Kyuafile index fd0d7abe85..fc799e64df 100644 --- a/unit/atf-src/atf-c++/detail/Kyuafile +++ b/unit/atf-src/atf-c++/detail/Kyuafile @@ -6,9 +6,6 @@ atf_test_program{name="application_test"} atf_test_program{name="auto_array_test"} atf_test_program{name="env_test"} atf_test_program{name="exceptions_test"} -atf_test_program{name="expand_test"} atf_test_program{name="fs_test"} -atf_test_program{name="parser_test"} -atf_test_program{name="sanity_test"} +atf_test_program{name="process_test"} atf_test_program{name="text_test"} -atf_test_program{name="ui_test"} diff --git a/unit/atf-src/atf-c++/detail/Makefile.am.inc b/unit/atf-src/atf-c++/detail/Makefile.am.inc index 0a7bd151e6..5aace7009a 100644 --- a/unit/atf-src/atf-c++/detail/Makefile.am.inc +++ b/unit/atf-src/atf-c++/detail/Makefile.am.inc @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# libatf_c___la_SOURCES += atf-c++/detail/application.cpp \ atf-c++/detail/application.hpp \ @@ -34,19 +30,13 @@ libatf_c___la_SOURCES += atf-c++/detail/application.cpp \ atf-c++/detail/env.hpp \ atf-c++/detail/exceptions.cpp \ atf-c++/detail/exceptions.hpp \ - atf-c++/detail/expand.cpp \ - atf-c++/detail/expand.hpp \ atf-c++/detail/fs.cpp \ atf-c++/detail/fs.hpp \ - atf-c++/detail/parser.cpp \ - atf-c++/detail/parser.hpp \ atf-c++/detail/process.cpp \ atf-c++/detail/process.hpp \ atf-c++/detail/sanity.hpp \ atf-c++/detail/text.cpp \ - atf-c++/detail/text.hpp \ - atf-c++/detail/ui.cpp \ - atf-c++/detail/ui.hpp + atf-c++/detail/text.hpp tests_atf_c___detail_DATA = atf-c++/detail/Atffile \ atf-c++/detail/Kyuafile @@ -56,6 +46,7 @@ EXTRA_DIST += $(tests_atf_c___detail_DATA) noinst_LTLIBRARIES += atf-c++/detail/libtest_helpers.la atf_c___detail_libtest_helpers_la_SOURCES = atf-c++/detail/test_helpers.cpp \ atf-c++/detail/test_helpers.hpp +atf_c___detail_libtest_helpers_la_CPPFLAGS = -DATF_INCLUDEDIR=\"$(includedir)\" tests_atf_c___detail_PROGRAMS = atf-c++/detail/application_test atf_c___detail_application_test_SOURCES = atf-c++/detail/application_test.cpp @@ -73,32 +64,19 @@ tests_atf_c___detail_PROGRAMS += atf-c++/detail/exceptions_test atf_c___detail_exceptions_test_SOURCES = atf-c++/detail/exceptions_test.cpp atf_c___detail_exceptions_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -tests_atf_c___detail_PROGRAMS += atf-c++/detail/expand_test -atf_c___detail_expand_test_SOURCES = atf-c++/detail/expand_test.cpp -atf_c___detail_expand_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) - tests_atf_c___detail_PROGRAMS += atf-c++/detail/fs_test atf_c___detail_fs_test_SOURCES = atf-c++/detail/fs_test.cpp atf_c___detail_fs_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -tests_atf_c___detail_PROGRAMS += atf-c++/detail/parser_test -atf_c___detail_parser_test_SOURCES = atf-c++/detail/parser_test.cpp -atf_c___detail_parser_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) - tests_atf_c___detail_PROGRAMS += atf-c++/detail/process_test atf_c___detail_process_test_SOURCES = atf-c++/detail/process_test.cpp atf_c___detail_process_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -tests_atf_c___detail_PROGRAMS += atf-c++/detail/sanity_test -atf_c___detail_sanity_test_SOURCES = atf-c++/detail/sanity_test.cpp -atf_c___detail_sanity_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) - tests_atf_c___detail_PROGRAMS += atf-c++/detail/text_test atf_c___detail_text_test_SOURCES = atf-c++/detail/text_test.cpp atf_c___detail_text_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) -tests_atf_c___detail_PROGRAMS += atf-c++/detail/ui_test -atf_c___detail_ui_test_SOURCES = atf-c++/detail/ui_test.cpp -atf_c___detail_ui_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) +tests_atf_c___detail_PROGRAMS += atf-c++/detail/version_helper +atf_c___detail_version_helper_SOURCES = atf-c++/detail/version_helper.cpp # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 diff --git a/unit/atf-src/atf-c++/detail/application.cpp b/unit/atf-src/atf-c++/detail/application.cpp index 878b010bcd..37086eb3ae 100644 --- a/unit/atf-src/atf-c++/detail/application.cpp +++ b/unit/atf-src/atf-c++/detail/application.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,11 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/detail/application.hpp" #if defined(HAVE_CONFIG_H) -#include "bconfig.h" +#include "config.h" #endif extern "C" { @@ -45,9 +43,7 @@ extern "C" { #include "atf-c/defs.h" } -#include "application.hpp" -#include "sanity.hpp" -#include "ui.hpp" +#include "atf-c++/detail/sanity.hpp" #if !defined(HAVE_VSNPRINTF_IN_STD) namespace std { @@ -106,17 +102,12 @@ impl::option::operator<(const impl::option& o) } impl::app::app(const std::string& description, - const std::string& manpage, - const std::string& global_manpage, - const bool use_ui) : - m_hflag(false), + const std::string& manpage) : m_argc(-1), m_argv(NULL), m_prog_name(NULL), m_description(description), - m_manpage(manpage), - m_global_manpage(global_manpage), - m_use_ui(use_ui) + m_manpage(manpage) { } @@ -133,11 +124,7 @@ impl::app::inited(void) impl::app::options_set impl::app::options(void) { - options_set opts = specific_options(); - if (m_use_ui) { - opts.insert(option('h', "", "Shows this help message")); - } - return opts; + return specific_options(); } std::string @@ -187,11 +174,6 @@ impl::app::process_options(void) ::opterr = 0; while ((ch = ::getopt(m_argc, m_argv, optstr.c_str())) != -1) { switch (ch) { - case 'h': - INV(m_use_ui); - m_hflag = true; - break; - case ':': throw usage_error("Option -%c requires an argument.", ::optopt); @@ -214,51 +196,6 @@ impl::app::process_options(void) #endif } -void -impl::app::usage(std::ostream& os) -{ - PRE(inited()); - - std::string args = specific_args(); - if (!args.empty()) - args = " " + args; - os << ui::format_text_with_tag(std::string(m_prog_name) + " [options]" + - args, "Usage: ", false) << "\n\n" - << ui::format_text(m_description) << "\n\n"; - - options_set opts = options(); - INV(!opts.empty()); - os << "Available options:\n"; - size_t coldesc = 0; - for (options_set::const_iterator iter = opts.begin(); - iter != opts.end(); iter++) { - const option& opt = (*iter); - - if (opt.m_argument.length() + 1 > coldesc) - coldesc = opt.m_argument.length() + 1; - } - for (options_set::const_iterator iter = opts.begin(); - iter != opts.end(); iter++) { - const option& opt = (*iter); - - std::string tag = std::string(" -") + opt.m_character; - if (opt.m_argument.empty()) - tag += " "; - else - tag += " " + opt.m_argument + " "; - os << ui::format_text_with_tag(opt.m_description, tag, false, - coldesc + 10) << "\n"; - } - os << "\n"; - - std::string gmp; - if (!m_global_manpage.empty()) - gmp = " and " + m_global_manpage; - os << ui::format_text("For more details please see " + m_manpage + - gmp + ".") - << "\n"; -} - int impl::app::run(int argc, char* const* argv) { @@ -290,55 +227,22 @@ impl::app::run(int argc, char* const* argv) int errcode; try { - int oldargc = m_argc; - process_options(); - - if (m_hflag) { - INV(m_use_ui); - if (oldargc != 2) - throw usage_error("-h must be given alone."); - - usage(std::cout); - errcode = EXIT_SUCCESS; - } else - errcode = main(); + errcode = main(); } catch (const usage_error& e) { - if (m_use_ui) { - std::cerr << ui::format_error(m_prog_name, e.what()) << "\n" - << ui::format_info(m_prog_name, std::string("Type `") + - m_prog_name + " -h' for more details.") - << "\n"; - } else { - std::cerr << m_prog_name << ": ERROR: " << e.what() << "\n"; - std::cerr << m_prog_name << ": See " << m_manpage << " for usage " - "details.\n"; - } + std::cerr << m_prog_name << ": ERROR: " << e.what() << "\n"; + std::cerr << m_prog_name << ": See " << m_manpage << " for usage " + "details.\n"; errcode = EXIT_FAILURE; } catch (const std::runtime_error& e) { - if (m_use_ui) { - std::cerr << ui::format_error(m_prog_name, std::string(e.what())) - << "\n"; - } else { - std::cerr << m_prog_name << ": ERROR: " << e.what() << "\n"; - } + std::cerr << m_prog_name << ": ERROR: " << e.what() << "\n"; errcode = EXIT_FAILURE; } catch (const std::exception& e) { - if (m_use_ui) { - std::cerr << ui::format_error(m_prog_name, std::string("Caught " - "unexpected error: ") + e.what() + "\n" + bug) << "\n"; - } else { - std::cerr << m_prog_name << ": ERROR: Caught unexpected error: " - << e.what() << "\n"; - } + std::cerr << m_prog_name << ": ERROR: Caught unexpected error: " + << e.what() << "\n"; errcode = EXIT_FAILURE; } catch (...) { - if (m_use_ui) { - std::cerr << ui::format_error(m_prog_name, std::string("Caught " - "unknown error\n") + bug) << "\n"; - } else { - std::cerr << m_prog_name << ": ERROR: Caught unknown error\n"; - } + std::cerr << m_prog_name << ": ERROR: Caught unknown error\n"; errcode = EXIT_FAILURE; } return errcode; diff --git a/unit/atf-src/atf-c++/detail/application.hpp b/unit/atf-src/atf-c++/detail/application.hpp index 9d1f242004..cdb4073ad8 100644 --- a/unit/atf-src/atf-c++/detail/application.hpp +++ b/unit/atf-src/atf-c++/detail/application.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,9 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if !defined(_ATF_CXX_APPLICATION_HPP_) -#define _ATF_CXX_APPLICATION_HPP_ +#if !defined(ATF_CXX_DETAIL_APPLICATION_HPP) +#define ATF_CXX_DETAIL_APPLICATION_HPP #include #include @@ -74,8 +70,6 @@ public: // ------------------------------------------------------------------------ class app { - bool m_hflag; - void process_options(void); void usage(std::ostream&); @@ -90,8 +84,7 @@ protected: const char* m_argv0; const char* m_prog_name; std::string m_description; - std::string m_manpage, m_global_manpage; - const bool m_use_ui; + std::string m_manpage; options_set options(void); @@ -102,8 +95,7 @@ protected: virtual int main(void) = 0; public: - app(const std::string&, const std::string&, const std::string&, - bool = true); + app(const std::string&, const std::string&); virtual ~app(void); int run(int, char* const*); @@ -112,4 +104,4 @@ public: } // namespace application } // namespace atf -#endif // !defined(_ATF_CXX_APPLICATION_HPP_) +#endif // !defined(ATF_CXX_DETAIL_APPLICATION_HPP) diff --git a/unit/atf-src/atf-c++/detail/application_test.cpp b/unit/atf-src/atf-c++/detail/application_test.cpp index 2a788bfb28..28b7a2f72f 100644 --- a/unit/atf-src/atf-c++/detail/application_test.cpp +++ b/unit/atf-src/atf-c++/detail/application_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2009 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,19 +22,18 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/detail/application.hpp" extern "C" { #include } -#include "application.hpp" - -#include "../macros.hpp" +#include class getopt_app : public atf::application::app { public: - getopt_app(void) : app("description", "manpage", "other") {} + getopt_app(void) : app("description", "manpage") {} int main(void) { diff --git a/unit/atf-src/atf-c++/detail/auto_array.hpp b/unit/atf-src/atf-c++/detail/auto_array.hpp index 1459284e3b..b434a58082 100644 --- a/unit/atf-src/atf-c++/detail/auto_array.hpp +++ b/unit/atf-src/atf-c++/detail/auto_array.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,9 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if !defined(_ATF_CXX_AUTO_ARRAY_HPP_) -#define _ATF_CXX_AUTO_ARRAY_HPP_ +#if !defined(ATF_CXX_DETAIL_AUTO_ARRAY_HPP) +#define ATF_CXX_DETAIL_AUTO_ARRAY_HPP #include @@ -176,4 +172,4 @@ auto_array< T >::operator auto_array_ref< T >(void) } // namespace atf -#endif // !defined(_ATF_CXX_AUTO_ARRAY_HPP_) +#endif // !defined(ATF_CXX_DETAIL_AUTO_ARRAY_HPP) diff --git a/unit/atf-src/atf-c++/detail/auto_array_test.cpp b/unit/atf-src/atf-c++/detail/auto_array_test.cpp index dcfe41551c..aaad90e152 100644 --- a/unit/atf-src/atf-c++/detail/auto_array_test.cpp +++ b/unit/atf-src/atf-c++/detail/auto_array_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,8 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/detail/auto_array.hpp" extern "C" { #include @@ -33,11 +31,11 @@ extern "C" { #include +#include + +extern "C" { #include "atf-c/defs.h" - -#include "../macros.hpp" - -#include "auto_array.hpp" +} // ------------------------------------------------------------------------ // Tests for the "auto_array" class. diff --git a/unit/atf-src/atf-c++/detail/env.cpp b/unit/atf-src/atf-c++/detail/env.cpp index 5ca7f09c4f..8855dcbc9a 100644 --- a/unit/atf-src/atf-c++/detail/env.cpp +++ b/unit/atf-src/atf-c++/detail/env.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,17 +22,16 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/detail/env.hpp" extern "C" { -#include "../../atf-c/error.h" - -#include "../../atf-c/detail/env.h" +#include "atf-c/detail/env.h" +#include "atf-c/error.h" } -#include "env.hpp" -#include "exceptions.hpp" -#include "sanity.hpp" +#include "atf-c++/detail/exceptions.hpp" +#include "atf-c++/detail/sanity.hpp" namespace impl = atf::env; #define IMPL_NAME "atf::env" @@ -50,6 +46,12 @@ impl::get(const std::string& name) return atf_env_get(name.c_str()); } +std::string +impl::get(const std::string& name, const std::string& default_value) +{ + return atf_env_get_with_default(name.c_str(), default_value.c_str()); +} + bool impl::has(const std::string& name) { diff --git a/unit/atf-src/atf-c++/detail/env.hpp b/unit/atf-src/atf-c++/detail/env.hpp index afdf69be59..e1dcbc0fae 100644 --- a/unit/atf-src/atf-c++/detail/env.hpp +++ b/unit/atf-src/atf-c++/detail/env.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,9 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if !defined(_ATF_CXX_ENV_HPP_) -#define _ATF_CXX_ENV_HPP_ +#if !defined(ATF_CXX_DETAIL_ENV_HPP) +#define ATF_CXX_DETAIL_ENV_HPP #include @@ -47,6 +43,11 @@ namespace env { //! std::string get(const std::string&); +//! +//! \brief Returns the value of an environment variable with a default. +//! +std::string get(const std::string&, const std::string&); + //! //! \brief Checks if the environment has a variable. //! @@ -81,4 +82,4 @@ void unset(const std::string&); } // namespace env } // namespace atf -#endif // !defined(_ATF_CXX_ENV_HPP_) +#endif // !defined(ATF_CXX_DETAIL_ENV_HPP) diff --git a/unit/atf-src/atf-c++/detail/env_test.cpp b/unit/atf-src/atf-c++/detail/env_test.cpp index a7b681d14e..91616f38f0 100644 --- a/unit/atf-src/atf-c++/detail/env_test.cpp +++ b/unit/atf-src/atf-c++/detail/env_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,11 +22,10 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#include "../macros.hpp" +#include "atf-c++/detail/env.hpp" -#include "env.hpp" +#include // ------------------------------------------------------------------------ // Test cases for the free functions. @@ -48,6 +44,19 @@ ATF_TEST_CASE_BODY(has_get) ATF_REQUIRE(!atf::env::has("_UNDEFINED_VARIABLE_")); } +ATF_TEST_CASE(get_with_default); +ATF_TEST_CASE_HEAD(get_with_default) +{ + set_md_var("descr", "Tests the get function with a default value"); +} +ATF_TEST_CASE_BODY(get_with_default) +{ + ATF_REQUIRE(atf::env::has("PATH")); + ATF_REQUIRE(atf::env::get("PATH", "default value") != "default value"); + + ATF_REQUIRE_EQ(atf::env::get("_UNDEFINED_VARIABLE_", "foo bar"), "foo bar"); +} + ATF_TEST_CASE(set); ATF_TEST_CASE_HEAD(set) { @@ -86,6 +95,7 @@ ATF_INIT_TEST_CASES(tcs) { // Add the test cases for the free functions. ATF_ADD_TEST_CASE(tcs, has_get); + ATF_ADD_TEST_CASE(tcs, get_with_default); ATF_ADD_TEST_CASE(tcs, set); ATF_ADD_TEST_CASE(tcs, unset); } diff --git a/unit/atf-src/atf-c++/detail/exceptions.cpp b/unit/atf-src/atf-c++/detail/exceptions.cpp index 79c5b489e7..a5b74a370e 100644 --- a/unit/atf-src/atf-c++/detail/exceptions.cpp +++ b/unit/atf-src/atf-c++/detail/exceptions.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,11 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/detail/exceptions.hpp" #if defined(HAVE_CONFIG_H) -#include "bconfig.h" +#include "config.h" #endif #include @@ -37,11 +35,10 @@ #include extern "C" { -#include "../../atf-c/error.h" -}; +#include "atf-c/error.h" +} -#include "exceptions.hpp" -#include "sanity.hpp" +#include "atf-c++/detail/sanity.hpp" // ------------------------------------------------------------------------ // The "system_error" type. diff --git a/unit/atf-src/atf-c++/detail/exceptions.hpp b/unit/atf-src/atf-c++/detail/exceptions.hpp index f655a84d82..0728ad1c6d 100644 --- a/unit/atf-src/atf-c++/detail/exceptions.hpp +++ b/unit/atf-src/atf-c++/detail/exceptions.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,9 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if !defined(_ATF_CXX_EXCEPTIONS_HPP_) -#define _ATF_CXX_EXCEPTIONS_HPP_ +#if !defined(ATF_CXX_DETAIL_EXCEPTIONS_HPP) +#define ATF_CXX_DETAIL_EXCEPTIONS_HPP #include #include @@ -39,47 +35,6 @@ struct atf_error; namespace atf { -template< class T > -class not_found_error : - public std::runtime_error -{ - T m_value; - -public: - not_found_error(const std::string& message, const T& value) throw(); - - virtual ~not_found_error(void) throw(); - - const T& get_value(void) const throw(); -}; - -template< class T > -inline -not_found_error< T >::not_found_error(const std::string& message, - const T& value) - throw() : - std::runtime_error(message), - m_value(value) -{ -} - -template< class T > -inline -not_found_error< T >::~not_found_error(void) - throw() -{ -} - -template< class T > -inline -const T& -not_found_error< T >::get_value(void) - const - throw() -{ - return m_value; -} - class system_error : public std::runtime_error { int m_sys_err; mutable std::string m_message; @@ -96,4 +51,4 @@ void throw_atf_error(struct atf_error *); } // namespace atf -#endif // !defined(_ATF_CXX_EXCEPTIONS_HPP_) +#endif // !defined(ATF_CXX_DETAIL_EXCEPTIONS_HPP) diff --git a/unit/atf-src/atf-c++/detail/exceptions_test.cpp b/unit/atf-src/atf-c++/detail/exceptions_test.cpp index 821c192dd2..c0bf4fc2f0 100644 --- a/unit/atf-src/atf-c++/detail/exceptions_test.cpp +++ b/unit/atf-src/atf-c++/detail/exceptions_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2009 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,19 +22,19 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/detail/exceptions.hpp" extern "C" { -#include "../../atf-c/error.h" +#include "atf-c/error.h" } #include #include -#include "../macros.hpp" +#include -#include "exceptions.hpp" -#include "sanity.hpp" +#include "atf-c++/detail/sanity.hpp" // ------------------------------------------------------------------------ // The "test" error. diff --git a/unit/atf-src/atf-c++/detail/fs.cpp b/unit/atf-src/atf-c++/detail/fs.cpp index 3517e261f9..bcef9204d1 100644 --- a/unit/atf-src/atf-c++/detail/fs.cpp +++ b/unit/atf-src/atf-c++/detail/fs.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,11 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/detail/fs.hpp" #if defined(HAVE_CONFIG_H) -#include "bconfig.h" +#include "config.h" #endif extern "C" { @@ -47,17 +45,15 @@ extern "C" { #include extern "C" { -#include "../../atf-c/error.h" +#include "atf-c/error.h" } -#include "../utils.hpp" - -#include "exceptions.hpp" -#include "env.hpp" -#include "fs.hpp" -#include "process.hpp" -#include "sanity.hpp" -#include "text.hpp" +#include "atf-c++/detail/env.hpp" +#include "atf-c++/detail/exceptions.hpp" +#include "atf-c++/detail/process.hpp" +#include "atf-c++/detail/sanity.hpp" +#include "atf-c++/detail/text.hpp" +#include "atf-c++/utils.hpp" namespace impl = atf::fs; #define IMPL_NAME "atf::fs" diff --git a/unit/atf-src/atf-c++/detail/fs.hpp b/unit/atf-src/atf-c++/detail/fs.hpp index 4ffb39b2a5..d6670f6e67 100644 --- a/unit/atf-src/atf-c++/detail/fs.hpp +++ b/unit/atf-src/atf-c++/detail/fs.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,9 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if !defined(_ATF_CXX_FS_HPP_) -#define _ATF_CXX_FS_HPP_ +#if !defined(ATF_CXX_DETAIL_FS_HPP) +#define ATF_CXX_DETAIL_FS_HPP extern "C" { #include @@ -42,7 +38,7 @@ extern "C" { #include extern "C" { -#include "../../atf-c/detail/fs.h" +#include "atf-c/detail/fs.h" } namespace atf { @@ -388,4 +384,4 @@ void rmdir(const path&); } // namespace fs } // namespace atf -#endif // !defined(_ATF_CXX_FS_HPP_) +#endif // !defined(ATF_CXX_DETAIL_FS_HPP) diff --git a/unit/atf-src/atf-c++/detail/fs_test.cpp b/unit/atf-src/atf-c++/detail/fs_test.cpp index 6cf9bf6c63..bf64ab2bf0 100644 --- a/unit/atf-src/atf-c++/detail/fs_test.cpp +++ b/unit/atf-src/atf-c++/detail/fs_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,8 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/detail/fs.hpp" extern "C" { #include @@ -36,10 +34,9 @@ extern "C" { #include #include -#include "../macros.hpp" +#include -#include "exceptions.hpp" -#include "fs.hpp" +#include "atf-c++/detail/exceptions.hpp" // ------------------------------------------------------------------------ // Auxiliary functions. diff --git a/unit/atf-src/atf-c++/detail/process.cpp b/unit/atf-src/atf-c++/detail/process.cpp index f7ae6d49de..8139536d39 100644 --- a/unit/atf-src/atf-c++/detail/process.cpp +++ b/unit/atf-src/atf-c++/detail/process.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2008 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,21 +22,20 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/detail/process.hpp" extern "C" { #include -#include "../../atf-c/error.h" - -#include "../../atf-c/detail/process.h" +#include "atf-c/detail/process.h" +#include "atf-c/error.h" } #include -#include "exceptions.hpp" -#include "process.hpp" -#include "sanity.hpp" +#include "atf-c++/detail/exceptions.hpp" +#include "atf-c++/detail/sanity.hpp" namespace detail = atf::process::detail; namespace impl = atf::process; @@ -341,11 +337,6 @@ impl::child::stderr_fd(void) void detail::flush_streams(void) { - // This is a weird hack to ensure that the output of the parent process - // is flushed before executing a child which prevents, for example, the - // output of the atf-run hooks to appear before the output of atf-run - // itself. - // // TODO: This should only be executed when inheriting the stdout or // stderr file descriptors. However, the flushing is specific to the // iostreams, so we cannot do it from the C library where all the process diff --git a/unit/atf-src/atf-c++/detail/process.hpp b/unit/atf-src/atf-c++/detail/process.hpp index bc55a5721c..0d4989a4f4 100644 --- a/unit/atf-src/atf-c++/detail/process.hpp +++ b/unit/atf-src/atf-c++/detail/process.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2008 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,25 +22,23 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if !defined(_ATF_CXX_PROCESS_HPP_) -#define _ATF_CXX_PROCESS_HPP_ +#if !defined(ATF_CXX_DETAIL_PROCESS_HPP) +#define ATF_CXX_DETAIL_PROCESS_HPP extern "C" { #include -#include "../../atf-c/error.h" - -#include "../../atf-c/detail/process.h" +#include +#include } #include #include -#include "auto_array.hpp" -#include "exceptions.hpp" -#include "fs.hpp" +#include +#include +#include namespace atf { namespace process { @@ -276,4 +271,4 @@ exec(const atf::fs::path& prog, const argv_array& argv, } // namespace process } // namespace atf -#endif // !defined(_ATF_CXX_PROCESS_HPP_) +#endif // !defined(ATF_CXX_DETAIL_PROCESS_HPP) diff --git a/unit/atf-src/atf-c++/detail/process_test.cpp b/unit/atf-src/atf-c++/detail/process_test.cpp index d13ab9453a..0686d2a191 100644 --- a/unit/atf-src/atf-c++/detail/process_test.cpp +++ b/unit/atf-src/atf-c++/detail/process_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2008 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,15 +22,15 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/detail/process.hpp" #include #include -#include "../macros.hpp" +#include -#include "process.hpp" -#include "test_helpers.hpp" +#include "atf-c++/detail/test_helpers.hpp" // TODO: Testing the fork function is a huge task and I'm afraid of // copy/pasting tons of stuff from the C version. I'd rather not do that @@ -64,10 +61,10 @@ exec_process_helpers(const atf::tests::tc& tc, const char* helper_name) using atf::process::exec; std::vector< std::string > argv; - argv.push_back(get_process_helpers_path(tc).leaf_name()); + argv.push_back(get_process_helpers_path(tc, true).leaf_name()); argv.push_back(helper_name); - return exec(get_process_helpers_path(tc), + return exec(get_process_helpers_path(tc, true), atf::process::argv_array(argv), atf::process::stream_inherit(), atf::process::stream_inherit()); diff --git a/unit/atf-src/atf-c++/detail/sanity.hpp b/unit/atf-src/atf-c++/detail/sanity.hpp index 6021a6e689..3d89ab4b03 100644 --- a/unit/atf-src/atf-c++/detail/sanity.hpp +++ b/unit/atf-src/atf-c++/detail/sanity.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,13 +22,12 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if !defined(_ATF_CXX_SANITY_HPP_) -#define _ATF_CXX_SANITY_HPP_ +#if !defined(ATF_CXX_DETAIL_SANITY_HPP) +#define ATF_CXX_DETAIL_SANITY_HPP extern "C" { -#include "../../atf-c/detail/sanity.h" +#include } -#endif // !defined(_ATF_CXX_SANITY_HPP_) +#endif // !defined(ATF_CXX_DETAIL_SANITY_HPP) diff --git a/unit/atf-src/atf-c++/detail/test_helpers.cpp b/unit/atf-src/atf-c++/detail/test_helpers.cpp index 191649d03d..d3f94003ac 100644 --- a/unit/atf-src/atf-c++/detail/test_helpers.cpp +++ b/unit/atf-src/atf-c++/detail/test_helpers.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2009 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,95 +22,79 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/detail/test_helpers.hpp" #include #include #include #include -#include "../check.hpp" -#include "../config.hpp" -#include "../macros.hpp" +#include -#include "fs.hpp" -#include "process.hpp" -#include "test_helpers.hpp" +#include "atf-c++/check.hpp" +#include "atf-c++/detail/env.hpp" +#include "atf-c++/detail/fs.hpp" +#include "atf-c++/detail/process.hpp" -void -build_check_cxx_o_aux(const atf::fs::path& sfile, const char* failmsg, - const bool expect_pass) +// Path to the directory containing the libatf-c tests, used to locate the +// process_helpers program. If NULL (the default), the code will use a +// relative path. Otherwise, the provided path will be used; this is so +// that we can locate the helpers binary if the installation uses a +// different layout than the one we provide (as is the case in FreeBSD). +#if defined(ATF_C_TESTS_BASE) +static const char* atf_c_tests_base = ATF_C_TESTS_BASE; +#else +static const char* atf_c_tests_base = NULL; +#endif +#undef ATF_C_TESTS_BASE + +bool +build_check_cxx_o(const char* sfile) { std::vector< std::string > optargs; - optargs.push_back("-I" + atf::config::get("atf_includedir")); + optargs.push_back("-I" + atf::env::get("ATF_INCLUDEDIR", ATF_INCLUDEDIR)); optargs.push_back("-Wall"); optargs.push_back("-Werror"); - const bool result = atf::check::build_cxx_o( - sfile.str(), "test.o", atf::process::argv_array(optargs)); - if ((expect_pass && !result) || (!expect_pass && result)) - ATF_FAIL(failmsg); + return atf::check::build_cxx_o(sfile, "test.o", + atf::process::argv_array(optargs)); } -void -build_check_cxx_o(const atf::tests::tc& tc, const char* sfile, - const char* failmsg, const bool expect_pass) +bool +build_check_cxx_o_srcdir(const atf::tests::tc& tc, const char* sfile) { const atf::fs::path sfilepath = atf::fs::path(tc.get_config_var("srcdir")) / sfile; - build_check_cxx_o_aux(sfilepath, failmsg, expect_pass); + return build_check_cxx_o(sfilepath.c_str()); } void header_check(const char *hdrname) { - std::ofstream srcfile("test.c"); + std::ofstream srcfile("test.cpp"); ATF_REQUIRE(srcfile); srcfile << "#include <" << hdrname << ">\n"; srcfile.close(); const std::string failmsg = std::string("Header check failed; ") + hdrname + " is not self-contained"; - build_check_cxx_o_aux(atf::fs::path("test.c"), failmsg.c_str(), true); + if (!build_check_cxx_o("test.cpp")) + ATF_FAIL(failmsg); } atf::fs::path -get_process_helpers_path(const atf::tests::tc& tc) +get_process_helpers_path(const atf::tests::tc& tc, bool is_detail) { - return atf::fs::path(tc.get_config_var("srcdir")) / - ".." / "atf-c" / "detail" / "process_helpers"; -} - -void -test_helpers_detail::check_equal(const char* expected[], - const string_vector& actual) -{ - const char** expected_iter = expected; - string_vector::const_iterator actual_iter = actual.begin(); - - bool equals = true; - while (equals && *expected_iter != NULL && actual_iter != actual.end()) { - if (*expected_iter != *actual_iter) { - equals = false; - } else { - expected_iter++; - actual_iter++; - } - } - if (equals && ((*expected_iter == NULL && actual_iter != actual.end()) || - (*expected_iter != NULL && actual_iter == actual.end()))) - equals = false; - - if (!equals) { - std::cerr << "EXPECTED:\n"; - for (expected_iter = expected; *expected_iter != NULL; expected_iter++) - std::cerr << *expected_iter << "\n"; - - std::cerr << "ACTUAL:\n"; - for (actual_iter = actual.begin(); actual_iter != actual.end(); - actual_iter++) - std::cerr << *actual_iter << "\n"; - - ATF_FAIL("Expected results differ to actual values"); + const char* helper = "detail/process_helpers"; + if (atf_c_tests_base == NULL) { + if (is_detail) + return atf::fs::path(tc.get_config_var("srcdir")) / + ".." / ".." / "atf-c" / helper; + else + return atf::fs::path(tc.get_config_var("srcdir")) / + ".." / "atf-c" / helper; + } else { + return atf::fs::path(atf_c_tests_base) / helper; } } diff --git a/unit/atf-src/atf-c++/detail/test_helpers.hpp b/unit/atf-src/atf-c++/detail/test_helpers.hpp index 4a39331de4..f166ee218a 100644 --- a/unit/atf-src/atf-c++/detail/test_helpers.hpp +++ b/unit/atf-src/atf-c++/detail/test_helpers.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2009 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,12 +22,11 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if defined(TESTS_ATF_ATF_CXX_TEST_HELPERS_H) +#if defined(ATF_CXX_DETAIL_TEST_HELPERS_H) # error "Cannot include test_helpers.hpp more than once." #else -# define TESTS_ATF_ATF_CXX_TEST_HELPERS_H +# define ATF_CXX_DETAIL_TEST_HELPERS_H #endif #include @@ -38,11 +34,9 @@ #include #include -#include "../macros.hpp" -#include "../tests.hpp" -#include "parser.hpp" -#include "process.hpp" -#include "text.hpp" +#include + +#include #define HEADER_TC(name, hdrname) \ ATF_TEST_CASE(name); \ @@ -64,18 +58,8 @@ } \ ATF_TEST_CASE_BODY(name) \ { \ - build_check_cxx_o(*this, sfile, failmsg, true); \ - } - -#define BUILD_TC_FAIL(name, sfile, descr, failmsg) \ - ATF_TEST_CASE(name); \ - ATF_TEST_CASE_HEAD(name) \ - { \ - set_md_var("descr", descr); \ - } \ - ATF_TEST_CASE_BODY(name) \ - { \ - build_check_cxx_o(*this, sfile, failmsg, false); \ + if (!build_check_cxx_o_srcdir(*this, sfile)) \ + ATF_FAIL(failmsg); \ } namespace atf { @@ -85,8 +69,9 @@ class tc; } void header_check(const char*); -void build_check_cxx_o(const atf::tests::tc&, const char*, const char*, bool); -atf::fs::path get_process_helpers_path(const atf::tests::tc&); +bool build_check_cxx_o(const char*); +bool build_check_cxx_o_srcdir(const atf::tests::tc&, const char*); +atf::fs::path get_process_helpers_path(const atf::tests::tc&, bool); struct run_h_tc_data { const atf::tests::vars_map& m_config; @@ -120,45 +105,3 @@ run_h_tc(atf::tests::vars_map config = atf::tests::vars_map()) const atf::process::status s = c.wait(); ATF_REQUIRE(s.exited()); } - -namespace test_helpers_detail { - -typedef std::vector< std::string > string_vector; - -template< class Reader > -std::pair< string_vector, string_vector > -do_read(const char* input) -{ - string_vector errors; - - std::istringstream is(input); - Reader reader(is); - try { - reader.read(); - } catch (const atf::parser::parse_errors& pes) { - for (std::vector< atf::parser::parse_error >::const_iterator iter = - pes.begin(); iter != pes.end(); iter++) - errors.push_back(*iter); - } catch (const atf::parser::parse_error& pe) { - ATF_FAIL("Raised a lonely parse error: " + - atf::text::to_string(pe.first) + ": " + pe.second); - } - - return std::make_pair(reader.m_calls, errors); -} - -void check_equal(const char*[], const string_vector&); - -} // namespace test_helpers_detail - -template< class Reader > -void -do_parser_test(const char* input, const char* exp_calls[], - const char* exp_errors[]) -{ - const std::pair< test_helpers_detail::string_vector, - test_helpers_detail::string_vector > - actual = test_helpers_detail::do_read< Reader >(input); - test_helpers_detail::check_equal(exp_calls, actual.first); - test_helpers_detail::check_equal(exp_errors, actual.second); -} diff --git a/unit/atf-src/atf-c++/detail/text.cpp b/unit/atf-src/atf-c++/detail/text.cpp index 66eebf0a77..35a0beca95 100644 --- a/unit/atf-src/atf-c++/detail/text.cpp +++ b/unit/atf-src/atf-c++/detail/text.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,8 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/detail/text.hpp" extern "C" { #include @@ -35,13 +33,11 @@ extern "C" { #include extern "C" { -#include "../../atf-c/error.h" - -#include "../../atf-c/detail/text.h" +#include "atf-c/detail/text.h" +#include "atf-c/error.h" } -#include "exceptions.hpp" -#include "text.hpp" +#include "atf-c++/detail/exceptions.hpp" namespace impl = atf::text; #define IMPL_NAME "atf::text" diff --git a/unit/atf-src/atf-c++/detail/text.hpp b/unit/atf-src/atf-c++/detail/text.hpp index 6a1b027c18..63c3190a37 100644 --- a/unit/atf-src/atf-c++/detail/text.hpp +++ b/unit/atf-src/atf-c++/detail/text.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,9 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if !defined(_ATF_CXX_TEXT_HPP_) -#define _ATF_CXX_TEXT_HPP_ +#if !defined(ATF_CXX_DETAIL_TEXT_HPP) +#define ATF_CXX_DETAIL_TEXT_HPP extern "C" { #include @@ -150,4 +146,4 @@ to_type(const std::string& str) } // namespace text } // namespace atf -#endif // !defined(_ATF_CXX_TEXT_HPP_) +#endif // !defined(ATF_CXX_DETAIL_TEXT_HPP) diff --git a/unit/atf-src/atf-c++/detail/text_test.cpp b/unit/atf-src/atf-c++/detail/text_test.cpp index b7c0ba1af8..49d37741b4 100644 --- a/unit/atf-src/atf-c++/detail/text_test.cpp +++ b/unit/atf-src/atf-c++/detail/text_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,15 +22,14 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/detail/text.hpp" #include #include #include -#include "../macros.hpp" - -#include "text.hpp" +#include // ------------------------------------------------------------------------ // Test cases for the free functions. diff --git a/unit/atf-src/atf-c++/detail/version_helper.cpp b/unit/atf-src/atf-c++/detail/version_helper.cpp new file mode 100644 index 0000000000..0ee47913e2 --- /dev/null +++ b/unit/atf-src/atf-c++/detail/version_helper.cpp @@ -0,0 +1,41 @@ +// Copyright 2014 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif + +#include +#include + +int +main(void) +{ + std::cout << PACKAGE_VERSION << "\n"; + return EXIT_SUCCESS; +} diff --git a/unit/atf-src/atf-c++/macros.hpp b/unit/atf-src/atf-c++/macros.hpp index c6ce9c2be5..ea0b2dc080 100644 --- a/unit/atf-src/atf-c++/macros.hpp +++ b/unit/atf-src/atf-c++/macros.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,9 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if !defined(_ATF_CXX_MACROS_HPP_) -#define _ATF_CXX_MACROS_HPP_ +#if !defined(ATF_CXX_MACROS_HPP) +#define ATF_CXX_MACROS_HPP #include #include @@ -99,21 +95,23 @@ #define ATF_PASS() atf::tests::tc::pass() -#define ATF_REQUIRE(x) \ +#define ATF_REQUIRE(expression) \ do { \ - if (!(x)) { \ + if (!(expression)) { \ std::ostringstream atfu_ss; \ - atfu_ss << "Line " << __LINE__ << ": " << #x << " not met"; \ + atfu_ss << "Line " << __LINE__ << ": " << #expression \ + << " not met"; \ atf::tests::tc::fail(atfu_ss.str()); \ } \ } while (false) -#define ATF_REQUIRE_EQ(x, y) \ +#define ATF_REQUIRE_EQ(expected, actual) \ do { \ - if ((x) != (y)) { \ + if ((expected) != (actual)) { \ std::ostringstream atfu_ss; \ - atfu_ss << "Line " << __LINE__ << ": " << #x << " != " << #y \ - << " (" << (x) << " != " << (y) << ")"; \ + atfu_ss << "Line " << __LINE__ << ": " \ + << #expected << " != " << #actual \ + << " (" << (expected) << " != " << (actual) << ")"; \ atf::tests::tc::fail(atfu_ss.str()); \ } \ } while (false) @@ -134,69 +132,74 @@ } \ } while (false) -#define ATF_REQUIRE_THROW(e, x) \ +#define ATF_REQUIRE_THROW(expected_exception, statement) \ do { \ try { \ - x; \ + statement; \ std::ostringstream atfu_ss; \ - atfu_ss << "Line " << __LINE__ << ": " #x " did not throw " \ - #e " as expected"; \ + atfu_ss << "Line " << __LINE__ \ + << ": " #statement " did not throw " #expected_exception \ + " as expected"; \ atf::tests::tc::fail(atfu_ss.str()); \ - } catch (const e&) { \ + } catch (const expected_exception&) { \ } catch (const std::exception& atfu_e) { \ std::ostringstream atfu_ss; \ - atfu_ss << "Line " << __LINE__ << ": " #x " threw an " \ - "unexpected error (not " #e "): " << atfu_e.what(); \ + atfu_ss << "Line " << __LINE__ << ": " #statement " threw an " \ + "unexpected error (not " #expected_exception "): " \ + << atfu_e.what(); \ atf::tests::tc::fail(atfu_ss.str()); \ } catch (...) { \ std::ostringstream atfu_ss; \ - atfu_ss << "Line " << __LINE__ << ": " #x " threw an " \ - "unexpected error (not " #e ")"; \ + atfu_ss << "Line " << __LINE__ << ": " #statement " threw an " \ + "unexpected error (not " #expected_exception ")"; \ atf::tests::tc::fail(atfu_ss.str()); \ } \ } while (false) -#define ATF_REQUIRE_THROW_RE(type, regexp, x) \ +#define ATF_REQUIRE_THROW_RE(expected_exception, regexp, statement) \ do { \ try { \ - x; \ + statement; \ std::ostringstream atfu_ss; \ - atfu_ss << "Line " << __LINE__ << ": " #x " did not throw " \ - #type " as expected"; \ + atfu_ss << "Line " << __LINE__ \ + << ": " #statement " did not throw " #expected_exception \ + " as expected"; \ atf::tests::tc::fail(atfu_ss.str()); \ - } catch (const type& e) { \ + } catch (const expected_exception& e) { \ if (!atf::tests::detail::match(regexp, e.what())) { \ std::ostringstream atfu_ss; \ - atfu_ss << "Line " << __LINE__ << ": " #x " threw " #type "(" \ + atfu_ss << "Line " << __LINE__ \ + << ": " #statement " threw " #expected_exception "(" \ << e.what() << "), but does not match '" << regexp \ << "'"; \ atf::tests::tc::fail(atfu_ss.str()); \ } \ } catch (const std::exception& atfu_e) { \ std::ostringstream atfu_ss; \ - atfu_ss << "Line " << __LINE__ << ": " #x " threw an " \ - "unexpected error (not " #type "): " << atfu_e.what(); \ + atfu_ss << "Line " << __LINE__ << ": " #statement " threw an " \ + "unexpected error (not " #expected_exception "): " \ + << atfu_e.what(); \ atf::tests::tc::fail(atfu_ss.str()); \ } catch (...) { \ std::ostringstream atfu_ss; \ - atfu_ss << "Line " << __LINE__ << ": " #x " threw an " \ - "unexpected error (not " #type ")"; \ + atfu_ss << "Line " << __LINE__ << ": " #statement " threw an " \ + "unexpected error (not " #expected_exception ")"; \ atf::tests::tc::fail(atfu_ss.str()); \ } \ } while (false) -#define ATF_CHECK_ERRNO(exp_errno, bool_expr) \ - atf::tests::tc::check_errno(__FILE__, __LINE__, exp_errno, #bool_expr, \ - bool_expr) +#define ATF_CHECK_ERRNO(expected_errno, bool_expr) \ + atf::tests::tc::check_errno(__FILE__, __LINE__, expected_errno, \ + #bool_expr, bool_expr) -#define ATF_REQUIRE_ERRNO(exp_errno, bool_expr) \ - atf::tests::tc::require_errno(__FILE__, __LINE__, exp_errno, #bool_expr, \ - bool_expr) +#define ATF_REQUIRE_ERRNO(expected_errno, bool_expr) \ + atf::tests::tc::require_errno(__FILE__, __LINE__, expected_errno, \ + #bool_expr, bool_expr) #define ATF_INIT_TEST_CASES(tcs) \ namespace atf { \ namespace tests { \ - int run_tp(int, char* const*, \ + int run_tp(int, char**, \ void (*)(std::vector< atf::tests::tc * >&)); \ } \ } \ @@ -204,7 +207,7 @@ static void atfu_init_tcs(std::vector< atf::tests::tc * >&); \ \ int \ - main(int argc, char* const* argv) \ + main(int argc, char** argv) \ { \ return atf::tests::run_tp(argc, argv, atfu_init_tcs); \ } \ @@ -219,4 +222,4 @@ (tcs).push_back(atfu_tcptr_ ## tcname); \ } while (0); -#endif // !defined(_ATF_CXX_MACROS_HPP_) +#endif // !defined(ATF_CXX_MACROS_HPP) diff --git a/unit/atf-src/atf-c++/macros_hpp_test.cpp b/unit/atf-src/atf-c++/macros_hpp_test.cpp index 2cb75360a4..0bc27c60cb 100644 --- a/unit/atf-src/atf-c++/macros_hpp_test.cpp +++ b/unit/atf-src/atf-c++/macros_hpp_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2008 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,12 +22,11 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -#include #include +#include + void atf_check_errno_semicolons(void) { diff --git a/unit/atf-src/atf-c++/macros_test.cpp b/unit/atf-src/atf-c++/macros_test.cpp index 67e41061c8..23b5e5cbb6 100644 --- a/unit/atf-src/atf-c++/macros_test.cpp +++ b/unit/atf-src/atf-c++/macros_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2008 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,8 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/macros.hpp" extern "C" { #include @@ -37,14 +35,14 @@ extern "C" { #include #include -#include "macros.hpp" -#include "utils.hpp" +#include -#include "detail/fs.hpp" -#include "detail/process.hpp" -#include "detail/sanity.hpp" -#include "detail/test_helpers.hpp" -#include "detail/text.hpp" +#include "atf-c++/detail/fs.hpp" +#include "atf-c++/detail/process.hpp" +#include "atf-c++/detail/sanity.hpp" +#include "atf-c++/detail/test_helpers.hpp" +#include "atf-c++/detail/text.hpp" +#include "atf-c++/utils.hpp" // ------------------------------------------------------------------------ // Auxiliary functions. @@ -757,17 +755,35 @@ ATF_TEST_CASE_BODY(require_errno) // Tests cases for the header file. // ------------------------------------------------------------------------ -HEADER_TC(include, "atf-c++/macros.hpp"); BUILD_TC(use, "macros_hpp_test.cpp", "Tests that the macros provided by the atf-c++/macros.hpp file " "do not cause syntax errors when used", "Build of macros_hpp_test.cpp failed; some macros in " "atf-c++/macros.hpp are broken"); -BUILD_TC_FAIL(detect_unused_tests, "unused_test.cpp", - "Tests that defining an unused test case raises a warning (and thus " - "an error)", - "Build of unused_test.cpp passed; unused test cases are not properly " - "detected"); + +ATF_TEST_CASE(detect_unused_tests); +ATF_TEST_CASE_HEAD(detect_unused_tests) +{ + set_md_var("descr", + "Tests that defining an unused test case raises a warning (and " + "thus an error)"); +} +ATF_TEST_CASE_BODY(detect_unused_tests) +{ + const char* validate_compiler = + "class test_class { public: int dummy; };\n" + "#define define_unused static test_class unused\n" + "define_unused;\n"; + + atf::utils::create_file("compiler_test.cpp", validate_compiler); + if (build_check_cxx_o("compiler_test.cpp")) + expect_fail("Compiler does not raise a warning on an unused " + "static global variable declared by a macro"); + + if (build_check_cxx_o_srcdir(*this, "unused_test.cpp")) + ATF_FAIL("Build of unused_test.cpp passed; unused test cases are " + "not properly detected"); +} // ------------------------------------------------------------------------ // Main. @@ -790,7 +806,6 @@ ATF_INIT_TEST_CASES(tcs) ATF_ADD_TEST_CASE(tcs, require_errno); // Add the test cases for the header file. - ATF_ADD_TEST_CASE(tcs, include); ATF_ADD_TEST_CASE(tcs, use); ATF_ADD_TEST_CASE(tcs, detect_unused_tests); } diff --git a/unit/atf-src/atf-c++/pkg_config_test.sh b/unit/atf-src/atf-c++/pkg_config_test.sh index 8409902c0f..af541f6d76 100644 --- a/unit/atf-src/atf-c++/pkg_config_test.sh +++ b/unit/atf-src/atf-c++/pkg_config_test.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2008 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# # The following tests assume that the atfc++.pc file is installed in a # directory that is known by pkg-config. Otherwise they will fail, @@ -43,10 +39,8 @@ require_pc() check_version() { - atf_check -s eq:0 -o save:stdout -e empty -x \ - "atf-version | head -n 1 | cut -d ' ' -f 4" - ver1=$(cat stdout) - echo "Version reported by atf-version: ${ver1}" + ver1=$($(atf_get_srcdir)/detail/version_helper) + echo "Version reported by builtin PACKAGE_VERSION: ${ver1}" atf_check -s eq:0 -o save:stdout -e empty pkg-config --modversion "${1}" ver2=$(cat stdout) diff --git a/unit/atf-src/atf-c++/tests.cpp b/unit/atf-src/atf-c++/tests.cpp index 2c351fcb3d..ede9609e32 100644 --- a/unit/atf-src/atf-c++/tests.cpp +++ b/unit/atf-src/atf-c++/tests.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,12 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/tests.hpp" + +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif extern "C" { #include @@ -55,22 +57,26 @@ extern "C" { #include "atf-c/utils.h" } -#include "noncopyable.hpp" -#include "tests.hpp" +#include "atf-c++/detail/application.hpp" +#include "atf-c++/detail/auto_array.hpp" +#include "atf-c++/detail/env.hpp" +#include "atf-c++/detail/exceptions.hpp" +#include "atf-c++/detail/fs.hpp" +#include "atf-c++/detail/sanity.hpp" +#include "atf-c++/detail/text.hpp" -#include "detail/application.hpp" -#include "detail/auto_array.hpp" -#include "detail/env.hpp" -#include "detail/exceptions.hpp" -#include "detail/fs.hpp" -#include "detail/parser.hpp" -#include "detail/sanity.hpp" -#include "detail/text.hpp" +#if defined(HAVE_GNU_GETOPT) +# define GETOPT_POSIX "+" +#else +# define GETOPT_POSIX "" +#endif namespace impl = atf::tests; namespace detail = atf::tests::detail; #define IMPL_NAME "atf::tests" +using atf::application::usage_error; + // ------------------------------------------------------------------------ // The "atf_tp_writer" class. // ------------------------------------------------------------------------ @@ -79,12 +85,7 @@ detail::atf_tp_writer::atf_tp_writer(std::ostream& os) : m_os(os), m_is_first(true) { - atf::parser::headers_map hm; - atf::parser::attrs_map ct_attrs; - ct_attrs["version"] = "1"; - hm["Content-Type"] = atf::parser::header_entry("Content-Type", - "application/X-atf-tp", ct_attrs); - atf::parser::write_headers(hm, m_os); + m_os << "Content-Type: application/X-atf-tp; version=\"1\"\n\n"; } void @@ -116,6 +117,21 @@ detail::atf_tp_writer::tc_meta_data(const std::string& name, // Free helper functions. // ------------------------------------------------------------------------ +std::string Program_Name; + +static void +set_program_name(const char* argv0) +{ + const std::string program_name = atf::fs::path(argv0).leaf_name(); + // Libtool workaround: if running from within the source tree (binaries + // that are not installed yet), skip the "lt-" prefix added to files in + // the ".libs" directory to show the real (not temporary) name. + if (program_name.substr(0, 3) == "lt-") + Program_Name = program_name.substr(3); + else + Program_Name = program_name; +} + bool detail::match(const std::string& regexp, const std::string& str) { @@ -129,7 +145,13 @@ detail::match(const std::string& regexp, const std::string& str) static std::map< atf_tc_t*, impl::tc* > wraps; static std::map< const atf_tc_t*, const impl::tc* > cwraps; -struct impl::tc_impl : atf::noncopyable { +struct impl::tc_impl { +private: + // Non-copyable. + tc_impl(const tc_impl&); + tc_impl& operator=(const tc_impl&); + +public: std::string m_ident; atf_tc_t m_tc; bool m_has_cleanup; @@ -154,14 +176,7 @@ struct impl::tc_impl : atf::noncopyable { std::map< const atf_tc_t*, const impl::tc* >::const_iterator iter = cwraps.find(tc); INV(iter != cwraps.end()); - try { - (*iter).second->body(); - } catch (const std::exception& e) { - (*iter).second->fail("Caught unhandled exception: " + std::string( - e.what())); - } catch (...) { - (*iter).second->fail("Caught unknown exception"); - } + (*iter).second->body(); } static void @@ -385,197 +400,70 @@ impl::tc::expect_timeout(const std::string& reason) } // ------------------------------------------------------------------------ -// The "tp" class. +// Test program main code. // ------------------------------------------------------------------------ -class tp : public atf::application::app { -public: - typedef std::vector< impl::tc * > tc_vector; +namespace { -private: - static const char* m_description; +typedef std::vector< impl::tc * > tc_vector; - bool m_lflag; - atf::fs::path m_resfile; - std::string m_srcdir_arg; - atf::fs::path m_srcdir; +enum tc_part { BODY, CLEANUP }; - atf::tests::vars_map m_vars; - - std::string specific_args(void) const; - options_set specific_options(void) const; - void process_option(int, const char*); - - void (*m_add_tcs)(tc_vector&); - tc_vector m_tcs; - - void parse_vflag(const std::string&); - void handle_srcdir(void); - - tc_vector init_tcs(void); - - enum tc_part { - BODY, - CLEANUP, - }; - - void list_tcs(void); - impl::tc* find_tc(tc_vector, const std::string&); - static std::pair< std::string, tc_part > process_tcarg(const std::string&); - int run_tc(const std::string&); - -public: - tp(void (*)(tc_vector&)); - ~tp(void); - - int main(void); -}; - -const char* tp::m_description = - "This is an independent atf test program."; - -tp::tp(void (*add_tcs)(tc_vector&)) : - app(m_description, "atf-test-program(1)", "atf(7)", false), - m_lflag(false), - m_resfile("/dev/stdout"), - m_srcdir("."), - m_add_tcs(add_tcs) -{ -} - -tp::~tp(void) -{ - for (tc_vector::iterator iter = m_tcs.begin(); - iter != m_tcs.end(); iter++) { - impl::tc* tc = *iter; - - delete tc; - } -} - -std::string -tp::specific_args(void) - const -{ - return "test_case"; -} - -tp::options_set -tp::specific_options(void) - const -{ - using atf::application::option; - options_set opts; - opts.insert(option('l', "", "List test cases and their purpose")); - opts.insert(option('r', "resfile", "The file to which the test program " - "will write the results of the " - "executed test case")); - opts.insert(option('s', "srcdir", "Directory where the test's data " - "files are located")); - opts.insert(option('v', "var=value", "Sets the configuration variable " - "`var' to `value'")); - return opts; -} - -void -tp::process_option(int ch, const char* arg) -{ - switch (ch) { - case 'l': - m_lflag = true; - break; - - case 'r': - m_resfile = atf::fs::path(arg); - break; - - case 's': - m_srcdir_arg = arg; - break; - - case 'v': - parse_vflag(arg); - break; - - default: - UNREACHABLE; - } -} - -void -tp::parse_vflag(const std::string& str) +static void +parse_vflag(const std::string& str, atf::tests::vars_map& vars) { if (str.empty()) throw std::runtime_error("-v requires a non-empty argument"); std::vector< std::string > ws = atf::text::split(str, "="); if (ws.size() == 1 && str[str.length() - 1] == '=') { - m_vars[ws[0]] = ""; + vars[ws[0]] = ""; } else { if (ws.size() != 2) throw std::runtime_error("-v requires an argument of the form " "var=value"); - m_vars[ws[0]] = ws[1]; + vars[ws[0]] = ws[1]; } } -void -tp::handle_srcdir(void) +static atf::fs::path +handle_srcdir(const char* argv0, const std::string& srcdir_arg) { - if (m_srcdir_arg.empty()) { - m_srcdir = atf::fs::path(m_argv0).branch_path(); - if (m_srcdir.leaf_name() == ".libs") - m_srcdir = m_srcdir.branch_path(); + atf::fs::path srcdir("."); + + if (srcdir_arg.empty()) { + srcdir = atf::fs::path(argv0).branch_path(); + if (srcdir.leaf_name() == ".libs") + srcdir = srcdir.branch_path(); } else - m_srcdir = atf::fs::path(m_srcdir_arg); + srcdir = atf::fs::path(srcdir_arg); - if (!atf::fs::exists(m_srcdir / m_prog_name)) - throw std::runtime_error("Cannot find the test program in the " - "source directory `" + m_srcdir.str() + "'"); + if (!atf::fs::exists(srcdir / Program_Name)) + throw usage_error("Cannot find the test program in the source " + "directory `%s'", srcdir.c_str()); - if (!m_srcdir.is_absolute()) - m_srcdir = m_srcdir.to_absolute(); + if (!srcdir.is_absolute()) + srcdir = srcdir.to_absolute(); - m_vars["srcdir"] = m_srcdir.str(); + return srcdir; } -tp::tc_vector -tp::init_tcs(void) +static void +init_tcs(void (*add_tcs)(tc_vector&), tc_vector& tcs, + const atf::tests::vars_map& vars) { - m_add_tcs(m_tcs); - for (tc_vector::iterator iter = m_tcs.begin(); - iter != m_tcs.end(); iter++) { + add_tcs(tcs); + for (tc_vector::iterator iter = tcs.begin(); iter != tcs.end(); iter++) { impl::tc* tc = *iter; - tc->init(m_vars); + tc->init(vars); } - return m_tcs; } -// -// An auxiliary unary predicate that compares the given test case's -// identifier to the identifier stored in it. -// -class tc_equal_to_ident { - const std::string& m_ident; - -public: - tc_equal_to_ident(const std::string& i) : - m_ident(i) - { - } - - bool operator()(const impl::tc* tc) - { - return tc->get_md_var("ident") == m_ident; - } -}; - -void -tp::list_tcs(void) +static int +list_tcs(const tc_vector& tcs) { - tc_vector tcs = init_tcs(); detail::atf_tp_writer writer(std::cout); for (tc_vector::const_iterator iter = tcs.begin(); @@ -597,10 +485,12 @@ tp::list_tcs(void) writer.end_tc(); } + + return EXIT_SUCCESS; } -impl::tc* -tp::find_tc(tc_vector tcs, const std::string& name) +static impl::tc* +find_tc(tc_vector tcs, const std::string& name) { std::vector< std::string > ids; for (tc_vector::iterator iter = tcs.begin(); @@ -610,12 +500,11 @@ tp::find_tc(tc_vector tcs, const std::string& name) if (tc->get_md_var("ident") == name) return tc; } - throw atf::application::usage_error("Unknown test case `%s'", - name.c_str()); + throw usage_error("Unknown test case `%s'", name.c_str()); } -std::pair< std::string, tp::tc_part > -tp::process_tcarg(const std::string& tcarg) +static std::pair< std::string, tc_part > +process_tcarg(const std::string& tcarg) { const std::string::size_type pos = tcarg.find(':'); if (pos == std::string::npos) { @@ -629,83 +518,141 @@ tp::process_tcarg(const std::string& tcarg) else if (partname == "cleanup") return std::make_pair(tcname, CLEANUP); else { - using atf::application::usage_error; throw usage_error("Invalid test case part `%s'", partname.c_str()); } } } -int -tp::run_tc(const std::string& tcarg) +static int +run_tc(tc_vector& tcs, const std::string& tcarg, const atf::fs::path& resfile) { const std::pair< std::string, tc_part > fields = process_tcarg(tcarg); - impl::tc* tc = find_tc(init_tcs(), fields.first); + impl::tc* tc = find_tc(tcs, fields.first); if (!atf::env::has("__RUNNING_INSIDE_ATF_RUN") || atf::env::get( "__RUNNING_INSIDE_ATF_RUN") != "internal-yes-value") { - std::cerr << m_prog_name << ": WARNING: Running test cases without " - "atf-run(1) is unsupported\n"; - std::cerr << m_prog_name << ": WARNING: No isolation nor timeout " + std::cerr << Program_Name << ": WARNING: Running test cases outside " + "of kyua(1) is unsupported\n"; + std::cerr << Program_Name << ": WARNING: No isolation nor timeout " "control is being applied; you may get unexpected failures; see " "atf-test-case(4)\n"; } - try { - switch (fields.second) { - case BODY: - tc->run(m_resfile.str()); - break; - case CLEANUP: - tc->run_cleanup(); - break; - default: - UNREACHABLE; - } - return EXIT_SUCCESS; - } catch (const std::runtime_error& e) { - std::cerr << "ERROR: " << e.what() << "\n"; - return EXIT_FAILURE; + switch (fields.second) { + case BODY: + tc->run(resfile.str()); + break; + case CLEANUP: + tc->run_cleanup(); + break; + default: + UNREACHABLE; } + return EXIT_SUCCESS; } -int -tp::main(void) +static int +safe_main(int argc, char** argv, void (*add_tcs)(tc_vector&)) { - using atf::application::usage_error; + const char* argv0 = argv[0]; + + bool lflag = false; + atf::fs::path resfile("/dev/stdout"); + std::string srcdir_arg; + atf::tests::vars_map vars; + + int ch; + int old_opterr; + + old_opterr = opterr; + ::opterr = 0; + while ((ch = ::getopt(argc, argv, GETOPT_POSIX ":lr:s:v:")) != -1) { + switch (ch) { + case 'l': + lflag = true; + break; + + case 'r': + resfile = atf::fs::path(::optarg); + break; + + case 's': + srcdir_arg = ::optarg; + break; + + case 'v': + parse_vflag(::optarg, vars); + break; + + case ':': + throw usage_error("Option -%c requires an argument.", ::optopt); + break; + + case '?': + default: + throw usage_error("Unknown option -%c.", ::optopt); + } + } + argc -= optind; + argv += optind; + + // Clear getopt state just in case the test wants to use it. + ::opterr = old_opterr; + ::optind = 1; +#if defined(HAVE_OPTRESET) + ::optreset = 1; +#endif + + vars["srcdir"] = handle_srcdir(argv0, srcdir_arg).str(); int errcode; - handle_srcdir(); - - if (m_lflag) { - if (m_argc > 0) + tc_vector tcs; + if (lflag) { + if (argc > 0) throw usage_error("Cannot provide test case names with -l"); - list_tcs(); - errcode = EXIT_SUCCESS; + init_tcs(add_tcs, tcs, vars); + errcode = list_tcs(tcs); } else { - if (m_argc == 0) + if (argc == 0) throw usage_error("Must provide a test case name"); - else if (m_argc > 1) + else if (argc > 1) throw usage_error("Cannot provide more than one test case name"); - INV(m_argc == 1); + INV(argc == 1); - errcode = run_tc(m_argv[0]); + init_tcs(add_tcs, tcs, vars); + errcode = run_tc(tcs, argv[0], resfile); + } + for (tc_vector::iterator iter = tcs.begin(); iter != tcs.end(); iter++) { + impl::tc* tc = *iter; + + delete tc; } return errcode; } +} // anonymous namespace + namespace atf { namespace tests { - int run_tp(int, char* const*, void (*)(tp::tc_vector&)); + int run_tp(int, char**, void (*)(tc_vector&)); } } int -impl::run_tp(int argc, char* const* argv, void (*add_tcs)(tp::tc_vector&)) +impl::run_tp(int argc, char** argv, void (*add_tcs)(tc_vector&)) { - return tp(add_tcs).run(argc, argv); + try { + set_program_name(argv[0]); + return ::safe_main(argc, argv, add_tcs); + } catch (const usage_error& e) { + std::cerr + << Program_Name << ": ERROR: " << e.what() << '\n' + << Program_Name << ": See atf-test-program(1) for usage details.\n"; + return EXIT_FAILURE; + } } diff --git a/unit/atf-src/atf-c++/tests.hpp b/unit/atf-src/atf-c++/tests.hpp index 22a2a8706a..ce2fb1d165 100644 --- a/unit/atf-src/atf-c++/tests.hpp +++ b/unit/atf-src/atf-c++/tests.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,9 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if !defined(_ATF_CXX_TESTS_HPP_) -#define _ATF_CXX_TESTS_HPP_ +#if !defined(ATF_CXX_TESTS_HPP) +#define ATF_CXX_TESTS_HPP #include #include @@ -38,8 +34,6 @@ extern "C" { #include } -#include - namespace atf { namespace tests { @@ -74,7 +68,11 @@ typedef std::map< std::string, std::string > vars_map; struct tc_impl; -class tc : noncopyable { +class tc { + // Non-copyable. + tc(const tc&); + tc& operator=(const tc&); + std::auto_ptr< tc_impl > pimpl; protected: @@ -124,4 +122,4 @@ public: } // namespace tests } // namespace atf -#endif // !defined(_ATF_CXX_TESTS_HPP_) +#endif // !defined(ATF_CXX_TESTS_HPP) diff --git a/unit/atf-src/atf-c++/tests_test.cpp b/unit/atf-src/atf-c++/tests_test.cpp index 63ab2ef91a..ed9fef0d01 100644 --- a/unit/atf-src/atf-c++/tests_test.cpp +++ b/unit/atf-src/atf-c++/tests_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,8 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/tests.hpp" extern "C" { #include @@ -36,12 +34,12 @@ extern "C" { } #include +#include #include -#include "macros.hpp" +#include -#include "detail/parser.hpp" -#include "detail/test_helpers.hpp" +#include "atf-c++/detail/text.hpp" // ------------------------------------------------------------------------ // Tests for the "atf_tp_writer" class. @@ -181,12 +179,6 @@ ATF_TEST_CASE_BODY(atf_tp_writer) #undef RESET } -// ------------------------------------------------------------------------ -// Tests cases for the header file. -// ------------------------------------------------------------------------ - -HEADER_TC(include, "atf-c++/tests.hpp"); - // ------------------------------------------------------------------------ // Main. // ------------------------------------------------------------------------ @@ -195,7 +187,4 @@ ATF_INIT_TEST_CASES(tcs) { // Add tests for the "atf_tp_writer" class. ATF_ADD_TEST_CASE(tcs, atf_tp_writer); - - // Add the test cases for the header file. - ATF_ADD_TEST_CASE(tcs, include); } diff --git a/unit/atf-src/atf-c++/unused_test.cpp b/unit/atf-src/atf-c++/unused_test.cpp index 2a18a455a7..1a577e14be 100644 --- a/unit/atf-src/atf-c++/unused_test.cpp +++ b/unit/atf-src/atf-c++/unused_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2012 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,9 +22,8 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#include +#include ATF_TEST_CASE(this_is_used); ATF_TEST_CASE_HEAD(this_is_used) diff --git a/unit/atf-src/atf-c++/utils.cpp b/unit/atf-src/atf-c++/utils.cpp index cc338bb892..a6ab08f0d7 100644 --- a/unit/atf-src/atf-c++/utils.cpp +++ b/unit/atf-src/atf-c++/utils.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,8 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/utils.hpp" extern "C" { #include "atf-c/utils.h" @@ -34,8 +32,6 @@ extern "C" { #include #include -#include "utils.hpp" - void atf::utils::cat_file(const std::string& path, const std::string& prefix) { diff --git a/unit/atf-src/atf-c++/utils.hpp b/unit/atf-src/atf-c++/utils.hpp index b8596aecdc..8f5c5e3374 100644 --- a/unit/atf-src/atf-c++/utils.hpp +++ b/unit/atf-src/atf-c++/utils.hpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,10 +22,9 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -#if !defined(_ATF_CXX_UTILS_HPP_) -#define _ATF_CXX_UTILS_HPP_ +#if !defined(ATF_CXX_UTILS_HPP) +#define ATF_CXX_UTILS_HPP extern "C" { #include @@ -65,4 +61,4 @@ grep_collection(const std::string& regexp, const Collection& collection) } // namespace utils } // namespace atf -#endif // !defined(_ATF_CXX_UTILS_HPP_) +#endif // !defined(ATF_CXX_UTILS_HPP) diff --git a/unit/atf-src/atf-c++/utils_test.cpp b/unit/atf-src/atf-c++/utils_test.cpp index 37457ff2b8..34e0709f58 100644 --- a/unit/atf-src/atf-c++/utils_test.cpp +++ b/unit/atf-src/atf-c++/utils_test.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,8 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// + +#include "atf-c++/utils.hpp" extern "C" { #include @@ -38,22 +36,20 @@ extern "C" { #include #include #include +#include #include #include -#include "macros.hpp" -#include "utils.hpp" - -#include "detail/test_helpers.hpp" +#include static std::string -read_file(const char *path) +read_file(const std::string& path) { char buffer[1024]; - const int fd = open(path, O_RDONLY); + const int fd = open(path.c_str(), O_RDONLY); if (fd == -1) - ATF_FAIL("Cannot open " + std::string(path)); + ATF_FAIL("Cannot open " + path); const ssize_t length = read(fd, buffer, sizeof(buffer) - 1); close(fd); ATF_REQUIRE(length != -1); @@ -238,8 +234,13 @@ ATF_TEST_CASE_BODY(fork) ATF_REQUIRE(WIFEXITED(status)); ATF_REQUIRE_EQ(EXIT_SUCCESS, WEXITSTATUS(status)); - ATF_REQUIRE_EQ("Child stdout\n", read_file("atf_utils_fork_out.txt")); - ATF_REQUIRE_EQ("Child stderr\n", read_file("atf_utils_fork_err.txt")); + std::ostringstream out_name; + out_name << "atf_utils_fork_" << pid << "_out.txt"; + std::ostringstream err_name; + err_name << "atf_utils_fork_" << pid << "_err.txt"; + + ATF_REQUIRE_EQ("Child stdout\n", read_file(out_name.str())); + ATF_REQUIRE_EQ("Child stderr\n", read_file(err_name.str())); } ATF_TEST_CASE_WITHOUT_HEAD(grep_collection__set); @@ -353,6 +354,35 @@ ATF_TEST_CASE_BODY(wait__ok) } } +ATF_TEST_CASE_WITHOUT_HEAD(wait__ok_nested); +ATF_TEST_CASE_BODY(wait__ok_nested) +{ + const pid_t parent = atf::utils::fork(); + ATF_REQUIRE(parent != -1); + if (parent == 0) { + const pid_t child = atf::utils::fork(); + ATF_REQUIRE(child != -1); + if (child == 0) { + std::cerr.flush(); + std::cout << "Child output\n"; + std::cout.flush(); + std::cerr << "Child error\n"; + std::exit(50); + } else { + std::cout << "Parent output\n"; + std::cerr << "Parent error\n"; + atf::utils::wait(child, 50, "Child output\n", "Child error\n"); + std::exit(40); + } + } else { + atf::utils::wait(parent, 40, + "Parent output\n" + "subprocess stdout: Child output\n" + "subprocess stderr: Child error\n", + "Parent error\n"); + } +} + ATF_TEST_CASE_WITHOUT_HEAD(wait__invalid_exitstatus); ATF_TEST_CASE_BODY(wait__invalid_exitstatus) { @@ -432,12 +462,6 @@ ATF_TEST_CASE_BODY(wait__save_stderr) } } -// ------------------------------------------------------------------------ -// Tests cases for the header file. -// ------------------------------------------------------------------------ - -HEADER_TC(include, "atf-c++/utils.hpp"); - // ------------------------------------------------------------------------ // Main. // ------------------------------------------------------------------------ @@ -476,12 +500,10 @@ ATF_INIT_TEST_CASES(tcs) ATF_ADD_TEST_CASE(tcs, redirect__other); ATF_ADD_TEST_CASE(tcs, wait__ok); + ATF_ADD_TEST_CASE(tcs, wait__ok_nested); ATF_ADD_TEST_CASE(tcs, wait__invalid_exitstatus); ATF_ADD_TEST_CASE(tcs, wait__invalid_stdout); ATF_ADD_TEST_CASE(tcs, wait__invalid_stderr); ATF_ADD_TEST_CASE(tcs, wait__save_stdout); ATF_ADD_TEST_CASE(tcs, wait__save_stderr); - - // Add the test cases for the header file. - ATF_ADD_TEST_CASE(tcs, include); } diff --git a/unit/atf-src/atf-c.h b/unit/atf-src/atf-c.h index 86606df3f9..701f7464f7 100644 --- a/unit/atf-src/atf-c.h +++ b/unit/atf-src/atf-c.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if !defined(ATF_C_H) #define ATF_C_H diff --git a/unit/atf-src/atf-c/Atffile b/unit/atf-src/atf-c/Atffile index 522e6f4c51..d6fd6b9a2b 100644 --- a/unit/atf-src/atf-c/Atffile +++ b/unit/atf-src/atf-c/Atffile @@ -7,7 +7,6 @@ tp: detail tp: atf_c_test tp: build_test tp: check_test -tp: config_test tp: error_test tp: macros_test tp: pkg_config_test diff --git a/unit/atf-src/atf-c/Kyuafile b/unit/atf-src/atf-c/Kyuafile index 2f3b82e100..40fdb92158 100644 --- a/unit/atf-src/atf-c/Kyuafile +++ b/unit/atf-src/atf-c/Kyuafile @@ -5,7 +5,6 @@ test_suite("atf") atf_test_program{name="atf_c_test"} atf_test_program{name="build_test"} atf_test_program{name="check_test"} -atf_test_program{name="config_test"} atf_test_program{name="error_test"} atf_test_program{name="macros_test"} atf_test_program{name="pkg_config_test"} diff --git a/unit/atf-src/atf-c/Makefile.am.inc b/unit/atf-src/atf-c/Makefile.am.inc index b813ec4bc1..fb89bf01f7 100644 --- a/unit/atf-src/atf-c/Makefile.am.inc +++ b/unit/atf-src/atf-c/Makefile.am.inc @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,15 +22,12 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# lib_LTLIBRARIES += libatf-c.la libatf_c_la_SOURCES = atf-c/build.c \ atf-c/build.h \ atf-c/check.c \ atf-c/check.h \ - atf-c/config.c \ - atf-c/config.h \ atf-c/error.c \ atf-c/error.h \ atf-c/error_fwd.h \ @@ -45,45 +39,44 @@ libatf_c_la_SOURCES = atf-c/build.c \ atf-c/utils.c \ atf-c/utils.h nodist_libatf_c_la_SOURCES = atf-c/defs.h -libatf_c_la_CPPFLAGS = "-DATF_ARCH=\"$(atf_arch)\"" \ - "-DATF_BUILD_CC=\"$(ATF_BUILD_CC)\"" \ +#libatf_c_la_CPPFLAGS = "-DATF_BUILD_CC=\"$(ATF_BUILD_CC)\"" \ +# "-DATF_BUILD_CFLAGS=\"$(ATF_BUILD_CFLAGS)\"" \ +# "-DATF_BUILD_CPP=\"$(ATF_BUILD_CPP)\"" \ +# "-DATF_BUILD_CPPFLAGS=\"$(ATF_BUILD_CPPFLAGS)\"" \ +# "-DATF_BUILD_CXX=\"$(ATF_BUILD_CXX)\"" \ +# "-DATF_BUILD_CXXFLAGS=\"$(ATF_BUILD_CXXFLAGS)\"" \ +# "-DATF_INCLUDEDIR=\"$(includedir)\"" \ +# "-DATF_LIBEXECDIR=\"$(libexecdir)\"" \ +# "-DATF_PKGDATADIR=\"$(pkgdatadir)\"" \ +# "-DATF_SHELL=\"$(ATF_SHELL)\"" \ +# "-DATF_WORKDIR=\"$(ATF_WORKDIR)\"" +libatf_c_la_CPPFLAGS = "-DATF_BUILD_CC=\"$(ATF_BUILD_CC)\"" \ "-DATF_BUILD_CFLAGS=\"$(ATF_BUILD_CFLAGS)\"" \ "-DATF_BUILD_CPP=\"$(ATF_BUILD_CPP)\"" \ "-DATF_BUILD_CPPFLAGS=\"$(ATF_BUILD_CPPFLAGS)\"" \ "-DATF_BUILD_CXX=\"$(ATF_BUILD_CXX)\"" \ - "-DATF_BUILD_CXXFLAGS=\"$(ATF_BUILD_CXXFLAGS)\"" \ - "-DATF_CONFDIR=\"$(atf_confdir)\"" \ - "-DATF_INCLUDEDIR=\"$(includedir)\"" \ - "-DATF_LIBDIR=\"$(libdir)\"" \ - "-DATF_LIBEXECDIR=\"$(libexecdir)\"" \ - "-DATF_MACHINE=\"$(atf_machine)\"" \ - "-DATF_M4=\"$(ATF_M4)\"" \ - "-DATF_PKGDATADIR=\"$(pkgdatadir)\"" \ - "-DATF_SHELL=\"$(ATF_SHELL)\"" \ - "-DATF_WORKDIR=\"$(ATF_WORKDIR)\"" \ - -I$(srcdir)/atf-c -libatf_c_la_LDFLAGS = -version-info 0:0:0 + "-DATF_BUILD_CXXFLAGS=\"$(ATF_BUILD_CXXFLAGS)\"" +libatf_c_la_LDFLAGS = -version-info 1:0:0 # XXX For some reason, the nodist line above does not work as expected. # Work this problem around. -dist-hook: kill-defs-h +DIST_HOOKS += kill-defs-h kill-defs-h: rm -f $(distdir)/atf-c/defs.h include_HEADERS += atf-c.h atf_c_HEADERS = atf-c/build.h \ atf-c/check.h \ - atf-c/config.h \ - atf-c/defs.h \ atf-c/error.h \ atf-c/error_fwd.h \ atf-c/macros.h \ atf-c/tc.h \ atf-c/tp.h \ atf-c/utils.h +nodist_atf_c_HEADERS = atf-c/defs.h atf_cdir = $(includedir)/atf-c -dist_man_MANS += atf-c/atf-c-api.3 +dist_man_MANS += atf-c/atf-c.3 atf_aclocal_DATA += atf-c/atf-common.m4 atf-c/atf-c.m4 EXTRA_DIST += atf-c/atf-common.m4 atf-c/atf-c.m4 @@ -93,12 +86,12 @@ atf_cpkgconfig_DATA = atf-c/atf-c.pc CLEANFILES += atf-c/atf-c.pc EXTRA_DIST += atf-c/atf-c.pc.in atf-c/atf-c.pc: $(srcdir)/atf-c/atf-c.pc.in Makefile - test -d atf-c || mkdir -p atf-c + $(AM_V_GEN)test -d atf-c || mkdir -p atf-c; \ sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \ -e 's#__CC__#$(CC)#g' \ -e 's#__INCLUDEDIR__#$(includedir)#g' \ -e 's#__LIBDIR__#$(libdir)#g' \ - <$(srcdir)/atf-c/atf-c.pc.in >atf-c/atf-c.pc.tmp + <$(srcdir)/atf-c/atf-c.pc.in >atf-c/atf-c.pc.tmp; \ mv atf-c/atf-c.pc.tmp atf-c/atf-c.pc tests_atf_c_DATA = atf-c/Atffile \ @@ -120,10 +113,6 @@ tests_atf_c_PROGRAMS += atf-c/check_test atf_c_check_test_SOURCES = atf-c/check_test.c atf_c_check_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la -tests_atf_c_PROGRAMS += atf-c/config_test -atf_c_config_test_SOURCES = atf-c/config_test.c -atf_c_config_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la - tests_atf_c_PROGRAMS += atf-c/error_test atf_c_error_test_SOURCES = atf-c/error_test.c atf_c_error_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la @@ -136,8 +125,7 @@ tests_atf_c_SCRIPTS = atf-c/pkg_config_test CLEANFILES += atf-c/pkg_config_test EXTRA_DIST += atf-c/pkg_config_test.sh atf-c/pkg_config_test: $(srcdir)/atf-c/pkg_config_test.sh - test -d atf-c || mkdir -p atf-c - @src="$(srcdir)/atf-c/pkg_config_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-c/pkg_config_test.sh"; \ dst="atf-c/pkg_config_test"; $(BUILD_SH_TP) tests_atf_c_PROGRAMS += atf-c/tc_test diff --git a/unit/atf-src/atf-c/atf-c-api.3 b/unit/atf-src/atf-c/atf-c.3 similarity index 90% rename from unit/atf-src/atf-c/atf-c-api.3 rename to unit/atf-src/atf-c/atf-c.3 index 0ef47a49cc..edb7207d7c 100644 --- a/unit/atf-src/atf-c/atf-c-api.3 +++ b/unit/atf-src/atf-c/atf-c.3 @@ -1,6 +1,3 @@ -.\" -.\" Automated Testing Framework (atf) -.\" .\" Copyright (c) 2008 The NetBSD Foundation, Inc. .\" All rights reserved. .\" @@ -25,12 +22,11 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd November 30, 2012 -.Dt ATF-C-API 3 +.Dd October 13, 2014 +.Dt ATF-C 3 .Os .Sh NAME -.Nm atf-c-api , +.Nm atf-c , .Nm ATF_CHECK , .Nm ATF_CHECK_MSG , .Nm ATF_CHECK_EQ , @@ -93,24 +89,26 @@ .Nd C API to write ATF-based test programs .Sh SYNOPSIS .In atf-c.h +.\" NO_CHECK_STYLE_BEGIN .Fn ATF_CHECK "expression" .Fn ATF_CHECK_MSG "expression" "fail_msg_fmt" ... -.Fn ATF_CHECK_EQ "expression_1" "expression_2" -.Fn ATF_CHECK_EQ_MSG "expression_1" "expression_2" "fail_msg_fmt" ... +.Fn ATF_CHECK_EQ "expected_expression" "actual_expression" +.Fn ATF_CHECK_EQ_MSG "expected_expression" "actual_expression" "fail_msg_fmt" ... .Fn ATF_CHECK_MATCH "regexp" "string" .Fn ATF_CHECK_MATCH_MSG "regexp" "string" "fail_msg_fmt" ... .Fn ATF_CHECK_STREQ "string_1" "string_2" .Fn ATF_CHECK_STREQ_MSG "string_1" "string_2" "fail_msg_fmt" ... -.Fn ATF_CHECK_ERRNO "exp_errno" "bool_expression" +.Fn ATF_CHECK_ERRNO "expected_errno" "bool_expression" .Fn ATF_REQUIRE "expression" .Fn ATF_REQUIRE_MSG "expression" "fail_msg_fmt" ... -.Fn ATF_REQUIRE_EQ "expression_1" "expression_2" -.Fn ATF_REQUIRE_EQ_MSG "expression_1" "expression_2" "fail_msg_fmt" ... +.Fn ATF_REQUIRE_EQ "expected_expression" "actual_expression" +.Fn ATF_REQUIRE_EQ_MSG "expected_expression" "actual_expression" "fail_msg_fmt" ... .Fn ATF_REQUIRE_MATCH "regexp" "string" .Fn ATF_REQUIRE_MATCH_MSG "regexp" "string" "fail_msg_fmt" ... -.Fn ATF_REQUIRE_STREQ "string_1" "string_2" -.Fn ATF_REQUIRE_STREQ_MSG "string_1" "string_2" "fail_msg_fmt" ... -.Fn ATF_REQUIRE_ERRNO "exp_errno" "bool_expression" +.Fn ATF_REQUIRE_STREQ "expected_string" "actual_string" +.Fn ATF_REQUIRE_STREQ_MSG "expected_string" "actual_string" "fail_msg_fmt" ... +.Fn ATF_REQUIRE_ERRNO "expected_errno" "bool_expression" +.\" NO_CHECK_STYLE_END .Fn ATF_TC "name" .Fn ATF_TC_BODY "name" "tc" .Fn ATF_TC_BODY_NAME "name" @@ -202,9 +200,8 @@ .Fa "const char *expected_stderr" .Fc .Sh DESCRIPTION -The ATF -.Pp -C-based test programs always follow this template: +ATF provides a C programming interface to implement test programs. +C-based test programs follow this template: .Bd -literal -offset indent .Ns ... C-specific includes go here ... @@ -410,9 +407,8 @@ If .Va exitcode is not .Sq -1 , -.Xr atf-run 1 -will validate that the exit code of the test case matches the one provided -in this call. +the runtime engine will validate that the exit code of the test case +matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn atf_tc_expect_fail "reason" "..." Any failure (be it fatal or non-fatal) raised in this mode is recorded. @@ -444,9 +440,8 @@ If .Va signo is not .Sq -1 , -.Xr atf-run 1 -will validate that the signal that terminated the test case matches the one -provided in this call. +the runtime engine will validate that the signal that terminated the test +case matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn atf_tc_expect_timeout "reason" "..." Expects the test case to execute for longer than its timeout. @@ -498,6 +493,8 @@ take an expression and fail if the expression evaluates to false. and .Fn ATF_REQUIRE_EQ_MSG take two expressions and fail if the two evaluated values are not equal. +The common style is to put the expected value in the first parameter and the +actual value in the second parameter. .Pp .Fn ATF_CHECK_MATCH , .Fn ATF_CHECK_MATCH_MSG , @@ -515,6 +512,8 @@ the string. and .Fn ATF_REQUIRE_STREQ_MSG take two strings and fail if the two are not equal character by character. +The common style is to put the expected string in the first parameter and the +actual string in the second parameter. .Pp .Fn ATF_CHECK_ERRNO and @@ -536,7 +535,7 @@ In particular, these are useful to write tests for command-line interfaces. .Fa "const char *file" .Fa "const char *prefix" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Prints the contents of .Fa file to the standard output, prefixing every line with the string in @@ -548,7 +547,7 @@ to the standard output, prefixing every line with the string in .Fa "const char *file" .Fa "const char *contents" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Returns true if the given .Fa file matches exactly the expected inlined @@ -560,7 +559,7 @@ matches exactly the expected inlined .Fa "const char *source" .Fa "const char *destination" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Copies the file .Fa source to @@ -574,7 +573,7 @@ The permissions of the file are preserved during the code. .Fa "const char *contents" .Fa "..." .Fc -.Bd -offset indent +.Bd -ragged -offset indent Creates .Fa file with the text given in @@ -586,7 +585,7 @@ which is a formatting string that uses the rest of the variable arguments. .Fo atf_utils_file_exists .Fa "const char *file" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Checks if .Fa file exists. @@ -596,7 +595,7 @@ exists. .Fo atf_utils_fork .Fa "void" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Forks a process and redirects the standard output and standard error of the child to files for later validation with .Fn atf_utils_wait . @@ -607,7 +606,7 @@ Fails the test case if the fork fails, so this does not return an error. .Fo atf_utils_free_charpp .Fa "char **argv" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Frees a dynamically-allocated array of dynamically-allocated strings. .Ed .Pp @@ -617,7 +616,7 @@ Frees a dynamically-allocated array of dynamically-allocated strings. .Fa "const char *file" .Fa "..." .Fc -.Bd -offset indent +.Bd -ragged -offset indent Searches for the .Fa regexp , which is a formatting string representing the regular expression, @@ -632,7 +631,7 @@ The variable arguments are used to construct the regular expression. .Fa "const char *str" .Fa "..." .Fc -.Bd -offset indent +.Bd -ragged -offset indent Searches for the .Fa regexp , which is a formatting string representing the regular expression, @@ -645,7 +644,7 @@ The variable arguments are used to construct the regular expression. .Fo atf_utils_readline .Fa "int fd" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Reads a line from the file descriptor .Fa fd . The line, if any, is returned as a dynamically-allocated buffer that must be @@ -660,7 +659,7 @@ If there was nothing to read, returns .Fa "const int fd" .Fa "const char *file" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Redirects the given file descriptor .Fa fd to @@ -679,7 +678,7 @@ those spawned by .Fa "const char *expected_stdout" .Fa "const char *expected_stderr" .Fc -.Bd -offset indent +.Bd -ragged -offset indent Waits and validates the result of a subprocess spawned with .Fn atf_utils_wait . The validation involves checking that the subprocess exited cleanly and returned @@ -699,6 +698,25 @@ strings are prefixed with then they specify the name of the file into which to store the stdout or stderr of the subprocess, and no comparison is performed. .Ed +.Sh ENVIRONMENT +The following variables are recognized by +.Nm +but should not be overridden other than for testing purposes: +.Pp +.Bl -tag -width ATFXBUILDXCXXFLAGSXX -compact +.It Va ATF_BUILD_CC +Path to the C compiler. +.It Va ATF_BUILD_CFLAGS +C compiler flags. +.It Va ATF_BUILD_CPP +Path to the C/C++ preprocessor. +.It Va ATF_BUILD_CPPFLAGS +C/C++ preprocessor flags. +.It Va ATF_BUILD_CXX +Path to the C++ compiler. +.It Va ATF_BUILD_CXXFLAGS +C++ compiler flags. +.El .Sh EXAMPLES The following shows a complete test program with a single test case that validates the addition operator: @@ -713,13 +731,13 @@ ATF_TC_HEAD(addition, tc) } ATF_TC_BODY(addition, tc) { - ATF_CHECK_EQ(0 + 0, 0); - ATF_CHECK_EQ(0 + 1, 1); - ATF_CHECK_EQ(1 + 0, 1); + ATF_CHECK_EQ(0, 0 + 0); + ATF_CHECK_EQ(1, 0 + 1); + ATF_CHECK_EQ(1, 1 + 0); - ATF_CHECK_EQ(1 + 1, 2); + ATF_CHECK_EQ(2, 1 + 1); - ATF_CHECK_EQ(100 + 200, 300); + ATF_CHECK_EQ(300, 100 + 200); } ATF_TC(string_formatting); @@ -772,5 +790,4 @@ ATF_TP_ADD_TCS(tp) .Ed .Sh SEE ALSO .Xr atf-test-program 1 , -.Xr atf-test-case 4 , -.Xr atf 7 +.Xr atf-test-case 4 diff --git a/unit/atf-src/atf-c/atf-c.m4 b/unit/atf-src/atf-c/atf-c.m4 index d0237b8482..94288f7e16 100644 --- a/unit/atf-src/atf-c/atf-c.m4 +++ b/unit/atf-src/atf-c/atf-c.m4 @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright 2011 Google Inc. dnl All rights reserved. dnl @@ -28,7 +25,6 @@ dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl dnl ATF_CHECK_C([version-spec]) dnl diff --git a/unit/atf-src/atf-c/atf-common.m4 b/unit/atf-src/atf-c/atf-common.m4 index 464a5a7fa0..f8fc7e9ebb 100644 --- a/unit/atf-src/atf-c/atf-common.m4 +++ b/unit/atf-src/atf-c/atf-common.m4 @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright 2011 Google Inc. dnl All rights reserved. dnl @@ -28,7 +25,6 @@ dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl dnl ATF_ARG_WITH dnl diff --git a/unit/atf-src/atf-c/atf_c_test.c b/unit/atf-src/atf-c/atf_c_test.c index f44d87fb09..eda9596bd2 100644 --- a/unit/atf-src/atf-c/atf_c_test.c +++ b/unit/atf-src/atf-c/atf_c_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,12 +21,11 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include -#include "detail/test_helpers.h" +#include "atf-c/detail/test_helpers.h" /* --------------------------------------------------------------------- * Tests cases for the header file. diff --git a/unit/atf-src/atf-c/build.c b/unit/atf-src/atf-c/build.c index 248330373b..c119fc97a2 100644 --- a/unit/atf-src/atf-c/build.c +++ b/unit/atf-src/atf-c/build.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2009 The NetBSD Foundation, Inc. +/* Copyright (c) 2009 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,31 +21,31 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/build.h" #include #include -#include "atf-c/build.h" -#include "atf-c/config.h" +#include "atf-c/detail/env.h" +#include "atf-c/detail/sanity.h" +#include "atf-c/detail/text.h" #include "atf-c/error.h" -#include "detail/sanity.h" -#include "detail/text.h" - /* --------------------------------------------------------------------- * Auxiliary functions. * --------------------------------------------------------------------- */ static atf_error_t -append_config_var(const char *var, atf_list_t *argv) +append_config_var(const char *var, const char *default_value, atf_list_t *argv) { atf_error_t err; atf_list_t words; - err = atf_text_split(atf_config_get(var), " ", &words); + err = atf_text_split(atf_env_get_with_default(var, default_value), + " ", &words); if (atf_is_error(err)) goto out; @@ -158,15 +155,16 @@ atf_build_c_o(const char *sfile, if (atf_is_error(err)) goto out; - err = append_config_var("atf_build_cc", &argv_list); + err = append_config_var("ATF_BUILD_CC", ATF_BUILD_CC, &argv_list); if (atf_is_error(err)) goto out_list; - err = append_config_var("atf_build_cppflags", &argv_list); + err = append_config_var("ATF_BUILD_CPPFLAGS", ATF_BUILD_CPPFLAGS, + &argv_list); if (atf_is_error(err)) goto out_list; - err = append_config_var("atf_build_cflags", &argv_list); + err = append_config_var("ATF_BUILD_CFLAGS", ATF_BUILD_CFLAGS, &argv_list); if (atf_is_error(err)) goto out_list; @@ -203,11 +201,12 @@ atf_build_cpp(const char *sfile, if (atf_is_error(err)) goto out; - err = append_config_var("atf_build_cpp", &argv_list); + err = append_config_var("ATF_BUILD_CPP", ATF_BUILD_CPP, &argv_list); if (atf_is_error(err)) goto out_list; - err = append_config_var("atf_build_cppflags", &argv_list); + err = append_config_var("ATF_BUILD_CPPFLAGS", ATF_BUILD_CPPFLAGS, + &argv_list); if (atf_is_error(err)) goto out_list; @@ -248,15 +247,17 @@ atf_build_cxx_o(const char *sfile, if (atf_is_error(err)) goto out; - err = append_config_var("atf_build_cxx", &argv_list); + err = append_config_var("ATF_BUILD_CXX", ATF_BUILD_CXX, &argv_list); if (atf_is_error(err)) goto out_list; - err = append_config_var("atf_build_cppflags", &argv_list); + err = append_config_var("ATF_BUILD_CPPFLAGS", ATF_BUILD_CPPFLAGS, + &argv_list); if (atf_is_error(err)) goto out_list; - err = append_config_var("atf_build_cxxflags", &argv_list); + err = append_config_var("ATF_BUILD_CXXFLAGS", ATF_BUILD_CXXFLAGS, + &argv_list); if (atf_is_error(err)) goto out_list; diff --git a/unit/atf-src/atf-c/build.h b/unit/atf-src/atf-c/build.h index 2e981cfdad..a263f5063b 100644 --- a/unit/atf-src/atf-c/build.h +++ b/unit/atf-src/atf-c/build.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2009 The NetBSD Foundation, Inc. +/* Copyright (c) 2009 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if !defined(ATF_C_BUILD_H) #define ATF_C_BUILD_H @@ -39,4 +35,4 @@ atf_error_t atf_build_cpp(const char *, const char *, const char *const [], atf_error_t atf_build_cxx_o(const char *, const char *, const char *const [], char ***); -#endif /* ATF_C_BUILD_H */ +#endif /* !defined(ATF_C_BUILD_H) */ diff --git a/unit/atf-src/atf-c/build_test.c b/unit/atf-src/atf-c/build_test.c index b08c9a5491..c24b573702 100644 --- a/unit/atf-src/atf-c/build_test.c +++ b/unit/atf-src/atf-c/build_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2009 The NetBSD Foundation, Inc. +/* Copyright (c) 2009 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/build.h" #include #include @@ -33,20 +31,15 @@ #include -#include "atf-c/build.h" -#include "atf-c/config.h" +#include "atf-c/detail/env.h" +#include "atf-c/detail/test_helpers.h" +#include "atf-c/h_build.h" #include "atf-c/utils.h" -#include "detail/env.h" -#include "detail/test_helpers.h" -#include "h_build.h" - /* --------------------------------------------------------------------- * Auxiliary functions. * --------------------------------------------------------------------- */ -void __atf_config_reinit(void); - static bool equal_arrays(const char *const *exp_array, char **actual_array) @@ -167,7 +160,6 @@ ATF_TC_BODY(c_o, tc) verbose_set_env("ATF_BUILD_CC", test->cc); verbose_set_env("ATF_BUILD_CFLAGS", test->cflags); verbose_set_env("ATF_BUILD_CPPFLAGS", test->cppflags); - __atf_config_reinit(); { char **argv; @@ -196,7 +188,6 @@ ATF_TC_BODY(cpp, tc) verbose_set_env("ATF_BUILD_CPP", test->cpp); verbose_set_env("ATF_BUILD_CPPFLAGS", test->cppflags); - __atf_config_reinit(); { char **argv; @@ -226,7 +217,6 @@ ATF_TC_BODY(cxx_o, tc) verbose_set_env("ATF_BUILD_CXX", test->cxx); verbose_set_env("ATF_BUILD_CXXFLAGS", test->cxxflags); verbose_set_env("ATF_BUILD_CPPFLAGS", test->cppflags); - __atf_config_reinit(); { char **argv; @@ -241,12 +231,6 @@ ATF_TC_BODY(cxx_o, tc) } } -/* --------------------------------------------------------------------- - * Tests cases for the header file. - * --------------------------------------------------------------------- */ - -HEADER_TC(include, "atf-c/build.h"); - /* --------------------------------------------------------------------- * Main. * --------------------------------------------------------------------- */ @@ -261,8 +245,5 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, cpp); ATF_TP_ADD_TC(tp, cxx_o); - /* Add the test cases for the header file. */ - ATF_TP_ADD_TC(tp, include); - return atf_no_error(); } diff --git a/unit/atf-src/atf-c/check.c b/unit/atf-src/atf-c/check.c index d7a908d3c5..38afdf3743 100644 --- a/unit/atf-src/atf-c/check.c +++ b/unit/atf-src/atf-c/check.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/check.h" #include @@ -37,18 +35,16 @@ #include #include "atf-c/build.h" -#include "atf-c/check.h" -#include "atf-c/config.h" #include "atf-c/defs.h" +#include "atf-c/detail/dynstr.h" +#include "atf-c/detail/env.h" +#include "atf-c/detail/fs.h" +#include "atf-c/detail/list.h" +#include "atf-c/detail/process.h" +#include "atf-c/detail/sanity.h" #include "atf-c/error.h" #include "atf-c/utils.h" -#include "detail/dynstr.h" -#include "detail/fs.h" -#include "detail/list.h" -#include "detail/process.h" -#include "detail/sanity.h" - /* --------------------------------------------------------------------- * Auxiliary functions. * --------------------------------------------------------------------- */ @@ -60,7 +56,7 @@ create_tmpdir(atf_fs_path_t *dir) atf_error_t err; err = atf_fs_path_init_fmt(dir, "%s/check.XXXXXX", - atf_config_get("atf_workdir")); + atf_env_get_with_default("TMPDIR", "/tmp")); if (atf_is_error(err)) goto out; diff --git a/unit/atf-src/atf-c/check.h b/unit/atf-src/atf-c/check.h index f36aa3eaef..1eb2267d7e 100644 --- a/unit/atf-src/atf-c/check.h +++ b/unit/atf-src/atf-c/check.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if !defined(ATF_C_CHECK_H) #define ATF_C_CHECK_H @@ -70,4 +66,4 @@ atf_error_t atf_check_build_cxx_o(const char *, const char *, bool *); atf_error_t atf_check_exec_array(const char *const *, atf_check_result_t *); -#endif /* ATF_C_CHECK_H */ +#endif /* !defined(ATF_C_CHECK_H) */ diff --git a/unit/atf-src/atf-c/check_test.c b/unit/atf-src/atf-c/check_test.c index a26e032e11..adaca649be 100644 --- a/unit/atf-src/atf-c/check_test.c +++ b/unit/atf-src/atf-c/check_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/check.h" #include #include @@ -36,13 +34,10 @@ #include -#include "atf-c/check.h" -#include "atf-c/config.h" - -#include "detail/fs.h" -#include "detail/map.h" -#include "detail/process.h" -#include "detail/test_helpers.h" +#include "atf-c/detail/fs.h" +#include "atf-c/detail/map.h" +#include "atf-c/detail/process.h" +#include "atf-c/detail/test_helpers.h" /* --------------------------------------------------------------------- * Auxiliary functions. @@ -494,12 +489,8 @@ ATF_TC_HEAD(exec_unknown, tc) } ATF_TC_BODY(exec_unknown, tc) { - char buf[1024]; - snprintf(buf, sizeof(buf), "%s/non-existent", - atf_config_get("atf_workdir")); - const char *argv[2]; - argv[0] = buf; + argv[0] = "/foo/bar/non-existent"; argv[1] = NULL; atf_check_result_t result; @@ -509,12 +500,6 @@ ATF_TC_BODY(exec_unknown, tc) atf_check_result_fini(&result); } -/* --------------------------------------------------------------------- - * Tests cases for the header file. - * --------------------------------------------------------------------- */ - -HEADER_TC(include, "atf-c/check.h"); - /* --------------------------------------------------------------------- * Main. * --------------------------------------------------------------------- */ @@ -532,8 +517,5 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, exec_umask); ATF_TP_ADD_TC(tp, exec_unknown); - /* Add the test cases for the header file. */ - ATF_TP_ADD_TC(tp, include); - return atf_no_error(); } diff --git a/unit/atf-src/atf-c/config.c b/unit/atf-src/atf-c/config.c deleted file mode 100644 index f1047f0558..0000000000 --- a/unit/atf-src/atf-c/config.c +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND - * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include - -#include "atf-c/config.h" - -#include "detail/env.h" -#include "detail/sanity.h" - -static bool initialized = false; - -static struct var { - const char *name; - const char *default_value; - const char *value; - bool can_be_empty; -} vars[] = { - { "atf_arch", ATF_ARCH, NULL, false, }, - { "atf_build_cc", ATF_BUILD_CC, NULL, false, }, - { "atf_build_cflags", ATF_BUILD_CFLAGS, NULL, true, }, - { "atf_build_cpp", ATF_BUILD_CPP, NULL, false, }, - { "atf_build_cppflags", ATF_BUILD_CPPFLAGS, NULL, true, }, - { "atf_build_cxx", ATF_BUILD_CXX, NULL, false, }, - { "atf_build_cxxflags", ATF_BUILD_CXXFLAGS, NULL, true, }, - { "atf_confdir", ATF_CONFDIR, NULL, false, }, - { "atf_includedir", ATF_INCLUDEDIR, NULL, false, }, - { "atf_libdir", ATF_LIBDIR, NULL, false, }, - { "atf_libexecdir", ATF_LIBEXECDIR, NULL, false, }, - { "atf_machine", ATF_MACHINE, NULL, false, }, - { "atf_pkgdatadir", ATF_PKGDATADIR, NULL, false, }, - { "atf_shell", ATF_SHELL, NULL, false, }, - { "atf_workdir", ATF_WORKDIR, NULL, false, }, - { NULL, NULL, NULL, false, }, -}; - -/* Only used for unit testing, so this prototype is private. */ -void __atf_config_reinit(void); - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -static -char * -string_to_upper(const char *str) -{ - char *uc; - - uc = (char *)malloc(strlen(str) + 1); - if (uc != NULL) { - char *ucptr = uc; - while (*str != '\0') { - *ucptr = toupper((int)*str); - - str++; - ucptr++; - } - *ucptr = '\0'; - } - - return uc; -} - -static -void -initialize_var(struct var *var, const char *envname) -{ - PRE(var->value == NULL); - - if (atf_env_has(envname)) { - const char *val = atf_env_get(envname); - if (strlen(val) > 0 || var->can_be_empty) - var->value = val; - else - var->value = var->default_value; - } else - var->value = var->default_value; - - POST(var->value != NULL); -} - -static -void -initialize(void) -{ - struct var *var; - - PRE(!initialized); - - for (var = vars; var->name != NULL; var++) { - char *envname; - - envname = string_to_upper(var->name); - initialize_var(var, envname); - free(envname); - } - - initialized = true; -} - -/* --------------------------------------------------------------------- - * Free functions. - * --------------------------------------------------------------------- */ - -const char * -atf_config_get(const char *name) -{ - const struct var *var; - const char *value; - - if (!initialized) { - initialize(); - INV(initialized); - } - - value = NULL; - for (var = vars; value == NULL && var->name != NULL; var++) - if (strcmp(var->name, name) == 0) - value = var->value; - INV(value != NULL); - - return value; -} - -void -__atf_config_reinit(void) -{ - struct var *var; - - initialized = false; - - for (var = vars; var->name != NULL; var++) - var->value = NULL; -} diff --git a/unit/atf-src/atf-c/config.h b/unit/atf-src/atf-c/config.h deleted file mode 100644 index 19b86e2c2f..0000000000 --- a/unit/atf-src/atf-c/config.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND - * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#if !defined(ATF_C_CONFIG_H) -#define ATF_C_CONFIG_H - -#include - -const char *atf_config_get(const char *); - -#endif /* !defined(ATF_C_CONFIG_H) */ diff --git a/unit/atf-src/atf-c/config_test.c b/unit/atf-src/atf-c/config_test.c deleted file mode 100644 index a21d68fe58..0000000000 --- a/unit/atf-src/atf-c/config_test.c +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007 The NetBSD Foundation, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND - * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include - -#include - -#include "atf-c/config.h" - -#include "detail/env.h" -#include "detail/test_helpers.h" - -static const char *test_value = "env-value"; - -static struct varnames { - const char *lc; - const char *uc; - bool can_be_empty; -} all_vars[] = { - { "atf_arch", "ATF_ARCH", false }, - { "atf_build_cc", "ATF_BUILD_CC", false }, - { "atf_build_cflags", "ATF_BUILD_CFLAGS", true }, - { "atf_build_cpp", "ATF_BUILD_CPP", false }, - { "atf_build_cppflags", "ATF_BUILD_CPPFLAGS", true }, - { "atf_build_cxx", "ATF_BUILD_CXX", false }, - { "atf_build_cxxflags", "ATF_BUILD_CXXFLAGS", true }, - { "atf_confdir", "ATF_CONFDIR", false }, - { "atf_includedir", "ATF_INCLUDEDIR", false }, - { "atf_libdir", "ATF_LIBDIR", false }, - { "atf_libexecdir", "ATF_LIBEXECDIR", false }, - { "atf_machine", "ATF_MACHINE", false }, - { "atf_pkgdatadir", "ATF_PKGDATADIR", false }, - { "atf_shell", "ATF_SHELL", false }, - { "atf_workdir", "ATF_WORKDIR", false }, - { NULL, NULL, false } -}; - -/* --------------------------------------------------------------------- - * Auxiliary functions. - * --------------------------------------------------------------------- */ - -void __atf_config_reinit(void); - -static -void -unset_all(void) -{ - const struct varnames *v; - for (v = all_vars; v->lc != NULL; v++) - RE(atf_env_unset(v->uc)); -} - -static -void -compare_one(const char *var, const char *expvalue) -{ - const struct varnames *v; - - printf("Checking that %s is set to %s\n", var, expvalue); - - for (v = all_vars; v->lc != NULL; v++) { - if (strcmp(v->lc, var) == 0) - ATF_CHECK_STREQ(atf_config_get(v->lc), test_value); - else - ATF_CHECK(strcmp(atf_config_get(v->lc), test_value) != 0); - } -} - -/* --------------------------------------------------------------------- - * Test cases for the free functions. - * --------------------------------------------------------------------- */ - -ATF_TC(get); -ATF_TC_HEAD(get, tc) -{ - atf_tc_set_md_var(tc, "descr", "Tests the atf_config_get function"); -} -ATF_TC_BODY(get, tc) -{ - const struct varnames *v; - - /* Unset all known environment variables and make sure the built-in - * values do not match the bogus value we will use for testing. */ - unset_all(); - __atf_config_reinit(); - for (v = all_vars; v->lc != NULL; v++) - ATF_CHECK(strcmp(atf_config_get(v->lc), test_value) != 0); - - /* Test the behavior of empty values. */ - for (v = all_vars; v->lc != NULL; v++) { - unset_all(); - if (strcmp(atf_config_get(v->lc), "") != 0) { - RE(atf_env_set(v->uc, "")); - __atf_config_reinit(); - if (v->can_be_empty) - ATF_CHECK(strlen(atf_config_get(v->lc)) == 0); - else - ATF_CHECK(strlen(atf_config_get(v->lc)) > 0); - } - } - - /* Check if every variable is recognized individually. */ - for (v = all_vars; v->lc != NULL; v++) { - unset_all(); - RE(atf_env_set(v->uc, test_value)); - __atf_config_reinit(); - compare_one(v->lc, test_value); - } -} - -/* --------------------------------------------------------------------- - * Tests cases for the header file. - * --------------------------------------------------------------------- */ - -HEADER_TC(include, "atf-c/config.h"); - -/* --------------------------------------------------------------------- - * Main. - * --------------------------------------------------------------------- */ - -ATF_TP_ADD_TCS(tp) -{ - ATF_TP_ADD_TC(tp, get); - - /* Add the test cases for the header file. */ - ATF_TP_ADD_TC(tp, include); - - return atf_no_error(); -} diff --git a/unit/atf-src/atf-c/defs.h.in b/unit/atf-src/atf-c/defs.h.in index 7925107cf8..6059e7fdb0 100644 --- a/unit/atf-src/atf-c/defs.h.in +++ b/unit/atf-src/atf-c/defs.h.in @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if !defined(ATF_C_DEFS_H) #define ATF_C_DEFS_H diff --git a/unit/atf-src/atf-c/detail/Makefile.am.inc b/unit/atf-src/atf-c/detail/Makefile.am.inc index 20a8dc57c2..ad45602d18 100644 --- a/unit/atf-src/atf-c/detail/Makefile.am.inc +++ b/unit/atf-src/atf-c/detail/Makefile.am.inc @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# libatf_c_la_SOURCES += atf-c/detail/dynstr.c \ atf-c/detail/dynstr.h \ @@ -55,7 +51,8 @@ EXTRA_DIST += $(tests_atf_c_detail_DATA) noinst_LTLIBRARIES += atf-c/detail/libtest_helpers.la atf_c_detail_libtest_helpers_la_SOURCES = atf-c/detail/test_helpers.c \ atf-c/detail/test_helpers.h -atf_c_detail_libtest_helpers_la_CPPFLAGS = -I$(srcdir)/atf-c +atf_c_detail_libtest_helpers_la_CPPFLAGS = -I$(srcdir)/atf-c \ + -DATF_INCLUDEDIR=\"$(includedir)\" tests_atf_c_detail_PROGRAMS = atf-c/detail/dynstr_test atf_c_detail_dynstr_test_SOURCES = atf-c/detail/dynstr_test.c @@ -96,4 +93,7 @@ tests_atf_c_detail_PROGRAMS += atf-c/detail/user_test atf_c_detail_user_test_SOURCES = atf-c/detail/user_test.c atf_c_detail_user_test_LDADD = atf-c/detail/libtest_helpers.la libatf-c.la +tests_atf_c_detail_PROGRAMS += atf-c/detail/version_helper +atf_c_detail_version_helper_SOURCES = atf-c/detail/version_helper.c + # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 diff --git a/unit/atf-src/atf-c/detail/dynstr.c b/unit/atf-src/atf-c/detail/dynstr.c index e533a811ff..424a1c9dac 100644 --- a/unit/atf-src/atf-c/detail/dynstr.c +++ b/unit/atf-src/atf-c/detail/dynstr.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/dynstr.h" #include #include @@ -34,12 +32,10 @@ #include #include +#include "atf-c/detail/sanity.h" +#include "atf-c/detail/text.h" #include "atf-c/error.h" -#include "dynstr.h" -#include "sanity.h" -#include "text.h" - /* --------------------------------------------------------------------- * Auxiliary functions. * --------------------------------------------------------------------- */ diff --git a/unit/atf-src/atf-c/detail/dynstr.h b/unit/atf-src/atf-c/detail/dynstr.h index c82209a480..60b8e422ca 100644 --- a/unit/atf-src/atf-c/detail/dynstr.h +++ b/unit/atf-src/atf-c/detail/dynstr.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,11 +21,10 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined(ATF_C_DYNSTR_H) -#define ATF_C_DYNSTR_H +#if !defined(ATF_C_DETAIL_DYNSTR_H) +#define ATF_C_DETAIL_DYNSTR_H #include #include @@ -78,4 +74,4 @@ atf_error_t atf_dynstr_prepend_fmt(atf_dynstr_t *, const char *, ...); bool atf_equal_dynstr_cstring(const atf_dynstr_t *, const char *); bool atf_equal_dynstr_dynstr(const atf_dynstr_t *, const atf_dynstr_t *); -#endif /* ATF_C_DYNSTR_H */ +#endif /* !defined(ATF_C_DETAIL_DYNSTR_H) */ diff --git a/unit/atf-src/atf-c/detail/dynstr_test.c b/unit/atf-src/atf-c/detail/dynstr_test.c index 1b68d38b77..25127529f8 100644 --- a/unit/atf-src/atf-c/detail/dynstr_test.c +++ b/unit/atf-src/atf-c/detail/dynstr_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/dynstr.h" #include #include @@ -35,8 +33,7 @@ #include -#include "dynstr.h" -#include "test_helpers.h" +#include "atf-c/detail/test_helpers.h" /* --------------------------------------------------------------------- * Tests for the "atf_dynstr" type. diff --git a/unit/atf-src/atf-c/detail/env.c b/unit/atf-src/atf-c/detail/env.c index feb4ee53e7..8ee3d697c2 100644 --- a/unit/atf-src/atf-c/detail/env.c +++ b/unit/atf-src/atf-c/detail/env.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007 The NetBSD Foundation, Inc. +/* Copyright (c) 2007 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,22 +21,21 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/env.h" #if defined(HAVE_CONFIG_H) -#include "bconfig.h" +#include "config.h" #endif #include #include +#include "atf-c/detail/sanity.h" +#include "atf-c/detail/text.h" #include "atf-c/error.h" -#include "env.h" -#include "sanity.h" -#include "text.h" - const char * atf_env_get(const char *name) { @@ -48,6 +44,16 @@ atf_env_get(const char *name) return val; } +const char * +atf_env_get_with_default(const char *name, const char *default_value) +{ + const char* val = getenv(name); + if (val == NULL) + return default_value; + else + return val; +} + bool atf_env_has(const char *name) { diff --git a/unit/atf-src/atf-c/detail/env.h b/unit/atf-src/atf-c/detail/env.h index c0d07a3a33..5d29440df4 100644 --- a/unit/atf-src/atf-c/detail/env.h +++ b/unit/atf-src/atf-c/detail/env.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,19 +21,19 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined(ATF_C_ENV_H) -#define ATF_C_ENV_H +#if !defined(ATF_C_DETAIL_ENV_H) +#define ATF_C_DETAIL_ENV_H #include #include const char *atf_env_get(const char *); +const char *atf_env_get_with_default(const char *, const char *); bool atf_env_has(const char *); atf_error_t atf_env_set(const char *, const char *); atf_error_t atf_env_unset(const char *); -#endif /* !defined(ATF_C_ENV_H) */ +#endif /* !defined(ATF_C_DETAIL_ENV_H) */ diff --git a/unit/atf-src/atf-c/detail/env_test.c b/unit/atf-src/atf-c/detail/env_test.c index 6ebf36c8bb..3909c29fb9 100644 --- a/unit/atf-src/atf-c/detail/env_test.c +++ b/unit/atf-src/atf-c/detail/env_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007 The NetBSD Foundation, Inc. +/* Copyright (c) 2007 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,17 +21,17 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/env.h" #include #include #include -#include "env.h" -#include "test_helpers.h" -#include "text.h" +#include "atf-c/detail/test_helpers.h" +#include "atf-c/detail/text.h" /* --------------------------------------------------------------------- * Test cases for the free functions. @@ -67,6 +64,25 @@ ATF_TC_BODY(get, tc) ATF_REQUIRE(strchr(val, ':') != NULL); } +ATF_TC(get_with_default); +ATF_TC_HEAD(get_with_default, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the atf_env_get_with_default " + "function"); +} +ATF_TC_BODY(get_with_default, tc) +{ + const char *val; + + ATF_REQUIRE(atf_env_has("PATH")); + + val = atf_env_get_with_default("PATH", "unknown"); + ATF_REQUIRE(strcmp(val, "unknown") != 0); + + val = atf_env_get_with_default("_UNKNOWN_VARIABLE_", "foo bar"); + ATF_REQUIRE(strcmp(val, "foo bar") == 0); +} + ATF_TC(set); ATF_TC_HEAD(set, tc) { @@ -109,6 +125,7 @@ ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, has); ATF_TP_ADD_TC(tp, get); + ATF_TP_ADD_TC(tp, get_with_default); ATF_TP_ADD_TC(tp, set); ATF_TP_ADD_TC(tp, unset); diff --git a/unit/atf-src/atf-c/detail/fs.c b/unit/atf-src/atf-c/detail/fs.c index 22cbca439b..5ff7648c3c 100644 --- a/unit/atf-src/atf-c/detail/fs.c +++ b/unit/atf-src/atf-c/detail/fs.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007 The NetBSD Foundation, Inc. +/* Copyright (c) 2007 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,11 +21,12 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/fs.h" #if defined(HAVE_CONFIG_H) -#include "bconfig.h" +#include "config.h" #endif #include @@ -47,13 +45,11 @@ #include #include "atf-c/defs.h" +#include "atf-c/detail/sanity.h" +#include "atf-c/detail/text.h" +#include "atf-c/detail/user.h" #include "atf-c/error.h" -#include "fs.h" -#include "sanity.h" -#include "text.h" -#include "user.h" - /* --------------------------------------------------------------------- * Prototypes for auxiliary functions. * --------------------------------------------------------------------- */ diff --git a/unit/atf-src/atf-c/detail/fs.h b/unit/atf-src/atf-c/detail/fs.h index ec77c3bb73..1c6c0eba64 100644 --- a/unit/atf-src/atf-c/detail/fs.h +++ b/unit/atf-src/atf-c/detail/fs.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,11 +21,10 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined(ATF_C_FS_H) -#define ATF_C_FS_H +#if !defined(ATF_C_DETAIL_FS_H) +#define ATF_C_DETAIL_FS_H #include #include @@ -36,10 +32,9 @@ #include #include +#include #include -#include "dynstr.h" - /* --------------------------------------------------------------------- * The "atf_fs_path" type. * --------------------------------------------------------------------- */ @@ -130,4 +125,4 @@ atf_error_t atf_fs_mkstemp(atf_fs_path_t *, int *); atf_error_t atf_fs_rmdir(const atf_fs_path_t *); atf_error_t atf_fs_unlink(const atf_fs_path_t *); -#endif /* !defined(ATF_C_FS_H) */ +#endif /* !defined(ATF_C_DETAIL_FS_H) */ diff --git a/unit/atf-src/atf-c/detail/fs_test.c b/unit/atf-src/atf-c/detail/fs_test.c index 043304a0c7..3dbc4d3ba7 100644 --- a/unit/atf-src/atf-c/detail/fs_test.c +++ b/unit/atf-src/atf-c/detail/fs_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007 The NetBSD Foundation, Inc. +/* Copyright (c) 2007 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/fs.h" #include #include @@ -39,9 +37,8 @@ #include -#include "fs.h" -#include "test_helpers.h" -#include "user.h" +#include "atf-c/detail/test_helpers.h" +#include "atf-c/detail/user.h" /* --------------------------------------------------------------------- * Auxiliary functions. diff --git a/unit/atf-src/atf-c/detail/list.c b/unit/atf-src/atf-c/detail/list.c index 0d005ad051..d14216eb40 100644 --- a/unit/atf-src/atf-c/detail/list.c +++ b/unit/atf-src/atf-c/detail/list.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,18 +21,17 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/list.h" #include #include +#include "atf-c/detail/sanity.h" #include "atf-c/error.h" #include "atf-c/utils.h" -#include "list.h" -#include "sanity.h" - /* --------------------------------------------------------------------- * Auxiliary functions. * --------------------------------------------------------------------- */ diff --git a/unit/atf-src/atf-c/detail/list.h b/unit/atf-src/atf-c/detail/list.h index 2c0fbcba1e..b250066806 100644 --- a/unit/atf-src/atf-c/detail/list.h +++ b/unit/atf-src/atf-c/detail/list.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,11 +21,10 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined(ATF_C_LIST_H) -#define ATF_C_LIST_H +#if !defined(ATF_C_DETAIL_LIST_H) +#define ATF_C_DETAIL_LIST_H #include #include @@ -112,4 +108,4 @@ void atf_list_append_list(atf_list_t *, atf_list_t *); !atf_equal_list_citer_list_citer((iter), atf_list_end_c(list)); \ iter = atf_list_citer_next(iter)) -#endif /* ATF_C_LIST_H */ +#endif /* !defined(ATF_C_DETAIL_LIST_H) */ diff --git a/unit/atf-src/atf-c/detail/list_test.c b/unit/atf-src/atf-c/detail/list_test.c index 3aa576cae6..82a715d28b 100644 --- a/unit/atf-src/atf-c/detail/list_test.c +++ b/unit/atf-src/atf-c/detail/list_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,19 +21,18 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/list.h" #include #include #include +#include "atf-c/detail/test_helpers.h" #include "atf-c/utils.h" -#include "list.h" -#include "test_helpers.h" - /* --------------------------------------------------------------------- * Tests for the "atf_list" type. * --------------------------------------------------------------------- */ diff --git a/unit/atf-src/atf-c/detail/map.c b/unit/atf-src/atf-c/detail/map.c index 34025b2829..45de47f310 100644 --- a/unit/atf-src/atf-c/detail/map.c +++ b/unit/atf-src/atf-c/detail/map.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,19 +21,18 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/map.h" #include #include #include +#include "atf-c/detail/sanity.h" #include "atf-c/error.h" #include "atf-c/utils.h" -#include "map.h" -#include "sanity.h" - /* --------------------------------------------------------------------- * Auxiliary functions. * --------------------------------------------------------------------- */ diff --git a/unit/atf-src/atf-c/detail/map.h b/unit/atf-src/atf-c/detail/map.h index a3ed7a2274..7ca8e8ad6c 100644 --- a/unit/atf-src/atf-c/detail/map.h +++ b/unit/atf-src/atf-c/detail/map.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,19 +21,17 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined(ATF_C_MAP_H) -#define ATF_C_MAP_H +#if !defined(ATF_C_DETAIL_MAP_H) +#define ATF_C_DETAIL_MAP_H #include #include +#include #include -#include "list.h" - /* --------------------------------------------------------------------- * The "atf_map_citer" type. * --------------------------------------------------------------------- */ @@ -116,4 +111,4 @@ atf_error_t atf_map_insert(atf_map_t *, const char *, void *, bool); !atf_equal_map_citer_map_citer((iter), atf_map_end_c(map)); \ iter = atf_map_citer_next(iter)) -#endif /* ATF_C_MAP_H */ +#endif /* !defined(ATF_C_DETAIL_MAP_H) */ diff --git a/unit/atf-src/atf-c/detail/map_test.c b/unit/atf-src/atf-c/detail/map_test.c index 644ab6926c..0982e20f7d 100644 --- a/unit/atf-src/atf-c/detail/map_test.c +++ b/unit/atf-src/atf-c/detail/map_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,19 +21,18 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/map.h" #include #include #include +#include "atf-c/detail/test_helpers.h" #include "atf-c/utils.h" -#include "map.h" -#include "test_helpers.h" - /* --------------------------------------------------------------------- * Tests for the "atf_map" type. * --------------------------------------------------------------------- */ diff --git a/unit/atf-src/atf-c/detail/process.c b/unit/atf-src/atf-c/detail/process.c index bc36b570e7..8e08b6c574 100644 --- a/unit/atf-src/atf-c/detail/process.c +++ b/unit/atf-src/atf-c/detail/process.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007 The NetBSD Foundation, Inc. +/* Copyright (c) 2007 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/process.h" #include #include @@ -38,11 +36,9 @@ #include #include "atf-c/defs.h" +#include "atf-c/detail/sanity.h" #include "atf-c/error.h" -#include "process.h" -#include "sanity.h" - /* This prototype is not in the header file because this is a private * function; however, we need to access it during testing. */ atf_error_t atf_process_status_init(atf_process_status_t *, int); diff --git a/unit/atf-src/atf-c/detail/process.h b/unit/atf-src/atf-c/detail/process.h index b4aad3d93a..81158d0a5a 100644 --- a/unit/atf-src/atf-c/detail/process.h +++ b/unit/atf-src/atf-c/detail/process.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,21 +21,19 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined(ATF_C_PROCESS_H) -#define ATF_C_PROCESS_H +#if !defined(ATF_C_DETAIL_PROCESS_H) +#define ATF_C_DETAIL_PROCESS_H #include #include +#include +#include #include -#include "fs.h" -#include "list.h" - /* --------------------------------------------------------------------- * The "atf_process_stream" type. * --------------------------------------------------------------------- */ @@ -133,4 +128,4 @@ atf_error_t atf_process_exec_list(atf_process_status_t *, const atf_process_stream_t *, void (*)(void)); -#endif /* !defined(ATF_C_PROCESS_H) */ +#endif /* !defined(ATF_C_DETAIL_PROCESS_H) */ diff --git a/unit/atf-src/atf-c/detail/process_helpers.c b/unit/atf-src/atf-c/detail/process_helpers.c index 61f1b67c98..47b90bccf8 100644 --- a/unit/atf-src/atf-c/detail/process_helpers.c +++ b/unit/atf-src/atf-c/detail/process_helpers.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/unit/atf-src/atf-c/detail/process_test.c b/unit/atf-src/atf-c/detail/process_test.c index 9e55f70e32..5ae5565b6a 100644 --- a/unit/atf-src/atf-c/detail/process_test.c +++ b/unit/atf-src/atf-c/detail/process_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/process.h" #include #include @@ -43,10 +41,8 @@ #include #include "atf-c/defs.h" - -#include "process.h" -#include "sanity.h" -#include "test_helpers.h" +#include "atf-c/detail/sanity.h" +#include "atf-c/detail/test_helpers.h" atf_error_t atf_process_status_init(atf_process_status_t *, int); diff --git a/unit/atf-src/atf-c/detail/sanity.c b/unit/atf-src/atf-c/detail/sanity.c index d8a8905f2c..cfc8676beb 100644 --- a/unit/atf-src/atf-c/detail/sanity.c +++ b/unit/atf-src/atf-c/detail/sanity.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,11 +21,12 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/sanity.h" #if defined(HAVE_CONFIG_H) -#include "bconfig.h" +#include "config.h" #endif #include @@ -36,8 +34,6 @@ #include #include -#include "sanity.h" - static void fail(const char *fmt, ...) @@ -53,7 +49,7 @@ fail(const char *fmt, ...) warnx("This is probably a bug in this application or one of the " "libraries it uses. If you believe this problem is caused " "by, or is related to " PACKAGE_STRING ", please report it " - "to " PACKAGE_BUGREPORT " and provide as many detatils as " + "to " PACKAGE_BUGREPORT " and provide as many details as " "possible describing how you got to this condition."); abort(); diff --git a/unit/atf-src/atf-c/detail/sanity.h b/unit/atf-src/atf-c/detail/sanity.h index 161c6f0af7..33b5528e14 100644 --- a/unit/atf-src/atf-c/detail/sanity.h +++ b/unit/atf-src/atf-c/detail/sanity.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,11 +21,10 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined(ATF_C_SANITY_H) -#define ATF_C_SANITY_H +#if !defined(ATF_C_DETAIL_SANITY_H) +#define ATF_C_DETAIL_SANITY_H void atf_sanity_inv(const char *, int, const char *); void atf_sanity_pre(const char *, int, const char *); @@ -73,4 +69,4 @@ void atf_sanity_post(const char *, int, const char *); #define UNREACHABLE INV(0) -#endif /* ATF_C_SANITY_H */ +#endif /* !defined(ATF_C_DETAIL_SANITY_H) */ diff --git a/unit/atf-src/atf-c/detail/sanity_test.c b/unit/atf-src/atf-c/detail/sanity_test.c index 7c8285b519..a986c32ae3 100644 --- a/unit/atf-src/atf-c/detail/sanity_test.c +++ b/unit/atf-src/atf-c/detail/sanity_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,11 +21,12 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/sanity.h" #if defined(HAVE_CONFIG_H) -#include "bconfig.h" +#include "config.h" #endif #include @@ -42,10 +40,9 @@ #include -#include "dynstr.h" -#include "process.h" -#include "sanity.h" -#include "test_helpers.h" +#include "atf-c/detail/dynstr.h" +#include "atf-c/detail/process.h" +#include "atf-c/detail/test_helpers.h" /* --------------------------------------------------------------------- * Auxiliary functions. diff --git a/unit/atf-src/atf-c/detail/test_helpers.c b/unit/atf-src/atf-c/detail/test_helpers.c index aa64c12de4..827d46eeb8 100644 --- a/unit/atf-src/atf-c/detail/test_helpers.c +++ b/unit/atf-src/atf-c/detail/test_helpers.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,35 +21,34 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/test_helpers.h" #include #include #include #include +#include + #include "atf-c/build.h" #include "atf-c/check.h" -#include "atf-c/config.h" +#include "atf-c/detail/dynstr.h" +#include "atf-c/detail/env.h" +#include "atf-c/detail/fs.h" +#include "atf-c/detail/process.h" #include "atf-c/error.h" -#include "atf-c/macros.h" -#include "dynstr.h" -#include "fs.h" -#include "process.h" -#include "test_helpers.h" - -static -void -build_check_c_o_aux(const char *path, const char *failmsg, - const bool expect_pass) +bool +build_check_c_o(const char *path) { bool success; atf_dynstr_t iflag; const char *optargs[4]; - RE(atf_dynstr_init_fmt(&iflag, "-I%s", atf_config_get("atf_includedir"))); + RE(atf_dynstr_init_fmt(&iflag, "-I%s", atf_env_get_with_default( + "ATF_INCLUDEDIR", ATF_INCLUDEDIR))); optargs[0] = atf_dynstr_cstring(&iflag); optargs[1] = "-Wall"; @@ -63,20 +59,19 @@ build_check_c_o_aux(const char *path, const char *failmsg, atf_dynstr_fini(&iflag); - if ((expect_pass && !success) || (!expect_pass && success)) - atf_tc_fail("%s", failmsg); + return success; } -void -build_check_c_o(const atf_tc_t *tc, const char *sfile, const char *failmsg, - const bool expect_pass) +bool +build_check_c_o_srcdir(const atf_tc_t *tc, const char *sfile) { atf_fs_path_t path; RE(atf_fs_path_init_fmt(&path, "%s/%s", atf_tc_get_config_var(tc, "srcdir"), sfile)); - build_check_c_o_aux(atf_fs_path_cstring(&path), failmsg, expect_pass); + const bool result = build_check_c_o(atf_fs_path_cstring(&path)); atf_fs_path_fini(&path); + return result; } void @@ -93,7 +88,8 @@ header_check(const char *hdrname) snprintf(failmsg, sizeof(failmsg), "Header check failed; %s is not self-contained", hdrname); - build_check_c_o_aux("test.c", failmsg, true); + if (!build_check_c_o("test.c")) + atf_tc_fail("%s", failmsg); } void diff --git a/unit/atf-src/atf-c/detail/test_helpers.h b/unit/atf-src/atf-c/detail/test_helpers.h index 5df034fb42..a601c293ff 100644 --- a/unit/atf-src/atf-c/detail/test_helpers.h +++ b/unit/atf-src/atf-c/detail/test_helpers.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,18 +21,20 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if defined(TESTS_ATF_ATF_C_TEST_HELPERS_H) +#if defined(ATF_C_DETAIL_TEST_HELPERS_H) # error "Cannot include test_helpers.h more than once." #else -# define TESTS_ATF_ATF_C_TEST_HELPERS_H +# define ATF_C_DETAIL_TEST_HELPERS_H #endif #include -#include "atf-c/error_fwd.h" +#include + +#include +#include struct atf_dynstr; struct atf_fs_path; @@ -63,21 +62,12 @@ struct atf_fs_path; } \ ATF_TC_BODY(name, tc) \ { \ - build_check_c_o(tc, sfile, failmsg, true); \ + if (!build_check_c_o_srcdir(tc, sfile)) \ + atf_tc_fail("%s", failmsg); \ } -#define BUILD_TC_FAIL(name, sfile, descr, failmsg) \ - ATF_TC(name); \ - ATF_TC_HEAD(name, tc) \ - { \ - atf_tc_set_md_var(tc, "descr", descr); \ - } \ - ATF_TC_BODY(name, tc) \ - { \ - build_check_c_o(tc, sfile, failmsg, false); \ - } - -void build_check_c_o(const atf_tc_t *, const char *, const char *, const bool); +bool build_check_c_o(const char *); +bool build_check_c_o_srcdir(const atf_tc_t *, const char *); void header_check(const char *); void get_process_helpers_path(const atf_tc_t *, const bool, struct atf_fs_path *); diff --git a/unit/atf-src/atf-c/detail/text.c b/unit/atf-src/atf-c/detail/text.c index d91e8d1dcf..3b1d7e7fe2 100644 --- a/unit/atf-src/atf-c/detail/text.c +++ b/unit/atf-src/atf-c/detail/text.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,20 +21,19 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/text.h" #include #include #include #include +#include "atf-c/detail/dynstr.h" +#include "atf-c/detail/sanity.h" #include "atf-c/error.h" -#include "dynstr.h" -#include "sanity.h" -#include "text.h" - atf_error_t atf_text_for_each_word(const char *instr, const char *sep, atf_error_t (*func)(const char *, void *), diff --git a/unit/atf-src/atf-c/detail/text.h b/unit/atf-src/atf-c/detail/text.h index 8f8ddf4ccb..b2820b6b7c 100644 --- a/unit/atf-src/atf-c/detail/text.h +++ b/unit/atf-src/atf-c/detail/text.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,19 +21,17 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined(ATF_C_TEXT_H) -#define ATF_C_TEXT_H +#if !defined(ATF_C_DETAIL_TEXT_H) +#define ATF_C_DETAIL_TEXT_H #include #include +#include #include -#include "list.h" - atf_error_t atf_text_for_each_word(const char *, const char *, atf_error_t (*)(const char *, void *), void *); @@ -46,4 +41,4 @@ atf_error_t atf_text_split(const char *, const char *, atf_list_t *); atf_error_t atf_text_to_bool(const char *, bool *); atf_error_t atf_text_to_long(const char *, long *); -#endif /* ATF_C_TEXT_H */ +#endif /* !defined(ATF_C_DETAIL_TEXT_H) */ diff --git a/unit/atf-src/atf-c/detail/text_test.c b/unit/atf-src/atf-c/detail/text_test.c index 7bdf9c8312..5d6c8e56f4 100644 --- a/unit/atf-src/atf-c/detail/text_test.c +++ b/unit/atf-src/atf-c/detail/text_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/text.h" #include #include @@ -33,9 +31,8 @@ #include -#include "sanity.h" -#include "test_helpers.h" -#include "text.h" +#include "atf-c/detail/sanity.h" +#include "atf-c/detail/test_helpers.h" /* --------------------------------------------------------------------- * Auxiliary functions. diff --git a/unit/atf-src/atf-c/detail/tp_main.c b/unit/atf-src/atf-c/detail/tp_main.c index 2c773117f7..229615b481 100644 --- a/unit/atf-src/atf-c/detail/tp_main.c +++ b/unit/atf-src/atf-c/detail/tp_main.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,11 +21,10 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if defined(HAVE_CONFIG_H) -#include "bconfig.h" +#include "config.h" #endif #include @@ -38,17 +34,16 @@ #include #include +#include "atf-c/detail/dynstr.h" +#include "atf-c/detail/env.h" +#include "atf-c/detail/fs.h" +#include "atf-c/detail/map.h" +#include "atf-c/detail/sanity.h" #include "atf-c/error.h" #include "atf-c/tc.h" #include "atf-c/tp.h" #include "atf-c/utils.h" -#include "dynstr.h" -#include "env.h" -#include "fs.h" -#include "map.h" -#include "sanity.h" - #if defined(HAVE_GNU_GETOPT) # define GETOPT_POSIX "+" #else @@ -502,7 +497,7 @@ run_tc(const atf_tp_t *tp, struct params *p, int *exitcode) if (!atf_env_has("__RUNNING_INSIDE_ATF_RUN") || strcmp(atf_env_get( "__RUNNING_INSIDE_ATF_RUN"), "internal-yes-value") != 0) { - print_warning("Running test cases without atf-run(1) is unsupported"); + print_warning("Running test cases outside of kyua(1) is unsupported"); print_warning("No isolation nor timeout control is being applied; you " "may get unexpected failures; see atf-test-case(4)"); } diff --git a/unit/atf-src/atf-c/detail/user.c b/unit/atf-src/atf-c/detail/user.c index 5a89bf42b2..bbb4ded5e8 100644 --- a/unit/atf-src/atf-c/detail/user.c +++ b/unit/atf-src/atf-c/detail/user.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007 The NetBSD Foundation, Inc. +/* Copyright (c) 2007 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,16 +21,16 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/user.h" #include #include #include #include -#include "sanity.h" -#include "user.h" +#include "atf-c/detail/sanity.h" /* --------------------------------------------------------------------- * Free functions. diff --git a/unit/atf-src/atf-c/detail/user.h b/unit/atf-src/atf-c/detail/user.h index d682bcfb43..14a3e96cec 100644 --- a/unit/atf-src/atf-c/detail/user.h +++ b/unit/atf-src/atf-c/detail/user.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007 The NetBSD Foundation, Inc. +/* Copyright (c) 2007 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,11 +21,10 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if !defined(ATF_C_USER_H) -#define ATF_C_USER_H +#if !defined(ATF_C_DETAIL_USER_H) +#define ATF_C_DETAIL_USER_H #include @@ -46,4 +42,4 @@ bool atf_user_is_member_of_group(gid_t); bool atf_user_is_root(void); bool atf_user_is_unprivileged(void); -#endif /* !defined(ATF_C_USER_H) */ +#endif /* !defined(ATF_C_DETAIL_USER_H) */ diff --git a/unit/atf-src/atf-c/detail/user_test.c b/unit/atf-src/atf-c/detail/user_test.c index 0bf37e7e3e..6a0f6e158d 100644 --- a/unit/atf-src/atf-c/detail/user_test.c +++ b/unit/atf-src/atf-c/detail/user_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007 The NetBSD Foundation, Inc. +/* Copyright (c) 2007 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/detail/user.h" #include #include @@ -36,8 +34,7 @@ #include -#include "test_helpers.h" -#include "user.h" +#include "atf-c/detail/test_helpers.h" /* --------------------------------------------------------------------- * Test cases for the free functions. diff --git a/unit/atf-src/atf-c/detail/version_helper.c b/unit/atf-src/atf-c/detail/version_helper.c new file mode 100644 index 0000000000..fd48466de0 --- /dev/null +++ b/unit/atf-src/atf-c/detail/version_helper.c @@ -0,0 +1,43 @@ +/* + * Copyright 2014 Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Google Inc. nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif + +#include +#include + +int +main(void) +{ + printf("%s\n", PACKAGE_VERSION); + return EXIT_SUCCESS; +} diff --git a/unit/atf-src/atf-c/error.c b/unit/atf-src/atf-c/error.c index aeb55a8ba4..071daf6d24 100644 --- a/unit/atf-src/atf-c/error.c +++ b/unit/atf-src/atf-c/error.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,17 +21,16 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/error.h" #include #include #include #include -#include "atf-c/error.h" - -#include "detail/sanity.h" +#include "atf-c/detail/sanity.h" /* Theoretically, there can only be a single error intance at any given * point in time, because errors are raised at one point and must be diff --git a/unit/atf-src/atf-c/error.h b/unit/atf-src/atf-c/error.h index a8502801b0..260c0d07bf 100644 --- a/unit/atf-src/atf-c/error.h +++ b/unit/atf-src/atf-c/error.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,17 +21,16 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if !defined(ATF_C_ERROR_H) #define ATF_C_ERROR_H +#include + #include #include -#include - /* --------------------------------------------------------------------- * The "atf_error" type. * --------------------------------------------------------------------- */ @@ -68,4 +64,4 @@ const char *atf_libc_error_msg(const atf_error_t); atf_error_t atf_no_memory_error(void); -#endif /* ATF_C_ERROR_H */ +#endif /* !defined(ATF_C_ERROR_H) */ diff --git a/unit/atf-src/atf-c/error_fwd.h b/unit/atf-src/atf-c/error_fwd.h index 69d7e7dadb..d73e164b5c 100644 --- a/unit/atf-src/atf-c/error_fwd.h +++ b/unit/atf-src/atf-c/error_fwd.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if !defined(ATF_C_ERROR_FWD_H) #define ATF_C_ERROR_FWD_H @@ -37,4 +33,4 @@ struct atf_error; typedef struct atf_error *atf_error_t; -#endif /* ATF_C_ERROR_FWD_H */ +#endif /* !defined(ATF_C_ERROR_FWD_H) */ diff --git a/unit/atf-src/atf-c/error_test.c b/unit/atf-src/atf-c/error_test.c index 2c2a30789b..8bfa1249b3 100644 --- a/unit/atf-src/atf-c/error_test.c +++ b/unit/atf-src/atf-c/error_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/error.h" #include #include @@ -35,9 +33,6 @@ #include #include "atf-c/defs.h" -#include "atf-c/error.h" - -#include "detail/test_helpers.h" /* --------------------------------------------------------------------- * Auxiliary functions. @@ -276,13 +271,6 @@ ATF_TC_BODY(no_memory_twice, tc) } } -/* --------------------------------------------------------------------- - * Tests cases for the header file. - * --------------------------------------------------------------------- */ - -HEADER_TC(include, "atf-c/error.h"); -HEADER_TC(include_fwd, "atf-c/error_fwd.h"); - /* --------------------------------------------------------------------- * Main. * --------------------------------------------------------------------- */ @@ -305,9 +293,5 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, no_memory_format); ATF_TP_ADD_TC(tp, no_memory_twice); - /* Add the test cases for the header file. */ - ATF_TP_ADD_TC(tp, include); - ATF_TP_ADD_TC(tp, include_fwd); - return atf_no_error(); } diff --git a/unit/atf-src/atf-c/h_build.h b/unit/atf-src/atf-c/h_build.h index 9454fdfde8..c5ad1c75ef 100644 --- a/unit/atf-src/atf-c/h_build.h +++ b/unit/atf-src/atf-c/h_build.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2009 The NetBSD Foundation, Inc. +/* Copyright (c) 2009 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,13 +21,12 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#if defined(TESTS_ATF_ATF_C_H_BUILD_H) +#if defined(ATF_C_H_BUILD_H) # error "Cannot include h_build.h more than once." #else -# define TESTS_ATF_ATF_C_H_BUILD_H +# define ATF_C_H_BUILD_H #endif /* --------------------------------------------------------------------- diff --git a/unit/atf-src/atf-c/macros.h b/unit/atf-src/atf-c/macros.h index 7c33ccbc1e..485a159ace 100644 --- a/unit/atf-src/atf-c/macros.h +++ b/unit/atf-src/atf-c/macros.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if !defined(ATF_C_MACROS_H) #define ATF_C_MACROS_H @@ -131,55 +127,63 @@ return atfu_err; \ } while (0) -#define ATF_REQUIRE_MSG(x, fmt, ...) \ +#define ATF_REQUIRE_MSG(expression, fmt, ...) \ do { \ - if (!(x)) \ + if (!(expression)) \ atf_tc_fail_requirement(__FILE__, __LINE__, fmt, ##__VA_ARGS__); \ } while(0) -#define ATF_CHECK_MSG(x, fmt, ...) \ +#define ATF_CHECK_MSG(expression, fmt, ...) \ do { \ - if (!(x)) \ + if (!(expression)) \ atf_tc_fail_check(__FILE__, __LINE__, fmt, ##__VA_ARGS__); \ } while(0) -#define ATF_REQUIRE(x) \ +#define ATF_REQUIRE(expression) \ do { \ - if (!(x)) \ - atf_tc_fail_requirement(__FILE__, __LINE__, "%s", #x " not met"); \ + if (!(expression)) \ + atf_tc_fail_requirement(__FILE__, __LINE__, "%s", \ + #expression " not met"); \ } while(0) -#define ATF_CHECK(x) \ +#define ATF_CHECK(expression) \ do { \ - if (!(x)) \ - atf_tc_fail_check(__FILE__, __LINE__, "%s", #x " not met"); \ + if (!(expression)) \ + atf_tc_fail_check(__FILE__, __LINE__, "%s", \ + #expression " not met"); \ } while(0) -#define ATF_REQUIRE_EQ(x, y) \ - ATF_REQUIRE_MSG((x) == (y), "%s != %s", #x, #y) +#define ATF_REQUIRE_EQ(expected, actual) \ + ATF_REQUIRE_MSG((expected) == (actual), "%s != %s", #expected, #actual) -#define ATF_CHECK_EQ(x, y) \ - ATF_CHECK_MSG((x) == (y), "%s != %s", #x, #y) +#define ATF_CHECK_EQ(expected, actual) \ + ATF_CHECK_MSG((expected) == (actual), "%s != %s", #expected, #actual) -#define ATF_REQUIRE_EQ_MSG(x, y, fmt, ...) \ - ATF_REQUIRE_MSG((x) == (y), "%s != %s: " fmt, #x, #y, ##__VA_ARGS__) +#define ATF_REQUIRE_EQ_MSG(expected, actual, fmt, ...) \ + ATF_REQUIRE_MSG((expected) == (actual), "%s != %s: " fmt, \ + #expected, #actual, ##__VA_ARGS__) -#define ATF_CHECK_EQ_MSG(x, y, fmt, ...) \ - ATF_CHECK_MSG((x) == (y), "%s != %s: " fmt, #x, #y, ##__VA_ARGS__) +#define ATF_CHECK_EQ_MSG(expected, actual, fmt, ...) \ + ATF_CHECK_MSG((expected) == (actual), "%s != %s: " fmt, \ + #expected, #actual, ##__VA_ARGS__) -#define ATF_REQUIRE_STREQ(x, y) \ - ATF_REQUIRE_MSG(strcmp(x, y) == 0, "%s != %s (%s != %s)", #x, #y, x, y) +#define ATF_REQUIRE_STREQ(expected, actual) \ + ATF_REQUIRE_MSG(strcmp(expected, actual) == 0, "%s != %s (%s != %s)", \ + #expected, #actual, expected, actual) -#define ATF_CHECK_STREQ(x, y) \ - ATF_CHECK_MSG(strcmp(x, y) == 0, "%s != %s (%s != %s)", #x, #y, x, y) +#define ATF_CHECK_STREQ(expected, actual) \ + ATF_CHECK_MSG(strcmp(expected, actual) == 0, "%s != %s (%s != %s)", \ + #expected, #actual, expected, actual) -#define ATF_REQUIRE_STREQ_MSG(x, y, fmt, ...) \ - ATF_REQUIRE_MSG(strcmp(x, y) == 0, "%s != %s (%s != %s): " fmt, \ - #x, #y, x, y, ##__VA_ARGS__) +#define ATF_REQUIRE_STREQ_MSG(expected, actual, fmt, ...) \ + ATF_REQUIRE_MSG(strcmp(expected, actual) == 0, \ + "%s != %s (%s != %s): " fmt, \ + #expected, #actual, expected, actual, ##__VA_ARGS__) -#define ATF_CHECK_STREQ_MSG(x, y, fmt, ...) \ - ATF_CHECK_MSG(strcmp(x, y) == 0, "%s != %s (%s != %s): " fmt, \ - #x, #y, x, y, ##__VA_ARGS__) +#define ATF_CHECK_STREQ_MSG(expected, actual, fmt, ...) \ + ATF_CHECK_MSG(strcmp(expected, actual) == 0, \ + "%s != %s (%s != %s): " fmt, \ + #expected, #actual, expected, actual, ##__VA_ARGS__) #define ATF_REQUIRE_MATCH(regexp, string) \ ATF_REQUIRE_MSG(atf_utils_grep_string("%s", string, regexp), \ diff --git a/unit/atf-src/atf-c/macros_h_test.c b/unit/atf-src/atf-c/macros_h_test.c index 3dae471e4d..9525fcaae2 100644 --- a/unit/atf-src/atf-c/macros_h_test.c +++ b/unit/atf-src/atf-c/macros_h_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -87,6 +83,7 @@ ATF_TC(TEST_MACRO_1); ATF_TC_HEAD(TEST_MACRO_1, tc) { if (tc != NULL) {} } ATF_TC_BODY(TEST_MACRO_1, tc) { if (tc != NULL) {} } atf_tc_t *test_name_1 = &ATF_TC_NAME(TEST_MACRO_1); +atf_tc_pack_t *test_pack_1 = &ATF_TC_PACK_NAME(TEST_MACRO_1); void (*head_1)(atf_tc_t *) = ATF_TC_HEAD_NAME(TEST_MACRO_1); void (*body_1)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_1); ATF_TC_WITH_CLEANUP(TEST_MACRO_2); @@ -94,10 +91,12 @@ ATF_TC_HEAD(TEST_MACRO_2, tc) { if (tc != NULL) {} } ATF_TC_BODY(TEST_MACRO_2, tc) { if (tc != NULL) {} } ATF_TC_CLEANUP(TEST_MACRO_2, tc) { if (tc != NULL) {} } atf_tc_t *test_name_2 = &ATF_TC_NAME(TEST_MACRO_2); +atf_tc_pack_t *test_pack_2 = &ATF_TC_PACK_NAME(TEST_MACRO_2); void (*head_2)(atf_tc_t *) = ATF_TC_HEAD_NAME(TEST_MACRO_2); void (*body_2)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_2); void (*cleanup_2)(const atf_tc_t *) = ATF_TC_CLEANUP_NAME(TEST_MACRO_2); ATF_TC_WITHOUT_HEAD(TEST_MACRO_3); ATF_TC_BODY(TEST_MACRO_3, tc) { if (tc != NULL) {} } atf_tc_t *test_name_3 = &ATF_TC_NAME(TEST_MACRO_3); +atf_tc_pack_t *test_pack_3 = &ATF_TC_PACK_NAME(TEST_MACRO_3); void (*body_3)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_3); diff --git a/unit/atf-src/atf-c/macros_test.c b/unit/atf-src/atf-c/macros_test.c index f077a273d7..83578cda59 100644 --- a/unit/atf-src/atf-c/macros_test.c +++ b/unit/atf-src/atf-c/macros_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/macros.h" #include #include @@ -41,10 +39,10 @@ #include -#include "detail/fs.h" -#include "detail/process.h" -#include "detail/test_helpers.h" -#include "detail/text.h" +#include "atf-c/detail/fs.h" +#include "atf-c/detail/process.h" +#include "atf-c/detail/test_helpers.h" +#include "atf-c/detail/text.h" /* --------------------------------------------------------------------- * Auxiliary functions. @@ -837,17 +835,35 @@ ATF_TC_BODY(msg_embedded_fmt, tc) * Tests cases for the header file. * --------------------------------------------------------------------- */ -HEADER_TC(include, "atf-c/macros.h"); BUILD_TC(use, "macros_h_test.c", "Tests that the macros provided by the atf-c/macros.h file " "do not cause syntax errors when used", "Build of macros_h_test.c failed; some macros in atf-c/macros.h " "are broken"); -BUILD_TC_FAIL(detect_unused_tests, "unused_test.c", - "Tests that defining an unused test case raises a warning (and thus " - "an error)", - "Build of unused_test.c passed; unused test cases are not properly " - "detected"); + +ATF_TC(detect_unused_tests); +ATF_TC_HEAD(detect_unused_tests, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Tests that defining an unused test case raises a " + "warning (and thus an error)"); +} +ATF_TC_BODY(detect_unused_tests, tc) +{ + const char* validate_compiler = + "struct test_struct { int dummy; };\n" + "#define define_unused static struct test_struct unused\n" + "define_unused;\n"; + + atf_utils_create_file("compiler_test.c", "%s", validate_compiler); + if (build_check_c_o("compiler_test.c")) + atf_tc_expect_fail("Compiler does not raise a warning on an unused " + "static global variable declared by a macro"); + + if (build_check_c_o_srcdir(tc, "unused_test.c")) + atf_tc_fail("Build of unused_test.c passed; unused test cases are " + "not properly detected"); +} /* --------------------------------------------------------------------- * Main. @@ -870,7 +886,6 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, msg_embedded_fmt); /* Add the test cases for the header file. */ - ATF_TP_ADD_TC(tp, include); ATF_TP_ADD_TC(tp, use); ATF_TP_ADD_TC(tp, detect_unused_tests); diff --git a/unit/atf-src/atf-c/pkg_config_test.sh b/unit/atf-src/atf-c/pkg_config_test.sh index 8770808cad..ddffdb0ca1 100644 --- a/unit/atf-src/atf-c/pkg_config_test.sh +++ b/unit/atf-src/atf-c/pkg_config_test.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2008 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# # The following tests assume that the atf-c.pc file is installed in a # directory that is known by pkg-config. Otherwise they will fail, @@ -43,10 +39,8 @@ require_pc() check_version() { - atf_check -s eq:0 -o save:stdout -e empty -x \ - "atf-version | head -n 1 | cut -d ' ' -f 4" - ver1=$(cat stdout) - echo "Version reported by atf-version: ${ver1}" + ver1=$($(atf_get_srcdir)/detail/version_helper) + echo "Version reported by builtin PACKAGE_VERSION: ${ver1}" atf_check -s eq:0 -o save:stdout -e empty pkg-config --modversion "${1}" ver2=$(cat stdout) diff --git a/unit/atf-src/atf-c/tc.c b/unit/atf-src/atf-c/tc.c index 330ea0b924..f75d059871 100644 --- a/unit/atf-src/atf-c/tc.c +++ b/unit/atf-src/atf-c/tc.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/tc.h" #include #include @@ -41,14 +39,12 @@ #include #include "atf-c/defs.h" +#include "atf-c/detail/env.h" +#include "atf-c/detail/fs.h" +#include "atf-c/detail/map.h" +#include "atf-c/detail/sanity.h" +#include "atf-c/detail/text.h" #include "atf-c/error.h" -#include "atf-c/tc.h" - -#include "detail/env.h" -#include "detail/fs.h" -#include "detail/map.h" -#include "detail/sanity.h" -#include "detail/text.h" /* --------------------------------------------------------------------- * Auxiliary functions. diff --git a/unit/atf-src/atf-c/tc.h b/unit/atf-src/atf-c/tc.h index 3f24186b02..3fb695562a 100644 --- a/unit/atf-src/atf-c/tc.h +++ b/unit/atf-src/atf-c/tc.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if !defined(ATF_C_TC_H) #define ATF_C_TC_H @@ -137,4 +133,4 @@ void atf_tc_check_errno(const char *, const size_t, const int, void atf_tc_require_errno(const char *, const size_t, const int, const char *, const bool); -#endif /* ATF_C_TC_H */ +#endif /* !defined(ATF_C_TC_H) */ diff --git a/unit/atf-src/atf-c/tc_test.c b/unit/atf-src/atf-c/tc_test.c index 4aaf9a54c2..616c37e94e 100644 --- a/unit/atf-src/atf-c/tc_test.c +++ b/unit/atf-src/atf-c/tc_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,15 +21,16 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/tc.h" #include #include #include -#include "detail/test_helpers.h" +#include "atf-c/detail/test_helpers.h" /* --------------------------------------------------------------------- * Auxiliary test cases. @@ -166,12 +164,6 @@ ATF_TC_BODY(config, tcin) * but good tests here could allow us to avoid much of the indirect * testing done later on. */ -/* --------------------------------------------------------------------- - * Tests cases for the header file. - * --------------------------------------------------------------------- */ - -HEADER_TC(include, "atf-c/tc.h"); - /* --------------------------------------------------------------------- * Main. * --------------------------------------------------------------------- */ @@ -187,8 +179,5 @@ ATF_TP_ADD_TCS(tp) /* Add the test cases for the free functions. */ /* TODO */ - /* Add the test cases for the header file. */ - ATF_TP_ADD_TC(tp, include); - return atf_no_error(); } diff --git a/unit/atf-src/atf-c/tp.c b/unit/atf-src/atf-c/tp.c index 7833498ac1..f4f225772c 100644 --- a/unit/atf-src/atf-c/tp.c +++ b/unit/atf-src/atf-c/tp.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,21 +21,20 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/tp.h" #include #include #include #include +#include "atf-c/detail/fs.h" +#include "atf-c/detail/map.h" +#include "atf-c/detail/sanity.h" #include "atf-c/error.h" #include "atf-c/tc.h" -#include "atf-c/tp.h" - -#include "detail/fs.h" -#include "detail/map.h" -#include "detail/sanity.h" struct atf_tp_impl { atf_list_t m_tcs; diff --git a/unit/atf-src/atf-c/tp.h b/unit/atf-src/atf-c/tp.h index e4f9ba46e9..c176f7d96f 100644 --- a/unit/atf-src/atf-c/tp.h +++ b/unit/atf-src/atf-c/tp.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if !defined(ATF_C_TP_H) #define ATF_C_TP_H @@ -66,4 +62,4 @@ atf_error_t atf_tp_add_tc(atf_tp_t *, struct atf_tc *); atf_error_t atf_tp_run(const atf_tp_t *, const char *, const char *); atf_error_t atf_tp_cleanup(const atf_tp_t *, const char *); -#endif /* ATF_C_TP_H */ +#endif /* !defined(ATF_C_TP_H) */ diff --git a/unit/atf-src/atf-c/tp_test.c b/unit/atf-src/atf-c/tp_test.c index 5da18b20bd..de334a9748 100644 --- a/unit/atf-src/atf-c/tp_test.c +++ b/unit/atf-src/atf-c/tp_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2010 The NetBSD Foundation, Inc. +/* Copyright (c) 2010 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,16 +21,15 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/tp.h" #include #include #include -#include "detail/test_helpers.h" - ATF_TC(getopt); ATF_TC_HEAD(getopt, tc) { @@ -80,12 +76,6 @@ ATF_TC_BODY(getopt, tc) "invalid"); } -/* --------------------------------------------------------------------- - * Tests cases for the header file. - * --------------------------------------------------------------------- */ - -HEADER_TC(include, "atf-c/tp.h"); - /* --------------------------------------------------------------------- * Main. * --------------------------------------------------------------------- */ @@ -94,8 +84,5 @@ ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, getopt); - /* Add the test cases for the header file. */ - ATF_TP_ADD_TC(tp, include); - return atf_no_error(); } diff --git a/unit/atf-src/atf-c/unused_test.c b/unit/atf-src/atf-c/unused_test.c index e8de6823a3..1c5fda9323 100644 --- a/unit/atf-src/atf-c/unused_test.c +++ b/unit/atf-src/atf-c/unused_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2012 The NetBSD Foundation, Inc. +/* Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,10 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include ATF_TC(this_is_used); ATF_TC_HEAD(this_is_used, tc) diff --git a/unit/atf-src/atf-c/utils.c b/unit/atf-src/atf-c/utils.c index 4409f7a4fb..1e2aac1ed3 100644 --- a/unit/atf-src/atf-c/utils.c +++ b/unit/atf-src/atf-c/utils.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2010 The NetBSD Foundation, Inc. +/* Copyright (c) 2010 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "atf-c/utils.h" @@ -43,7 +39,35 @@ #include -#include "detail/dynstr.h" +#include "atf-c/detail/dynstr.h" + +/** Allocate a filename to be used by atf_utils_{fork,wait}. + * + * In case of a failure, marks the calling test as failed when in_parent is + * true, else terminates execution. + * + * \param [out] name String to contain the generated file. + * \param pid PID of the process that will write to the file. + * \param suffix Either "out" or "err". + * \param in_parent If true, fail with atf_tc_fail; else use err(3). */ +static void +init_out_filename(atf_dynstr_t *name, const pid_t pid, const char *suffix, + const bool in_parent) +{ + atf_error_t error; + + error = atf_dynstr_init_fmt(name, "atf_utils_fork_%d_%s.txt", + (int)pid, suffix); + if (atf_is_error(error)) { + char buffer[1024]; + atf_error_format(error, buffer, sizeof(buffer)); + if (in_parent) { + atf_tc_fail("Failed to create output file: %s", buffer); + } else { + err(EXIT_FAILURE, "Failed to create output file: %s", buffer); + } + } +} /** Searches for a regexp in a string. * @@ -232,8 +256,17 @@ atf_utils_fork(void) atf_tc_fail("fork failed"); if (pid == 0) { - atf_utils_redirect(STDOUT_FILENO, "atf_utils_fork_out.txt"); - atf_utils_redirect(STDERR_FILENO, "atf_utils_fork_err.txt"); + atf_dynstr_t out_name; + init_out_filename(&out_name, getpid(), "out", false); + + atf_dynstr_t err_name; + init_out_filename(&err_name, getpid(), "err", false); + + atf_utils_redirect(STDOUT_FILENO, atf_dynstr_cstring(&out_name)); + atf_utils_redirect(STDERR_FILENO, atf_dynstr_cstring(&err_name)); + + atf_dynstr_fini(&err_name); + atf_dynstr_fini(&out_name); } return pid; } @@ -385,8 +418,14 @@ atf_utils_wait(const pid_t pid, const int exitstatus, const char *expout, int status; ATF_REQUIRE(waitpid(pid, &status, 0) != -1); - atf_utils_cat_file("atf_utils_fork_out.txt", "subprocess stdout: "); - atf_utils_cat_file("atf_utils_fork_err.txt", "subprocess stderr: "); + atf_dynstr_t out_name; + init_out_filename(&out_name, pid, "out", true); + + atf_dynstr_t err_name; + init_out_filename(&err_name, pid, "err", true); + + atf_utils_cat_file(atf_dynstr_cstring(&out_name), "subprocess stdout: "); + atf_utils_cat_file(atf_dynstr_cstring(&err_name), "subprocess stderr: "); ATF_REQUIRE(WIFEXITED(status)); ATF_REQUIRE_EQ(exitstatus, WEXITSTATUS(status)); @@ -396,20 +435,22 @@ atf_utils_wait(const pid_t pid, const int exitstatus, const char *expout, if (strlen(expout) > save_prefix_length && strncmp(expout, save_prefix, save_prefix_length) == 0) { - atf_utils_copy_file("atf_utils_fork_out.txt", + atf_utils_copy_file(atf_dynstr_cstring(&out_name), expout + save_prefix_length); } else { - ATF_REQUIRE(atf_utils_compare_file("atf_utils_fork_out.txt", expout)); + ATF_REQUIRE(atf_utils_compare_file(atf_dynstr_cstring(&out_name), + expout)); } if (strlen(experr) > save_prefix_length && strncmp(experr, save_prefix, save_prefix_length) == 0) { - atf_utils_copy_file("atf_utils_fork_err.txt", + atf_utils_copy_file(atf_dynstr_cstring(&err_name), experr + save_prefix_length); } else { - ATF_REQUIRE(atf_utils_compare_file("atf_utils_fork_err.txt", experr)); + ATF_REQUIRE(atf_utils_compare_file(atf_dynstr_cstring(&err_name), + experr)); } - ATF_REQUIRE(unlink("atf_utils_fork_out.txt") != -1); - ATF_REQUIRE(unlink("atf_utils_fork_err.txt") != -1); + ATF_REQUIRE(unlink(atf_dynstr_cstring(&out_name)) != -1); + ATF_REQUIRE(unlink(atf_dynstr_cstring(&err_name)) != -1); } diff --git a/unit/atf-src/atf-c/utils.h b/unit/atf-src/atf-c/utils.h index 666804d3a2..e4162b215f 100644 --- a/unit/atf-src/atf-c/utils.h +++ b/unit/atf-src/atf-c/utils.h @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2010 The NetBSD Foundation, Inc. +/* Copyright (c) 2010 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if !defined(ATF_C_UTILS_H) #define ATF_C_UTILS_H @@ -51,4 +47,4 @@ char *atf_utils_readline(int); void atf_utils_redirect(const int, const char *); void atf_utils_wait(const pid_t, const int, const char *, const char *); -#endif /* ATF_C_UTILS_H */ +#endif /* !defined(ATF_C_UTILS_H) */ diff --git a/unit/atf-src/atf-c/utils_test.c b/unit/atf-src/atf-c/utils_test.c index 57d6af8d2a..fb81cd3a1d 100644 --- a/unit/atf-src/atf-c/utils_test.c +++ b/unit/atf-src/atf-c/utils_test.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2010 The NetBSD Foundation, Inc. +/* Copyright (c) 2010 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,9 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#include "atf-c/utils.h" #include #include @@ -39,9 +37,8 @@ #include -#include "atf-c/utils.h" - -#include "detail/test_helpers.h" +#include "atf-c/detail/dynstr.h" +#include "atf-c/detail/test_helpers.h" /** Reads the contents of a file into a buffer. * @@ -246,11 +243,19 @@ ATF_TC_BODY(fork, tc) ATF_REQUIRE(WIFEXITED(status)); ATF_REQUIRE_EQ(EXIT_SUCCESS, WEXITSTATUS(status)); + atf_dynstr_t out_name; + RE(atf_dynstr_init_fmt(&out_name, "atf_utils_fork_%d_out.txt", (int)pid)); + atf_dynstr_t err_name; + RE(atf_dynstr_init_fmt(&err_name, "atf_utils_fork_%d_err.txt", (int)pid)); + char buffer[1024]; - read_file("atf_utils_fork_out.txt", buffer, sizeof(buffer)); + read_file(atf_dynstr_cstring(&out_name), buffer, sizeof(buffer)); ATF_REQUIRE_STREQ("Child stdout\n", buffer); - read_file("atf_utils_fork_err.txt", buffer, sizeof(buffer)); + read_file(atf_dynstr_cstring(&err_name), buffer, sizeof(buffer)); ATF_REQUIRE_STREQ("Child stderr\n", buffer); + + atf_dynstr_fini(&err_name); + atf_dynstr_fini(&out_name); } ATF_TC_WITHOUT_HEAD(free_charpp__empty); @@ -384,6 +389,7 @@ static void fork_and_wait(const int exitstatus, const char* expout, const char* experr) { const pid_t pid = atf_utils_fork(); + ATF_REQUIRE(pid != -1); if (pid == 0) { fprintf(stdout, "Some output\n"); fprintf(stderr, "Some error\n"); @@ -408,6 +414,35 @@ ATF_TC_BODY(wait__ok, tc) } } +ATF_TC_WITHOUT_HEAD(wait__ok_nested); +ATF_TC_BODY(wait__ok_nested, tc) +{ + const pid_t parent = atf_utils_fork(); + ATF_REQUIRE(parent != -1); + if (parent == 0) { + const pid_t child = atf_utils_fork(); + ATF_REQUIRE(child != -1); + if (child == 0) { + fflush(stderr); + fprintf(stdout, "Child output\n"); + fflush(stdout); + fprintf(stderr, "Child error\n"); + exit(50); + } else { + fprintf(stdout, "Parent output\n"); + fprintf(stderr, "Parent error\n"); + atf_utils_wait(child, 50, "Child output\n", "Child error\n"); + exit(40); + } + } else { + atf_utils_wait(parent, 40, + "Parent output\n" + "subprocess stdout: Child output\n" + "subprocess stderr: Child error\n", + "Parent error\n"); + } +} + ATF_TC_WITHOUT_HEAD(wait__invalid_exitstatus); ATF_TC_BODY(wait__invalid_exitstatus, tc) { @@ -487,8 +522,6 @@ ATF_TC_BODY(wait__save_stderr, tc) } } -HEADER_TC(include, "atf-c/utils.h"); - ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, cat_file__empty); @@ -526,13 +559,12 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, redirect__other); ATF_TP_ADD_TC(tp, wait__ok); + ATF_TP_ADD_TC(tp, wait__ok_nested); ATF_TP_ADD_TC(tp, wait__save_stdout); ATF_TP_ADD_TC(tp, wait__save_stderr); ATF_TP_ADD_TC(tp, wait__invalid_exitstatus); ATF_TP_ADD_TC(tp, wait__invalid_stdout); ATF_TP_ADD_TC(tp, wait__invalid_stderr); - ATF_TP_ADD_TC(tp, include); - return atf_no_error(); } diff --git a/unit/atf-src/atf-config/Atffile b/unit/atf-src/atf-config/Atffile deleted file mode 100644 index 146211e000..0000000000 --- a/unit/atf-src/atf-config/Atffile +++ /dev/null @@ -1,5 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp-glob: *_test diff --git a/unit/atf-src/atf-config/Kyuafile b/unit/atf-src/atf-config/Kyuafile deleted file mode 100644 index 8ba4da8288..0000000000 --- a/unit/atf-src/atf-config/Kyuafile +++ /dev/null @@ -1,5 +0,0 @@ -syntax("kyuafile", 1) - -test_suite("atf") - -atf_test_program{name="integration_test"} diff --git a/unit/atf-src/atf-config/Makefile.am.inc b/unit/atf-src/atf-config/Makefile.am.inc deleted file mode 100644 index 0f32778aad..0000000000 --- a/unit/atf-src/atf-config/Makefile.am.inc +++ /dev/null @@ -1,48 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -bin_PROGRAMS += atf-config/atf-config -atf_config_atf_config_SOURCES = atf-config/atf-config.cpp -atf_config_atf_config_LDADD = $(ATF_CXX_LIBS) -dist_man_MANS += atf-config/atf-config.1 - -tests_atf_config_DATA = atf-config/Atffile \ - atf-config/Kyuafile -tests_atf_configdir = $(pkgtestsdir)/atf-config -EXTRA_DIST += $(tests_atf_config_DATA) - -tests_atf_config_SCRIPTS = atf-config/integration_test -CLEANFILES += atf-config/integration_test -EXTRA_DIST += atf-config/integration_test.sh -atf-config/integration_test: $(srcdir)/atf-config/integration_test.sh - test -d atf-config || mkdir -p atf-config - @src="$(srcdir)/atf-config/integration_test.sh"; \ - dst="atf-config/integration_test"; $(BUILD_SH_TP) - -# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 diff --git a/unit/atf-src/atf-report/Atffile b/unit/atf-src/atf-report/Atffile deleted file mode 100644 index 146211e000..0000000000 --- a/unit/atf-src/atf-report/Atffile +++ /dev/null @@ -1,5 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp-glob: *_test diff --git a/unit/atf-src/atf-report/Kyuafile b/unit/atf-src/atf-report/Kyuafile deleted file mode 100644 index d69e3fa54d..0000000000 --- a/unit/atf-src/atf-report/Kyuafile +++ /dev/null @@ -1,6 +0,0 @@ -syntax("kyuafile", 1) - -test_suite("atf") - -atf_test_program{name="integration_test"} -atf_test_program{name="reader_test"} diff --git a/unit/atf-src/atf-report/Makefile.am.inc b/unit/atf-src/atf-report/Makefile.am.inc deleted file mode 100644 index e62275e64e..0000000000 --- a/unit/atf-src/atf-report/Makefile.am.inc +++ /dev/null @@ -1,80 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -bin_PROGRAMS += atf-report/atf-report -atf_report_atf_report_SOURCES = atf-report/atf-report.cpp \ - atf-report/reader.cpp \ - atf-report/reader.hpp -atf_report_atf_report_LDADD = $(ATF_CXX_LIBS) -dist_man_MANS += atf-report/atf-report.1 - -cssdir = $(atf_cssdir) -css_DATA = atf-report/tests-results.css -EXTRA_DIST += $(css_DATA) - -dtddir = $(atf_dtddir) -dtd_DATA = atf-report/tests-results.dtd -EXTRA_DIST += $(dtd_DATA) - -xsldir = $(atf_xsldir) -xsl_DATA = atf-report/tests-results.xsl -EXTRA_DIST += $(xsl_DATA) - -tests_atf_report_DATA = atf-report/Atffile \ - atf-report/Kyuafile -tests_atf_reportdir = $(pkgtestsdir)/atf-report -EXTRA_DIST += $(tests_atf_report_DATA) - -tests_atf_report_PROGRAMS = atf-report/fail_helper -atf_report_fail_helper_SOURCES = atf-report/fail_helper.cpp -atf_report_fail_helper_LDADD = $(ATF_CXX_LIBS) - -tests_atf_report_PROGRAMS += atf-report/misc_helpers -atf_report_misc_helpers_SOURCES = atf-report/misc_helpers.cpp -atf_report_misc_helpers_LDADD = $(ATF_CXX_LIBS) - -tests_atf_report_PROGRAMS += atf-report/pass_helper -atf_report_pass_helper_SOURCES = atf-report/pass_helper.cpp -atf_report_pass_helper_LDADD = $(ATF_CXX_LIBS) - -tests_atf_report_SCRIPTS = atf-report/integration_test -CLEANFILES += atf-report/integration_test -EXTRA_DIST += atf-report/integration_test.sh -atf-report/integration_test: $(srcdir)/atf-report/integration_test.sh - test -d atf-report || mkdir -p atf-report - @src="$(srcdir)/atf-report/integration_test.sh"; \ - dst="atf-report/integration_test"; $(BUILD_SH_TP) - -tests_atf_report_PROGRAMS += atf-report/reader_test -atf_report_reader_test_SOURCES = atf-report/reader_test.cpp \ - atf-report/reader.cpp -atf_report_reader_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail -atf_report_reader_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) - -# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 diff --git a/unit/atf-src/atf-report/pass_helper.cpp b/unit/atf-src/atf-report/pass_helper.cpp deleted file mode 100644 index b752b131b3..0000000000 --- a/unit/atf-src/atf-report/pass_helper.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007 The NetBSD Foundation, Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -#include "atf-c++/macros.hpp" - -ATF_TEST_CASE(main); -ATF_TEST_CASE_HEAD(main) -{ - set_md_var("descr", "Helper test case that always passes"); -} -ATF_TEST_CASE_BODY(main) -{ -} - -ATF_INIT_TEST_CASES(tcs) -{ - ATF_ADD_TEST_CASE(tcs, main); -} diff --git a/unit/atf-src/atf-run/Atffile b/unit/atf-src/atf-run/Atffile deleted file mode 100644 index 146211e000..0000000000 --- a/unit/atf-src/atf-run/Atffile +++ /dev/null @@ -1,5 +0,0 @@ -Content-Type: application/X-atf-atffile; version="1" - -prop: test-suite = atf - -tp-glob: *_test diff --git a/unit/atf-src/atf-run/Kyuafile b/unit/atf-src/atf-run/Kyuafile deleted file mode 100644 index 305d699e16..0000000000 --- a/unit/atf-src/atf-run/Kyuafile +++ /dev/null @@ -1,13 +0,0 @@ -syntax("kyuafile", 1) - -test_suite("atf") - -atf_test_program{name="atffile_test"} -atf_test_program{name="config_test"} -atf_test_program{name="fs_test"} -atf_test_program{name="integration_test"} -atf_test_program{name="io_test"} -atf_test_program{name="requirements_test"} -atf_test_program{name="signals_test"} -atf_test_program{name="test_program_test"} -atf_test_program{name="user_test"} diff --git a/unit/atf-src/atf-run/Makefile.am.inc b/unit/atf-src/atf-run/Makefile.am.inc deleted file mode 100644 index 7eb8333b31..0000000000 --- a/unit/atf-src/atf-run/Makefile.am.inc +++ /dev/null @@ -1,150 +0,0 @@ -# -# Automated Testing Framework (atf) -# -# Copyright (c) 2007 The NetBSD Foundation, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -bin_PROGRAMS += atf-run/atf-run -atf_run_atf_run_CPPFLAGS = "-DGDB=\"$(GDB)\"" -atf_run_atf_run_SOURCES = atf-run/atf-run.cpp \ - atf-run/atffile.cpp \ - atf-run/atffile.hpp \ - atf-run/config.cpp \ - atf-run/config.hpp \ - atf-run/fs.cpp \ - atf-run/fs.hpp \ - atf-run/io.cpp \ - atf-run/io.hpp \ - atf-run/requirements.cpp \ - atf-run/requirements.hpp \ - atf-run/signals.cpp \ - atf-run/signals.hpp \ - atf-run/test-program.cpp \ - atf-run/test-program.hpp \ - atf-run/timer.cpp \ - atf-run/timer.hpp \ - atf-run/user.cpp \ - atf-run/user.hpp -atf_run_atf_run_LDADD = $(ATF_CXX_LIBS) -dist_man_MANS += atf-run/atf-run.1 - -tests_atf_run_DATA = atf-run/Atffile \ - atf-run/Kyuafile -tests_atf_rundir = $(pkgtestsdir)/atf-run -EXTRA_DIST += $(tests_atf_run_DATA) - -tests_atf_run_PROGRAMS = atf-run/atffile_test -atf_run_atffile_test_SOURCES = atf-run/atffile_test.cpp \ - atf-run/atffile.cpp -atf_run_atffile_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail -atf_run_atffile_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) - -tests_atf_run_PROGRAMS += atf-run/bad_metadata_helper -atf_run_bad_metadata_helper_SOURCES = atf-run/bad_metadata_helper.c -atf_run_bad_metadata_helper_LDADD = libatf-c.la - -tests_atf_run_PROGRAMS += atf-run/config_test -atf_run_config_test_SOURCES = atf-run/config_test.cpp \ - atf-run/config.cpp -atf_run_config_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail -atf_run_config_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) - -tests_atf_run_PROGRAMS += atf-run/expect_helpers -atf_run_expect_helpers_SOURCES = atf-run/expect_helpers.c -atf_run_expect_helpers_LDADD = libatf-c.la - -tests_atf_run_PROGRAMS += atf-run/fs_test -atf_run_fs_test_SOURCES = atf-run/fs_test.cpp \ - atf-run/fs.cpp \ - atf-run/user.cpp -atf_run_fs_test_LDADD = $(ATF_CXX_LIBS) - -tests_atf_run_PROGRAMS += atf-run/io_test -atf_run_io_test_SOURCES = atf-run/io_test.cpp \ - atf-run/io.cpp \ - atf-run/signals.cpp -atf_run_io_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) - -tests_atf_run_PROGRAMS += atf-run/misc_helpers -atf_run_misc_helpers_SOURCES = atf-run/misc_helpers.cpp -atf_run_misc_helpers_LDADD = $(ATF_CXX_LIBS) - -tests_atf_run_PROGRAMS += atf-run/pass_helper -atf_run_pass_helper_SOURCES = atf-run/pass_helper.cpp -atf_run_pass_helper_LDADD = $(ATF_CXX_LIBS) - -tests_atf_run_PROGRAMS += atf-run/several_tcs_helper -atf_run_several_tcs_helper_SOURCES = atf-run/several_tcs_helper.c -atf_run_several_tcs_helper_LDADD = libatf-c.la - -tests_atf_run_PROGRAMS += atf-run/requirements_test -atf_run_requirements_test_SOURCES = atf-run/requirements_test.cpp \ - atf-run/requirements.cpp \ - atf-run/user.cpp -atf_run_requirements_test_LDADD = $(ATF_CXX_LIBS) - -tests_atf_run_PROGRAMS += atf-run/signals_test -atf_run_signals_test_SOURCES = atf-run/signals_test.cpp atf-run/signals.cpp -atf_run_signals_test_LDADD = $(ATF_CXX_LIBS) - -tests_atf_run_PROGRAMS += atf-run/test_program_test -atf_run_test_program_test_SOURCES = atf-run/test_program_test.cpp \ - atf-run/fs.cpp \ - atf-run/io.cpp \ - atf-run/requirements.cpp \ - atf-run/signals.cpp \ - atf-run/test-program.cpp \ - atf-run/timer.cpp \ - atf-run/user.cpp -atf_run_test_program_test_CPPFLAGS = -I$(srcdir)/atf-c++/detail -atf_run_test_program_test_LDADD = atf-c++/detail/libtest_helpers.la $(ATF_CXX_LIBS) - -tests_atf_run_PROGRAMS += atf-run/user_test -atf_run_user_test_SOURCES = atf-run/user_test.cpp atf-run/user.cpp -atf_run_user_test_LDADD = $(ATF_CXX_LIBS) - -tests_atf_run_PROGRAMS += atf-run/zero_tcs_helper -atf_run_zero_tcs_helper_SOURCES = atf-run/zero_tcs_helper.c -atf_run_zero_tcs_helper_LDADD = libatf-c.la - -tests_atf_run_SCRIPTS = atf-run/integration_test -CLEANFILES += atf-run/integration_test -EXTRA_DIST += atf-run/integration_test.sh -atf-run/integration_test: $(srcdir)/atf-run/integration_test.sh - test -d atf-run || mkdir -p atf-run - @src="$(srcdir)/atf-run/integration_test.sh"; \ - dst="atf-run/integration_test"; $(BUILD_SH_TP) - -hooksdir = $(pkgdatadir) -hooks_DATA = atf-run/share/atf-run.hooks -EXTRA_DIST += $(hooks_DATA) - -egdir = $(atf_egdir) -eg_DATA = atf-run/sample/atf-run.hooks -eg_DATA += atf-run/sample/common.conf -EXTRA_DIST += $(eg_DATA) - -# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 diff --git a/unit/atf-src/atf-run/fs.cpp b/unit/atf-src/atf-run/fs.cpp deleted file mode 100644 index e84a90da73..0000000000 --- a/unit/atf-src/atf-run/fs.cpp +++ /dev/null @@ -1,265 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007 The NetBSD Foundation, Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -#if defined(HAVE_CONFIG_H) -#include "bconfig.h" -#endif - -extern "C" { -#include -#include -#include -#include - -#include -} - -#include -#include -#include - -#include "atf-c++/detail/auto_array.hpp" -#include "atf-c++/detail/process.hpp" -#include "atf-c++/detail/sanity.hpp" - -#include "fs.hpp" -#include "user.hpp" - -namespace impl = atf::atf_run; -#define IMPL_NAME "atf::atf_run" - -// ------------------------------------------------------------------------ -// Auxiliary functions. -// ------------------------------------------------------------------------ - -static void cleanup_aux(const atf::fs::path&, dev_t, bool); -static void cleanup_aux_dir(const atf::fs::path&, const atf::fs::file_info&, - bool); -static void do_unmount(const atf::fs::path&); - -// The cleanup routines below are tricky: they are executed immediately after -// a test case's death, and after we have forcibly killed any stale processes. -// However, even if the processes are dead, this does not mean that the file -// system we are scanning is stable. In particular, if the test case has -// mounted file systems through fuse/puffs, the fact that the processes died -// does not mean that the file system is truly unmounted. -// -// The code below attempts to cope with this by catching errors and either -// ignoring them or retrying the actions on the same file/directory a few times -// before giving up. -static const int max_retries = 5; -static const int retry_delay_in_seconds = 1; - -// The erase parameter in this routine is to control nested mount points. -// We want to descend into a mount point to unmount anything that is -// mounted under it, but we do not want to delete any files while doing -// this traversal. In other words, we erase files until we cross the -// first mount point, and after that point we only scan and unmount. -static -void -cleanup_aux(const atf::fs::path& p, dev_t parent_device, bool erase) -{ - try { - atf::fs::file_info fi(p); - - if (fi.get_type() == atf::fs::file_info::dir_type) - cleanup_aux_dir(p, fi, fi.get_device() == parent_device); - - if (fi.get_device() != parent_device) - do_unmount(p); - - if (erase) { - if (fi.get_type() == atf::fs::file_info::dir_type) - atf::fs::rmdir(p); - else - atf::fs::remove(p); - } - } catch (const atf::system_error& e) { - if (e.code() != ENOENT && e.code() != ENOTDIR) - throw e; - } -} - -static -void -cleanup_aux_dir(const atf::fs::path& p, const atf::fs::file_info& fi, - bool erase) -{ - if (erase && ((fi.get_mode() & S_IRWXU) != S_IRWXU)) { - int retries = max_retries; -retry_chmod: - if (chmod(p.c_str(), fi.get_mode() | S_IRWXU) == -1) { - if (retries > 0) { - retries--; - ::sleep(retry_delay_in_seconds); - goto retry_chmod; - } else { - throw atf::system_error(IMPL_NAME "::cleanup(" + - p.str() + ")", "chmod(2) failed", - errno); - } - } - } - - std::set< std::string > subdirs; - { - bool ok = false; - int retries = max_retries; - while (!ok) { - INV(retries > 0); - try { - const atf::fs::directory d(p); - subdirs = d.names(); - ok = true; - } catch (const atf::system_error& e) { - retries--; - if (retries == 0) - throw e; - ::sleep(retry_delay_in_seconds); - } - } - INV(ok); - } - - for (std::set< std::string >::const_iterator iter = subdirs.begin(); - iter != subdirs.end(); iter++) { - const std::string& name = *iter; - if (name != "." && name != "..") - cleanup_aux(p / name, fi.get_device(), erase); - } -} - -static -void -do_unmount(const atf::fs::path& in_path) -{ - // At least, FreeBSD's unmount(2) requires the path to be absolute. - // Let's make it absolute in all cases just to be safe that this does - // not affect other systems. - const atf::fs::path& abs_path = in_path.is_absolute() ? - in_path : in_path.to_absolute(); - -#if defined(HAVE_UNMOUNT) - int retries = max_retries; -retry_unmount: - if (unmount(abs_path.c_str(), 0) == -1) { - if (errno == EBUSY && retries > 0) { - retries--; - ::sleep(retry_delay_in_seconds); - goto retry_unmount; - } else { - throw atf::system_error(IMPL_NAME "::cleanup(" + in_path.str() + - ")", "unmount(2) failed", errno); - } - } -#else - // We could use umount(2) instead if it was available... but - // trying to do so under, e.g. Linux, is a nightmare because we - // also have to update /etc/mtab to match what we did. It is - // satf::fser to just leave the system-specific umount(8) tool deal - // with it, at least for now. - - const atf::fs::path prog("umount"); - atf::process::argv_array argv("umount", abs_path.c_str(), NULL); - - atf::process::status s = atf::process::exec(prog, argv, - atf::process::stream_inherit(), atf::process::stream_inherit()); - if (!s.exited() || s.exitstatus() != EXIT_SUCCESS) - throw std::runtime_error("Call to unmount failed"); -#endif -} - -// ------------------------------------------------------------------------ -// The "temp_dir" class. -// ------------------------------------------------------------------------ - -impl::temp_dir::temp_dir(const atf::fs::path& p) -{ - atf::auto_array< char > buf(new char[p.str().length() + 1]); - std::strcpy(buf.get(), p.c_str()); - if (::mkdtemp(buf.get()) == NULL) - throw system_error(IMPL_NAME "::temp_dir::temp_dir(" + - p.str() + ")", "mkdtemp(3) failed", - errno); - - m_path.reset(new atf::fs::path(buf.get())); -} - -impl::temp_dir::~temp_dir(void) -{ - cleanup(*m_path); -} - -const atf::fs::path& -impl::temp_dir::get_path(void) - const -{ - return *m_path; -} - -// ------------------------------------------------------------------------ -// Free functions. -// ------------------------------------------------------------------------ - -atf::fs::path -impl::change_directory(const atf::fs::path& dir) -{ - atf::fs::path olddir = get_current_dir(); - - if (olddir != dir) { - if (::chdir(dir.c_str()) == -1) - throw system_error(IMPL_NAME "::chdir(" + dir.str() + ")", - "chdir(2) failed", errno); - } - - return olddir; -} - -void -impl::cleanup(const atf::fs::path& p) -{ - atf::fs::file_info fi(p); - cleanup_aux(p, fi.get_device(), true); -} - -atf::fs::path -impl::get_current_dir(void) -{ - std::auto_ptr< char > cwd; -#if defined(HAVE_GETCWD_DYN) - cwd.reset(getcwd(NULL, 0)); -#else - cwd.reset(getcwd(NULL, MAXPATHLEN)); -#endif - if (cwd.get() == NULL) - throw atf::system_error(IMPL_NAME "::get_current_dir()", - "getcwd() failed", errno); - - return atf::fs::path(cwd.get()); -} diff --git a/unit/atf-src/atf-run/fs_test.cpp b/unit/atf-src/atf-run/fs_test.cpp deleted file mode 100644 index f03045eb61..0000000000 --- a/unit/atf-src/atf-run/fs_test.cpp +++ /dev/null @@ -1,260 +0,0 @@ -// -// Automated Testing Framework (atf) -// -// Copyright (c) 2007 The NetBSD Foundation, Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// - -extern "C" { -#include -#include -} - -#include -#include - -#include "atf-c++/macros.hpp" - -#include "atf-c++/detail/exceptions.hpp" -#include "atf-c++/detail/fs.hpp" - -#include "fs.hpp" -#include "user.hpp" - -// ------------------------------------------------------------------------ -// Auxiliary functions. -// ------------------------------------------------------------------------ - -static -void -create_file(const char *name) -{ - std::ofstream os(name); - os.close(); -} - -// ------------------------------------------------------------------------ -// Test cases for the "temp_dir" class. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(temp_dir_raii); -ATF_TEST_CASE_HEAD(temp_dir_raii) -{ - set_md_var("descr", "Tests the RAII behavior of the temp_dir class"); -} -ATF_TEST_CASE_BODY(temp_dir_raii) -{ - using atf::atf_run::temp_dir; - - atf::fs::path t1("non-existent"); - atf::fs::path t2("non-existent"); - - { - atf::fs::path tmpl("testdir.XXXXXX"); - temp_dir td1(tmpl); - temp_dir td2(tmpl); - t1 = td1.get_path(); - t2 = td2.get_path(); - ATF_REQUIRE(t1.str().find("XXXXXX") == std::string::npos); - ATF_REQUIRE(t2.str().find("XXXXXX") == std::string::npos); - ATF_REQUIRE(t1 != t2); - ATF_REQUIRE(!atf::fs::exists(tmpl)); - ATF_REQUIRE( atf::fs::exists(t1)); - ATF_REQUIRE( atf::fs::exists(t2)); - - atf::fs::file_info fi1(t1); - ATF_REQUIRE( fi1.is_owner_readable()); - ATF_REQUIRE( fi1.is_owner_writable()); - ATF_REQUIRE( fi1.is_owner_executable()); - ATF_REQUIRE(!fi1.is_group_readable()); - ATF_REQUIRE(!fi1.is_group_writable()); - ATF_REQUIRE(!fi1.is_group_executable()); - ATF_REQUIRE(!fi1.is_other_readable()); - ATF_REQUIRE(!fi1.is_other_writable()); - ATF_REQUIRE(!fi1.is_other_executable()); - - atf::fs::file_info fi2(t2); - ATF_REQUIRE( fi2.is_owner_readable()); - ATF_REQUIRE( fi2.is_owner_writable()); - ATF_REQUIRE( fi2.is_owner_executable()); - ATF_REQUIRE(!fi2.is_group_readable()); - ATF_REQUIRE(!fi2.is_group_writable()); - ATF_REQUIRE(!fi2.is_group_executable()); - ATF_REQUIRE(!fi2.is_other_readable()); - ATF_REQUIRE(!fi2.is_other_writable()); - ATF_REQUIRE(!fi2.is_other_executable()); - } - - ATF_REQUIRE(t1.str() != "non-existent"); - ATF_REQUIRE(!atf::fs::exists(t1)); - ATF_REQUIRE(t2.str() != "non-existent"); - ATF_REQUIRE(!atf::fs::exists(t2)); -} - - -// ------------------------------------------------------------------------ -// Test cases for the free functions. -// ------------------------------------------------------------------------ - -ATF_TEST_CASE(cleanup); -ATF_TEST_CASE_HEAD(cleanup) -{ - set_md_var("descr", "Tests the cleanup function"); -} -ATF_TEST_CASE_BODY(cleanup) -{ - using atf::atf_run::cleanup; - - ::mkdir("root", 0755); - ::mkdir("root/dir", 0755); - ::mkdir("root/dir/1", 0100); - ::mkdir("root/dir/2", 0644); - create_file("root/reg"); - - atf::fs::path p("root"); - ATF_REQUIRE(atf::fs::exists(p)); - ATF_REQUIRE(atf::fs::exists(p / "dir")); - ATF_REQUIRE(atf::fs::exists(p / "dir/1")); - ATF_REQUIRE(atf::fs::exists(p / "dir/2")); - ATF_REQUIRE(atf::fs::exists(p / "reg")); - cleanup(p); - ATF_REQUIRE(!atf::fs::exists(p)); -} - -ATF_TEST_CASE(cleanup_eacces_on_root); -ATF_TEST_CASE_HEAD(cleanup_eacces_on_root) -{ - set_md_var("descr", "Tests the cleanup function"); -} -ATF_TEST_CASE_BODY(cleanup_eacces_on_root) -{ - using atf::atf_run::cleanup; - - ::mkdir("aux", 0755); - ::mkdir("aux/root", 0755); - ATF_REQUIRE(::chmod("aux", 0555) != -1); - - try { - cleanup(atf::fs::path("aux/root")); - ATF_REQUIRE(atf::atf_run::is_root()); - } catch (const atf::system_error& e) { - ATF_REQUIRE(!atf::atf_run::is_root()); - ATF_REQUIRE_EQ(EACCES, e.code()); - } -} - -ATF_TEST_CASE(cleanup_eacces_on_subdir); -ATF_TEST_CASE_HEAD(cleanup_eacces_on_subdir) -{ - set_md_var("descr", "Tests the cleanup function"); -} -ATF_TEST_CASE_BODY(cleanup_eacces_on_subdir) -{ - using atf::atf_run::cleanup; - - ::mkdir("root", 0755); - ::mkdir("root/1", 0755); - ::mkdir("root/1/2", 0755); - ::mkdir("root/1/2/3", 0755); - ATF_REQUIRE(::chmod("root/1/2", 0555) != -1); - ATF_REQUIRE(::chmod("root/1", 0555) != -1); - - const atf::fs::path p("root"); - cleanup(p); - ATF_REQUIRE(!atf::fs::exists(p)); -} - -ATF_TEST_CASE(change_directory); -ATF_TEST_CASE_HEAD(change_directory) -{ - set_md_var("descr", "Tests the change_directory function"); -} -ATF_TEST_CASE_BODY(change_directory) -{ - using atf::atf_run::change_directory; - using atf::atf_run::get_current_dir; - - ::mkdir("files", 0755); - ::mkdir("files/dir", 0755); - create_file("files/reg"); - - const atf::fs::path old = get_current_dir(); - - ATF_REQUIRE_THROW(atf::system_error, - change_directory(atf::fs::path("files/reg"))); - ATF_REQUIRE(get_current_dir() == old); - - atf::fs::path old2 = change_directory(atf::fs::path("files")); - ATF_REQUIRE(old2 == old); - atf::fs::path old3 = change_directory(atf::fs::path("dir")); - ATF_REQUIRE(old3 == old2 / "files"); - atf::fs::path old4 = change_directory(atf::fs::path("../..")); - ATF_REQUIRE(old4 == old3 / "dir"); - ATF_REQUIRE(get_current_dir() == old); -} - -ATF_TEST_CASE(get_current_dir); -ATF_TEST_CASE_HEAD(get_current_dir) -{ - set_md_var("descr", "Tests the get_current_dir function"); -} -ATF_TEST_CASE_BODY(get_current_dir) -{ - using atf::atf_run::change_directory; - using atf::atf_run::get_current_dir; - - ::mkdir("files", 0755); - ::mkdir("files/dir", 0755); - create_file("files/reg"); - - atf::fs::path curdir = get_current_dir(); - change_directory(atf::fs::path(".")); - ATF_REQUIRE(get_current_dir() == curdir); - change_directory(atf::fs::path("files")); - ATF_REQUIRE(get_current_dir() == curdir / "files"); - change_directory(atf::fs::path("dir")); - ATF_REQUIRE(get_current_dir() == curdir / "files/dir"); - change_directory(atf::fs::path("..")); - ATF_REQUIRE(get_current_dir() == curdir / "files"); - change_directory(atf::fs::path("..")); - ATF_REQUIRE(get_current_dir() == curdir); -} - -// ------------------------------------------------------------------------ -// Main. -// ------------------------------------------------------------------------ - -ATF_INIT_TEST_CASES(tcs) -{ - // Add the tests for the "temp_dir" class. - ATF_ADD_TEST_CASE(tcs, temp_dir_raii); - - // Add the tests for the free functions. - ATF_ADD_TEST_CASE(tcs, cleanup); - ATF_ADD_TEST_CASE(tcs, cleanup_eacces_on_root); - ATF_ADD_TEST_CASE(tcs, cleanup_eacces_on_subdir); - ATF_ADD_TEST_CASE(tcs, change_directory); - ATF_ADD_TEST_CASE(tcs, get_current_dir); -} diff --git a/unit/atf-src/atf-sh/Makefile.am.inc b/unit/atf-src/atf-sh/Makefile.am.inc index f8f521a4c7..59d09113af 100644 --- a/unit/atf-src/atf-sh/Makefile.am.inc +++ b/unit/atf-src/atf-sh/Makefile.am.inc @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,15 +22,18 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# libexec_PROGRAMS += atf-sh/atf-check atf_sh_atf_check_SOURCES = atf-sh/atf-check.cpp atf_sh_atf_check_LDADD = $(ATF_CXX_LIBS) +atf_sh_atf_check_CPPFLAGS = -DATF_SHELL=\"$(ATF_SHELL)\" dist_man_MANS += atf-sh/atf-check.1 bin_PROGRAMS += atf-sh/atf-sh atf_sh_atf_sh_SOURCES = atf-sh/atf-sh.cpp +atf_sh_atf_sh_CPPFLAGS = -DATF_LIBEXECDIR=\"$(libexecdir)\" \ + -DATF_PKGDATADIR=\"$(pkgdatadir)\" \ + -DATF_SHELL=\"$(ATF_SHELL)\" atf_sh_atf_sh_LDADD = $(ATF_CXX_LIBS) dist_man_MANS += atf-sh/atf-sh.1 @@ -41,7 +41,7 @@ atf_sh_DATA = atf-sh/libatf-sh.subr atf_shdir = $(pkgdatadir) EXTRA_DIST += $(atf_sh_DATA) -dist_man_MANS += atf-sh/atf-sh-api.3 +dist_man_MANS += atf-sh/atf-sh.3 atf_aclocal_DATA += atf-sh/atf-sh.m4 EXTRA_DIST += atf-sh/atf-sh.m4 @@ -51,10 +51,10 @@ atf_shpkgconfig_DATA = atf-sh/atf-sh.pc CLEANFILES += atf-sh/atf-sh.pc EXTRA_DIST += atf-sh/atf-sh.pc.in atf-sh/atf-sh.pc: $(srcdir)/atf-sh/atf-sh.pc.in Makefile - test -d atf-sh || mkdir -p atf-sh + $(AM_V_GEN)test -d atf-sh || mkdir -p atf-sh; \ sed -e 's#__ATF_VERSION__#$(PACKAGE_VERSION)#g' \ -e 's#__EXEC_PREFIX__#$(exec_prefix)#g' \ - <$(srcdir)/atf-sh/atf-sh.pc.in >atf-sh/atf-sh.pc.tmp + <$(srcdir)/atf-sh/atf-sh.pc.in >atf-sh/atf-sh.pc.tmp; \ mv atf-sh/atf-sh.pc.tmp atf-sh/atf-sh.pc tests_atf_sh_DATA = atf-sh/Atffile \ @@ -66,64 +66,57 @@ tests_atf_sh_SCRIPTS = atf-sh/misc_helpers CLEANFILES += atf-sh/misc_helpers EXTRA_DIST += atf-sh/misc_helpers.sh atf-sh/misc_helpers: $(srcdir)/atf-sh/misc_helpers.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/misc_helpers.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/misc_helpers.sh"; \ dst="atf-sh/misc_helpers"; $(BUILD_SH_TP) tests_atf_sh_SCRIPTS += atf-sh/atf_check_test CLEANFILES += atf-sh/atf_check_test EXTRA_DIST += atf-sh/atf_check_test.sh atf-sh/atf_check_test: $(srcdir)/atf-sh/atf_check_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/atf_check_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/atf_check_test.sh"; \ dst="atf-sh/atf_check_test"; $(BUILD_SH_TP) tests_atf_sh_SCRIPTS += atf-sh/atf-check_test CLEANFILES += atf-sh/atf-check_test EXTRA_DIST += atf-sh/atf-check_test.sh atf-sh/atf-check_test: $(srcdir)/atf-sh/atf-check_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/atf-check_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/atf-check_test.sh"; \ dst="atf-sh/atf-check_test"; $(BUILD_SH_TP) tests_atf_sh_SCRIPTS += atf-sh/config_test CLEANFILES += atf-sh/config_test EXTRA_DIST += atf-sh/config_test.sh atf-sh/config_test: $(srcdir)/atf-sh/config_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/config_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/config_test.sh"; \ dst="atf-sh/config_test"; $(BUILD_SH_TP) tests_atf_sh_SCRIPTS += atf-sh/integration_test CLEANFILES += atf-sh/integration_test EXTRA_DIST += atf-sh/integration_test.sh atf-sh/integration_test: $(srcdir)/atf-sh/integration_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/integration_test.sh"; \ - dst="atf-sh/integration_test"; $(BUILD_SH_TP) + $(AM_V_GEN)src="$(srcdir)/atf-sh/integration_test.sh"; \ + dst="atf-sh/integration_test"; \ + substs="s,__ATF_SH__,$(exec_prefix)/bin/atf-sh,g"; $(BUILD_SH_TP) tests_atf_sh_SCRIPTS += atf-sh/normalize_test CLEANFILES += atf-sh/normalize_test EXTRA_DIST += atf-sh/normalize_test.sh atf-sh/normalize_test: $(srcdir)/atf-sh/normalize_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/normalize_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/normalize_test.sh"; \ dst="atf-sh/normalize_test"; $(BUILD_SH_TP) tests_atf_sh_SCRIPTS += atf-sh/tc_test CLEANFILES += atf-sh/tc_test EXTRA_DIST += atf-sh/tc_test.sh atf-sh/tc_test: $(srcdir)/atf-sh/tc_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/tc_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/tc_test.sh"; \ dst="atf-sh/tc_test"; $(BUILD_SH_TP) tests_atf_sh_SCRIPTS += atf-sh/tp_test CLEANFILES += atf-sh/tp_test EXTRA_DIST += atf-sh/tp_test.sh atf-sh/tp_test: $(srcdir)/atf-sh/tp_test.sh - test -d atf-sh || mkdir -p atf-sh - @src="$(srcdir)/atf-sh/tp_test.sh"; \ + $(AM_V_GEN)src="$(srcdir)/atf-sh/tp_test.sh"; \ dst="atf-sh/tp_test"; $(BUILD_SH_TP) # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 diff --git a/unit/atf-src/atf-sh/atf-check.1 b/unit/atf-src/atf-sh/atf-check.1 index 06904bc3ff..a3bd379c74 100644 --- a/unit/atf-src/atf-sh/atf-check.1 +++ b/unit/atf-src/atf-sh/atf-check.1 @@ -1,6 +1,3 @@ -.\" -.\" Automated Testing Framework (atf) -.\" .\" Copyright (c) 2008 The NetBSD Foundation, Inc. .\" All rights reserved. .\" @@ -25,8 +22,7 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd June 27, 2010 +.Dd October 5, 2014 .Dt ATF-CHECK 1 .Os .Sh NAME @@ -39,13 +35,16 @@ .Op Fl e Ar action:arg ... .Op Fl x .Ar command -.Nm -.Fl h .Sh DESCRIPTION .Nm executes a given command and analyzes its results, including exit code, stdout and stderr. .Pp +.Em Test cases must use +.Em Xr atf-sh 3 Ns ' Ns s +.Em Nm atf_check +.Em builtin function instead of calling this utility directly. +.Pp In the first synopsis form, .Nm will execute the provided command and apply checks specified @@ -67,8 +66,6 @@ will print information about all supported options and their purpose. .Pp The following options are available: .Bl -tag -width XqualXvalueXX -.It Fl h -Shows a short summary of all available options and their purpose. .It Fl s Ar qual:value Analyzes termination status. Must be one of: @@ -118,34 +115,46 @@ Analyzes standard error (syntax identical to above) Executes .Ar command as a shell command line, executing it with the system shell defined by -.Va ATF_SHELL -in -.Xr atf-config 1 . +.Va ATF_SHELL . You should avoid using this flag if at all possible to prevent shell quoting issues. .El .Sh EXIT STATUS .Nm exits 0 on success, and other (unspecified) value on failure. +.Sh ENVIRONMENT +.Bl -tag -width ATFXSHELLXX -compact +.It Va ATF_SHELL +Path to the system shell to be used when the +.Fl x +is given to run commands. +.El .Sh EXAMPLES +The following are sample invocations from within a test case. +Note that we use the +.Nm atf_check +function provided by +.Xr atf-sh 3 +instead of executing +.Nm +directly: .Bd -literal -offset indent # Exit code 0, nothing on stdout/stderr -atf-check 'true' +atf_check 'true' # Typical usage if failure is expected -atf-check -s not-exit:0 'false' +atf_check -s not-exit:0 'false' # Checking stdout/stderr echo foobar >expout -atf-check -o file:expout -e inline:"xx\etyy\en" \e +atf_check -o file:expout -e inline:"xx\etyy\en" \e 'echo foobar ; printf "xx\etyy\en" >&2' # Checking for a crash -atf-check -s signal:sigsegv my_program +atf_check -s signal:sigsegv my_program # Combined checks -atf-check -o match:foo -o not-match:bar echo foo baz +atf_check -o match:foo -o not-match:bar echo foo baz .Ed .Sh SEE ALSO -.Xr atf-config 1 , -.Xr atf 7 +.Xr atf-sh 1 diff --git a/unit/atf-src/atf-sh/atf-check.cpp b/unit/atf-src/atf-sh/atf-check.cpp index 8fc1545c22..866b7bb483 100644 --- a/unit/atf-src/atf-sh/atf-check.cpp +++ b/unit/atf-src/atf-sh/atf-check.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2008 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,6 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// extern "C" { #include @@ -48,10 +44,9 @@ extern "C" { #include #include "atf-c++/check.hpp" -#include "atf-c++/config.hpp" - #include "atf-c++/detail/application.hpp" #include "atf-c++/detail/auto_array.hpp" +#include "atf-c++/detail/env.hpp" #include "atf-c++/detail/exceptions.hpp" #include "atf-c++/detail/fs.hpp" #include "atf-c++/detail/process.hpp" @@ -112,17 +107,20 @@ class temp_file : public std::ostream { int m_fd; public: - temp_file(const atf::fs::path& p) : + temp_file(const char* pattern) : std::ostream(NULL), m_fd(-1) { - atf::auto_array< char > buf(new char[p.str().length() + 1]); - std::strcpy(buf.get(), p.c_str()); + const atf::fs::path file = atf::fs::path( + atf::env::get("TMPDIR", "/tmp")) / pattern; + + atf::auto_array< char > buf(new char[file.str().length() + 1]); + std::strcpy(buf.get(), file.c_str()); m_fd = ::mkstemp(buf.get()); if (m_fd == -1) throw atf::system_error("atf_check::temp_file::temp_file(" + - p.str() + ")", "mkstemp(3) failed", + file.str() + ")", "mkstemp(3) failed", errno); m_path.reset(new atf::fs::path(buf.get())); @@ -331,10 +329,13 @@ static std::auto_ptr< atf::check::check_result > execute(const char* const* argv) { + // TODO: This should go to stderr... but fixing it now may be hard as test + // cases out there might be relying on stderr being silent. std::cout << "Executing command [ "; for (int i = 0; argv[i] != NULL; ++i) std::cout << argv[i] << " "; std::cout << "]\n"; + std::cout.flush(); atf::process::argv_array argva(argv); return atf::check::exec(argva); @@ -347,7 +348,7 @@ execute_with_shell(char* const* argv) const std::string cmd = flatten_argv(argv); const char* sh_argv[4]; - sh_argv[0] = atf::config::get("atf_shell").c_str(); + sh_argv[0] = atf::env::get("ATF_SHELL", ATF_SHELL).c_str(); sh_argv[1] = "-c"; sh_argv[2] = cmd.c_str(); sh_argv[3] = NULL; @@ -620,9 +621,7 @@ run_output_check(const output_check oc, const atf::fs::path& path, } else if (oc.type == oc_ignore) { result = true; } else if (oc.type == oc_inline) { - atf::fs::path path2 = atf::fs::path(atf::config::get("atf_workdir")) - / "inline.XXXXXX"; - temp_file temp(path2); + temp_file temp("atf-check.XXXXXX"); temp.write(decode(oc.value)); temp.close(); @@ -721,7 +720,7 @@ const char* atf_check::m_description = "atf-check executes given command and analyzes its results."; atf_check::atf_check(void) : - app(m_description, "atf-check(1)", "atf(7)"), + app(m_description, "atf-check(1)"), m_xflag(false) { } diff --git a/unit/atf-src/atf-sh/atf-check_test.sh b/unit/atf-src/atf-sh/atf-check_test.sh index 7319a2b882..9542dfb0bd 100644 --- a/unit/atf-src/atf-sh/atf-check_test.sh +++ b/unit/atf-src/atf-sh/atf-check_test.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2008 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# # The Atf_Check and Atf-Shell variables are set by atf-sh. @@ -211,16 +207,7 @@ oflag_inline_body() h_pass "echo foo bar" -o inline:"foo bar\n" h_pass "printf 'foo bar'" -o inline:"foo bar" h_pass "printf '\t\n\t\n'" -o inline:"\t\n\t\n" - # XXX Ugly hack to workaround the lack of \e in FreeBSD. Also, \e doesn't - # seem to work as expected in Linux. Look for a nicer solution. - case $(uname) in - Darwin|FreeBSD|Linux) - h_pass "printf '\a\b\f\n\r\t\v'" -o inline:"\a\b\f\n\r\t\v" - ;; - *) - h_pass "printf '\a\b\e\f\n\r\t\v'" -o inline:"\a\b\e\f\n\r\t\v" - ;; - esac + h_pass "printf '\a\b\033\f\n\r\t\v'" -o inline:"\a\b\e\f\n\r\t\v" h_pass "printf '\011\022\033\012'" -o inline:"\011\022\033\012" h_fail "echo foo bar" -o inline:"foo bar" @@ -331,16 +318,7 @@ eflag_inline_body() h_pass "echo foo bar 1>&2" -e inline:"foo bar\n" h_pass "printf 'foo bar' 1>&2" -e inline:"foo bar" h_pass "printf '\t\n\t\n' 1>&2" -e inline:"\t\n\t\n" - # XXX Ugly hack to workaround the lack of \e in FreeBSD. Also, \e doesn't - # seem to work as expected in Linux. Look for a nicer solution. - case $(uname) in - Darwin|FreeBSD|Linux) - h_pass "printf '\a\b\f\n\r\t\v' 1>&2" -e inline:"\a\b\f\n\r\t\v" - ;; - *) - h_pass "printf '\a\b\e\f\n\r\t\v' 1>&2" -e inline:"\a\b\e\f\n\r\t\v" - ;; - esac + h_pass "printf '\a\b\033\f\n\r\t\v' 1>&2" -e inline:"\a\b\e\f\n\r\t\v" h_pass "printf '\011\022\033\012' 1>&2" -e inline:"\011\022\033\012" h_fail "echo foo bar 1>&2" -e inline:"foo bar" diff --git a/unit/atf-src/atf-sh/atf-sh.1 b/unit/atf-src/atf-sh/atf-sh.1 index b194bf4a17..e7eaff8b67 100644 --- a/unit/atf-src/atf-sh/atf-sh.1 +++ b/unit/atf-src/atf-sh/atf-sh.1 @@ -1,6 +1,3 @@ -.\" -.\" Automated Testing Framework (atf) -.\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. .\" @@ -25,53 +22,81 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd May 9, 2010 +.Dd September 27, 2014 .Dt ATF-SH 1 .Os .Sh NAME .Nm atf-sh +.Op Fl s Ar shell .Nd interpreter for shell-based test programs .Sh SYNOPSIS .Nm .Ar script -.Nm -.Fl h .Sh DESCRIPTION .Nm is an interpreter that runs the test program given in .Ar script after loading the -.Xr atf-sh-api 3 +.Xr atf-sh 3 library. .Pp .Nm is not a real interpreter though: it is just a wrapper around -the system-wide shell defined by the -.Sq atf_shell -configuration value in -.Xr atf-config 1 . +the system-wide shell defined by +.Va ATF_SHELL . .Nm executes the interpreter, loads the -.Xr atf-sh-api 3 +.Xr atf-sh 3 library and then runs the script. +You must consider +.Nm atf-sh +to be a POSIX shell by default and thus should not use any non-standard +extensions. .Pp +The following options are available: +.Bl -tag -width XsXshellXXX +.It Fl s Ar shell +Specifies the shell to use instead of the value provided by +.Va ATF_SHELL . +.El +.Sh ENVIRONMENT +.Bl -tag -width ATFXLIBEXECDIRXX -compact +.It Va ATF_LIBEXECDIR +Overrides the builtin directory where +.Nm +is located. +Should not be overridden other than for testing purposes. +.It Va ATF_PKGDATADIR +Overrides the builtin directory where +.Pa libatf-sh.subr +is located. +Should not be overridden other than for testing purposes. +.It Va ATF_SHELL +Path to the system shell to be used in the generated scripts. +Scripts must not rely on this variable being set to select a specific +interpreter. +.El +.Sh EXAMPLES Scripts using -.Xr atf-sh-api 3 +.Xr atf-sh 3 should start with: .Bd -literal -offset indent #! /usr/bin/env atf-sh .Ed .Pp -The following options are available: -.Bl -tag -width XhXX -.It Fl h -Shows a short summary of all available options and their purpose. -For those formats that write to a single file, specifying a -.Sq - -as the path will redirect the report to the standard output. -.El +Alternatively, if you want to explicitly choose a shell interpreter, you cannot +rely on +.Xr env 1 +to find +.Nm . +Instead, you have to hardcode the path to +.Nm +in the script and then use the +.Fl s +option afterwards as a +.Em single parameter : +.Bd -literal -offset indent +#! /path/to/bin/atf-sh -s/bin/bash +.Ed .Sh SEE ALSO -.Xr atf-config 1 , -.Xr atf-sh-api 3 , -.Xr atf 7 +.Xr atf-sh 3 diff --git a/unit/atf-src/atf-sh/atf-sh-api.3 b/unit/atf-src/atf-sh/atf-sh.3 similarity index 75% rename from unit/atf-src/atf-sh/atf-sh-api.3 rename to unit/atf-src/atf-sh/atf-sh.3 index 247b52c838..be56539d04 100644 --- a/unit/atf-src/atf-sh/atf-sh-api.3 +++ b/unit/atf-src/atf-sh/atf-sh.3 @@ -1,6 +1,3 @@ -.\" -.\" Automated Testing Framework (atf) -.\" .\" Copyright (c) 2008 The NetBSD Foundation, Inc. .\" All rights reserved. .\" @@ -25,9 +22,8 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd June 28, 2010 -.Dt ATF-SH-API 3 +.Dd October 13, 2014 +.Dt ATF-SH 3 .Os .Sh NAME .Nm atf_add_test_case , @@ -51,25 +47,52 @@ .Nm atf_test_case .Nd POSIX shell API to write ATF-based test programs .Sh SYNOPSIS -.Fn atf_add_test_case "name" -.Fn atf_check "command" -.Fn atf_check_equal "expr1" "expr2" -.Fn atf_config_get "var_name" -.Fn atf_config_has "var_name" -.Fn atf_expect_death "reason" "..." -.Fn atf_expect_exit "exitcode" "reason" "..." -.Fn atf_expect_fail "reason" "..." -.Fn atf_expect_pass -.Fn atf_expect_signal "signo" "reason" "..." -.Fn atf_expect_timeout "reason" "..." -.Fn atf_fail "reason" -.Fn atf_get "var_name" -.Fn atf_get_srcdir -.Fn atf_pass -.Fn atf_require_prog "prog_name" -.Fn atf_set "var_name" "value" -.Fn atf_skip "reason" -.Fn atf_test_case "name" "cleanup" +.Nm atf_add_test_case +.Qq name +.Nm atf_check +.Qq command +.Nm atf_check_equal +.Qq expected_expression +.Qq actual_expression +.Nm atf_config_get +.Qq var_name +.Nm atf_config_has +.Qq var_name +.Nm atf_expect_death +.Qq reason +.Qq ... +.Nm atf_expect_exit +.Qq exitcode +.Qq reason +.Qq ... +.Nm atf_expect_fail +.Qq reason +.Qq ... +.Nm atf_expect_pass +.Qq +.Nm atf_expect_signal +.Qq signo +.Qq reason +.Qq ... +.Nm atf_expect_timeout +.Qq reason +.Qq ... +.Nm atf_fail +.Qq reason +.Nm atf_get +.Qq var_name +.Nm atf_get_srcdir +.Nm atf_pass +.Nm atf_require_prog +.Qq prog_name +.Nm atf_set +.Qq var_name +.Qq value +.Nm atf_skip +.Qq reason +.Nm atf_test_case +.Qq name +.Qq cleanup .Sh DESCRIPTION ATF provides a simple but powerful interface to easily write test programs in @@ -120,7 +143,7 @@ the header, the body and an optional cleanup routine, all of which are described in .Xr atf-test-case 4 . To define test cases, one can use the -.Fn atf_test_case +.Nm atf_test_case function, which takes a first parameter specifiying the test case's name and instructs the library to set things up to accept it as a valid test case. @@ -132,33 +155,33 @@ It is important to note that this function .Em does not set the test case up for execution when the program is run. In order to do so, a later registration is needed through the -.Fn atf_add_test_case +.Nm atf_add_test_case function detailed in .Sx Program initialization . .Pp Later on, one must define the three parts of the body by providing two or three functions (remember that the cleanup routine is optional). These functions are named after the test case's identifier, and are -.Fn _head , -.Fn _body +.Nm \*(Ltid\*(Gt_head , +.Nm \*(Ltid\*(Gt_body and -.Fn _cleanup. +.Nm \*(Ltid\*(Gt_cleanup . None of these take parameters when executed. .Ss Program initialization The test program must define an -.Fn atf_init_test_cases +.Nm atf_init_test_cases function, which is in charge of registering the test cases that will be executed at run time by using the -.Fn atf_add_test_case +.Nm atf_add_test_case function, which takes the name of a test case as its single parameter. This main function should not do anything else, except maybe sourcing auxiliary source files that define extra variables and functions. .Ss Configuration variables The test case has read-only access to the current configuration variables through the -.Fn atf_config_has +.Nm atf_config_has and -.Fn atf_config_get +.Nm atf_config_get methods. The former takes a single parameter specifying a variable name and returns a boolean indicating whether the variable is defined or not. @@ -170,17 +193,17 @@ if the variable is not available. .Ss Access to the source directory It is possible to get the path to the test case's source directory from anywhere in the test program by using the -.Fn atf_get_srcdir +.Nm atf_get_srcdir function. It is interesting to note that this can be used inside -.Fn atf_init_test_cases +.Nm atf_init_test_cases to silently include additional helper files from the source directory. .Ss Requiring programs Aside from the .Va require.progs meta-data variable available in the header only, one can also check for additional programs in the test case's body by using the -.Fn atf_require_prog +.Nm atf_require_prog function, which takes the base name or full path of a single binary. Relative paths are forbidden. If it is not found, the test case will be automatically skipped. @@ -189,19 +212,19 @@ The test case finalizes either when the body reaches its end, at which point the test is assumed to have .Em passed , or at any explicit call to -.Fn atf_pass , -.Fn atf_fail +.Nm atf_pass , +.Nm atf_fail or -.Fn atf_skip . +.Nm atf_skip . These three functions terminate the execution of the test case immediately. The cleanup routine will be processed afterwards in a completely automated way, regardless of the test case's termination reason. .Pp -.Fn atf_pass +.Nm atf_pass does not take any parameters. -.Fn atf_fail +.Nm atf_fail and -.Fn atf_skip +.Nm atf_skip take a single string parameter that describes why the test case failed or was skipped, respectively. It is very important to provide a clear error message in both cases so that @@ -215,20 +238,19 @@ Each test case has an internal state called that describes what the test case expectations are at any point in time. The value of this property can change during execution by any of: .Bl -tag -width indent -.It Fn atf_expect_death "reason" "..." +.It Nm atf_expect_death Qo reason Qc Qo ... Qc Expects the test case to exit prematurely regardless of the nature of the exit. -.It Fn atf_expect_exit "exitcode" "reason" "..." +.It Nm atf_expect_exit Qo exitcode Qc Qo reason Qc Qo ... Qc Expects the test case to exit cleanly. If .Va exitcode is not .Sq -1 , -.Xr atf-run 1 -will validate that the exit code of the test case matches the one provided -in this call. +the runtime engine will validate that the exit code of the test case +matches the one provided in this call. Otherwise, the exact value will be ignored. -.It Fn atf_expect_fail "reason" +.It Nm atf_expect_fail Qo reason Qc Any failure raised in this mode is recorded, but such failures do not report the test case as failed; instead, the test case finalizes cleanly and is reported as @@ -247,38 +269,45 @@ adjusted to the new conditions. In this situation, it is useful, for example, to set .Fa reason as the bug number for tracking purposes. -.It Fn atf_expect_pass +.It Nm atf_expect_pass This is the normal mode of execution. In this mode, any failure is reported as such to the user and the test case is marked as .Sq failed . -.It Fn atf_expect_signal "signo" "reason" "..." +.It Nm atf_expect_signal Qo signo Qc Qo reason Qc Qo ... Qc Expects the test case to terminate due to the reception of a signal. If .Va signo is not .Sq -1 , -.Xr atf-run 1 -will validate that the signal that terminated the test case matches the one -provided in this call. +the runtime engine will validate that the signal that terminated the test +case matches the one provided in this call. Otherwise, the exact value will be ignored. -.It Fn atf_expect_timeout "reason" "..." +.It Nm atf_expect_timeout Qo reason Qc Qo ... Qc Expects the test case to execute for longer than its timeout. .El .Ss Helper functions for common checks -.Fn atf_check [options] command [args] -.Pp -This function wraps the execution of the -.Nm atf-check -tool and makes the test case fail if the tool reports failure. -You should always use this function instead of the tool in your scripts. -For more details on the parameters of this function, refer to -.Xr atf-check 1 . -.Pp -.Fn atf_check_equal expr1 expr2 +.Bl -tag -width indent +.It Nm atf_check Qo [options] Qc Qo command Qc Qo [args] Qc +Executes a command, performs checks on its exit code and its output, and +fails the test case if any of the checks is not successful. +This function is particularly useful in integration tests that verify the +correct functioning of a binary. .Pp +Internally, this function is just a wrapper over the +.Xr atf-check 1 +tool (whose manual page provides all details on the calling syntax). +You should always use the +.Nm atf_check +function instead of the +.Xr atf-check 1 +tool in your scripts; the latter is not even in the path. +.It Nm atf_check_equal Qo expected_expression Qc Qo actual_expression Qc This function takes two expressions, evaluates them and, if their results differ, aborts the test case with an appropriate failure message. +The common style is to put the expected value in the first parameter and the +actual value in the second parameter. +.El .Sh EXAMPLES The following shows a complete test program with a single test case that validates the addition operator: @@ -288,13 +317,13 @@ addition_head() { atf_set "descr" "Sample tests for the addition operator" } addition_body() { - atf_check_equal $((0 + 0)) 0 - atf_check_equal $((0 + 1)) 1 - atf_check_equal $((1 + 0)) 0 + atf_check_equal 0 $((0 + 0)) + atf_check_equal 1 $((0 + 1)) + atf_check_equal 1 $((1 + 0)) - atf_check_equal $((1 + 1)) 2 + atf_check_equal 2 $((1 + 1)) - atf_check_equal $((100 + 200)) 300 + atf_check_equal 300 $((100 + 200)) } atf_init_test_cases() { @@ -316,25 +345,28 @@ atf_init_test_cases() { .Ed .Pp This example demonstrates the use of the very useful -.Fn atf_check +.Nm atf_check function: .Bd -literal -offset indent # Check for silent output -atf_check 'true' 0 null null +atf_check -s exit:0 -o empty -e empty 'true' # Check for silent output and failure -atf_check 'false' 1 null null +atf_check -s exit:1 -o empty -e empty 'false' # Check for known stdout and silent stderr echo foo >expout -atf_check 'echo foo' 0 expout null +atf_check -s exit:0 -o file:expout -e empty 'echo foo' # Generate a file for later inspection -atf_check 'ls' 0 stdout null +atf_check -s exit:0 -o save:stdout -e empty 'ls' grep foo ls || atf_fail "foo file not found in listing" + +# Or just do the match along the way +atf_check -s exit:0 -o match:"^foo$" -e empty 'ls' .Ed .Sh SEE ALSO +.Xr atf-check 1 , .Xr atf-sh 1 , .Xr atf-test-program 1 , -.Xr atf-test-case 4 , -.Xr atf 7 +.Xr atf-test-case 4 diff --git a/unit/atf-src/atf-sh/atf-sh.cpp b/unit/atf-src/atf-sh/atf-sh.cpp index d7bc7fc82b..997557322e 100644 --- a/unit/atf-src/atf-sh/atf-sh.cpp +++ b/unit/atf-src/atf-sh/atf-sh.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2010 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,6 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// extern "C" { #include @@ -36,9 +32,8 @@ extern "C" { #include #include -#include "atf-c++/config.hpp" - #include "atf-c++/detail/application.hpp" +#include "atf-c++/detail/env.hpp" #include "atf-c++/detail/fs.hpp" #include "atf-c++/detail/sanity.hpp" @@ -63,9 +58,11 @@ static std::string* construct_script(const char* filename) { - const std::string libexecdir = atf::config::get("atf_libexecdir"); - const std::string pkgdatadir = atf::config::get("atf_pkgdatadir"); - const std::string shell = atf::config::get("atf_shell"); + const std::string libexecdir = atf::env::get( + "ATF_LIBEXECDIR", ATF_LIBEXECDIR); + const std::string pkgdatadir = atf::env::get( + "ATF_PKGDATADIR", ATF_PKGDATADIR); + const std::string shell = atf::env::get("ATF_SHELL", ATF_SHELL); std::string* command = new std::string(); command->reserve(512); @@ -111,6 +108,11 @@ construct_argv(const std::string& shell, const int interpreter_argc, class atf_sh : public atf::application::app { static const char* m_description; + atf::fs::path m_shell; + + options_set specific_options(void) const; + void process_option(int, const char*); + public: atf_sh(void); @@ -122,10 +124,38 @@ const char* atf_sh::m_description = "system sh(1) with the atf-sh library."; atf_sh::atf_sh(void) : - app(m_description, "atf-sh(1)", "atf(7)") + app(m_description, "atf-sh(1)"), + m_shell(atf::fs::path(atf::env::get("ATF_SHELL", ATF_SHELL))) { } +atf_sh::options_set +atf_sh::specific_options(void) + const +{ + using atf::application::option; + options_set opts; + + INV(m_shell == atf::fs::path(atf::env::get("ATF_SHELL", ATF_SHELL))); + opts.insert(option('s', "shell", "Path to the shell interpreter to use; " + "default: " + m_shell.str())); + + return opts; +} + +void +atf_sh::process_option(int ch, const char* arg) +{ + switch (ch) { + case 's': + m_shell = atf::fs::path(arg); + break; + + default: + UNREACHABLE; + } +} + int atf_sh::main(void) { @@ -137,15 +167,14 @@ atf_sh::main(void) throw std::runtime_error("The test program '" + script.str() + "' " "does not exist"); - const std::string shell = atf::config::get("atf_shell"); - const char** argv = construct_argv(shell, m_argc, m_argv); + const char** argv = construct_argv(m_shell.str(), m_argc, m_argv); // Don't bother keeping track of the memory allocated by construct_argv: // we are going to exec or die immediately. - const int ret = execv(shell.c_str(), const_cast< char** >(argv)); + const int ret = execv(m_shell.c_str(), const_cast< char** >(argv)); INV(ret == -1); - std::cerr << "Failed to execute " << shell << ": " << std::strerror(errno) - << "\n"; + std::cerr << "Failed to execute " << m_shell.str() << ": " + << std::strerror(errno) << "\n"; return EXIT_FAILURE; } diff --git a/unit/atf-src/atf-sh/atf-sh.m4 b/unit/atf-src/atf-sh/atf-sh.m4 index 7215d1c7fe..754f50264e 100644 --- a/unit/atf-src/atf-sh/atf-sh.m4 +++ b/unit/atf-src/atf-sh/atf-sh.m4 @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright 2011 Google Inc. dnl All rights reserved. dnl @@ -28,7 +25,6 @@ dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl dnl ATF_CHECK_SH([version-spec]) dnl diff --git a/unit/atf-src/atf-sh/atf_check_test.sh b/unit/atf-src/atf-sh/atf_check_test.sh index da13c92cdd..163e905f1a 100644 --- a/unit/atf-src/atf-sh/atf_check_test.sh +++ b/unit/atf-src/atf-sh/atf_check_test.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# # TODO: Bring in the checks in the bootstrap testsuite for atf_check. @@ -168,6 +164,21 @@ equal_body() grep '^failed: \${x} != \${y} (a != b)$' resfile } +atf_test_case flush_stdout_on_timeout +flush_stdout_on_timeout_body() +{ + "$(atf_get_srcdir)/misc_helpers" -s "$(atf_get_srcdir)" atf_check_timeout \ + >out 2>err & + pid="${!}" + sleep 1 + kill "${pid}" + + grep 'Executing command.*true' out \ + || atf_fail 'First command not in output' + grep 'Executing command.*sleep 42' out \ + || atf_fail 'Second command not in output' +} + atf_init_test_cases() { atf_add_test_case info_ok @@ -176,6 +187,7 @@ atf_init_test_cases() atf_add_test_case null_stdout atf_add_test_case null_stderr atf_add_test_case equal + atf_add_test_case flush_stdout_on_timeout } # vim: syntax=sh:expandtab:shiftwidth=4:softtabstop=4 diff --git a/unit/atf-src/atf-sh/config_test.sh b/unit/atf-src/atf-sh/config_test.sh index f7f57f0199..048834c1c4 100644 --- a/unit/atf-src/atf-sh/config_test.sh +++ b/unit/atf-src/atf-sh/config_test.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# atf_test_case has has_head() diff --git a/unit/atf-src/atf-sh/integration_test.sh b/unit/atf-src/atf-sh/integration_test.sh index 55bb2784ed..1150966f28 100644 --- a/unit/atf-src/atf-sh/integration_test.sh +++ b/unit/atf-src/atf-sh/integration_test.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2010 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,12 +22,14 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# + +: ${ATF_SH:="__ATF_SH__"} create_test_program() { - echo '#! /usr/bin/env atf-sh' >"${1}" - cat >>"${1}" - chmod +x "${1}" + local output="${1}"; shift + echo "#! ${ATF_SH} ${*}" >"${output}" + cat >>"${output}" + chmod +x "${output}" } atf_test_case no_args @@ -38,9 +37,9 @@ no_args_body() { cat >experr <experr <>> hello bye <<< >>>foo bar<<< EOF - atf_check -s eq:0 -o file:expout -e empty atf-sh tp ' hello bye ' 'foo bar' + atf_check -s eq:0 -o file:expout -e empty "${ATF_SH}" tp \ + ' hello bye ' 'foo bar' +} + +atf_test_case custom_shell__command_line +custom_shell__command_line_body() +{ + cat >expout <custom-shell <expout <custom-shell <custom-shell <tp < header file. */ #undef HAVE_STDINT_H @@ -60,28 +51,18 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have the `unmount' function. */ -#undef HAVE_UNMOUNT - /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV -/* Define to 1 if unsetenv is in std */ -#undef HAVE_UNSETENV_IN_STD - /* Define to 1 if vsnprintf is in std */ #undef HAVE_VSNPRINTF_IN_STD /* Define to the last valid signal number */ #undef LAST_SIGNO -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* Name of package */ #undef PACKAGE diff --git a/unit/atf-src/bootstrap/Makefile.am.inc b/unit/atf-src/bootstrap/Makefile.am.inc index a590999f96..fd80d809ce 100644 --- a/unit/atf-src/bootstrap/Makefile.am.inc +++ b/unit/atf-src/bootstrap/Makefile.am.inc @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,15 +22,14 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# check_PROGRAMS = bootstrap/h_app_empty bootstrap_h_app_empty_SOURCES = bootstrap/h_app_empty.cpp -bootstrap_h_app_empty_LDADD = $(ATF_CXX_LIBS) +bootstrap_h_app_empty_LDADD = tools/libtools.a $(ATF_CXX_LIBS) check_PROGRAMS += bootstrap/h_app_opts_args bootstrap_h_app_opts_args_SOURCES = bootstrap/h_app_opts_args.cpp -bootstrap_h_app_opts_args_LDADD = $(ATF_CXX_LIBS) +bootstrap_h_app_opts_args_LDADD = tools/libtools.a $(ATF_CXX_LIBS) check_PROGRAMS += bootstrap/h_tp_basic_c bootstrap_h_tp_basic_c_SOURCES = bootstrap/h_tp_basic_c.c @@ -47,30 +43,26 @@ check_SCRIPTS = bootstrap/h_tp_basic_sh CLEANFILES += bootstrap/h_tp_basic_sh EXTRA_DIST += bootstrap/h_tp_basic_sh.sh bootstrap/h_tp_basic_sh: $(srcdir)/bootstrap/h_tp_basic_sh.sh - test -d bootstrap || mkdir -p bootstrap - @src=$(srcdir)/bootstrap/h_tp_basic_sh.sh; dst=$@; $(BUILD_SH_TP) + $(AM_V_GEN)src=$(srcdir)/bootstrap/h_tp_basic_sh.sh; dst=$@; $(BUILD_SH_TP) check_SCRIPTS += bootstrap/h_tp_atf_check_sh CLEANFILES += bootstrap/h_tp_atf_check_sh EXTRA_DIST += bootstrap/h_tp_atf_check_sh.sh bootstrap/h_tp_atf_check_sh: \ $(srcdir)/bootstrap/h_tp_atf_check_sh.sh - test -d bootstrap || mkdir -p bootstrap - @src=$(srcdir)/bootstrap/h_tp_atf_check_sh.sh; dst=$@; $(BUILD_SH_TP) + $(AM_V_GEN)src=$(srcdir)/bootstrap/h_tp_atf_check_sh.sh; dst=$@; $(BUILD_SH_TP) check_SCRIPTS += bootstrap/h_tp_fail CLEANFILES += bootstrap/h_tp_fail EXTRA_DIST += bootstrap/h_tp_fail.sh bootstrap/h_tp_fail: $(srcdir)/bootstrap/h_tp_fail.sh - test -d bootstrap || mkdir -p bootstrap - @src=$(srcdir)/bootstrap/h_tp_fail.sh; dst=$@; $(BUILD_SH_TP) + $(AM_V_GEN)src=$(srcdir)/bootstrap/h_tp_fail.sh; dst=$@; $(BUILD_SH_TP) check_SCRIPTS += bootstrap/h_tp_pass CLEANFILES += bootstrap/h_tp_pass EXTRA_DIST += bootstrap/h_tp_pass.sh bootstrap/h_tp_pass: $(srcdir)/bootstrap/h_tp_pass.sh - test -d bootstrap || mkdir -p bootstrap - @src=$(srcdir)/bootstrap/h_tp_pass.sh; dst=$@; $(BUILD_SH_TP) + $(AM_V_GEN)src=$(srcdir)/bootstrap/h_tp_pass.sh; dst=$@; $(BUILD_SH_TP) DISTCLEANFILES = \ bootstrap/atconfig \ diff --git a/unit/atf-src/bootstrap/h_app_empty.cpp b/unit/atf-src/bootstrap/h_app_empty.cpp index df8c1fb276..9656f00135 100644 --- a/unit/atf-src/bootstrap/h_app_empty.cpp +++ b/unit/atf-src/bootstrap/h_app_empty.cpp @@ -29,9 +29,9 @@ #include -#include "atf-c++/detail/application.hpp" +#include "tools/application.hpp" -class h_app_empty : public atf::application::app { +class h_app_empty : public tools::application::app { static const char* m_description; public: diff --git a/unit/atf-src/bootstrap/h_app_opts_args.cpp b/unit/atf-src/bootstrap/h_app_opts_args.cpp index 26d6be841e..f05a6b2bb1 100644 --- a/unit/atf-src/bootstrap/h_app_opts_args.cpp +++ b/unit/atf-src/bootstrap/h_app_opts_args.cpp @@ -30,10 +30,9 @@ #include #include -#include "atf-c++/detail/application.hpp" -#include "atf-c++/detail/sanity.hpp" +#include "tools/application.hpp" -class h_app_opts_args : public atf::application::app { +class h_app_opts_args : public tools::application::app { static const char* m_description; std::string specific_args(void) const; @@ -66,7 +65,7 @@ h_app_opts_args::options_set h_app_opts_args::specific_options(void) const { - using atf::application::option; + using tools::application::option; options_set opts; opts.insert(option('d', "", "Debug mode")); opts.insert(option('v', "level", "Verbosity level")); @@ -86,7 +85,7 @@ h_app_opts_args::process_option(int ch, const char* arg) break; default: - UNREACHABLE; + std::abort(); } } diff --git a/unit/atf-src/bootstrap/h_tp_atf_check_sh.sh b/unit/atf-src/bootstrap/h_tp_atf_check_sh.sh index 1023684446..a5037698bc 100644 --- a/unit/atf-src/bootstrap/h_tp_atf_check_sh.sh +++ b/unit/atf-src/bootstrap/h_tp_atf_check_sh.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# atf_test_case exitcode_0_0 exitcode_0_0_head() diff --git a/unit/atf-src/bootstrap/h_tp_basic_c.c b/unit/atf-src/bootstrap/h_tp_basic_c.c index ff106e7863..6e74ef77b1 100644 --- a/unit/atf-src/bootstrap/h_tp_basic_c.c +++ b/unit/atf-src/bootstrap/h_tp_basic_c.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2008 The NetBSD Foundation, Inc. +/* Copyright (c) 2008 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/unit/atf-src/bootstrap/h_tp_basic_cpp.cpp b/unit/atf-src/bootstrap/h_tp_basic_cpp.cpp index c08444593d..ded8243430 100644 --- a/unit/atf-src/bootstrap/h_tp_basic_cpp.cpp +++ b/unit/atf-src/bootstrap/h_tp_basic_cpp.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,6 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// #include diff --git a/unit/atf-src/bootstrap/h_tp_basic_sh.sh b/unit/atf-src/bootstrap/h_tp_basic_sh.sh index f2bff9e60b..b05debb817 100644 --- a/unit/atf-src/bootstrap/h_tp_basic_sh.sh +++ b/unit/atf-src/bootstrap/h_tp_basic_sh.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# atf_test_case pass pass_head() diff --git a/unit/atf-src/bootstrap/h_tp_fail.sh b/unit/atf-src/bootstrap/h_tp_fail.sh index 2fa5442a4d..ac47d2f73b 100644 --- a/unit/atf-src/bootstrap/h_tp_fail.sh +++ b/unit/atf-src/bootstrap/h_tp_fail.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2009 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# atf_test_case @TC_NAME@ @TC_NAME@_head() diff --git a/unit/atf-src/bootstrap/h_tp_pass.sh b/unit/atf-src/bootstrap/h_tp_pass.sh index 65acef5956..dd6a5a81f0 100644 --- a/unit/atf-src/bootstrap/h_tp_pass.sh +++ b/unit/atf-src/bootstrap/h_tp_pass.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2009 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# atf_test_case @TC_NAME@ @TC_NAME@_head() diff --git a/unit/atf-src/bootstrap/t_subr_atf_check.at b/unit/atf-src/bootstrap/t_subr_atf_check.at index a8c39e2f66..4aca4e4de1 100644 --- a/unit/atf-src/bootstrap/t_subr_atf_check.at +++ b/unit/atf-src/bootstrap/t_subr_atf_check.at @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright (c) 2007 The NetBSD Foundation, Inc. dnl All rights reserved. dnl @@ -25,7 +22,6 @@ dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl AT_SETUP([subr: atf_check function]) diff --git a/unit/atf-src/bootstrap/t_test_program_compare.at b/unit/atf-src/bootstrap/t_test_program_compare.at index fe76434604..ebf6253d3f 100644 --- a/unit/atf-src/bootstrap/t_test_program_compare.at +++ b/unit/atf-src/bootstrap/t_test_program_compare.at @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright (c) 2007 The NetBSD Foundation, Inc. dnl All rights reserved. dnl @@ -25,7 +22,6 @@ dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl AT_SETUP([test_program: compare the user-visible interfaces]) diff --git a/unit/atf-src/bootstrap/t_test_program_filter.at b/unit/atf-src/bootstrap/t_test_program_filter.at index 89a7b68a31..c4124a9cbf 100644 --- a/unit/atf-src/bootstrap/t_test_program_filter.at +++ b/unit/atf-src/bootstrap/t_test_program_filter.at @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright (c) 2007 The NetBSD Foundation, Inc. dnl All rights reserved. dnl @@ -25,7 +22,6 @@ dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl AT_SETUP([test_program: filter test cases by name]) diff --git a/unit/atf-src/bootstrap/t_test_program_list.at b/unit/atf-src/bootstrap/t_test_program_list.at index bb7b67affc..f0a8ea114a 100644 --- a/unit/atf-src/bootstrap/t_test_program_list.at +++ b/unit/atf-src/bootstrap/t_test_program_list.at @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright (c) 2007 The NetBSD Foundation, Inc. dnl All rights reserved. dnl @@ -25,7 +22,6 @@ dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl AT_SETUP([test_program: list test cases]) diff --git a/unit/atf-src/bootstrap/t_test_program_run.at b/unit/atf-src/bootstrap/t_test_program_run.at index 5b6968ce12..1d7bf4a4c6 100644 --- a/unit/atf-src/bootstrap/t_test_program_run.at +++ b/unit/atf-src/bootstrap/t_test_program_run.at @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright (c) 2007 The NetBSD Foundation, Inc. dnl All rights reserved. dnl @@ -25,7 +22,6 @@ dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl AT_SETUP([test_program: output format and exit codes]) diff --git a/unit/atf-src/bootstrap/testsuite.at b/unit/atf-src/bootstrap/testsuite.at index d6db49ae6a..f13d391069 100644 --- a/unit/atf-src/bootstrap/testsuite.at +++ b/unit/atf-src/bootstrap/testsuite.at @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright (c) 2007 The NetBSD Foundation, Inc. dnl All rights reserved. dnl @@ -25,7 +22,6 @@ dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl AT_INIT([bootstrap tests]) @@ -74,7 +70,7 @@ m4_include(bootstrap/t_test_program_list.at) m4_include(bootstrap/t_test_program_compare.at) m4_include(bootstrap/t_subr_atf_check.at) -m4_if([ENABLE_TOOLS], yes, [ +m4_if(ENABLE_TOOLS, yes, [ m4_include(bootstrap/t_application_opts_args.at) m4_include(bootstrap/t_application_help.at) m4_include(bootstrap/t_atf_config.at) diff --git a/unit/atf-src/config.h.in b/unit/atf-src/config.h.in new file mode 100644 index 0000000000..fa88b355fb --- /dev/null +++ b/unit/atf-src/config.h.in @@ -0,0 +1,94 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if basename takes a constant pointer */ +#undef HAVE_CONST_BASENAME + +/* Define to 1 if dirname takes a constant pointer */ +#undef HAVE_CONST_DIRNAME + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if getcwd(NULL, 0) works */ +#undef HAVE_GETCWD_DYN + +/* Define to 1 if getopt allows a + sign for POSIX behavior */ +#undef HAVE_GNU_GETOPT + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if getopt has optreset */ +#undef HAVE_OPTRESET + +/* Define to 1 if you have the `putenv' function. */ +#undef HAVE_PUTENV + +/* Define to 1 if you have the `setenv' function. */ +#undef HAVE_SETENV + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `unsetenv' function. */ +#undef HAVE_UNSETENV + +/* Define to 1 if vsnprintf is in std */ +#undef HAVE_VSNPRINTF_IN_STD + +/* Define to the last valid signal number */ +#undef LAST_SIGNO + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the copyright string applicable to this package. */ +#undef PACKAGE_COPYRIGHT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION diff --git a/unit/atf-src/configure b/unit/atf-src/configure index 714a79414e..ed2ca84f00 100755 --- a/unit/atf-src/configure +++ b/unit/atf-src/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Automated Testing Framework 0.17. +# Generated by GNU Autoconf 2.69 for Automated Testing Framework 0.21. # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -200,6 +200,14 @@ test -x / || exit 1" as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes @@ -269,10 +277,10 @@ fi $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: atf-devel@NetBSD.org about your system, including any -$0: error possibly output before this message. Then install -$0: a modern shell, or manually run the script under such a -$0: shell if you do have one." +$0: atf-discuss@googlegroups.com about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." fi exit 1 fi @@ -558,155 +566,8 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - test -n "$DJDIR" || exec 7<&0 &1 @@ -731,10 +592,10 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Automated Testing Framework' PACKAGE_TARNAME='atf' -PACKAGE_VERSION='0.17' -PACKAGE_STRING='Automated Testing Framework 0.17' -PACKAGE_BUGREPORT='atf-devel@NetBSD.org' -PACKAGE_URL='http://code.google.com/p/kyua/wiki/ATF' +PACKAGE_VERSION='0.21' +PACKAGE_STRING='Automated Testing Framework 0.21' +PACKAGE_BUGREPORT='atf-discuss@googlegroups.com' +PACKAGE_URL='https://github.com/jmmv/atf/' ac_unique_file="atf-c.h" # Factoring default headers for most tests. @@ -789,9 +650,9 @@ atf_egdir atf_dtddir atf_cssdir atf_aclocaldir -ATF_WORKDIR atf_confdir ATF_CONFSUBDIR +ATF_WORKDIR atf_machine atf_arch target_srcdir @@ -815,14 +676,15 @@ ENABLE_TOOLS_FALSE ENABLE_TOOLS_TRUE ENABLE_TOOLS CPP +LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL -lt_ECHO +MANIFEST_TOOL RANLIB -AR +DLLTOOL OBJDUMP LN_S NM @@ -833,6 +695,7 @@ FGREP EGREP GREP SED +LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -850,7 +713,12 @@ CPPFLAGS LDFLAGS CFLAGS CC -LIBTOOL +ac_ct_AR +AR +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -927,12 +795,15 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_silent_rules +enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install -enable_dependency_tracking +with_aix_soname with_gnu_ld +with_sysroot enable_libtool_lock enable_tools enable_developer @@ -945,6 +816,7 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +LT_SYS_LIBRARY_PATH CPP CXX CXXFLAGS @@ -956,8 +828,8 @@ ATF_BUILD_CPP ATF_BUILD_CPPFLAGS ATF_BUILD_CXX ATF_BUILD_CXXFLAGS -ATF_CONFSUBDIR ATF_WORKDIR +ATF_CONFSUBDIR ATF_SHELL' @@ -1499,7 +1371,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 Automated Testing Framework 0.17 to adapt to many kinds of systems. +\`configure' configures Automated Testing Framework 0.21 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1570,7 +1442,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Automated Testing Framework 0.17:";; + short | recursive ) echo "Configuration of Automated Testing Framework 0.21:";; esac cat <<\_ACEOF @@ -1578,14 +1450,16 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-tools Enables the build of the deprecated ATF tools --enable-developer enable developer features @@ -1593,9 +1467,14 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX, [default=aix]. --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 @@ -1605,6 +1484,8 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + LT_SYS_LIBRARY_PATH + User-defined run-time library search path. CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags @@ -1621,16 +1502,16 @@ Some influential environment variables: C++ compiler to use at runtime ATF_BUILD_CXXFLAGS C++ compiler flags to use at runtime + ATF_WORKDIR Default location to use for ATF work directories ATF_CONFSUBDIR Subdirectory of sysconfdir under which to look for files - ATF_WORKDIR Default location to use for ATF work directories ATF_SHELL Location of the POSIX shell interpreter to use Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . -Automated Testing Framework home page: . +Report bugs to . +Automated Testing Framework home page: . _ACEOF ac_status=$? fi @@ -1693,7 +1574,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Automated Testing Framework configure 0.17 +Automated Testing Framework configure 0.21 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2257,7 +2138,7 @@ 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 Automated Testing Framework $as_me 0.17, which was +It was created by Automated Testing Framework $as_me 0.21, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2639,7 +2520,7 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -ac_config_headers="$ac_config_headers bconfig.h" +ac_config_headers="$ac_config_headers config.h" @@ -2757,7 +2638,7 @@ test -n "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- -am__api_version='1.12' +am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2929,8 +2810,8 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -2941,15 +2822,15 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -3182,6 +3063,45 @@ else fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -3204,7 +3124,7 @@ fi # Define the identity of the package. PACKAGE='atf' - VERSION='0.17' + VERSION='0.21' cat >>confdefs.h <<_ACEOF @@ -3238,12 +3158,16 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -3251,31 +3175,49 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. -macro_version='2.2.6b' -macro_revision='1.3017' +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -4128,6 +4070,65 @@ 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 +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +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 + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -4256,6 +4257,272 @@ else fi + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar lib "link -lib" + 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 ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar lib "link -lib" +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 ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + 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 +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="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 + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 +$as_echo_n "checking the archiver ($AR) interface... " >&6; } +if ${am_cv_ar_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 + + am_cv_ar_interface=ar + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int some_variable = 0; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_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 + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_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 + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext 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: $am_cv_ar_interface" >&5 +$as_echo "$am_cv_ar_interface" >&6; } + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + as_fn_error $? "could not determine $AR interface" "$LINENO" 5 + ;; +esac + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.6' +macro_revision='2.4.6' + + + + + + + + + + + + + +ltmain=$ac_aux_dir/ltmain.sh + +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +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 && \ + 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 + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case $ECHO in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : @@ -4557,19 +4824,19 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -4583,7 +4850,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -4594,7 +4861,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -4605,32 +4872,32 @@ if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -4673,33 +4940,38 @@ if ${lt_cv_path_NM+:} false; then : else if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM="$NM" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -4710,19 +4982,22 @@ else esac fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" 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 @@ -4766,7 +5041,7 @@ fi fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -4821,9 +5096,18 @@ esac fi fi + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -4840,13 +5124,13 @@ if ${lt_cv_nm_interface+:} false; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4843: $ac_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4846: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4849: output\"" >&5) + (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -4874,7 +5158,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -4903,13 +5187,18 @@ else lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -4928,6 +5217,11 @@ else lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -4954,22 +5248,23 @@ else ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do + for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -4987,7 +5282,7 @@ else fi -if test -n $lt_cv_sys_max_cmd_len ; then +if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else @@ -5005,30 +5300,6 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else @@ -5060,6 +5331,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 ${lt_cv_to_host_file_cmd+:} false; 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 ${lt_cv_to_tool_file_cmd+:} false; 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 ${lt_cv_ld_reload_flag+:} false; then : @@ -5076,9 +5421,14 @@ case $reload_flag in esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test yes != "$GCC"; then + reload_cmds=false + fi + ;; darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + if test yes = "$GCC"; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -5206,13 +5556,13 @@ lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. +# 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) @@ -5243,12 +5593,13 @@ mingw* | pw32*) lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -5274,7 +5625,7 @@ freebsd* | dragonfly*) fi ;; -gnu*) +haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -5286,11 +5637,11 @@ hpux10.20* | hpux11*) lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac @@ -5311,8 +5662,8 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu) +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -5334,8 +5685,8 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' @@ -5388,11 +5739,29 @@ sysv4 | sysv4.3*) tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + 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 @@ -5406,11 +5775,164 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + + + + + + + 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 ${ac_cv_prog_DLLTOOL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_DLLTOOL+:} false; 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 as_fn_executable_p "$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 ${lt_cv_sharedlib_from_linklib_cmd+:} false; 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 one 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 ${ac_cv_prog_AR+:} false; then : @@ -5426,7 +5948,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$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 @@ -5446,11 +5968,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 ${ac_cv_prog_ac_ct_AR+:} false; then : @@ -5466,7 +5992,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$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 @@ -5485,6 +6011,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 @@ -5496,12 +6026,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} @@ -5513,6 +6041,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 ${lt_cv_ar_at_file+:} false; 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 0 -eq "$ac_status"; 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 0 -ne "$ac_status"; 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 no = "$lt_cv_ar_at_file"; 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 @@ -5718,16 +6304,28 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + @@ -5796,7 +6394,7 @@ cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; @@ -5829,14 +6427,44 @@ case `$NM -V 2>&1` in symcode='[ABCDGIRSTW]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$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"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -5854,24 +6482,29 @@ for ac_symprfx in "" "_"; do # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" 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 @@ -5897,8 +6530,8 @@ _LT_EOF test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then @@ -5913,6 +6546,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 can'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 @@ -5924,7 +6569,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; } @@ -5932,7 +6577,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -5950,19 +6595,19 @@ 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" - LIBS="conftstm.$ac_objext" + 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 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then + 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 @@ -5979,7 +6624,7 @@ _LT_EOF rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -5999,6 +6644,12 @@ 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 @@ -6020,19 +6671,152 @@ 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 yes = "$GCC"; 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; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +if test -z "$lt_DD"; then + ac_path_lt_DD_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + 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_prog in dd; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_lt_DD" || continue +if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi + $ac_path_lt_DD_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_lt_DD"; then + : + fi +else + ac_cv_path_lt_DD=$lt_DD +fi + +rm -f conftest.i conftest2.i conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } + + + + + + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -6041,24 +6825,25 @@ ia64-*-hpux*) test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE="32" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. - echo '#line 6055 "configure"' > conftest.$ac_ext + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > 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 - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -6087,9 +6872,50 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > 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 + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -6103,9 +6929,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -6124,7 +6960,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -6142,7 +6981,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } @@ -6182,13 +7021,14 @@ 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 + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; -sparc*-*solaris*) - # Find out which ABI we are using. +*-*solaris*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -6198,7 +7038,20 @@ sparc*-*solaris*) case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*|x86_64-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD=${LD-ld}_sol2 + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -6212,7 +7065,124 @@ sparc*-*solaris*) ;; esac -need_locks="$enable_libtool_lock" +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 ${ac_cv_prog_MANIFEST_TOOL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; 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 as_fn_executable_p "$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 ${lt_cv_path_mainfest_tool+:} false; 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 yes != "$lt_cv_path_mainfest_tool"; then + MANIFEST_TOOL=: +fi + + + + case $host_os in @@ -6709,7 +7679,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then + if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -6721,7 +7691,13 @@ else $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -6732,6 +7708,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : @@ -6759,39 +7736,74 @@ else 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_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -6799,6 +7811,41 @@ $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } ;; esac +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7081,6 +8128,8 @@ done + + # Set options @@ -7100,14 +8149,14 @@ if test "${enable_shared+set}" = set; then : *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -7131,14 +8180,14 @@ if test "${enable_static+set}" = set; then : *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -7156,14 +8205,27 @@ fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac else pic_mode=default fi -test -z "$pic_mode" && pic_mode=default - @@ -7179,14 +8241,14 @@ if test "${enable_fast_install+set}" = set; then : *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -7200,11 +8262,63 @@ fi + shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[5-9]*,yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + +# Check whether --with-aix-soname was given. +if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case $withval in + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_with_aix_soname=aix +fi + + with_aix_soname=$lt_cv_with_aix_soname +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + + + + + + + # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -7227,6 +8341,11 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + + @@ -7248,7 +8367,7 @@ test -z "$LN_S" && LN_S="ln -s" -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -7282,60 +8401,30 @@ _ACEOF - - - - - - - - - - - - - case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld="$lt_cv_prog_gnu_ld" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -7344,15 +8433,8 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +func_cc_basename $compiler +cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it @@ -7367,22 +8449,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then : else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -f "$ac_dir/${ac_tool_prefix}file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -7405,13 +8487,13 @@ _LT_EOF break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -7433,22 +8515,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then : else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -f "$ac_dir/file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -7471,13 +8553,13 @@ _LT_EOF break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -7498,7 +8580,7 @@ esac # Use C for the default configuration in the libtool script -lt_save_CC="$CC" +lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7560,8 +8642,13 @@ if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= -if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' +if test yes = "$GCC"; then + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } @@ -7571,7 +8658,7 @@ else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" + lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -7581,15 +8668,15 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7584: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7588: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes @@ -7601,7 +8688,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then +if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : @@ -7618,20 +8705,19 @@ 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 + if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi + lt_prog_compiler_pic='-fPIC' ;; amigaos*) @@ -7642,8 +8728,8 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -7659,6 +8745,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -7667,6 +8758,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -7709,12 +8806,21 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else @@ -7722,10 +8828,29 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } fi ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | 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='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -7741,7 +8866,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' + lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -7750,9 +8875,9 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' @@ -7771,7 +8896,19 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' @@ -7783,25 +8920,40 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='' + ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' ;; esac ;; @@ -7833,7 +8985,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; @@ -7853,7 +9005,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi @@ -7882,7 +9034,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } fi case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; @@ -7890,13 +9042,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 ${lt_cv_prog_compiler_pic+:} false; 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. @@ -7910,7 +9066,7 @@ else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -7920,15 +9076,15 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7923: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7927: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes @@ -7940,7 +9096,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then +if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; @@ -7957,6 +9113,11 @@ fi + + + + + # # Check to make sure the static flag actually works. # @@ -7967,7 +9128,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -7976,7 +9137,7 @@ else if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes @@ -7986,13 +9147,13 @@ else fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } -if test x"$lt_cv_prog_compiler_static_works" = xyes; then +if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= @@ -8025,16 +9186,16 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8028: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8032: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -8080,16 +9241,16 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8083: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8087: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -8112,8 +9273,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } @@ -8125,9 +9286,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -8155,7 +9316,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported @@ -8171,9 +9331,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if @@ -8188,7 +9348,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. - if test "$GCC" != yes; then + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -8196,30 +9356,57 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; esac ld_shlibs=yes - if test "$with_gnu_ld" = yes; then + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test yes = "$with_gnu_ld"; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v 2>&1` in + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -8231,15 +9418,16 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -8249,7 +9437,7 @@ _LT_EOF case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -8265,7 +9453,7 @@ _LT_EOF allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi @@ -8275,61 +9463,97 @@ _LT_EOF # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='$wl--export-all-symbols' 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' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='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 $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + archive_cmds='$CC -shared $libobjs $deplibs $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, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; 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 $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test "$host_os" = linux-dietlibc; then + if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no + && test no = "$tmp_diet" then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -8340,39 +9564,47 @@ _LT_EOF lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + compiler_needs_object=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in - xlf*) + tcc*) + export_dynamic_flag_spec='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -8386,8 +9618,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 ;; @@ -8405,8 +9637,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 @@ -8418,7 +9650,7 @@ _LT_EOF ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify @@ -8433,9 +9665,9 @@ _LT_EOF # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - 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' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + 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' else ld_shlibs=no fi @@ -8452,15 +9684,15 @@ _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 ;; esac - if test "$ld_shlibs" = no; then + if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= @@ -8476,7 +9708,7 @@ _LT_EOF # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported @@ -8484,32 +9716,57 @@ _LT_EOF ;; aix[4-9]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -8528,13 +9785,21 @@ _LT_EOF hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes - file_list_spec='${wl}-f,' + file_list_spec='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct=no + hardcode_direct_absolute=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -8553,35 +9818,48 @@ _LT_EOF ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - export_dynamic_flag_spec='${wl}-bexpall' + export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. 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 set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8594,34 +9872,47 @@ 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 - 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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" +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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8634,33 +9925,57 @@ 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 - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" +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, # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' + no_undefined_flag=' $wl-bernotok' + allow_undefined_flag=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -8669,7 +9984,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -8689,20 +10004,65 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # 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 `$ECHO "X$deplibs" | $Xsed -e '\''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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $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 + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + 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*) @@ -8712,19 +10072,24 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec='' + fi link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" + allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no @@ -8738,10 +10103,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_shlibpath_var=no ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -8754,7 +10115,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -8763,41 +10124,40 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # 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 ;; 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' + if test yes = "$GCC"; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$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' + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' ;; hpux10*) - if test "$GCC" = yes -a "$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' + if test yes,no = "$GCC,$with_gnu_ld"; then + 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 - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes @@ -8805,33 +10165,72 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + 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 case $host_cpu in hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS=$save_LDFLAGS + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test yes = "$lt_cv_prog_compiler__b"; then + archive_cmds='$CC -b $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 + ;; esac fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in @@ -8842,7 +10241,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *) hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -8853,35 +10252,58 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + 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 ${lt_cv_irix_exported_symbol+:} false; 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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 yes = "$lt_cv_irix_exported_symbol"; 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" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + 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' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs=yes + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out @@ -8896,7 +10318,7 @@ rm -f core conftest.err conftest.$ac_objext \ newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; @@ -8904,27 +10326,19 @@ rm -f core conftest.err conftest.$ac_objext \ *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no @@ -8935,33 +10349,53 @@ rm -f core conftest.err conftest.$ac_objext \ hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes ;; osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_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' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + 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 \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -8972,24 +10406,24 @@ rm -f core conftest.err conftest.$ac_objext \ solaris*) 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' + if test yes = "$GCC"; then + wlarc='$wl' + 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"*) wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + wlarc='$wl' + archive_cmds='$CC -G$allow_undefined_flag -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -8999,11 +10433,11 @@ rm -f core conftest.err conftest.$ac_objext \ solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', + # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + if test yes = "$GCC"; then + whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi @@ -9013,10 +10447,10 @@ rm -f core conftest.err conftest.$ac_objext \ ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi @@ -9065,43 +10499,43 @@ rm -f core conftest.err conftest.$ac_objext \ ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' + no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' + no_undefined_flag='$wl-z,text' + allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' + export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -9116,10 +10550,10 @@ rm -f core conftest.err conftest.$ac_objext \ ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' + export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi @@ -9127,7 +10561,7 @@ rm -f core conftest.err conftest.$ac_objext \ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no +test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -9153,7 +10587,7 @@ x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -9164,44 +10598,50 @@ x|xyes) # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + 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; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi @@ -9353,11 +10793,6 @@ esac - - - - - @@ -9367,44 +10802,58 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -9414,14 +10863,20 @@ BEGIN {RS=" "; FS="/|\n";} { if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's|/\([A-Za-z]:\)|\1|g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -9438,56 +10893,108 @@ hardcode_into_libs=no # flags to be left without arguments need_version=unknown + + case $host_os in aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -9497,27 +11004,27 @@ amigaos*) powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -9529,16 +11036,17 @@ bsdi[45]*) cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll 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}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + 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~ @@ -9554,37 +11062,84 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - 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 + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + 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' ;; *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + # 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 ;; @@ -9594,8 +11149,8 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -9605,18 +11160,14 @@ darwin* | rhapsody*) ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -9624,25 +11175,26 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -9661,13 +11213,16 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -9684,14 +11239,15 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -9699,8 +11255,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -9709,20 +11265,22 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -9733,16 +11291,16 @@ irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -9761,8 +11319,8 @@ irix5* | irix6* | nonstopux*) esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -9771,22 +11329,47 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux +linux*android*) + version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec='-L$libdir' + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9799,22 +11382,31 @@ main () _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -9832,12 +11424,12 @@ netbsd*) need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -9846,8 +11438,8 @@ netbsd*) ;; newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -9856,58 +11448,68 @@ newsos6) version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + 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~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -9915,11 +11517,11 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -9929,20 +11531,20 @@ solaris*) sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -9963,24 +11565,24 @@ sysv4 | sysv4.3*) ;; sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -9995,19 +11597,19 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -10017,20 +11619,40 @@ uts4*) esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + + + + + + @@ -10122,15 +11744,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then + test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && + if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && + test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else @@ -10145,12 +11767,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -10160,7 +11782,7 @@ fi - if test "x$enable_dlopen" != xyes; then + if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -10170,23 +11792,23 @@ else case $host_os in beos*) - lt_cv_dlopen="load_add_on" + lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : @@ -10224,10 +11846,10 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else - lt_cv_dlopen="dyld" + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes @@ -10235,10 +11857,18 @@ fi ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" + lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } @@ -10277,11 +11907,11 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" + lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } @@ -10320,7 +11950,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } @@ -10359,7 +11989,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } @@ -10398,7 +12028,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" + lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -10419,21 +12049,21 @@ fi ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 @@ -10441,13 +12071,13 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10450 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10488,7 +12118,13 @@ else # endif #endif -void fnord() { int i=42;} +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10497,7 +12133,11 @@ int main () if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -10510,7 +12150,7 @@ _LT_EOF (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -10530,20 +12170,20 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } - if test "x$lt_cv_dlopen_self" = xyes; then + if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10546 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10584,7 +12224,13 @@ else # endif #endif -void fnord() { int i=42;} +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -10593,7 +12239,11 @@ int main () if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -10606,7 +12256,7 @@ _LT_EOF (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -10627,9 +12277,9 @@ fi $as_echo "$lt_cv_dlopen_self_static" >&6; } fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -10673,7 +12323,7 @@ else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -10701,7 +12351,7 @@ fi - # Report which library types will actually be built + # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 @@ -10709,13 +12359,13 @@ $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -10723,8 +12373,12 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } ;; aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -10734,7 +12388,7 @@ $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -10748,7 +12402,9 @@ 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 -CC="$lt_save_CC" +CC=$lt_save_CC + + @@ -11338,6 +12994,65 @@ 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 +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +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 + + depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -11466,131 +13181,6 @@ else fi -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - ac_ext=cpp @@ -11985,394 +13575,18 @@ fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - 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 ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $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 -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -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 ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $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_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - 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 - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () +func_stripname_cnf () { -#ifndef __GNUC__ - choke me -#endif + 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 - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -depcc="$CXX" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CXX_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named 'D' -- because '-MD' means "put the output - # in D". - rm -rf conftest.dir - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CXX_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with - # Solaris 10 /bin/sh. - echo '/* dummy */' > sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with '-c' and '-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle '-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # After this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested. - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok '-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CXX_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CXX_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } -CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then - am__fastdepCXX_TRUE= - am__fastdepCXX_FALSE='#' -else - am__fastdepCXX_TRUE='#' - am__fastdepCXX_FALSE= -fi - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then + if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -12496,7 +13710,8 @@ 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;} -_lt_caught_CXX_error=yes; } +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp @@ -12509,9 +13724,6 @@ else _lt_caught_CXX_error=yes fi - - - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -12527,7 +13739,6 @@ export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported @@ -12537,6 +13748,8 @@ module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no @@ -12552,7 +13765,7 @@ objext_CXX=$objext # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then +if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" @@ -12592,6 +13805,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 @@ -12609,48 +13823,42 @@ $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 - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + func_cc_basename $compiler +cc_basename=$func_cc_basename_result if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately - if test "$GXX" = yes; then + if test yes = "$GXX"; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi - if test "$GXX" = yes; then + if test yes = "$GXX"; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -12664,7 +13872,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -12675,7 +13883,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -12686,32 +13894,32 @@ if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -12747,22 +13955,22 @@ 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' + if test yes = "$with_gnu_ld"; then + 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' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) - wlarc='${wl}' + wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec_CXX= fi @@ -12781,7 +13989,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -12799,18 +14007,30 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie ld_shlibs_CXX=no ;; aix[4-9]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in @@ -12820,6 +14040,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie ;; esac done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -12838,13 +14065,21 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes - file_list_spec_CXX='${wl}-f,' + file_list_spec_CXX='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct_CXX=no + hardcode_direct_absolute_CXX=no + ;; + esac - if test "$GXX" = yes; then + if test yes = "$GXX"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -12862,36 +14097,50 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie fi esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - export_dynamic_flag_spec_CXX='${wl}-bexpall' + export_dynamic_flag_spec_CXX='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' + # The "-G" linker flag allows undefined symbols. + no_undefined_flag_CXX='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -12904,35 +14153,48 @@ 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 - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" +fi - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + aix_libpath=$lt_cv_aix_libpath__CXX +fi + + hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test set = "${lt_cv_aix_libpath+set}"; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -12945,34 +14207,58 @@ 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 - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" +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, # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' + no_undefined_flag_CXX=' $wl-bernotok' + allow_undefined_flag_CXX=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -12982,7 +14268,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi @@ -12998,28 +14284,76 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; 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' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes + 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $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 - ;; + 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, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; 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*) @@ -13027,22 +14361,27 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + + else + whole_archive_flag_spec_CXX='' + fi link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + allow_undefined_flag_CXX=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + if test yes != "$lt_cv_apple_cc_single_mod"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else @@ -13051,6 +14390,34 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; + os2*) + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_minus_L_CXX=yes + allow_undefined_flag_CXX=unsupported + shrext_cmds=.dll + archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes_CXX=yes + ;; + dgux*) case $cc_basename in ec++*) @@ -13069,7 +14436,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi esac ;; - freebsd[12]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no @@ -13085,13 +14452,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs_CXX=yes ;; - gnu*) + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + link_all_deplibs_CXX=yes ;; hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' + export_dynamic_flag_spec_CXX='$wl-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default @@ -13103,7 +14472,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs_CXX=no ;; aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${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 -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -13112,11 +14481,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - 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' + if test yes = "$GXX"; then + 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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -13126,15 +14495,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) - export_dynamic_flag_spec_CXX='${wl}-E' + export_dynamic_flag_spec_CXX='$wl-E' ;; esac fi @@ -13160,13 +14529,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi aCC*) case $host_cpu in hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists @@ -13177,20 +14546,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + 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 @@ -13205,22 +14574,22 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -13229,22 +14598,22 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) - 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -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 ;; esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -13252,8 +14621,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -13262,10 +14631,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. @@ -13279,59 +14648,59 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $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 -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in - *pgCC\ [1-5]* | *pgcpp\ [1-5]*) + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; - *) # Version 6 will use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + *) # Version 6 and above use weak symbols + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' @@ -13345,18 +14714,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; - xl*) + xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) @@ -13364,16 +14733,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -13425,24 +14794,19 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ld_shlibs_CXX=yes ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='$wl-E' + whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi @@ -13456,9 +14820,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using @@ -13476,17 +14840,17 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi cxx*) case $host in osf3*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' + archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac @@ -13501,27 +14865,27 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + if test yes,no = "$GXX,$with_gnu_ld"; then + allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' case $host in osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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-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" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${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 - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -13557,13 +14921,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no @@ -13571,14 +14935,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. + # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -13588,42 +14952,42 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; gcx*) # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if test yes,no = "$GXX,$with_gnu_ld"; 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 $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 $wl-h $wl$soname -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 # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else - # g++ 2.7 appears to require `-G' NOT `-shared' on this + # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -G -nostdlib $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 -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -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 # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi @@ -13632,48 +14996,52 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' + no_undefined_flag_CXX='$wl-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' + no_undefined_flag_CXX='$wl-z,text' + allow_undefined_flag_CXX='$wl-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' + hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' + export_dynamic_flag_spec_CXX='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" ;; *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; @@ -13705,10 +15073,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } - test "$ld_shlibs_CXX" = no && can_build_shared=no + test no = "$ld_shlibs_CXX" && can_build_shared=no - GCC_CXX="$GXX" - LD_CXX="$LD" + GCC_CXX=$GXX + LD_CXX=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -13731,6 +15099,14 @@ private: }; _LT_EOF + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13744,29 +15120,38 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 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. # Remove the space. - if test $p = "-L" || - test $p = "-R"; then + if test x-L = "$p" || + test x-R = "$p"; then prev=$p continue - else - prev= fi - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + # 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 no = "$pre_test_object_deps_done"; then + 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. if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" + compiler_lib_search_path_CXX=$prev$p else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" fi ;; # The "-l" case would never come before the object being @@ -13774,13 +15159,15 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 esac else if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" + postdeps_CXX=$prev$p else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" + 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. @@ -13789,15 +15176,15 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 continue fi - if test "$pre_test_object_deps_done" = no; then + if test no = "$pre_test_object_deps_done"; then if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" + predep_objects_CXX=$p else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" + postdep_objects_CXX=$p else postdep_objects_CXX="$postdep_objects_CXX $p" fi @@ -13816,6 +15203,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 @@ -13826,51 +15214,6 @@ interix[3-9]*) postdep_objects_CXX= postdeps_CXX= ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; esac @@ -13879,7 +15222,7 @@ case " $postdeps_CXX " in esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi @@ -13916,21 +15259,20 @@ 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 + if test yes = "$GXX"; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi + lt_prog_compiler_pic_CXX='-fPIC' ;; amigaos*) @@ -13941,8 +15283,8 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -13957,6 +15299,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static_CXX='$wl-static' + ;; + esac ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -13967,6 +15314,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_CXX= + ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. @@ -14001,7 +15353,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } case $host_os in aix[4-9]*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else @@ -14016,6 +15368,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; 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++*) @@ -14036,14 +15393,14 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then + lt_prog_compiler_static_CXX='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + lt_prog_compiler_static_CXX='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default @@ -14072,7 +15429,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; esac ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -14080,7 +15437,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. + # old Intel C++ for x86_64, which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' @@ -14105,8 +15462,8 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' @@ -14168,7 +15525,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' @@ -14225,7 +15582,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } fi case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; @@ -14233,10 +15590,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 ${lt_cv_prog_compiler_pic_CXX+:} false; 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. @@ -14250,7 +15614,7 @@ else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -14260,15 +15624,15 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14263: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14267: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes @@ -14280,7 +15644,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then +if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; @@ -14294,6 +15658,8 @@ fi + + # # Check to make sure the static flag actually works. # @@ -14304,7 +15670,7 @@ if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -14313,7 +15679,7 @@ else if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes @@ -14323,13 +15689,13 @@ else fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then +if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : else lt_prog_compiler_static_CXX= @@ -14359,16 +15725,16 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14362: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14366: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes @@ -14411,16 +15777,16 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14414: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14418: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes @@ -14443,8 +15809,8 @@ $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } @@ -14456,9 +15822,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -14471,31 +15837,45 @@ 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. - # -C means demangle to AIX nm, but means don't demangle with GNU nm + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" - ;; + 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*) + exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + 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; } -test "$ld_shlibs_CXX" = no && can_build_shared=no +test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld @@ -14512,7 +15892,7 @@ x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -14523,44 +15903,50 @@ x|xyes) # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + 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; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 -$as_echo "$archive_cmds_need_lc_CXX" >&6; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi @@ -14625,8 +16011,6 @@ esac - - @@ -14636,7 +16020,7 @@ $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -14653,56 +16037,108 @@ hardcode_into_libs=no # flags to be left without arguments need_version=unknown + + case $host_os in aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -14712,27 +16148,27 @@ amigaos*) powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -14744,16 +16180,17 @@ bsdi[45]*) cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll 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}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + 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~ @@ -14769,37 +16206,83 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - 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 + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + 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' ;; *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + # 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 ;; @@ -14809,8 +16292,8 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -14819,18 +16302,14 @@ darwin* | rhapsody*) ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -14838,25 +16317,26 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -14875,13 +16355,16 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -14898,14 +16381,15 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -14913,8 +16397,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -14923,20 +16407,22 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -14947,16 +16433,16 @@ irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -14975,8 +16461,8 @@ irix5* | irix6* | nonstopux*) esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -14985,22 +16471,47 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux +linux*android*) + version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec_CXX='-L$libdir' + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -15013,22 +16524,31 @@ main () _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -15046,12 +16566,12 @@ netbsd*) need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -15060,8 +16580,8 @@ netbsd*) ;; newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -15070,58 +16590,68 @@ newsos6) version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + 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~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -15129,11 +16659,11 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -15143,20 +16673,20 @@ solaris*) sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -15177,24 +16707,24 @@ sysv4 | sysv4.3*) ;; sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -15209,19 +16739,19 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -15231,20 +16761,34 @@ uts4*) esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + @@ -15285,15 +16829,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || - test "X$hardcode_automatic_CXX" = "Xyes" ; then + test yes = "$hardcode_automatic_CXX"; then # We can hardcode non-existent directories. - if test "$hardcode_direct_CXX" != no && + if test no != "$hardcode_direct_CXX" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && + test no != "$hardcode_minus_L_CXX"; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else @@ -15308,12 +16852,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } -if test "$hardcode_action_CXX" = relink || - test "$inherit_rpath_CXX" = yes; then +if test relink = "$hardcode_action_CXX" || + test yes = "$inherit_rpath_CXX"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -15327,6 +16871,7 @@ fi fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -15335,7 +16880,7 @@ fi lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes +fi # test yes != "$_lt_caught_CXX_error" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -15706,6 +17251,18 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + + @@ -16025,97 +17582,6 @@ done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether putenv is in std" >&5 -$as_echo_n "checking whether putenv is in std... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -std::putenv("a=b"); - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_PUTENV_IN_STD 1" >>confdefs.h - -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_ext - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv is in std" >&5 -$as_echo_n "checking whether setenv is in std... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -std::setenv("a", "b"); - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_SETENV_IN_STD 1" >>confdefs.h - -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_ext - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv is in std" >&5 -$as_echo_n "checking whether unsetenv is in std... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -std::unsetenv("a"); - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_UNSETENV_IN_STD 1" >>confdefs.h - -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_ext - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether basename takes a constant pointer" >&5 $as_echo_n "checking whether basename takes a constant pointer... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16218,51 +17684,6 @@ $as_echo "#define HAVE_GETCWD_DYN 1" >>confdefs.h fi - for ac_func in unmount -do : - ac_fn_cxx_check_func "$LINENO" "unmount" "ac_cv_func_unmount" -if test "x$ac_cv_func_unmount" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_UNMOUNT 1 -_ACEOF - -fi -done - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is in std" >&5 -$as_echo_n "checking whether snprintf is in std... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -char buf; - std::snprintf(&buf, 1, ""); - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_SNPRINTF_IN_STD 1" >>confdefs.h - -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_ext - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the last valid signal" >&5 $as_echo_n "checking for the last valid signal... " >&6; } @@ -16412,26 +17833,6 @@ atf_machine=${atf_machine} -if test x"${ATF_CONFSUBDIR-unset}" = x"unset"; then - ATF_CONFSUBDIR=atf -else - case ${ATF_CONFSUBDIR} in - /*) - as_fn_error $? "ATF_CONFSUBDIR must hold a relative path" "$LINENO" 5 - ;; - *) - ;; - esac -fi -if test x"${ATF_CONFSUBDIR}" = x""; then - atf_confdir=\${sysconfdir} - -else - atf_confdir=\${sysconfdir}/${ATF_CONFSUBDIR} - -fi - - if test x"${ATF_WORKDIR}" = x""; then for t in /tmp /var/tmp; do if test -d ${t}; then @@ -16452,6 +17853,26 @@ else esac fi + +if test x"${ATF_CONFSUBDIR-unset}" = x"unset"; then + ATF_CONFSUBDIR=atf +else + case ${ATF_CONFSUBDIR} in + /*) + as_fn_error $? "ATF_CONFSUBDIR must hold a relative path" "$LINENO" 5 + ;; + *) + ;; + esac +fi +if test x"${ATF_CONFSUBDIR}" = x""; then + atf_confdir=\${sysconfdir} + +else + atf_confdir=\${sysconfdir}/${ATF_CONFSUBDIR} + +fi + atf_aclocaldir=\${datadir}/aclocal atf_cssdir=\${datadir}/examples/atf @@ -16657,7 +18078,7 @@ fi -ac_config_files="$ac_config_files Makefile atf-c/defs.h" +ac_config_files="$ac_config_files Makefile atf-c/defs.h tools/defs.hpp" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -16804,10 +18225,6 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" 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. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${HAVE_KYUA_TRUE}" && test -z "${HAVE_KYUA_FALSE}"; then as_fn_error $? "conditional \"HAVE_KYUA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -17209,7 +18626,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Automated Testing Framework $as_me 0.17, which was +This file was extended by Automated Testing Framework $as_me 0.21, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17269,14 +18686,14 @@ $config_headers Configuration commands: $config_commands -Report bugs to . -Automated Testing Framework home page: ." +Report bugs to . +Automated Testing Framework home page: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Automated Testing Framework config.status 0.17 +Automated Testing Framework config.status 0.21 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -17406,184 +18823,213 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' -predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' -postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +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"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +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_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $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"`' +lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $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"`' +lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $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_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"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +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"`' +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"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' +configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +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_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"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +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"`' +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"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + # Quote evaled strings. -for var in SED \ +for var in SHELL \ +ECHO \ +PATH_SEPARATOR \ +SED \ GREP \ EGREP \ FGREP \ @@ -17596,8 +19042,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 \ @@ -17605,16 +19056,19 @@ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ +lt_cv_nm_interface \ +nm_file_list_spec \ +lt_cv_truncate_bin \ 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 \ @@ -17628,9 +19082,7 @@ with_gnu_ld \ allow_undefined_flag \ 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 \ @@ -17638,6 +19090,7 @@ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ +install_override_mode \ finish_eval \ old_striplib \ striplib \ @@ -17648,10 +19101,11 @@ predeps \ postdeps \ compiler_lib_search_path \ 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 \ @@ -17661,9 +19115,7 @@ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ 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 \ @@ -17673,9 +19125,9 @@ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -17697,11 +19149,14 @@ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec \ +configure_time_dlsearch_path \ +configure_time_lt_sys_library_path \ +reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ @@ -17710,10 +19165,11 @@ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ -prelink_cmds_CXX; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in +prelink_cmds_CXX \ +postlink_cmds_CXX; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -17721,26 +19177,17 @@ prelink_cmds_CXX; do esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' @@ -17757,12 +19204,13 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in - "bconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS bconfig.h" ;; + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "bootstrap/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS bootstrap/atconfig" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "atf-c/defs.h") CONFIG_FILES="$CONFIG_FILES atf-c/defs.h" ;; + "tools/defs.hpp") CONFIG_FILES="$CONFIG_FILES tools/defs.hpp" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -18382,7 +19830,7 @@ SHELL=\${CONFIG_SHELL-'$SHELL'} ATEOF ;; "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -18433,7 +19881,7 @@ $as_echo X"$mf" | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the @@ -18476,54 +19924,53 @@ $as_echo X"$file" | ;; "libtool":C) - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +# Copyright (C) 2014 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. + +# 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 of the License, or +# (at your option) any later version. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. # -# 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# 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. +# along with this program. If not, see . # The names of the tagged configurations supported by this script. -available_tags="CXX " +available_tags='CXX ' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG @@ -18543,6 +19990,18 @@ pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -18592,9 +20051,11 @@ SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +# 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 @@ -18602,13 +20063,30 @@ 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 @@ -18617,6 +20095,9 @@ RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + # A C compiler. LTCC=$lt_CC @@ -18629,27 +20110,39 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # 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 +# The name lister interface. +nm_interface=$lt_lt_cv_nm_interface + +# 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 where our libraries should be installed. +lt_sysroot=$lt_sysroot + +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + # The name of the directory that contains temporary libtool files. objdir=$objdir -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO - # Used to examine libraries when file_magic_cmd begins with "file". 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 @@ -18706,6 +20199,9 @@ library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds @@ -18725,8 +20221,11 @@ hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen @@ -18745,6 +20244,10 @@ striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds @@ -18757,12 +20260,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 @@ -18812,20 +20315,16 @@ no_undefined_flag=$lt_no_undefined_flag # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute @@ -18849,9 +20348,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 @@ -18867,6 +20363,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 @@ -18889,6 +20388,65 @@ compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + _LT_EOF case $host_os in @@ -18897,7 +20455,7 @@ _LT_EOF # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -18906,219 +20464,17 @@ _LT_EOF esac -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # 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) - 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 "X${1}" | $Xsed -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 file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$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 "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "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 "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e '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 -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" @@ -19130,6 +20486,10 @@ _LT_EOF # The linker used to build libraries. LD=$lt_LD_CXX +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX @@ -19142,12 +20502,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 @@ -19197,20 +20557,16 @@ no_undefined_flag=$lt_no_undefined_flag_CXX # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX @@ -19234,9 +20590,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 @@ -19252,6 +20605,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 diff --git a/unit/atf-src/configure.ac b/unit/atf-src/configure.ac index 14ac2c7d10..bc8506402b 100644 --- a/unit/atf-src/configure.ac +++ b/unit/atf-src/configure.ac @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright (c) 2007 The NetBSD Foundation, Inc. dnl All rights reserved. dnl @@ -25,21 +22,21 @@ dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl dnl ----------------------------------------------------------------------- dnl Initialize the GNU build system. dnl ----------------------------------------------------------------------- -AC_INIT([Automated Testing Framework], [0.17], [atf-devel@NetBSD.org], [atf], - [http://code.google.com/p/kyua/wiki/ATF]) +AC_INIT([Automated Testing Framework], [0.21], + [atf-discuss@googlegroups.com], [atf], + [https://github.com/jmmv/atf/]) AC_PREREQ([2.65]) AC_COPYRIGHT([Copyright (c) 2007-2012 The NetBSD Foundation, Inc.]) AC_DEFINE([PACKAGE_COPYRIGHT], ["Copyright (c) 2007-2012 The NetBSD Foundation, Inc."], [Define to the copyright string applicable to this package.]) AC_CONFIG_AUX_DIR([admin]) -AC_CONFIG_HEADERS([bconfig.h]) +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([atf-c.h]) AC_CONFIG_TESTDIR([bootstrap]) @@ -48,6 +45,7 @@ AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([1.9 check-news foreign subdir-objects -Wall]) +AM_PROG_AR LT_INIT AC_ARG_ENABLE(tools, @@ -86,11 +84,13 @@ fi KYUA_DEVELOPER_MODE([C,C++]) +dnl TODO(jmmv): Remove once the atf-*-api.3 symlinks are removed. +AC_PROG_LN_S + ATF_MODULE_APPLICATION ATF_MODULE_DEFS ATF_MODULE_ENV ATF_MODULE_FS -ATF_MODULE_SANITY ATF_MODULE_SIGNALS AC_CHECK_TYPE([timer_t], [], [], [[#include ]]) @@ -137,25 +137,6 @@ dnl ----------------------------------------------------------------------- dnl User-customizable variables. dnl ----------------------------------------------------------------------- -AC_ARG_VAR([ATF_CONFSUBDIR], - [Subdirectory of sysconfdir under which to look for files]) -if test x"${ATF_CONFSUBDIR-unset}" = x"unset"; then - ATF_CONFSUBDIR=atf -else - case ${ATF_CONFSUBDIR} in - /*) - AC_MSG_ERROR([ATF_CONFSUBDIR must hold a relative path]) - ;; - *) - ;; - esac -fi -if test x"${ATF_CONFSUBDIR}" = x""; then - AC_SUBST(atf_confdir, \${sysconfdir}) -else - AC_SUBST(atf_confdir, \${sysconfdir}/${ATF_CONFSUBDIR}) -fi - AC_ARG_VAR([ATF_WORKDIR], [Default location to use for ATF work directories]) if test x"${ATF_WORKDIR}" = x""; then @@ -178,6 +159,25 @@ else esac fi +AC_ARG_VAR([ATF_CONFSUBDIR], + [Subdirectory of sysconfdir under which to look for files]) +if test x"${ATF_CONFSUBDIR-unset}" = x"unset"; then + ATF_CONFSUBDIR=atf +else + case ${ATF_CONFSUBDIR} in + /*) + AC_MSG_ERROR([ATF_CONFSUBDIR must hold a relative path]) + ;; + *) + ;; + esac +fi +if test x"${ATF_CONFSUBDIR}" = x""; then + AC_SUBST(atf_confdir, \${sysconfdir}) +else + AC_SUBST(atf_confdir, \${sysconfdir}/${ATF_CONFSUBDIR}) +fi + AC_SUBST(atf_aclocaldir, \${datadir}/aclocal) AC_SUBST(atf_cssdir, \${datadir}/examples/atf) AC_SUBST(atf_dtddir, \${datadir}/xml/atf) @@ -218,7 +218,7 @@ dnl ----------------------------------------------------------------------- dnl Finally, generate output. dnl ----------------------------------------------------------------------- -AC_OUTPUT([Makefile atf-c/defs.h]) +AC_OUTPUT([Makefile atf-c/defs.h tools/defs.hpp]) if test ${enable_tools} = yes; then AC_MSG_WARN([Building the deprecated ATF tools (atf-run and atf-report);]) diff --git a/unit/atf-src/doc/Makefile.am.inc b/unit/atf-src/doc/Makefile.am.inc index 858ff04715..5f8a4a3612 100644 --- a/unit/atf-src/doc/Makefile.am.inc +++ b/unit/atf-src/doc/Makefile.am.inc @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,26 +22,19 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# dist_man_MANS += doc/atf-test-case.4 \ doc/atf-test-program.1 -if ENABLE_TOOLS - man_MANS += doc/atf.7 CLEANFILES += doc/atf.7 EXTRA_DIST += doc/atf.7.in -dist_man_MANS += doc/atf-formats.5 - doc/atf.7: $(srcdir)/doc/atf.7.in - test -d doc || mkdir -p doc + $(AM_V_GEN)test -d doc || mkdir -p doc; \ sed -e 's#__DOCDIR__#$(docdir)#g' \ -e 's#__TESTSDIR__#$(testsdir)#g' \ - <$(srcdir)/doc/atf.7.in >doc/atf.7.tmp + <$(srcdir)/doc/atf.7.in >doc/atf.7.tmp; \ mv doc/atf.7.tmp doc/atf.7 -endif - # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 diff --git a/unit/atf-src/doc/atf-test-case.4 b/unit/atf-src/doc/atf-test-case.4 index e1b2bf45ca..30254118ce 100644 --- a/unit/atf-src/doc/atf-test-case.4 +++ b/unit/atf-src/doc/atf-test-case.4 @@ -1,6 +1,3 @@ -.\" -.\" Automated Testing Framework (atf) -.\" .\" Copyright (c) 2007 The NetBSD Foundation, Inc. .\" All rights reserved. .\" @@ -25,8 +22,7 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd January 13, 2011 +.Dd October 5, 2014 .Dt ATF-TEST-CASE 4 .Os .Sh NAME @@ -123,8 +119,9 @@ The usefulness of the .Sq expected_* results comes when writing test cases that verify known failures caused, in general, due to programming errors (aka bugs). -Whenever the faulty condition that the expectation is trying to convery is -fixed, then the test case will be reported as +Whenever the faulty condition that the +.Sq expected_* +result is trying to cover is fixed, then the test case will be reported as .Sq failed and the developer will have to adjust it to match its new condition. .Pp @@ -170,9 +167,7 @@ Type: boolean. Optional. .Pp If set to true, specifies that the test case has a cleanup routine that has -to be executed by -.Xr atf-run 1 -during the cleanup phase of the execution. +to be executed by the runtime engine during the cleanup phase of the execution. This property is automatically set by the framework when defining a test case with a cleanup routine, so it should never be set by hand. .It ident @@ -195,6 +190,17 @@ A whitespace separated list of configuration variables that must be defined to execute the test case. If any of the required variables is not defined, the test case is .Em skipped . +.It require.diskspace +Type: integer. +Optional. +Specifies the minimum amount of available disk space needed by the test. +The value can have a size suffix such as +.Sq K , +.Sq M , +.Sq G +or +.Sq T +to make the amount of bytes easier to type and read. .It require.files Type: textual. Optional. @@ -250,8 +256,7 @@ the test case is .Pp If the test case is running as root and this property is .Sq unprivileged , -.Xr atf-run 1 -will automatically drop the privileges if the +the runtime engine will automatically drop the privileges if the .Sq unprivileged-user configuration property is set; otherwise the test case is .Em skipped . @@ -313,7 +318,4 @@ Test cases are always executed with a file creation mode mask (umask) of .Sq 0022 . The test case's code is free to change this during execution. .Sh SEE ALSO -.Xr atf-run 1 , -.Xr atf-test-program 1 , -.Xr atf-formats 5 , -.Xr atf 7 +.Xr atf-test-program 1 diff --git a/unit/atf-src/doc/atf-test-program.1 b/unit/atf-src/doc/atf-test-program.1 index 49ee12ddff..0ca1963554 100644 --- a/unit/atf-src/doc/atf-test-program.1 +++ b/unit/atf-src/doc/atf-test-program.1 @@ -1,6 +1,3 @@ -.\" -.\" Automated Testing Framework (atf) -.\" .\" Copyright (c) 2007 The NetBSD Foundation, Inc. .\" All rights reserved. .\" @@ -25,8 +22,7 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd February 6, 2011 +.Dd March 2, 2014 .Dt ATF-TEST-PROGRAM 1 .Os .Sh NAME @@ -61,16 +57,17 @@ instead of the test case body; see Note that the test case is .Em executed without isolation , so it can and probably will create and modify files in the current directory. -To execute test cases in a controller manner, refer to -.Xr atf-run 1 , -which is the preferred way to run test cases. +To execute test cases in a controller manner, you need a runtime engine +that understands the ATF interface. +The recommended runtime engine is +.Xr kyua 1 . You should only execute test cases by hand for debugging purposes. .Pp In the second synopsis form, the test program will list all available test cases alongside their meta-data properties in a format that is machine parseable. This list is processed by -.Xr atf-run 1 +.Xr kyua 1 to know how to execute the test cases of a given test program. .Pp The following options are available: @@ -99,5 +96,4 @@ to the value .Ar value . .El .Sh SEE ALSO -.Xr atf-run 1 , -.Xr atf 7 +.Xr kyua 1 diff --git a/unit/atf-src/doc/atf.7.in b/unit/atf-src/doc/atf.7.in index 5fcca44df1..ded00c1120 100644 --- a/unit/atf-src/doc/atf.7.in +++ b/unit/atf-src/doc/atf.7.in @@ -1,6 +1,3 @@ -.\" -.\" Automated Testing Framework (atf) -.\" .\" Copyright (c) 2007 The NetBSD Foundation, Inc. .\" All rights reserved. .\" @@ -25,96 +22,54 @@ .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd August 28, 2010 +.Dd September 14, 2014 .Dt ATF 7 .Os .Sh NAME .Nm ATF .Nd introduction to the Automated Testing Framework .Sh DESCRIPTION -.Em IMPORTANT: If you are here because you want to know how to run the tests in -.Em Pa __TESTSDIR__ , -.Em you most likely want to read the -.Em Xr tests 7 -.Em manual page instead. -.Pp The Automated Testing Framework .Pf ( Nm ) -is a collection of libraries and utilities designed to ease unattended -application testing in the hands of developers and end users of a specific -piece of software. +is a +.Em collection of libraries +to implement test programs in a variety of languages. +These libraries all offer similar functionality and any test program +written with them exposes a consistent user interface. .Pp -As regards developers, +Test programs using the .Nm -provides the necessary means to easily create -test suites composed of multiple test programs, which in turn are a -collection of test cases. -It also attempts to simplify the debugging of problems when these test -cases detect an error by providing as much information as possible -about the failure. -.Pp -As regards users, it simplifies the process of running the test suites and, -in special, encourages end users to run them often: they do not need to -have source trees around nor any other development tools installed to be -able to certify that a given piece of software works on their machine as -advertised. +libraries rely on a separate runtime engine to execute them in a +deterministic fashion. +The runtime engine isolates the test programs from the rest of the system +and ensures some common side-effects are cleaned up. +The runtime engine is also responsible for gathering the results of all +tests and composing reports. +The current runtime of choice is Kyua, described in +.Xr kyua 1 . .Pp If your operating systems distributes .Nm , -it is possible that it provides an introductory +it should also provide an introductory .Xr tests 7 manual page. You are encouraged to read it now. -.Ss License -.Nm -is distributed under the terms of the TNF License, a 2-clause BSD license. -For more details please see: -.Bd -literal -offset indent -.Pa __DOCDIR__/COPYING -.Ed -.Ss Components -.Nm -is a highly modular piece of software. -It provides a couple of libraries to ease the implementation of test -programs: one for the C and C++ languages and another one for shell -scripts. -It also includes multiple small utilities that follow the principle of -doing a single thing but doing it right. -This section outlines which these components are. .Pp -Public utilities: +The rest of this manual page serves as a cross-reference to all the other +documentation shipped with +.Nm . +.Ss Language bindings .Bl -tag -width atfXtestXprogramXXXXX -.It Xr atf-check 1 -Executes a command and checks that its exit code, its standard output -and its standard error output match pre-specified expected values. -.It Xr atf-config 1 -Queries static configuration information. -.It Xr atf-report 1 -Converts the output of -.Nm atf-run -to user-friendly and/or machine-parseable reports. -.It Xr atf-run 1 -Automates the execution of a series of test programs and collects their -results in a unified report. -.It Xr atf-sh 1 -Shell interpreter for shell-based test programs. +.It Xr atf-c 3 +C programming interface. +.It Xr atf-c++ 3 +C++ programming interface. +.It Xr atf-sh 3 +.Xr sh 1 +programming interface. .El -.Pp -Programming interfaces: +.Ss Miscellaneous pages .Bl -tag -width atfXtestXprogramXXXXX -.It Xr atf-c-api 3 -C programming interface for test programs. -.It Xr atf-c++-api 3 -C++ programming interface for test programs. -.It Xr atf-sh-api 3 -POSIX shell programming interface for test programs. -.El -.Pp -Other: -.Bl -tag -width atfXtestXprogramXXXXX -.It Xr atf-formats 5 -Description of the machine-parseable data formats used by the tools. .It Xr atf-test-case 4 Generic description of test cases, independent of the language they are implemented in. @@ -123,70 +78,43 @@ Common interface provided by the test programs written using the .Nm libraries. .El -.Ss Recommended reading order -For end users wishing to run tests: -.Bl -enum -compact -.It -.Xr tests 7 -(only if provided by your operating system). -.It -.Xr atf-test-program 1 -.It -.Xr atf-run 1 -.It -.Xr atf-report 1 -.It -.Xr atf-config 1 -.El -.Pp -For developers wanting to write their own tests: -.Bl -enum -compact -.It -Everything recommended to users. -.It -.Xr atf-test-case 4 -.It -.Xr atf-c-api 3 -.It -.Xr atf-c++-api 3 -.It -.Xr atf-sh-api 3 -.It -.Xr atf-sh 1 -.It -.Xr atf-check 1 -.El -.Pp -For those interested in -.Nm -internals: -.Bl -enum -compact -.It -Everything recommended to users. -.It -Everything recommended to developers. -.It -.Xr atf-formats 5 -.El .Sh SEE ALSO +.Xr kyua 1 , .Xr tests 7 .Sh HISTORY .Nm started as a Google Summer of Code 2007 project mentored by The NetBSD Foundation. -Its original goal was to provide a testing framework for The NetBSD -Operating System, but it grew as an independent project because the +Its original goal was to provide a testing framework for the +.Nx +operating system, but it grew as an independent project because the framework itself did not need to be tied to a specific operating system. .Pp -For more details on this subject, please see: +Originally, +.Nm +shipped the collection of libraries described in this manual page as well +as a runtime engine. +The runtime engine has since been replaced by Kyua and the old tools were +removed in +.Nm 0.20 , +which shipped in early 2014. +.Pp +As of late 2014, both +.Fx +and +.Nx +ship +.Nm +in their base systems and provide extensive test suites based on it. +.Pp +For more details on historical changes, refer to: .Bd -literal -offset indent .Pa __DOCDIR__/NEWS -.Pa __DOCDIR__/ROADMAP .Ed .Sh AUTHORS For more details on the people that made .Nm -possible, please see: +possible, refer to: .Bd -literal -offset indent .Pa __DOCDIR__/AUTHORS .Ed diff --git a/unit/atf-src/m4/cxx-std-funcs.m4 b/unit/atf-src/m4/cxx-std-funcs.m4 index d2266b4d5b..24b442e1ad 100644 --- a/unit/atf-src/m4/cxx-std-funcs.m4 +++ b/unit/atf-src/m4/cxx-std-funcs.m4 @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright (c) 2007 The NetBSD Foundation, Inc. dnl All rights reserved. dnl @@ -25,7 +22,6 @@ dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl AC_DEFUN([ATF_CHECK_IN_STD], [ AC_MSG_CHECKING(whether $1 is in std) @@ -38,35 +34,6 @@ AC_DEFUN([ATF_CHECK_IN_STD], [ ) ]) -AC_DEFUN([ATF_CHECK_STD_PUTENV], [ - ATF_CHECK_IN_STD([putenv], - [#include ], - [std::putenv("a=b");] - ) -]) - -AC_DEFUN([ATF_CHECK_STD_SETENV], [ - ATF_CHECK_IN_STD([setenv], - [#include ], - [std::setenv("a", "b");] - ) -]) - -AC_DEFUN([ATF_CHECK_STD_SNPRINTF], [ - ATF_CHECK_IN_STD([snprintf], - [#include ], - [char buf; - std::snprintf(&buf, 1, "");] - ) -]) - -AC_DEFUN([ATF_CHECK_STD_UNSETENV], [ - ATF_CHECK_IN_STD([unsetenv], - [#include ], - [std::unsetenv("a");] - ) -]) - AC_DEFUN([ATF_CHECK_STD_VSNPRINTF], [ ATF_CHECK_IN_STD([vsnprintf], [#include diff --git a/unit/atf-src/m4/libtool.m4 b/unit/atf-src/m4/libtool.m4 index 39ba996cb9..a3bc337b79 100644 --- a/unit/atf-src/m4/libtool.m4 +++ b/unit/atf-src/m4/libtool.m4 @@ -1,7 +1,6 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -9,35 +8,30 @@ # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 +# Copyright (C) 2014 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. + +# 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 of the License, or +# (at your option) any later version. # -# This file is part of GNU Libtool. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. # -# 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. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# 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. +# along with this program. If not, see . ]) -# serial 56 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -65,7 +59,8 @@ esac # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl @@ -82,11 +77,13 @@ AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -106,26 +103,43 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) +# _LT_PREPARE_CC_BASENAME +# ----------------------- +m4_defun([_LT_PREPARE_CC_BASENAME], [ +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in @S|@*""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} +])# _LT_PREPARE_CC_BASENAME + + # _LT_CC_BASENAME(CC) # ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, +# but that macro is also expanded into generated libtool script, which +# arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +[m4_require([_LT_PREPARE_CC_BASENAME])dnl +AC_REQUIRE([_LT_DECL_SED])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +func_cc_basename $1 +cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} @@ -138,6 +152,11 @@ m4_defun([_LT_FILEUTILS_DEFAULTS], m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -160,68 +179,54 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 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 +m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld="$lt_cv_prog_gnu_ld" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -250,16 +255,38 @@ _LT_CONFIG_COMMANDS ])# _LT_SETUP +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + # _LT_PROG_LTMAIN # --------------- -# Note that this code is called both from `configure', and `config.status' +# Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, +# 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN @@ -269,7 +296,7 @@ ltmain="$ac_aux_dir/ltmain.sh" # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' +# in macros and then make a single call at the end using the 'libtool' # label. @@ -404,11 +431,11 @@ m4_define([_lt_decl_all_varnames], # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME +# Quote a variable value, and forward it to 'config.status' so that its +# declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS @@ -418,7 +445,7 @@ m4_define([_LT_CONFIG_STATUS_DECLARE], # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) @@ -429,7 +456,7 @@ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl +available_tags='_LT_TAGS'dnl ]) @@ -457,7 +484,7 @@ m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], @@ -483,8 +510,8 @@ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated +# into 'config.status', and then the shell code to quote escape them in +# for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], @@ -517,12 +544,20 @@ LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -533,9 +568,9 @@ done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -543,16 +578,38 @@ for var in lt_decl_all_varnames([[ \ esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - _LT_OUTPUT_LIBTOOL_INIT ]) +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# '#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test 0 = "$lt_write_fail" && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- @@ -562,20 +619,11 @@ _LT_OUTPUT_LIBTOOL_INIT AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 +lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo @@ -583,7 +631,7 @@ exec AS_MESSAGE_LOG_FD>>config.log } >&AS_MESSAGE_LOG_FD lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, +'$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. @@ -601,11 +649,11 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." -while test $[#] != 0 +while test 0 != $[#] do case $[1] in --version | --v* | -V ) @@ -618,10 +666,10 @@ do lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; +Try '$[0] --help' for more information.]) ;; esac shift done @@ -646,15 +694,13 @@ chmod +x "$CONFIG_LT" # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi +lt_cl_success=: +test yes = "$silent" && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT @@ -669,32 +715,47 @@ m4_defun([_LT_CONFIG], _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. -# + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + _LT_COPYING _LT_LIBTOOL_TAGS +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} + # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG +_LT_EOF + + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +_LT_PREPARE_MUNGE_PATH_LIST +_LT_PREPARE_CC_BASENAME + +# ### END FUNCTIONS SHARED WITH CONFIGURE + _LT_EOF case $host_os in @@ -703,7 +764,7 @@ _LT_EOF # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -717,15 +778,10 @@ _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 - - 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" ], @@ -742,7 +798,6 @@ _LT_EOF [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS @@ -770,6 +825,7 @@ AC_DEFUN([LT_LANG], m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -791,6 +847,31 @@ m4_defun([_LT_LANG], ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -821,6 +902,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ], m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -831,11 +916,13 @@ AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER @@ -909,7 +996,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then + if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -921,7 +1008,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -929,6 +1022,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -938,36 +1032,64 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS + ]) + + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -977,8 +1099,8 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -987,23 +1109,29 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' + if test yes = "$lt_cv_ld_force_load"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test yes = "$_lt_dar_can_shared"; then + output_verbose_link_cmd=func_echo_all + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" +[ if test yes != "$lt_cv_apple_cc_single_mod"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1011,234 +1139,176 @@ 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 set = "${lt_cv_aix_libpath+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 # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + # _LT_PROG_ECHO_BACKSLASH # ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script that will find a shell with a builtin +# printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; +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 && \ + 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 + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case $ECHO in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; esac -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi - -AC_SUBST(lt_ECHO) -]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[AS_HELP_STRING([--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 yes = "$GCC"; 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 where our libraries should be installed.])]) + # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE="32" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -1267,9 +1337,46 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in @@ -1279,9 +1386,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1300,7 +1417,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1318,25 +1438,39 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; -sparc*-*solaris*) - # Find out which ABI we are using. +*-*solaris*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*|x86_64-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD=${LD-ld}_sol2 + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1350,18 +1484,51 @@ sparc*-*solaris*) ;; esac -need_locks="$enable_libtool_lock" +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 0 -eq "$ac_status"; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test 0 -ne "$ac_status"; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test no = "$lt_cv_ar_at_file"; 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=: @@ -1379,19 +1546,28 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + bitrig* | openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE @@ -1406,7 +1582,7 @@ AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" + lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -1416,15 +1592,15 @@ AC_CACHE_CHECK([$1], [$2], -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -1433,7 +1609,7 @@ AC_CACHE_CHECK([$1], [$2], $RM conftest* ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) @@ -1455,7 +1631,7 @@ AC_DEFUN([_LT_LINKER_OPTION], m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -1464,7 +1640,7 @@ AC_CACHE_CHECK([$1], [$2], if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -1474,10 +1650,10 @@ AC_CACHE_CHECK([$1], [$2], fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS ]) -if test x"[$]$2" = xyes; then +if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) @@ -1498,7 +1674,7 @@ AC_DEFUN([LT_CMD_MAX_LEN], AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -1527,13 +1703,18 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1552,6 +1733,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -1578,22 +1764,23 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do + for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -1609,7 +1796,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl ;; esac ]) -if test -n $lt_cv_sys_max_cmd_len ; then +if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) @@ -1637,13 +1824,13 @@ m4_defun([_LT_HEADER_DLFCN], # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : +if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" +[#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -1684,7 +1871,13 @@ else # endif #endif -void fnord() { int i=42;} +/* When -fvisibility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -1693,7 +1886,11 @@ int main () if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -1702,7 +1899,7 @@ int main () return status; }] _LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in @@ -1723,7 +1920,7 @@ rm -fr conftest* # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then +if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -1733,44 +1930,52 @@ else case $host_os in beos*) - lt_cv_dlopen="load_add_on" + lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], + [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], + [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) @@ -1779,21 +1984,21 @@ else ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], @@ -1803,7 +2008,7 @@ else lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) - if test "x$lt_cv_dlopen_self" = xyes; then + if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl @@ -1813,9 +2018,9 @@ else ]) fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -1869,16 +2074,16 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes @@ -1907,8 +2112,8 @@ m4_defun([_LT_COMPILER_FILE_LOCKS], m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes @@ -1918,8 +2123,8 @@ if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + if test no = "$hard_links"; then + AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else @@ -1946,8 +2151,8 @@ objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) +AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", + [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR @@ -1959,15 +2164,15 @@ m4_defun([_LT_LINKER_HARDCODE_LIBPATH], _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && + test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else @@ -1981,12 +2186,12 @@ else fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then +if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || + test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -2010,7 +2215,7 @@ else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) @@ -2028,6 +2233,47 @@ _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB +# _LT_PREPARE_MUNGE_PATH_LIST +# --------------------------- +# Make sure func_munge_path_list() is defined correctly. +m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], +[[# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x@S|@2 in + x) + ;; + *:) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" + ;; + x:*) + eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" + ;; + *) + eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" + ;; + esac +} +]])# _LT_PREPARE_PATH_LIST + + # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics @@ -2037,47 +2283,63 @@ m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -2087,14 +2349,20 @@ BEGIN {RS=" "; FS="/|\n";} { if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -2111,56 +2379,109 @@ hardcode_into_libs=no # flags to be left without arguments need_version=unknown +AC_ARG_VAR([LT_SYS_LIBRARY_PATH], +[User-defined run-time library search path.]) + case $host_os in aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -2170,27 +2491,27 @@ amigaos*) powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -2202,16 +2523,17 @@ bsdi[[45]]*) cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll 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}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + 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~ @@ -2227,37 +2549,84 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - 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 + soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + 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' ;; *) - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + # 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 ;; @@ -2267,8 +2636,8 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -2278,18 +2647,14 @@ m4_if([$1], [],[ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2297,25 +2662,26 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2334,13 +2700,16 @@ freebsd* | dragonfly*) esac ;; -gnu*) - version_type=linux +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH + dynamic_linker="$host_os runtime_loader" + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=no + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -2357,14 +2726,15 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -2372,8 +2742,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -2382,20 +2752,22 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -2406,16 +2778,16 @@ irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + if test yes = "$lt_cv_prog_gnu_ld"; then + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -2434,8 +2806,8 @@ irix5* | irix6* | nonstopux*) esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -2444,35 +2816,65 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux +linux*android*) + version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes - # Append ld.so.conf contents to the search path + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -2490,12 +2892,12 @@ netbsd*) need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -2504,8 +2906,8 @@ netbsd*) ;; newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -2514,58 +2916,68 @@ newsos6) version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no + else + need_version=yes + fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + 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~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -2573,11 +2985,11 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -2587,20 +2999,20 @@ solaris*) sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -2621,24 +3033,24 @@ sysv4 | sysv4.3*) ;; sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + if test -d /usr/nec; then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -2653,19 +3065,19 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -2674,20 +3086,30 @@ uts4*) ;; esac AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) @@ -2705,6 +3127,8 @@ _LT_DECL([], [library_names_spec], [1], The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], @@ -2718,39 +3142,41 @@ _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) +_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], + [Detected run-time system search path for libraries]) +_LT_DECL([], [configure_time_lt_sys_library_path], [2], + [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- -# find a file program which can recognize shared library +# find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -f "$ac_dir/$1"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -2773,11 +3199,11 @@ _LT_EOF break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else @@ -2795,7 +3221,7 @@ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- -# find a file program which can recognize a shared library +# find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then @@ -2817,20 +3243,21 @@ AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], + [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -2844,7 +3271,7 @@ if test "$GCC" = yes; then while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -2855,37 +3282,37 @@ if test "$GCC" = yes; then with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], +[if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi]) +rm -f conftest.i conftest2.i conftest.out]) +])# _LT_PATH_DD + + +# _LT_CMD_TRUNCATE +# ---------------- +# find command to truncate a binary pipe +m4_defun([_LT_CMD_TRUNCATE], +[m4_require([_LT_PATH_DD]) +AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], +[printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) +_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], + [Command to truncate a binary pipe]) +])# _LT_CMD_TRUNCATE + + # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies @@ -2966,13 +3435,13 @@ lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. +# 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) @@ -3003,12 +3472,13 @@ mingw* | pw32*) lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -3034,7 +3504,7 @@ freebsd* | dragonfly*) fi ;; -gnu*) +haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3046,11 +3516,11 @@ hpux10.20* | hpux11*) lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac @@ -3071,8 +3541,8 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu) +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -3094,8 +3564,8 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' @@ -3148,8 +3618,26 @@ sysv4 | sysv4.3*) tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; 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 @@ -3157,7 +3645,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown _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 @@ -3169,33 +3661,38 @@ AC_DEFUN([LT_PATH_NM], AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM="$NM" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -3206,18 +3703,30 @@ else esac fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols -headers" + ;; + *) + DUMPBIN=: + ;; + esac + fi AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -3227,13 +3736,13 @@ _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -3248,6 +3757,82 @@ 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 one 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 yes != "$lt_cv_path_mainfest_tool"; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# _LT_DLL_DEF_P([FILE]) +# --------------------- +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with func_dll_def_p in the libtool script +AC_DEFUN([_LT_DLL_DEF_P], +[dnl + test DEF = "`$SED -n dnl + -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace + -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments + -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl + -e q dnl Only consider the first "real" line + $1`" dnl +])# _LT_DLL_DEF_P + # LT_LIB_M # -------- @@ -3256,15 +3841,15 @@ AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) - AC_CHECK_LIB(m, cos, LIBM="-lm") + AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) @@ -3283,8 +3868,13 @@ m4_defun([_LT_COMPILER_NO_RTTI], _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= -if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +if test yes = "$GCC"; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, @@ -3301,6 +3891,7 @@ _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl @@ -3329,7 +3920,7 @@ cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; @@ -3362,14 +3953,44 @@ case `$NM -V 2>&1` in symcode='[[ABCDGIRSTW]]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$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"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -3387,24 +4008,29 @@ for ac_symprfx in "" "_"; do # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" 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 @@ -3426,7 +4052,7 @@ _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -3438,6 +4064,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 can'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 @@ -3449,7 +4087,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; } @@ -3457,7 +4095,7 @@ lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -3475,15 +4113,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" - LIBS="conftstm.$ac_objext" + 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 + 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 @@ -3500,7 +4138,7 @@ _LT_EOF rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -3516,16 +4154,29 @@ 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], [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], + [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _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_interface], [lt_cv_nm_interface], [1], + [The name lister interface]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -3537,20 +4188,20 @@ _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 + if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -3561,8 +4212,8 @@ m4_if([$1], [CXX], [ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -3578,6 +4229,11 @@ m4_if([$1], [CXX], [ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -3588,6 +4244,11 @@ m4_if([$1], [CXX], [ # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. @@ -3622,7 +4283,7 @@ m4_if([$1], [CXX], [ case $host_os in aix[[4-9]]*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -3637,6 +4298,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++*) @@ -3657,14 +4324,14 @@ m4_if([$1], [CXX], [ case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default @@ -3693,7 +4360,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -3701,7 +4368,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. + # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' @@ -3726,8 +4393,8 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' @@ -3789,7 +4456,7 @@ m4_if([$1], [CXX], [ ;; solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -3846,17 +4513,18 @@ m4_if([$1], [CXX], [ fi ], [ - if test "$GCC" = yes; then + if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) @@ -3867,8 +4535,8 @@ m4_if([$1], [CXX], [ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -3885,6 +4553,11 @@ m4_if([$1], [CXX], [ # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -3893,6 +4566,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -3935,12 +4614,21 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else @@ -3948,11 +4636,30 @@ m4_if([$1], [CXX], [ fi ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + case $cc_basename in + 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' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | 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']) + case $host_os in + os2*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -3968,7 +4675,7 @@ m4_if([$1], [CXX], [ ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -3977,9 +4684,9 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -3998,7 +4705,19 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + 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' + ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -4010,25 +4729,40 @@ m4_if([$1], [CXX], [ # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; @@ -4060,7 +4794,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; @@ -4080,7 +4814,7 @@ m4_if([$1], [CXX], [ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi @@ -4109,7 +4843,7 @@ m4_if([$1], [CXX], [ fi ]) case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; @@ -4117,9 +4851,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. @@ -4138,6 +4874,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. # @@ -4158,6 +4896,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 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 @@ -4166,27 +4905,41 @@ 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. - # -C means demangle to AIX nm, but means don't demangle with GNU nm + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; + _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(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _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)= @@ -4201,7 +4954,6 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4217,9 +4969,9 @@ m4_if([$1], [CXX], [ # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if @@ -4235,7 +4987,7 @@ dnl Note also adjust exclude_expsyms for C++ above. # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. - if test "$GCC" != yes; then + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -4243,30 +4995,57 @@ dnl Note also adjust exclude_expsyms for C++ above. # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes - if test "$with_gnu_ld" = yes; then + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test yes = "$with_gnu_ld"; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v 2>&1` in + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... @@ -4278,15 +5057,16 @@ dnl Note also adjust exclude_expsyms for C++ above. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -4296,7 +5076,7 @@ _LT_EOF case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -4312,7 +5092,7 @@ _LT_EOF _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4322,61 +5102,97 @@ _LT_EOF # _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 - _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' - # 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 $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + _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' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); 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 $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - gnu* | linux* | tpf* | k*bsd*-gnu) + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test "$host_os" = linux-dietlibc; then + if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no + && test no = "$tmp_diet" then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -4387,39 +5203,47 @@ _LT_EOF lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in - xlf*) + tcc*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' + ;; + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -4433,8 +5257,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 ;; @@ -4452,8 +5276,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 @@ -4465,7 +5289,7 @@ _LT_EOF _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify @@ -4480,9 +5304,9 @@ _LT_EOF # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _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(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _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' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4499,15 +5323,15 @@ _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 ;; esac - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= @@ -4523,7 +5347,7 @@ _LT_EOF # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported @@ -4531,32 +5355,57 @@ _LT_EOF ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -4575,13 +5424,21 @@ _LT_EOF _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -4600,56 +5457,80 @@ _LT_EOF ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _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_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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _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. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -4658,7 +5539,7 @@ _LT_EOF case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) @@ -4678,20 +5559,65 @@ _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 `$ECHO "X$deplibs" | $Xsed -e '\''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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $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(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _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*) @@ -4704,10 +5630,6 @@ _LT_EOF _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -4720,7 +5642,7 @@ _LT_EOF ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -4729,41 +5651,40 @@ _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 ;; 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' + if test yes = "$GCC"; then + _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 "x$output_objdir/$soname" = "x$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' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) - if test "$GCC" = yes -a "$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' + if test yes,no = "$GCC,$with_gnu_ld"; then + _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 - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -4771,33 +5692,40 @@ _LT_EOF ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _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 case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in @@ -4808,7 +5736,7 @@ _LT_EOF *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -4819,28 +5747,53 @@ _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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 yes = "$lt_cv_irix_exported_symbol"; 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" && $ECHO "X-set_version $verstring" | $Xsed` -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" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + _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' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + _LT_TAGVAR(ld_shlibs, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out @@ -4855,7 +5808,7 @@ _LT_EOF newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; @@ -4863,27 +5816,19 @@ _LT_EOF *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no @@ -4894,33 +5839,53 @@ _LT_EOF _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) - 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}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; 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-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(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _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 \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -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)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -4931,24 +5896,24 @@ _LT_EOF solaris*) _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' + if test yes = "$GCC"; then + wlarc='$wl' + _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"*) wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + wlarc='$wl' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -4958,11 +5923,11 @@ _LT_EOF solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', + # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + if test yes = "$GCC"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi @@ -4972,10 +5937,10 @@ _LT_EOF ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi @@ -5024,43 +5989,43 @@ _LT_EOF ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -5075,17 +6040,17 @@ _LT_EOF ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no +test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld @@ -5102,7 +6067,7 @@ x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -5111,36 +6076,38 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi @@ -5177,18 +6144,15 @@ _LT_TAGDECL([], [no_undefined_flag], [1], _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the + "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR @@ -5205,8 +6169,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], @@ -5217,6 +6179,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 @@ -5229,10 +6193,10 @@ dnl [Compiler flag to generate thread safe objects]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" +lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. @@ -5272,18 +6236,18 @@ if test -n "$compiler"; then LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB - # Report which library types will actually be built + # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -5291,8 +6255,12 @@ if test -n "$compiler"; then ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -5300,47 +6268,32 @@ if test -n "$compiler"; then AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP -CC="$lt_save_CC" +CC=$lt_save_CC ])# _LT_LANG_C_CONFIG -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. +# the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no @@ -5352,7 +6305,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -5362,6 +6314,8 @@ _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -5377,7 +6331,7 @@ _LT_TAGVAR(objext, $1)=$objext # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then +if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" @@ -5393,6 +6347,7 @@ if test "$_lt_caught_CXX_error" != yes; then # 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 @@ -5410,6 +6365,7 @@ if test "$_lt_caught_CXX_error" != yes; then fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -5417,35 +6373,35 @@ if test "$_lt_caught_CXX_error" != yes; then if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately - if test "$GXX" = yes; then + if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi - if test "$GXX" = yes; then + if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_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 - _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' + if test yes = "$with_gnu_ld"; then + _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' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) - wlarc='${wl}' + wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi @@ -5464,7 +6420,7 @@ if test "$_lt_caught_CXX_error" != yes; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -5481,18 +6437,30 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in @@ -5502,6 +6470,13 @@ if test "$_lt_caught_CXX_error" != yes; then ;; esac done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -5520,13 +6495,21 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + _LT_TAGVAR(file_list_spec, $1)='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + ;; + esac - if test "$GXX" = yes; then + if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -5544,59 +6527,84 @@ if test "$_lt_caught_CXX_error" != yes; then fi esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # The "-G" linker flag allows undefined symbols. + _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _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. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' + if test yes = "$with_gnu_ld"; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -5606,7 +6614,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -5622,32 +6630,108 @@ if test "$_lt_caught_CXX_error" != yes; then ;; 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(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $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 - ;; + 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, use it as + # is; otherwise, prepend EXPORTS... + _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); 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) ;; + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + shrext_cmds=.dll + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + dgux*) case $cc_basename in ec++*) @@ -5666,7 +6750,7 @@ if test "$_lt_caught_CXX_error" != yes; then esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -5682,13 +6766,15 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=yes ;; - gnu*) + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default @@ -5700,7 +6786,7 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${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 -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -5709,11 +6795,11 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - 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' + if test yes = "$GXX"; then + _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -5723,15 +6809,15 @@ if test "$_lt_caught_CXX_error" != yes; then ;; hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi @@ -5757,13 +6843,13 @@ if test "$_lt_caught_CXX_error" != yes; then aCC*) case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${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 -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists @@ -5774,20 +6860,20 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _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 @@ -5802,22 +6888,22 @@ if test "$_lt_caught_CXX_error" != yes; then interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -5826,22 +6912,22 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) - 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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -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 ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -5849,8 +6935,8 @@ if test "$_lt_caught_CXX_error" != yes; then # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -5859,10 +6945,10 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. @@ -5876,59 +6962,59 @@ if test "$_lt_caught_CXX_error" != yes; then # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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 -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ - $RANLIB $oldlib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; - *) # Version 6 will use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -5942,18 +7028,18 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; - xl*) + xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) @@ -5961,16 +7047,16 @@ if test "$_lt_caught_CXX_error" != yes; then *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -6022,24 +7108,19 @@ if test "$_lt_caught_CXX_error" != yes; then _LT_TAGVAR(ld_shlibs, $1)=yes ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6053,9 +7134,9 @@ if test "$_lt_caught_CXX_error" != yes; then # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using @@ -6073,17 +7154,17 @@ if test "$_lt_caught_CXX_error" != yes; then cxx*) case $host in osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -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)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac @@ -6098,27 +7179,27 @@ if test "$_lt_caught_CXX_error" != yes; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + if test yes,no = "$GXX,$with_gnu_ld"; then + _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) - _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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-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" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${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 - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -6154,13 +7235,13 @@ if test "$_lt_caught_CXX_error" != yes; then solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $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 -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -6168,14 +7249,14 @@ if test "$_lt_caught_CXX_error" != yes; then solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. + # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -6185,42 +7266,42 @@ if test "$_lt_caught_CXX_error" != yes; then ;; gcx*) # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if test yes,no = "$GXX,$with_gnu_ld"; 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 $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 $wl-h $wl$soname -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 # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else - # g++ 2.7 appears to require `-G' NOT `-shared' on this + # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $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 -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -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 # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi @@ -6229,48 +7310,52 @@ if test "$_lt_caught_CXX_error" != yes; then ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; @@ -6301,10 +7386,10 @@ if test "$_lt_caught_CXX_error" != yes; then esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$GXX + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -6322,6 +7407,7 @@ if test "$_lt_caught_CXX_error" != yes; then fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -6330,12 +7416,36 @@ if test "$_lt_caught_CXX_error" != yes; then lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes +fi # test yes != "$_lt_caught_CXX_error" 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 @S|@2 in + .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; + *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -6344,6 +7454,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)= @@ -6393,7 +7504,20 @@ public class foo { } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then @@ -6405,29 +7529,38 @@ 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. # Remove the space. - if test $p = "-L" || - test $p = "-R"; then + if test x-L = "$p" || + test x-R = "$p"; then prev=$p continue - else - prev= fi - if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + # 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 no = "$pre_test_object_deps_done"; then + 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. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being @@ -6435,13 +7568,15 @@ if AC_TRY_EVAL(ac_compile); then esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" + _LT_TAGVAR(postdeps, $1)=$prev$p else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + _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. @@ -6450,15 +7585,15 @@ if AC_TRY_EVAL(ac_compile); then continue fi - if test "$pre_test_object_deps_done" = no; then + if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" + _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" + _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi @@ -6477,6 +7612,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], @@ -6488,51 +7624,6 @@ interix[[3-9]]*) _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; esac ]) @@ -6541,7 +7632,7 @@ case " $_LT_TAGVAR(postdeps, $1) " in esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) @@ -6557,32 +7648,16 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1], ])# _LT_SYS_HIDDEN_LIBDEPS -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test no = "$F77"; then + _lt_disable_F77=yes +fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= @@ -6592,7 +7667,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -6601,6 +7675,8 @@ _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -6616,7 +7692,7 @@ _LT_TAGVAR(objext, $1)=$objext # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then +if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -6638,9 +7714,11 @@ if test "$_lt_disable_F77" != yes; then _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + 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]) @@ -6650,21 +7728,25 @@ if test "$_lt_disable_F77" != yes; then AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -6672,11 +7754,11 @@ if test "$_lt_disable_F77" != yes; then AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$G77 + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -6693,39 +7775,25 @@ if test "$_lt_disable_F77" != yes; then fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_F77" != yes + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test no = "$FC"; then + _lt_disable_FC=yes +fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= @@ -6735,7 +7803,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -6744,6 +7811,8 @@ _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -6759,7 +7828,7 @@ _LT_TAGVAR(objext, $1)=$objext # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then +if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t @@ -6781,9 +7850,11 @@ if test "$_lt_disable_FC" != yes; then _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. - lt_save_CC="$CC" + 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 @@ -6795,21 +7866,25 @@ if test "$_lt_disable_FC" != yes; then AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -6817,11 +7892,11 @@ if test "$_lt_disable_FC" != yes; then AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" + _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu + _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -6839,8 +7914,9 @@ if test "$_lt_disable_FC" != yes; then fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" -fi # test "$_lt_disable_FC" != yes + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG @@ -6850,7 +7926,7 @@ AC_LANG_POP # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE @@ -6876,19 +7952,23 @@ _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" +_LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -6908,15 +7988,87 @@ fi AC_LANG_RESTORE GCC=$lt_save_GCC -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to 'libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_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=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)=$LD +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. +# to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE @@ -6932,7 +8084,7 @@ _LT_TAGVAR(objext, $1)=$objext lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" +lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER @@ -6942,10 +8094,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= CC=${RC-"windres"} +CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -6958,7 +8112,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 @@ -6968,7 +8123,7 @@ AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) @@ -6978,6 +8133,13 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], @@ -7017,6 +8179,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 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 # ------------ @@ -7063,7 +8234,7 @@ lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue + test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in @@ -7080,9 +8251,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break + test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then + if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi @@ -7106,27 +8277,7 @@ dnl AC_DEFUN([LT_AC_PROG_SED], []) # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false @@ -7150,208 +8301,69 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _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 +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine what 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 + ;; + *-*-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 ;; - *) # 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 "X${1}" | $Xsed -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 file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - -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 "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "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 "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e '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 ]) +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 --git a/unit/atf-src/m4/ltoptions.m4 b/unit/atf-src/m4/ltoptions.m4 index 34151a3ba6..94b0829766 100644 --- a/unit/atf-src/m4/ltoptions.m4 +++ b/unit/atf-src/m4/ltoptions.m4 @@ -1,13 +1,14 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 6 ltoptions.m4 +# serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -28,7 +29,7 @@ m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl + [m4_warning([Unknown $1 option '$2'])])[]dnl ]) @@ -74,13 +75,15 @@ m4_if([$1],[LT_INIT],[ dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) + [_LT_ENABLE_FAST_INSTALL]) + _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], + [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS @@ -111,7 +114,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) +put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -125,7 +128,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) @@ -133,13 +136,13 @@ case $host in esac test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl +_LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], @@ -147,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL], _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) +put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -156,9 +159,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-shared flag, and supports the 'shared' and +# 'disable-shared' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], @@ -171,14 +174,14 @@ AC_ARG_ENABLE([shared], *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) @@ -210,9 +213,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-static flag, and support the 'static' and +# 'disable-static' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], @@ -225,14 +228,14 @@ AC_ARG_ENABLE([static], *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) @@ -264,9 +267,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +# implement the --enable-fast-install flag, and support the 'fast-install' +# and 'disable-fast-install' LT_INIT options. +# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], @@ -279,14 +282,14 @@ AC_ARG_ENABLE([fast-install], *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) @@ -303,14 +306,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) +the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) +the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: @@ -318,19 +321,85 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) +# _LT_WITH_AIX_SONAME([DEFAULT]) +# ---------------------------------- +# implement the --with-aix-soname flag, and support the `aix-soname=aix' +# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT +# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. +m4_define([_LT_WITH_AIX_SONAME], +[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl +shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[[5-9]]*,yes) + AC_MSG_CHECKING([which variant of shared library versioning to provide]) + AC_ARG_WITH([aix-soname], + [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], + [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], + [case $withval in + aix|svr4|both) + ;; + *) + AC_MSG_ERROR([Unknown argument to --with-aix-soname]) + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname], + [AC_CACHE_VAL([lt_cv_with_aix_soname], + [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) + with_aix_soname=$lt_cv_with_aix_soname]) + AC_MSG_RESULT([$with_aix_soname]) + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + +_LT_DECL([], [shared_archive_member_spec], [0], + [Shared archive member basename, for filename based shared library versioning on AIX])dnl +])# _LT_WITH_AIX_SONAME + +LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) +LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) + + # _LT_WITH_PIC([MODE]) # -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + for lt_pkg in $withval; do + IFS=$lt_save_ifs + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS=$lt_save_ifs + ;; + esac], + [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC @@ -343,7 +412,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) +put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: diff --git a/unit/atf-src/m4/ltsugar.m4 b/unit/atf-src/m4/ltsugar.m4 index 9000a057d3..48bc9344a4 100644 --- a/unit/atf-src/m4/ltsugar.m4 +++ b/unit/atf-src/m4/ltsugar.m4 @@ -1,6 +1,7 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives @@ -33,7 +34,7 @@ m4_define([_lt_join], # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. +# Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], @@ -44,7 +45,7 @@ m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different diff --git a/unit/atf-src/m4/ltversion.m4 b/unit/atf-src/m4/ltversion.m4 index f3c5309802..fa04b52a3b 100644 --- a/unit/atf-src/m4/ltversion.m4 +++ b/unit/atf-src/m4/ltversion.m4 @@ -1,23 +1,23 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # 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 3017 ltversion.m4 +# serial 4179 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) +m4_define([LT_PACKAGE_VERSION], [2.4.6]) +m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' +[macro_version='2.4.6' +macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/unit/atf-src/m4/lt~obsolete.m4 b/unit/atf-src/m4/lt~obsolete.m4 index 637bb2066c..c6b26f88f6 100644 --- a/unit/atf-src/m4/lt~obsolete.m4 +++ b/unit/atf-src/m4/lt~obsolete.m4 @@ -1,17 +1,18 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 4 lt~obsolete.m4 +# serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # @@ -25,7 +26,7 @@ # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until @@ -77,7 +78,6 @@ m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) @@ -90,3 +90,10 @@ m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/unit/atf-src/m4/module-application.m4 b/unit/atf-src/m4/module-application.m4 index 709c8493e6..6966b7177e 100644 --- a/unit/atf-src/m4/module-application.m4 +++ b/unit/atf-src/m4/module-application.m4 @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright (c) 2007 The NetBSD Foundation, Inc. dnl All rights reserved. dnl @@ -25,7 +22,6 @@ dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl AC_DEFUN([ATF_MODULE_APPLICATION], [ ATF_CHECK_STD_VSNPRINTF diff --git a/unit/atf-src/m4/module-defs.m4 b/unit/atf-src/m4/module-defs.m4 index eb08eb62c6..b1c9cc843f 100644 --- a/unit/atf-src/m4/module-defs.m4 +++ b/unit/atf-src/m4/module-defs.m4 @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright (c) 2008 The NetBSD Foundation, Inc. dnl All rights reserved. dnl @@ -25,7 +22,6 @@ dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl AC_DEFUN([ATF_ATTRIBUTE_FORMAT_PRINTF], [ AC_MSG_CHECKING( diff --git a/unit/atf-src/m4/module-env.m4 b/unit/atf-src/m4/module-env.m4 index 8080e1c33e..963aab386e 100644 --- a/unit/atf-src/m4/module-env.m4 +++ b/unit/atf-src/m4/module-env.m4 @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright (c) 2007 The NetBSD Foundation, Inc. dnl All rights reserved. dnl @@ -25,12 +22,7 @@ dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl AC_DEFUN([ATF_MODULE_ENV], [ AC_CHECK_FUNCS([putenv setenv unsetenv]) - - ATF_CHECK_STD_PUTENV - ATF_CHECK_STD_SETENV - ATF_CHECK_STD_UNSETENV ]) diff --git a/unit/atf-src/m4/module-fs.m4 b/unit/atf-src/m4/module-fs.m4 index 7019a664a5..032a3fa7ff 100644 --- a/unit/atf-src/m4/module-fs.m4 +++ b/unit/atf-src/m4/module-fs.m4 @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright (c) 2007 The NetBSD Foundation, Inc. dnl All rights reserved. dnl @@ -25,7 +22,6 @@ dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl AC_DEFUN([ATF_MODULE_FS], [ AC_MSG_CHECKING(whether basename takes a constant pointer) @@ -66,6 +62,4 @@ AC_DEFUN([ATF_MODULE_FS], [ AC_DEFINE([HAVE_GETCWD_DYN], [1], [Define to 1 if getcwd(NULL, 0) works]) fi - - AC_CHECK_FUNCS([unmount]) ]) diff --git a/unit/atf-src/m4/module-sanity.m4 b/unit/atf-src/m4/module-sanity.m4 deleted file mode 100644 index 9d146c1c7f..0000000000 --- a/unit/atf-src/m4/module-sanity.m4 +++ /dev/null @@ -1,32 +0,0 @@ -dnl -dnl Automated Testing Framework (atf) -dnl -dnl Copyright (c) 2007 The NetBSD Foundation, Inc. -dnl All rights reserved. -dnl -dnl Redistribution and use in source and binary forms, with or without -dnl modification, are permitted provided that the following conditions -dnl are met: -dnl 1. Redistributions of source code must retain the above copyright -dnl notice, this list of conditions and the following disclaimer. -dnl 2. Redistributions in binary form must reproduce the above copyright -dnl notice, this list of conditions and the following disclaimer in the -dnl documentation and/or other materials provided with the distribution. -dnl -dnl THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND -dnl CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -dnl INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -dnl IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY -dnl DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -dnl GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl - -AC_DEFUN([ATF_MODULE_SANITY], [ - ATF_CHECK_STD_SNPRINTF -]) diff --git a/unit/atf-src/m4/runtime-tool.m4 b/unit/atf-src/m4/runtime-tool.m4 index 85e2008fa1..3b453b7919 100644 --- a/unit/atf-src/m4/runtime-tool.m4 +++ b/unit/atf-src/m4/runtime-tool.m4 @@ -1,6 +1,3 @@ -dnl -dnl Automated Testing Framework (atf) -dnl dnl Copyright (c) 2009 The NetBSD Foundation, Inc. dnl All rights reserved. dnl @@ -25,7 +22,6 @@ dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER dnl IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN dnl IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -dnl dnl ----------------------------------------------------------------------- dnl User-customizable tools used at run-time. @@ -34,8 +30,8 @@ dnl ----------------------------------------------------------------------- dnl dnl ATF_RUNTIME_TOOL(varname, description, default) dnl -dnl Provides a configuration-time environment variable to select a tool -dnl that will be later available through atf-config(1). +dnl Provides a configure-time configuration variable. The value provided +dnl here can later be overriden at run-time via the environment. dnl AC_DEFUN([ATF_RUNTIME_TOOL],[ AC_ARG_VAR([$1], [$2]) diff --git a/unit/atf-src/test-programs/Makefile.am.inc b/unit/atf-src/test-programs/Makefile.am.inc index 9e8cdb5e21..9ef2b12258 100644 --- a/unit/atf-src/test-programs/Makefile.am.inc +++ b/unit/atf-src/test-programs/Makefile.am.inc @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# tests_test_programs_DATA = test-programs/Atffile \ test-programs/Kyuafile @@ -47,48 +43,42 @@ tests_test_programs_SCRIPTS = test-programs/sh_helpers CLEANFILES += test-programs/sh_helpers EXTRA_DIST += test-programs/sh_helpers.sh test-programs/sh_helpers: $(srcdir)/test-programs/sh_helpers.sh - test -d test-programs || mkdir -p test-programs - @src="$(srcdir)/test-programs/sh_helpers.sh $(common_sh)"; \ + $(AM_V_GEN)src="$(srcdir)/test-programs/sh_helpers.sh $(common_sh)"; \ dst="test-programs/sh_helpers"; $(BUILD_SH_TP) tests_test_programs_SCRIPTS += test-programs/config_test CLEANFILES += test-programs/config_test EXTRA_DIST += test-programs/config_test.sh test-programs/config_test: $(srcdir)/test-programs/config_test.sh - test -d test-programs || mkdir -p test-programs - @src="$(srcdir)/test-programs/config_test.sh $(common_sh)"; \ + $(AM_V_GEN)src="$(srcdir)/test-programs/config_test.sh $(common_sh)"; \ dst="test-programs/config_test"; $(BUILD_SH_TP) tests_test_programs_SCRIPTS += test-programs/expect_test CLEANFILES += test-programs/expect_test EXTRA_DIST += test-programs/expect_test.sh test-programs/expect_test: $(srcdir)/test-programs/expect_test.sh - test -d test-programs || mkdir -p test-programs - @src="$(srcdir)/test-programs/expect_test.sh $(common_sh)"; \ + $(AM_V_GEN)src="$(srcdir)/test-programs/expect_test.sh $(common_sh)"; \ dst="test-programs/expect_test"; $(BUILD_SH_TP) tests_test_programs_SCRIPTS += test-programs/meta_data_test CLEANFILES += test-programs/meta_data_test EXTRA_DIST += test-programs/meta_data_test.sh test-programs/meta_data_test: $(srcdir)/test-programs/meta_data_test.sh - test -d test-programs || mkdir -p test-programs - @src="$(srcdir)/test-programs/meta_data_test.sh $(common_sh)"; \ + $(AM_V_GEN)src="$(srcdir)/test-programs/meta_data_test.sh $(common_sh)"; \ dst="test-programs/meta_data_test"; $(BUILD_SH_TP) tests_test_programs_SCRIPTS += test-programs/result_test CLEANFILES += test-programs/result_test EXTRA_DIST += test-programs/result_test.sh test-programs/result_test: $(srcdir)/test-programs/result_test.sh - test -d test-programs || mkdir -p test-programs - @src="$(srcdir)/test-programs/result_test.sh $(common_sh)"; \ + $(AM_V_GEN)src="$(srcdir)/test-programs/result_test.sh $(common_sh)"; \ dst="test-programs/result_test"; $(BUILD_SH_TP) tests_test_programs_SCRIPTS += test-programs/srcdir_test CLEANFILES += test-programs/srcdir_test EXTRA_DIST += test-programs/srcdir_test.sh test-programs/srcdir_test: $(srcdir)/test-programs/srcdir_test.sh - test -d test-programs || mkdir -p test-programs - @src="$(srcdir)/test-programs/srcdir_test.sh $(common_sh)"; \ + $(AM_V_GEN)src="$(srcdir)/test-programs/srcdir_test.sh $(common_sh)"; \ dst="test-programs/srcdir_test"; $(BUILD_SH_TP) # vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 diff --git a/unit/atf-src/test-programs/c_helpers.c b/unit/atf-src/test-programs/c_helpers.c index ac9bcc3362..1b7aa4ef0b 100644 --- a/unit/atf-src/test-programs/c_helpers.c +++ b/unit/atf-src/test-programs/c_helpers.c @@ -1,7 +1,4 @@ -/* - * Automated Testing Framework (atf) - * - * Copyright (c) 2007 The NetBSD Foundation, Inc. +/* Copyright (c) 2007 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -24,8 +21,7 @@ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include @@ -39,12 +35,11 @@ #include -#include "atf-c/error.h" - #include "atf-c/detail/env.h" #include "atf-c/detail/fs.h" #include "atf-c/detail/test_helpers.h" #include "atf-c/detail/text.h" +#include "atf-c/error.h" /* --------------------------------------------------------------------- * Auxiliary functions. diff --git a/unit/atf-src/test-programs/common.sh b/unit/atf-src/test-programs/common.sh index ebeebdb2df..91657523b7 100644 --- a/unit/atf-src/test-programs/common.sh +++ b/unit/atf-src/test-programs/common.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2008 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# get_helpers() { diff --git a/unit/atf-src/test-programs/config_test.sh b/unit/atf-src/test-programs/config_test.sh index a697bee2b6..510285215c 100644 --- a/unit/atf-src/test-programs/config_test.sh +++ b/unit/atf-src/test-programs/config_test.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# atf_test_case vflag vflag_head() diff --git a/unit/atf-src/test-programs/cpp_helpers.cpp b/unit/atf-src/test-programs/cpp_helpers.cpp index d8a495e7c6..ff9e543919 100644 --- a/unit/atf-src/test-programs/cpp_helpers.cpp +++ b/unit/atf-src/test-programs/cpp_helpers.cpp @@ -1,6 +1,3 @@ -// -// Automated Testing Framework (atf) -// // Copyright (c) 2007 The NetBSD Foundation, Inc. // All rights reserved. // @@ -25,7 +22,6 @@ // IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// extern "C" { #include diff --git a/unit/atf-src/test-programs/expect_test.sh b/unit/atf-src/test-programs/expect_test.sh index 46293507db..74e38e1d6a 100644 --- a/unit/atf-src/test-programs/expect_test.sh +++ b/unit/atf-src/test-programs/expect_test.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# check_result() { file="${1}"; shift diff --git a/unit/atf-src/test-programs/meta_data_test.sh b/unit/atf-src/test-programs/meta_data_test.sh index 35b0086473..150b9e2120 100644 --- a/unit/atf-src/test-programs/meta_data_test.sh +++ b/unit/atf-src/test-programs/meta_data_test.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2010 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# atf_test_case no_descr no_descr_head() diff --git a/unit/atf-src/test-programs/result_test.sh b/unit/atf-src/test-programs/result_test.sh index b2b325c4da..a87f08daaf 100644 --- a/unit/atf-src/test-programs/result_test.sh +++ b/unit/atf-src/test-programs/result_test.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,21 +22,20 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -atf_test_case atf_run_warnings -atf_run_warnings_head() +atf_test_case runtime_warnings +runtime_warnings_head() { # The fact that this test case is in this test program is an abuse. atf_set "descr" "Tests that the test case prints a warning because" \ - "it is not being run by atf-run" + "it is being run outside of a runtime engine" } -atf_run_warnings_body() +runtime_warnings_body() { unset __RUNNING_INSIDE_ATF_RUN srcdir="$(atf_get_srcdir)" for h in $(get_helpers); do - atf_check -s eq:0 -o match:"passed" -e match:"WARNING.*atf-run" \ + atf_check -s eq:0 -o match:"passed" -e match:"WARNING.*kyua" \ "${h}" -s "${srcdir}" result_pass done } @@ -122,14 +118,14 @@ result_exception_head() result_exception_body() { for h in $(get_helpers cpp_helpers); do - atf_check -s exit:1 -o match:'failed: .*This is unhandled' \ - "${h}" -s "${srcdir}" result_exception + atf_check -s signal -o not-match:'failed: .*This is unhandled' \ + -e ignore "${h}" -s "${srcdir}" result_exception done } atf_init_test_cases() { - atf_add_test_case atf_run_warnings + atf_add_test_case runtime_warnings atf_add_test_case result_on_stdout atf_add_test_case result_to_file atf_add_test_case result_to_file_fail diff --git a/unit/atf-src/test-programs/sh_helpers.sh b/unit/atf-src/test-programs/sh_helpers.sh index eb55102dfe..b27a541df5 100644 --- a/unit/atf-src/test-programs/sh_helpers.sh +++ b/unit/atf-src/test-programs/sh_helpers.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# # ------------------------------------------------------------------------- # Helper tests for "t_cleanup". diff --git a/unit/atf-src/test-programs/srcdir_test.sh b/unit/atf-src/test-programs/srcdir_test.sh index 11d6831f88..90a468a8f0 100644 --- a/unit/atf-src/test-programs/srcdir_test.sh +++ b/unit/atf-src/test-programs/srcdir_test.sh @@ -1,6 +1,3 @@ -# -# Automated Testing Framework (atf) -# # Copyright (c) 2007 The NetBSD Foundation, Inc. # All rights reserved. # @@ -25,7 +22,6 @@ # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# create_files() { diff --git a/unit/atf-src/tools/.gitignore b/unit/atf-src/tools/.gitignore new file mode 100644 index 0000000000..f1d8cdaf76 --- /dev/null +++ b/unit/atf-src/tools/.gitignore @@ -0,0 +1,9 @@ +atf-config +atf-report +atf-run +atf-version +atf.7 +defs.hpp +libtools.a +revision.h +revision.h.stamp diff --git a/unit/atf-src/tools/Atffile b/unit/atf-src/tools/Atffile new file mode 100644 index 0000000000..8896078bcf --- /dev/null +++ b/unit/atf-src/tools/Atffile @@ -0,0 +1,25 @@ +Content-Type: application/X-atf-atffile; version="1" + +prop: test-suite = atf + +tp: atf-config_test +tp: atf-report_test +tp: atf-run_test +tp: application_test +tp: atffile_test +tp: auto_array_test +tp: config_test +tp: config_file_test +tp: env_test +tp: expand_test +tp: fs_test +tp: io_test +tp: parser_test +tp: process_test +tp: reader_test +tp: requirements_test +tp: signals_test +tp: test_program_test +tp: text_test +tp: ui_test +tp: user_test diff --git a/unit/atf-src/tools/Kyuafile b/unit/atf-src/tools/Kyuafile new file mode 100644 index 0000000000..09c5145ff9 --- /dev/null +++ b/unit/atf-src/tools/Kyuafile @@ -0,0 +1,24 @@ +syntax("kyuafile", 1) + +test_suite("atf") + +atf_test_program{name="atf-config_test"} +atf_test_program{name="atf-report_test"} +atf_test_program{name="atf-run_test"} +atf_test_program{name="application_test"} +atf_test_program{name="atffile_test"} +atf_test_program{name="auto_array_test"} +atf_test_program{name="config_test"} +atf_test_program{name="config_file_test"} +atf_test_program{name="env_test"} +atf_test_program{name="expand_test"} +atf_test_program{name="fs_test"} +atf_test_program{name="io_test"} +atf_test_program{name="parser_test"} +atf_test_program{name="process_test"} +atf_test_program{name="reader_test"} +atf_test_program{name="requirements_test"} +atf_test_program{name="signals_test"} +atf_test_program{name="test_program_test"} +atf_test_program{name="text_test"} +atf_test_program{name="ui_test"} diff --git a/unit/atf-src/tools/Makefile.am.inc b/unit/atf-src/tools/Makefile.am.inc new file mode 100644 index 0000000000..00c3b1397b --- /dev/null +++ b/unit/atf-src/tools/Makefile.am.inc @@ -0,0 +1,330 @@ +# +# Automated Testing Framework (atf) +# +# Copyright (c) 2007 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +TOOLS_CPPFLAGS = -I$(top_srcdir)/tools -I$(top_builddir)/tools +TOOLS_LDADD = tools/libtools.a + +noinst_LIBRARIES = tools/libtools.a +tools_libtools_a_SOURCES = tools/application.cpp \ + tools/application.hpp \ + tools/atffile.cpp \ + tools/atffile.hpp \ + tools/auto_array.hpp \ + tools/config.cpp \ + tools/config.hpp \ + tools/config_file.cpp \ + tools/config_file.hpp \ + tools/env.cpp \ + tools/env.hpp \ + tools/exceptions.cpp \ + tools/exceptions.hpp \ + tools/expand.cpp \ + tools/expand.hpp \ + tools/fs.cpp \ + tools/fs.hpp \ + tools/io.cpp \ + tools/io.hpp \ + tools/parser.cpp \ + tools/parser.hpp \ + tools/process.cpp \ + tools/process.hpp \ + tools/reader.cpp \ + tools/reader.hpp \ + tools/requirements.cpp \ + tools/requirements.hpp \ + tools/signals.cpp \ + tools/signals.hpp \ + tools/test-program.cpp \ + tools/test-program.hpp \ + tools/test_helpers.hpp \ + tools/text.cpp \ + tools/text.hpp \ + tools/timers.cpp \ + tools/timers.hpp \ + tools/ui.cpp \ + tools/ui.hpp \ + tools/user.cpp \ + tools/user.hpp +nodist_tools_libtools_a_SOURCES = tools/defs.hpp +tools_libtools_a_CPPFLAGS = "-DATF_ARCH=\"$(atf_arch)\"" \ + "-DATF_BUILD_CC=\"$(ATF_BUILD_CC)\"" \ + "-DATF_BUILD_CFLAGS=\"$(ATF_BUILD_CFLAGS)\"" \ + "-DATF_BUILD_CPP=\"$(ATF_BUILD_CPP)\"" \ + "-DATF_BUILD_CPPFLAGS=\"$(ATF_BUILD_CPPFLAGS)\"" \ + "-DATF_BUILD_CXX=\"$(ATF_BUILD_CXX)\"" \ + "-DATF_BUILD_CXXFLAGS=\"$(ATF_BUILD_CXXFLAGS)\"" \ + "-DATF_CONFDIR=\"$(atf_confdir)\"" \ + "-DATF_INCLUDEDIR=\"$(includedir)\"" \ + "-DATF_LIBDIR=\"$(libdir)\"" \ + "-DATF_LIBEXECDIR=\"$(libexecdir)\"" \ + "-DATF_MACHINE=\"$(atf_machine)\"" \ + "-DATF_PKGDATADIR=\"$(pkgdatadir)\"" \ + "-DATF_SHELL=\"$(ATF_SHELL)\"" \ + "-DATF_WORKDIR=\"$(ATF_WORKDIR)\"" \ + $(TOOLS_CPPFLAGS) + +# XXX For some reason, the nodist line above does not work as expected. +# Work this problem around. +DIST_HOOKS += kill-defs-hpp +kill-defs-hpp: + rm -f $(distdir)/tools/defs.hpp + + + +bin_PROGRAMS += tools/atf-config +tools_atf_config_SOURCES = tools/atf-config.cpp +tools_atf_config_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_atf_config_LDADD = $(TOOLS_LDADD) +dist_man_MANS += tools/atf-config.1 + +bin_PROGRAMS += tools/atf-report +tools_atf_report_SOURCES = tools/atf-report.cpp +tools_atf_report_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_atf_report_LDADD = $(TOOLS_LDADD) +dist_man_MANS += tools/atf-report.1 + +bin_PROGRAMS += tools/atf-run +tools_atf_run_CPPFLAGS = $(TOOLS_CPPFLAGS) "-DGDB=\"$(GDB)\"" +tools_atf_run_SOURCES = tools/atf-run.cpp +tools_atf_run_LDADD = $(TOOLS_LDADD) +dist_man_MANS += tools/atf-run.1 + +bin_PROGRAMS += tools/atf-version +tools_atf_version_SOURCES = tools/atf-version.cpp +nodist_tools_atf_version_SOURCES = tools/revision.h +tools_atf_version_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_atf_version_LDADD = $(TOOLS_LDADD) +dist_man_MANS += tools/atf-version.1 + +EXTRA_DIST += tools/generate-revision.sh + +BUILT_SOURCES += tools/revision.h +CLEANFILES += tools/revision.h +tools/revision.h: tools/revision.h.stamp + @test -d tools || mkdir -p tools + @cmp -s tools/revision.h tools/revision.h.stamp || \ + cp -p tools/revision.h.stamp tools/revision.h + +CLEANFILES += tools/revision.h.stamp +PHONY_TARGETS += tools/revision.h.stamp +tools/revision.h.stamp: + @test -d tools || mkdir -p tools + @$(top_srcdir)/tools/generate-revision.sh \ + -g "$(GIT)" -r $(top_srcdir) -o tools/revision.h.stamp \ + -v $(PACKAGE_VERSION) + +#man_MANS += tools/atf.7 +#CLEANFILES += tools/atf.7 +#EXTRA_DIST += tools/atf.7.in + +dist_man_MANS += tools/atf-formats.5 + +tools/atf.7: $(srcdir)/tools/atf.7.in + test -d tools || mkdir -p tools + sed -e 's#__DOCDIR__#$(docdir)#g' \ + -e 's#__TESTSDIR__#$(testsdir)#g' \ + <$(srcdir)/tools/atf.7.in >tools/atf.7.tmp + mv tools/atf.7.tmp tools/atf.7 + + + +cssdir = $(atf_cssdir) +css_DATA = tools/tests-results.css +EXTRA_DIST += $(css_DATA) + +dtddir = $(atf_dtddir) +dtd_DATA = tools/tests-results.dtd +EXTRA_DIST += $(dtd_DATA) + +egdir = $(atf_egdir) +eg_DATA = tools/sample/atf-run.hooks +eg_DATA += tools/sample/common.conf +EXTRA_DIST += $(eg_DATA) + +hooksdir = $(pkgdatadir) +hooks_DATA = tools/share/atf-run.hooks +EXTRA_DIST += $(hooks_DATA) + +xsldir = $(atf_xsldir) +xsl_DATA = tools/tests-results.xsl +EXTRA_DIST += $(xsl_DATA) + + + +tests_tools_DATA = tools/Atffile tools/Kyuafile +tests_toolsdir = $(pkgtestsdir)/tools +EXTRA_DIST += $(tests_tools_DATA) + +tests_tools_SCRIPTS = tools/atf-config_test +CLEANFILES += tools/atf-config_test +EXTRA_DIST += tools/atf-config_test.sh +tools/atf-config_test: $(srcdir)/tools/atf-config_test.sh + @test -d tools || mkdir -p tools + @src="$(srcdir)/tools/atf-config_test.sh"; \ + dst="tools/atf-config_test"; $(BUILD_SH_TP) + +tests_tools_SCRIPTS += tools/atf-report_test +CLEANFILES += tools/atf-report_test +EXTRA_DIST += tools/atf-report_test.sh +tools/atf-report_test: $(srcdir)/tools/atf-report_test.sh + @test -d tools || mkdir -p tools + @src="$(srcdir)/tools/atf-report_test.sh"; \ + dst="tools/atf-report_test"; $(BUILD_SH_TP) + +tests_tools_SCRIPTS += tools/atf-run_test +CLEANFILES += tools/atf-run_test +EXTRA_DIST += tools/atf-run_test.sh +tools/atf-run_test: $(srcdir)/tools/atf-run_test.sh + @test -d tools || mkdir -p tools + @src="$(srcdir)/tools/atf-run_test.sh"; \ + dst="tools/atf-run_test"; $(BUILD_SH_TP) + +tests_tools_PROGRAMS = tools/application_test +tools_application_test_SOURCES = tools/application_test.cpp +tools_application_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_application_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/atffile_test +tools_atffile_test_SOURCES = tools/atffile_test.cpp +tools_atffile_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_atffile_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/auto_array_test +tools_auto_array_test_SOURCES = tools/auto_array_test.cpp +tools_auto_array_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_auto_array_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/bad_metadata_helper +tools_bad_metadata_helper_SOURCES = tools/bad_metadata_helper.c +tools_bad_metadata_helper_LDADD = libatf-c.la + +tests_tools_PROGRAMS += tools/config_test +tools_config_test_SOURCES = tools/config_test.cpp +tools_config_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_config_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/config_file_test +tools_config_file_test_SOURCES = tools/config_file_test.cpp +tools_config_file_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_config_file_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/env_test +tools_env_test_SOURCES = tools/env_test.cpp +tools_env_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_env_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/expand_test +tools_expand_test_SOURCES = tools/expand_test.cpp +tools_expand_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_expand_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/expect_helpers +tools_expect_helpers_SOURCES = tools/expect_helpers.c +tools_expect_helpers_LDADD = libatf-c.la + +tests_tools_PROGRAMS += tools/fail_helper +tools_fail_helper_SOURCES = tools/fail_helper.cpp +tools_fail_helper_LDADD = $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/fs_test +tools_fs_test_SOURCES = tools/fs_test.cpp +tools_fs_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_fs_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/io_test +tools_io_test_SOURCES = tools/io_test.cpp +tools_io_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_io_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/misc_helpers +tools_misc_helpers_SOURCES = tools/misc_helpers.cpp +tools_misc_helpers_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_misc_helpers_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/parser_test +tools_parser_test_SOURCES = tools/parser_test.cpp +tools_parser_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_parser_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/process_test +tools_process_test_SOURCES = tools/process_test.cpp +tools_process_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_process_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/pass_helper +tools_pass_helper_SOURCES = tools/pass_helper.cpp +tools_pass_helper_LDADD = $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/process_helpers +tools_process_helpers_SOURCES = tools/process_helpers.c + +tests_tools_PROGRAMS += tools/reader_test +tools_reader_test_SOURCES = tools/reader_test.cpp +tools_reader_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_reader_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/requirements_test +tools_requirements_test_SOURCES = tools/requirements_test.cpp +tools_requirements_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_requirements_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/several_tcs_helper +tools_several_tcs_helper_SOURCES = tools/several_tcs_helper.c +tools_several_tcs_helper_LDADD = libatf-c.la + +tests_tools_PROGRAMS += tools/signals_test +tools_signals_test_SOURCES = tools/signals_test.cpp tools/signals.cpp +tools_signals_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_signals_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/test_program_test +tools_test_program_test_SOURCES = tools/test_program_test.cpp +tools_test_program_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_test_program_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/text_test +tools_text_test_SOURCES = tools/text_test.cpp tools/text.cpp +tools_text_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_text_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/ui_test +tools_ui_test_SOURCES = tools/ui_test.cpp tools/ui.cpp +tools_ui_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_ui_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/user_test +tools_user_test_SOURCES = tools/user_test.cpp tools/user.cpp +tools_user_test_CPPFLAGS = $(TOOLS_CPPFLAGS) +tools_user_test_LDADD = $(TOOLS_LDADD) $(ATF_CXX_LIBS) + +tests_tools_PROGRAMS += tools/zero_tcs_helper +tools_zero_tcs_helper_SOURCES = tools/zero_tcs_helper.c +tools_zero_tcs_helper_LDADD = libatf-c.la + +# vim: syntax=make:noexpandtab:shiftwidth=8:softtabstop=8 diff --git a/unit/atf-src/tools/application.cpp b/unit/atf-src/tools/application.cpp new file mode 100644 index 0000000000..d32fd7e2ce --- /dev/null +++ b/unit/atf-src/tools/application.cpp @@ -0,0 +1,317 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif + +extern "C" { +#include +} + +#include +#include +#include +#include +#include +#include + +#include "application.hpp" +#include "defs.hpp" +#include "ui.hpp" + +#if !defined(HAVE_VSNPRINTF_IN_STD) +namespace std { +using ::vsnprintf; +} +#endif // !defined(HAVE_VSNPRINTF_IN_STD) + +namespace impl = tools::application; +#define IMPL_NAME "tools::application" + +// ------------------------------------------------------------------------ +// The "usage_error" class. +// ------------------------------------------------------------------------ + +impl::usage_error::usage_error(const char *fmt, ...) + throw() : + std::runtime_error("usage_error; message unformatted") +{ + va_list ap; + + va_start(ap, fmt); + std::vsnprintf(m_text, sizeof(m_text), fmt, ap); + va_end(ap); +} + +impl::usage_error::~usage_error(void) + throw() +{ +} + +const char* +impl::usage_error::what(void) + const throw() +{ + return m_text; +} + +// ------------------------------------------------------------------------ +// The "application" class. +// ------------------------------------------------------------------------ + +impl::option::option(char ch, + const std::string& a, + const std::string& desc) : + m_character(ch), + m_argument(a), + m_description(desc) +{ +} + +bool +impl::option::operator<(const impl::option& o) + const +{ + return m_character < o.m_character; +} + +impl::app::app(const std::string& description, + const std::string& manpage, + const std::string& global_manpage) : + m_hflag(false), + m_argc(-1), + m_argv(NULL), + m_prog_name(NULL), + m_description(description), + m_manpage(manpage), + m_global_manpage(global_manpage) +{ +} + +impl::app::~app(void) +{ +} + +bool +impl::app::inited(void) +{ + return m_argc != -1; +} + +impl::app::options_set +impl::app::options(void) +{ + options_set opts = specific_options(); + opts.insert(option('h', "", "Shows this help message")); + return opts; +} + +std::string +impl::app::specific_args(void) + const +{ + return ""; +} + +impl::app::options_set +impl::app::specific_options(void) + const +{ + return options_set(); +} + +void +impl::app::process_option(int ch ATF_DEFS_ATTRIBUTE_UNUSED, + const char* arg ATF_DEFS_ATTRIBUTE_UNUSED) +{ +} + +void +impl::app::process_options(void) +{ + assert(inited()); + + std::string optstr; +#if defined(HAVE_GNU_GETOPT) + optstr += '+'; // Turn on POSIX behavior. +#endif + optstr += ':'; + { + options_set opts = options(); + for (options_set::const_iterator iter = opts.begin(); + iter != opts.end(); iter++) { + const option& opt = (*iter); + + optstr += opt.m_character; + if (!opt.m_argument.empty()) + optstr += ':'; + } + } + + int ch; + const int old_opterr = ::opterr; + ::opterr = 0; + while ((ch = ::getopt(m_argc, m_argv, optstr.c_str())) != -1) { + switch (ch) { + case 'h': + m_hflag = true; + break; + + case ':': + throw usage_error("Option -%c requires an argument.", + ::optopt); + + case '?': + throw usage_error("Unknown option -%c.", ::optopt); + + default: + process_option(ch, ::optarg); + } + } + m_argc -= ::optind; + m_argv += ::optind; + + // Clear getopt state just in case the test wants to use it. + opterr = old_opterr; + optind = 1; +#if defined(HAVE_OPTRESET) + optreset = 1; +#endif +} + +void +impl::app::usage(std::ostream& os) +{ + assert(inited()); + + std::string args = specific_args(); + if (!args.empty()) + args = " " + args; + os << ui::format_text_with_tag(std::string(m_prog_name) + " [options]" + + args, "Usage: ", false) << "\n\n" + << ui::format_text(m_description) << "\n\n"; + + options_set opts = options(); + assert(!opts.empty()); + os << "Available options:\n"; + size_t coldesc = 0; + for (options_set::const_iterator iter = opts.begin(); + iter != opts.end(); iter++) { + const option& opt = (*iter); + + if (opt.m_argument.length() + 1 > coldesc) + coldesc = opt.m_argument.length() + 1; + } + for (options_set::const_iterator iter = opts.begin(); + iter != opts.end(); iter++) { + const option& opt = (*iter); + + std::string tag = std::string(" -") + opt.m_character; + if (opt.m_argument.empty()) + tag += " "; + else + tag += " " + opt.m_argument + " "; + os << ui::format_text_with_tag(opt.m_description, tag, false, + coldesc + 10) << "\n"; + } + os << "\n"; + + std::string gmp; + if (!m_global_manpage.empty()) + gmp = " and " + m_global_manpage; + os << ui::format_text("For more details please see " + m_manpage + + gmp + ".") + << "\n"; +} + +int +impl::app::run(int argc, char* const* argv) +{ + assert(argc > 0); + assert(argv != NULL); + + m_argc = argc; + m_argv = argv; + + m_argv0 = m_argv[0]; + + m_prog_name = std::strrchr(m_argv[0], '/'); + if (m_prog_name == NULL) + m_prog_name = m_argv[0]; + else + m_prog_name++; + + // Libtool workaround: if running from within the source tree (binaries + // that are not installed yet), skip the "lt-" prefix added to files in + // the ".libs" directory to show the real (not temporary) name. + if (std::strncmp(m_prog_name, "lt-", 3) == 0) + m_prog_name += 3; + + const std::string bug = + std::string("This is probably a bug in ") + m_prog_name + + " or one of the libraries it uses. Please report this problem to " + PACKAGE_BUGREPORT " and provide as many details as possible " + "describing how you got to this condition."; + + int errcode; + try { + int oldargc = m_argc; + + process_options(); + + if (m_hflag) { + if (oldargc != 2) + throw usage_error("-h must be given alone."); + + usage(std::cout); + errcode = EXIT_SUCCESS; + } else + errcode = main(); + } catch (const usage_error& e) { + std::cerr << ui::format_error(m_prog_name, e.what()) << "\n" + << ui::format_info(m_prog_name, std::string("Type `") + + m_prog_name + " -h' for more details.") + << "\n"; + errcode = EXIT_FAILURE; + } catch (const std::runtime_error& e) { + std::cerr << ui::format_error(m_prog_name, std::string(e.what())) + << "\n"; + errcode = EXIT_FAILURE; + } catch (const std::exception& e) { + std::cerr << ui::format_error(m_prog_name, std::string("Caught " + "unexpected error: ") + e.what() + "\n" + bug) << "\n"; + errcode = EXIT_FAILURE; + } catch (...) { + std::cerr << ui::format_error(m_prog_name, std::string("Caught " + "unknown error\n") + bug) << "\n"; + errcode = EXIT_FAILURE; + } + return errcode; +} diff --git a/unit/atf-src/tools/application.hpp b/unit/atf-src/tools/application.hpp new file mode 100644 index 0000000000..5a8d57c6e5 --- /dev/null +++ b/unit/atf-src/tools/application.hpp @@ -0,0 +1,113 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#if !defined(TOOLS_APPLICATION_HPP) +#define TOOLS_APPLICATION_HPP + +#include +#include +#include +#include + +namespace tools { +namespace application { + +// ------------------------------------------------------------------------ +// The "usage_error" class. +// ------------------------------------------------------------------------ + +class usage_error : public std::runtime_error { + char m_text[4096]; + +public: + usage_error(const char*, ...) throw(); + ~usage_error(void) throw(); + + const char* what(void) const throw(); +}; + +// ------------------------------------------------------------------------ +// The "option" class. +// ------------------------------------------------------------------------ + +class option { + char m_character; + std::string m_argument; + std::string m_description; + + friend class app; + +public: + option(char, const std::string&, const std::string&); + + bool operator<(const option&) const; +}; + +// ------------------------------------------------------------------------ +// The "app" class. +// ------------------------------------------------------------------------ + +class app { + bool m_hflag; + + void process_options(void); + void usage(std::ostream&); + + bool inited(void); + +protected: + typedef std::set< option > options_set; + + int m_argc; + char* const* m_argv; + + const char* m_argv0; + const char* m_prog_name; + std::string m_description; + std::string m_manpage, m_global_manpage; + + options_set options(void); + + // To be redefined. + virtual std::string specific_args(void) const; + virtual options_set specific_options(void) const; + virtual void process_option(int, const char*); + virtual int main(void) = 0; + +public: + app(const std::string&, const std::string&, const std::string&); + virtual ~app(void); + + int run(int, char* const*); +}; + +} // namespace application +} // namespace tools + +#endif // !defined(TOOLS_APPLICATION_HPP) diff --git a/unit/atf-src/tools/application_test.cpp b/unit/atf-src/tools/application_test.cpp new file mode 100644 index 0000000000..a9013cdc6b --- /dev/null +++ b/unit/atf-src/tools/application_test.cpp @@ -0,0 +1,94 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2009 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +extern "C" { +#include +} + +#include + +#include "application.hpp" + +class getopt_app : public tools::application::app { +public: + getopt_app(void) : app("description", "manpage", "other") {} + + int main(void) + { + // Provide an option that is unknown to the application driver and + // one that is, together with an argument that would be swallowed by + // the test program option if it were recognized. + int argc = 4; + char arg1[] = "progname"; + char arg2[] = "-Z"; + char arg3[] = "-s"; + char arg4[] = "foo"; + char *const argv[] = { arg1, arg2, arg3, arg4, NULL }; + + int ch; + bool zflag; + + // Given that this obviously is an application, and that we used the + // same driver to start, we can test getopt(3) right here without doing + // any fancy stuff. + zflag = false; + while ((ch = ::getopt(argc, argv, ":Z")) != -1) { + switch (ch) { + case 'Z': + zflag = true; + break; + + case '?': + default: + if (optopt != 's') + ATF_FAIL("Unexpected unknown option found"); + } + } + + ATF_REQUIRE(zflag); + ATF_REQUIRE_EQ(1, argc - optind); + ATF_REQUIRE_EQ(std::string("foo"), argv[optind]); + + return 0; + } +}; + +ATF_TEST_CASE_WITHOUT_HEAD(getopt); +ATF_TEST_CASE_BODY(getopt) +{ + int argc = 1; + char arg1[] = "progname"; + char *const argv[] = { arg1, NULL }; + ATF_REQUIRE_EQ(0, getopt_app().run(argc, argv)); +} + +ATF_INIT_TEST_CASES(tcs) +{ + ATF_ADD_TEST_CASE(tcs, getopt); +} diff --git a/unit/atf-src/atf-config/atf-config.1 b/unit/atf-src/tools/atf-config.1 similarity index 100% rename from unit/atf-src/atf-config/atf-config.1 rename to unit/atf-src/tools/atf-config.1 diff --git a/unit/atf-src/atf-config/atf-config.cpp b/unit/atf-src/tools/atf-config.cpp similarity index 88% rename from unit/atf-src/atf-config/atf-config.cpp rename to unit/atf-src/tools/atf-config.cpp index e5fdca1950..4d82d55e63 100644 --- a/unit/atf-src/atf-config/atf-config.cpp +++ b/unit/atf-src/tools/atf-config.cpp @@ -32,16 +32,11 @@ #include #include -extern "C" { -#include "atf-c/defs.h" -} +#include "application.hpp" +#include "config.hpp" +#include "defs.hpp" -#include "atf-c++/config.hpp" - -#include "atf-c++/detail/application.hpp" -#include "atf-c++/detail/sanity.hpp" - -class atf_config : public atf::application::app { +class atf_config : public tools::application::app { static const char* m_description; bool m_tflag; @@ -79,7 +74,7 @@ atf_config::process_option(int ch, const char* arg ATF_DEFS_ATTRIBUTE_UNUSED) break; default: - UNREACHABLE; + std::abort(); } } @@ -94,7 +89,7 @@ atf_config::options_set atf_config::specific_options(void) const { - using atf::application::option; + using tools::application::option; options_set opts; opts.insert(option('t', "", "Terse output: show values only")); return opts; @@ -117,20 +112,20 @@ int atf_config::main(void) { if (m_argc < 1) { - std::map< std::string, std::string > cv = atf::config::get_all(); + std::map< std::string, std::string > cv = tools::config::get_all(); for (std::map< std::string, std::string >::const_iterator iter = cv.begin(); iter != cv.end(); iter++) std::cout << format_var((*iter).first, (*iter).second) << "\n"; } else { for (int i = 0; i < m_argc; i++) { - if (!atf::config::has(m_argv[i])) + if (!tools::config::has(m_argv[i])) throw std::runtime_error(std::string("Unknown variable `") + m_argv[i] + "'"); } for (int i = 0; i < m_argc; i++) { - std::cout << format_var(m_argv[i], atf::config::get(m_argv[i])) + std::cout << format_var(m_argv[i], tools::config::get(m_argv[i])) << "\n"; } } diff --git a/unit/atf-src/atf-config/integration_test.sh b/unit/atf-src/tools/atf-config_test.sh similarity index 100% rename from unit/atf-src/atf-config/integration_test.sh rename to unit/atf-src/tools/atf-config_test.sh diff --git a/unit/atf-src/doc/atf-formats.5 b/unit/atf-src/tools/atf-formats.5 similarity index 100% rename from unit/atf-src/doc/atf-formats.5 rename to unit/atf-src/tools/atf-formats.5 diff --git a/unit/atf-src/atf-report/atf-report.1 b/unit/atf-src/tools/atf-report.1 similarity index 100% rename from unit/atf-src/atf-report/atf-report.1 rename to unit/atf-src/tools/atf-report.1 diff --git a/unit/atf-src/atf-report/atf-report.cpp b/unit/atf-src/tools/atf-report.cpp similarity index 93% rename from unit/atf-src/atf-report/atf-report.cpp rename to unit/atf-src/tools/atf-report.cpp index 359b58b230..cb065f993e 100644 --- a/unit/atf-src/atf-report/atf-report.cpp +++ b/unit/atf-src/tools/atf-report.cpp @@ -41,20 +41,17 @@ extern "C" { #include #include -#include "atf-c/defs.h" - -#include "atf-c++/detail/application.hpp" -#include "atf-c++/detail/fs.hpp" -#include "atf-c++/detail/sanity.hpp" -#include "atf-c++/detail/text.hpp" -#include "atf-c++/detail/ui.hpp" - +#include "application.hpp" +#include "defs.hpp" +#include "fs.hpp" #include "reader.hpp" +#include "text.hpp" +#include "ui.hpp" typedef std::auto_ptr< std::ostream > ostream_ptr; static ostream_ptr -open_outfile(const atf::fs::path& path) +open_outfile(const tools::fs::path& path) { ostream_ptr osp; if (path.str() == "-") @@ -128,7 +125,7 @@ class csv_writer : public writer { std::string m_tcname; public: - csv_writer(const atf::fs::path& p) : + csv_writer(const tools::fs::path& p) : m_os(open_outfile(p)) { } @@ -223,8 +220,8 @@ class ticker_writer : public writer { void write_tp_start(const std::string& tp, size_t ntcs) { - using atf::text::to_string; - using atf::ui::format_text; + using tools::text::to_string; + using tools::ui::format_text; m_tpname = tp; @@ -238,7 +235,7 @@ class ticker_writer : public writer { void write_tp_end(struct timeval* tv, const std::string& reason) { - using atf::ui::format_text_with_tag; + using tools::ui::format_text_with_tag; m_curtp++; @@ -290,7 +287,7 @@ class ticker_writer : public writer { str = "Skipped: " + reason; m_tcs_skipped++; } else - UNREACHABLE; + std::abort(); // XXX Wrap text. format_text_with_tag does not currently allow // to specify the current column, which is needed because we have @@ -304,8 +301,8 @@ class ticker_writer : public writer { write_expected_failures(const std::map< std::string, std::string >& xfails, std::ostream& os) { - using atf::ui::format_text; - using atf::ui::format_text_with_tag; + using tools::ui::format_text; + using tools::ui::format_text_with_tag; os << format_text("Test cases for known bugs:") << "\n"; @@ -322,10 +319,10 @@ class ticker_writer : public writer { void write_eof(void) { - using atf::text::join; - using atf::text::to_string; - using atf::ui::format_text; - using atf::ui::format_text_with_tag; + using tools::text::join; + using tools::text::to_string; + using tools::ui::format_text; + using tools::ui::format_text_with_tag; if (!m_failed_tps.empty()) { (*m_os) << format_text("Failed (bogus) test programs:") @@ -362,7 +359,7 @@ class ticker_writer : public writer { } public: - ticker_writer(const atf::fs::path& p) : + ticker_writer(const tools::fs::path& p) : m_os(open_outfile(p)) { } @@ -473,7 +470,7 @@ class xml_writer : public writer { } else if (state == "skipped") { (*m_os) << "" << elemval(reason) << "\n"; } else - UNREACHABLE; + std::abort(); (*m_os) << "" << format_tv(tv) << ""; (*m_os) << "\n"; } @@ -485,7 +482,7 @@ class xml_writer : public writer { } public: - xml_writer(const atf::fs::path& p) : + xml_writer(const tools::fs::path& p) : m_os(open_outfile(p)) { (*m_os) << "\n" @@ -507,7 +504,7 @@ public: //! raised by the parser, redirects it to multiple writers so that they //! can reformat it according to their output rules. //! -class converter : public atf::atf_report::atf_tps_reader { +class converter : public tools::atf_report::atf_tps_reader { typedef std::vector< writer* > outs_vector; outs_vector m_outs; @@ -586,7 +583,7 @@ class converter : public atf::atf_report::atf_tps_reader { public: converter(std::istream& is) : - atf::atf_report::atf_tps_reader(is) + tools::atf_report::atf_tps_reader(is) { } @@ -598,7 +595,7 @@ public: } void - add_output(const std::string& fmt, const atf::fs::path& p) + add_output(const std::string& fmt, const tools::fs::path& p) { if (fmt == "csv") { m_outs.push_back(new csv_writer(p)); @@ -615,10 +612,10 @@ public: // The "atf_report" class. // ------------------------------------------------------------------------ -class atf_report : public atf::application::app { +class atf_report : public tools::application::app { static const char* m_description; - typedef std::pair< std::string, atf::fs::path > fmt_path_pair; + typedef std::pair< std::string, tools::fs::path > fmt_path_pair; std::vector< fmt_path_pair > m_oflags; void process_option(int, const char*); @@ -651,14 +648,14 @@ atf_report::process_option(int ch, const char* arg) throw std::runtime_error("Syntax error in -o option"); else { std::string fmt = str.substr(0, pos); - atf::fs::path path = atf::fs::path(str.substr(pos + 1)); + tools::fs::path path = tools::fs::path(str.substr(pos + 1)); m_oflags.push_back(fmt_path_pair(fmt, path)); } } break; default: - UNREACHABLE; + std::abort(); } } @@ -666,7 +663,7 @@ atf_report::options_set atf_report::specific_options(void) const { - using atf::application::option; + using tools::application::option; options_set opts; opts.insert(option('o', "fmt:path", "Adds a new output file; multiple " "ones can be specified, and a - " @@ -681,15 +678,15 @@ atf_report::main(void) throw std::runtime_error("No arguments allowed"); if (m_oflags.empty()) - m_oflags.push_back(fmt_path_pair("ticker", atf::fs::path("-"))); + m_oflags.push_back(fmt_path_pair("ticker", tools::fs::path("-"))); // Look for path duplicates. - std::set< atf::fs::path > paths; + std::set< tools::fs::path > paths; for (std::vector< fmt_path_pair >::const_iterator iter = m_oflags.begin(); iter != m_oflags.end(); iter++) { - atf::fs::path p = (*iter).second; - if (p == atf::fs::path("/dev/stdout")) - p = atf::fs::path("-"); + tools::fs::path p = (*iter).second; + if (p == tools::fs::path("/dev/stdout")) + p = tools::fs::path("-"); if (paths.find(p) != paths.end()) throw std::runtime_error("The file `" + p.str() + "' was " "specified more than once"); diff --git a/unit/atf-src/atf-report/integration_test.sh b/unit/atf-src/tools/atf-report_test.sh similarity index 99% rename from unit/atf-src/atf-report/integration_test.sh rename to unit/atf-src/tools/atf-report_test.sh index b19346a86c..9f0f47fc61 100644 --- a/unit/atf-src/atf-report/integration_test.sh +++ b/unit/atf-src/tools/atf-report_test.sh @@ -105,7 +105,7 @@ default_body() atf_test_case expect expect_body() { - ln -s "$(atf_get_srcdir)/../atf-run/expect_helpers" . + ln -s "$(atf_get_srcdir)/expect_helpers" . cat >Atffile <Atffile < +#include #include #include #include @@ -48,25 +49,24 @@ extern "C" { #include #include -#include "atf-c++/detail/application.hpp" -#include "atf-c++/config.hpp" -#include "atf-c++/tests.hpp" - -#include "atf-c++/detail/env.hpp" -#include "atf-c++/detail/exceptions.hpp" -#include "atf-c++/detail/fs.hpp" -#include "atf-c++/detail/parser.hpp" -#include "atf-c++/detail/process.hpp" -#include "atf-c++/detail/sanity.hpp" -#include "atf-c++/detail/text.hpp" - +#include "application.hpp" #include "atffile.hpp" #include "config.hpp" +#include "config_file.hpp" +#include "env.hpp" +#include "exceptions.hpp" #include "fs.hpp" +#include "parser.hpp" +#include "process.hpp" #include "requirements.hpp" #include "test-program.hpp" +#include "text.hpp" -namespace impl = atf::atf_run; +namespace { + +typedef std::map< std::string, std::string > vars_map; + +} // anonymous namespace #if defined(MAXCOMLEN) static const std::string::size_type max_core_name_length = MAXCOMLEN; @@ -74,12 +74,12 @@ static const std::string::size_type max_core_name_length = MAXCOMLEN; static const std::string::size_type max_core_name_length = std::string::npos; #endif -class atf_run : public atf::application::app { +class atf_run : public tools::application::app { static const char* m_description; - atf::tests::vars_map m_cmdline_vars; + vars_map m_cmdline_vars; - static atf::tests::vars_map::value_type parse_var(const std::string&); + static vars_map::value_type parse_var(const std::string&); void process_option(int, const char*); std::string specific_args(void) const; @@ -91,14 +91,17 @@ class atf_run : public atf::application::app { size_t count_tps(std::vector< std::string >) const; - int run_test(const atf::fs::path&, impl::atf_tps_writer&, - const atf::tests::vars_map&); - int run_test_directory(const atf::fs::path&, impl::atf_tps_writer&); - int run_test_program(const atf::fs::path&, impl::atf_tps_writer&, - const atf::tests::vars_map&); + int run_test(const tools::fs::path&, tools::test_program::atf_tps_writer&, + const vars_map&); + int run_test_directory(const tools::fs::path&, + tools::test_program::atf_tps_writer&); + int run_test_program(const tools::fs::path&, + tools::test_program::atf_tps_writer&, + const vars_map&); - impl::test_case_result get_test_case_result(const std::string&, - const atf::process::status&, const atf::fs::path&) const; + tools::test_program::test_case_result get_test_case_result( + const std::string&, const tools::process::status&, + const tools::fs::path&) const; public: atf_run(void); @@ -110,7 +113,7 @@ static void sanitize_gdb_env(void) { try { - atf::env::unset("TERM"); + tools::env::unset("TERM"); } catch (...) { // Just swallow exceptions here; they cannot propagate into C, which // is where this function is called from, and even if these exceptions @@ -119,29 +122,30 @@ sanitize_gdb_env(void) } static void -dump_stacktrace(const atf::fs::path& tp, const atf::process::status& s, - const atf::fs::path& workdir, impl::atf_tps_writer& w) +dump_stacktrace(const tools::fs::path& tp, const tools::process::status& s, + const tools::fs::path& workdir, + tools::test_program::atf_tps_writer& w) { - PRE(s.signaled() && s.coredump()); + assert(s.signaled() && s.coredump()); w.stderr_tc("Test program crashed; attempting to get stack trace"); - const atf::fs::path corename = workdir / + const tools::fs::path corename = workdir / (tp.leaf_name().substr(0, max_core_name_length) + ".core"); - if (!atf::fs::exists(corename)) { + if (!tools::fs::exists(corename)) { w.stderr_tc("Expected file " + corename.str() + " not found"); return; } - const atf::fs::path gdb(GDB); - const atf::fs::path gdbout = workdir / "gdb.out"; - const atf::process::argv_array args(gdb.leaf_name().c_str(), "-batch", + const tools::fs::path gdb(GDB); + const tools::fs::path gdbout = workdir / "gdb.out"; + const tools::process::argv_array args(gdb.leaf_name().c_str(), "-batch", "-q", "-ex", "bt", tp.c_str(), corename.c_str(), NULL); - atf::process::status status = atf::process::exec( + tools::process::status status = tools::process::exec( gdb, args, - atf::process::stream_redirect_path(gdbout), - atf::process::stream_redirect_path(atf::fs::path("/dev/null")), + tools::process::stream_redirect_path(gdbout), + tools::process::stream_redirect_path(tools::fs::path("/dev/null")), sanitize_gdb_env); if (!status.exited() || status.exitstatus() != EXIT_SUCCESS) { w.stderr_tc("Execution of " GDB " failed"); @@ -177,7 +181,7 @@ atf_run::process_option(int ch, const char* arg) break; default: - UNREACHABLE; + std::abort(); } } @@ -192,7 +196,7 @@ atf_run::options_set atf_run::specific_options(void) const { - using atf::application::option; + using tools::application::option; options_set opts; opts.insert(option('v', "var=value", "Sets the configuration variable " "`var' to `value'; overrides " @@ -206,7 +210,7 @@ atf_run::parse_vflag(const std::string& str) if (str.empty()) throw std::runtime_error("-v requires a non-empty argument"); - std::vector< std::string > ws = atf::text::split(str, "="); + std::vector< std::string > ws = tools::text::split(str, "="); if (ws.size() == 1 && str[str.length() - 1] == '=') { m_cmdline_vars[ws[0]] = ""; } else { @@ -219,18 +223,18 @@ atf_run::parse_vflag(const std::string& str) } int -atf_run::run_test(const atf::fs::path& tp, - impl::atf_tps_writer& w, - const atf::tests::vars_map& config) +atf_run::run_test(const tools::fs::path& tp, + tools::test_program::atf_tps_writer& w, + const vars_map& config) { - atf::fs::file_info fi(tp); + tools::fs::file_info fi(tp); int errcode; - if (fi.get_type() == atf::fs::file_info::dir_type) + if (fi.get_type() == tools::fs::file_info::dir_type) errcode = run_test_directory(tp, w); else { - const atf::tests::vars_map effective_config = - impl::merge_configs(config, m_cmdline_vars); + const vars_map effective_config = + tools::config_file::merge_configs(config, m_cmdline_vars); errcode = run_test_program(tp, w, effective_config); } @@ -238,39 +242,38 @@ atf_run::run_test(const atf::fs::path& tp, } int -atf_run::run_test_directory(const atf::fs::path& tp, - impl::atf_tps_writer& w) +atf_run::run_test_directory(const tools::fs::path& tp, + tools::test_program::atf_tps_writer& w) { - impl::atffile af = impl::read_atffile(tp / "Atffile"); + tools::atffile af = tools::read_atffile(tp / "Atffile"); - atf::tests::vars_map test_suite_vars; + vars_map test_suite_vars; { - atf::tests::vars_map::const_iterator iter = - af.props().find("test-suite"); - INV(iter != af.props().end()); - test_suite_vars = impl::read_config_files((*iter).second); + vars_map::const_iterator iter = af.props().find("test-suite"); + assert(iter != af.props().end()); + test_suite_vars = tools::config_file::read_config_files((*iter).second); } bool ok = true; for (std::vector< std::string >::const_iterator iter = af.tps().begin(); iter != af.tps().end(); iter++) { const bool result = run_test(tp / *iter, w, - impl::merge_configs(af.conf(), test_suite_vars)); + tools::config_file::merge_configs(af.conf(), test_suite_vars)); ok &= (result == EXIT_SUCCESS); } return ok ? EXIT_SUCCESS : EXIT_FAILURE; } -impl::test_case_result +tools::test_program::test_case_result atf_run::get_test_case_result(const std::string& broken_reason, - const atf::process::status& s, - const atf::fs::path& resfile) + const tools::process::status& s, + const tools::fs::path& resfile) const { - using atf::text::to_string; - using impl::read_test_case_result; - using impl::test_case_result; + using tools::text::to_string; + using tools::test_program::read_test_case_result; + using tools::test_program::test_case_result; if (!broken_reason.empty()) { test_case_result tcr; @@ -343,7 +346,7 @@ atf_run::get_test_case_result(const std::string& broken_reason, tcr = read_test_case_result(resfile); } catch (const std::runtime_error&) { return test_case_result("failed", -1, "Test program received " - "signal " + atf::text::to_string(s.termsig()) + + "signal " + tools::text::to_string(s.termsig()) + (s.coredump() ? " (core dumped)" : "")); } @@ -358,53 +361,53 @@ atf_run::get_test_case_result(const std::string& broken_reason, " signal but got " + to_string(s.termsig())); } else { return test_case_result("failed", -1, "Test program received " - "signal " + atf::text::to_string(s.termsig()) + + "signal " + tools::text::to_string(s.termsig()) + (s.coredump() ? " (core dumped)" : "") + " and created a " "bogus results file"); } } - UNREACHABLE; + std::abort(); return test_case_result(); } int -atf_run::run_test_program(const atf::fs::path& tp, - impl::atf_tps_writer& w, - const atf::tests::vars_map& config) +atf_run::run_test_program(const tools::fs::path& tp, + tools::test_program::atf_tps_writer& w, + const vars_map& config) { int errcode = EXIT_SUCCESS; - impl::metadata md; + tools::test_program::metadata md; try { - md = impl::get_metadata(tp, config); - } catch (const atf::parser::format_error& e) { + md = tools::test_program::get_metadata(tp, config); + } catch (const tools::parser::format_error& e) { w.start_tp(tp.str(), 0); w.end_tp("Invalid format for test case list: " + std::string(e.what())); return EXIT_FAILURE; - } catch (const atf::parser::parse_errors& e) { - const std::string reason = atf::text::join(e, "; "); + } catch (const tools::parser::parse_errors& e) { + const std::string reason = tools::text::join(e, "; "); w.start_tp(tp.str(), 0); w.end_tp("Invalid format for test case list: " + reason); return EXIT_FAILURE; } - impl::temp_dir resdir(atf::fs::path(atf::config::get("atf_workdir")) / - "atf-run.XXXXXX"); + tools::fs::temp_dir resdir( + tools::fs::path(tools::config::get("atf_workdir")) / "atf-run.XXXXXX"); w.start_tp(tp.str(), md.test_cases.size()); if (md.test_cases.empty()) { w.end_tp("Bogus test program: reported 0 test cases"); errcode = EXIT_FAILURE; } else { - for (std::map< std::string, atf::tests::vars_map >::const_iterator iter + for (std::map< std::string, vars_map >::const_iterator iter = md.test_cases.begin(); iter != md.test_cases.end(); iter++) { const std::string& tcname = (*iter).first; - const atf::tests::vars_map& tcmd = (*iter).second; + const vars_map& tcmd = (*iter).second; w.start_tc(tcname); try { - const std::string& reqfail = impl::check_requirements( + const std::string& reqfail = tools::check_requirements( tcmd, config); if (!reqfail.empty()) { w.end_tc("skipped", reqfail); @@ -416,51 +419,53 @@ atf_run::run_test_program(const atf::fs::path& tp, continue; } - const std::pair< int, int > user = impl::get_required_user( + const std::pair< int, int > user = tools::get_required_user( tcmd, config); - atf::fs::path resfile = resdir.get_path() / "tcr"; - INV(!atf::fs::exists(resfile)); + tools::fs::path resfile = resdir.get_path() / "tcr"; + assert(!tools::fs::exists(resfile)); try { - const bool has_cleanup = atf::text::to_bool( + const bool has_cleanup = tools::text::to_bool( (*tcmd.find("has.cleanup")).second); - impl::temp_dir workdir(atf::fs::path(atf::config::get( + tools::fs::temp_dir workdir(tools::fs::path(tools::config::get( "atf_workdir")) / "atf-run.XXXXXX"); if (user.first != -1 && user.second != -1) { if (::chown(workdir.get_path().c_str(), user.first, user.second) == -1) { - throw atf::system_error("chown(" + + throw tools::system_error("chown(" + workdir.get_path().str() + ")", "chown(2) failed", errno); } resfile = workdir.get_path() / "tcr"; } - std::pair< std::string, const atf::process::status > s = - impl::run_test_case(tp, tcname, "body", tcmd, config, - resfile, workdir.get_path(), w); + std::pair< std::string, const tools::process::status > s = + tools::test_program::run_test_case( + tp, tcname, "body", tcmd, config, + resfile, workdir.get_path(), w); if (s.second.signaled() && s.second.coredump()) dump_stacktrace(tp, s.second, workdir.get_path(), w); if (has_cleanup) - (void)impl::run_test_case(tp, tcname, "cleanup", tcmd, - config, resfile, workdir.get_path(), w); + (void)tools::test_program::run_test_case( + tp, tcname, "cleanup", tcmd, + config, resfile, workdir.get_path(), w); // TODO: Force deletion of workdir. - impl::test_case_result tcr = get_test_case_result(s.first, - s.second, resfile); + tools::test_program::test_case_result tcr = + get_test_case_result(s.first, s.second, resfile); w.end_tc(tcr.state(), tcr.reason()); if (tcr.state() == "failed") errcode = EXIT_FAILURE; } catch (...) { - if (atf::fs::exists(resfile)) - atf::fs::remove(resfile); + if (tools::fs::exists(resfile)) + tools::fs::remove(resfile); throw; } - if (atf::fs::exists(resfile)) - atf::fs::remove(resfile); + if (tools::fs::exists(resfile)) + tools::fs::remove(resfile); } w.end_tp(""); @@ -477,11 +482,11 @@ atf_run::count_tps(std::vector< std::string > tps) for (std::vector< std::string >::const_iterator iter = tps.begin(); iter != tps.end(); iter++) { - atf::fs::path tp(*iter); - atf::fs::file_info fi(tp); + tools::fs::path tp(*iter); + tools::fs::file_info fi(tp); - if (fi.get_type() == atf::fs::file_info::dir_type) { - impl::atffile af = impl::read_atffile(tp / "Atffile"); + if (fi.get_type() == tools::fs::file_info::dir_type) { + tools::atffile af = tools::read_atffile(tp / "Atffile"); std::vector< std::string > aux = af.tps(); for (std::vector< std::string >::iterator i2 = aux.begin(); i2 != aux.end(); i2++) @@ -498,16 +503,16 @@ static void call_hook(const std::string& tool, const std::string& hook) { - const atf::fs::path sh(atf::config::get("atf_shell")); - const atf::fs::path hooks = - atf::fs::path(atf::config::get("atf_pkgdatadir")) / (tool + ".hooks"); + const tools::fs::path sh(tools::config::get("atf_shell")); + const tools::fs::path hooks = + tools::fs::path(tools::config::get("atf_pkgdatadir")) / (tool + ".hooks"); - const atf::process::status s = - atf::process::exec(sh, - atf::process::argv_array(sh.c_str(), hooks.c_str(), + const tools::process::status s = + tools::process::exec(sh, + tools::process::argv_array(sh.c_str(), hooks.c_str(), hook.c_str(), NULL), - atf::process::stream_inherit(), - atf::process::stream_inherit()); + tools::process::stream_inherit(), + tools::process::stream_inherit()); if (!s.exited() || s.exitstatus() != EXIT_SUCCESS) @@ -518,7 +523,7 @@ call_hook(const std::string& tool, const std::string& hook) int atf_run::main(void) { - impl::atffile af = impl::read_atffile(atf::fs::path("Atffile")); + tools::atffile af = tools::read_atffile(tools::fs::path("Atffile")); std::vector< std::string > tps; tps = af.tps(); @@ -531,23 +536,22 @@ atf_run::main(void) } // Read configuration data for this test suite. - atf::tests::vars_map test_suite_vars; + vars_map test_suite_vars; { - atf::tests::vars_map::const_iterator iter = - af.props().find("test-suite"); - INV(iter != af.props().end()); - test_suite_vars = impl::read_config_files((*iter).second); + vars_map::const_iterator iter = af.props().find("test-suite"); + assert(iter != af.props().end()); + test_suite_vars = tools::config_file::read_config_files((*iter).second); } - impl::atf_tps_writer w(std::cout); + tools::test_program::atf_tps_writer w(std::cout); call_hook("atf-run", "info_start_hook"); w.ntps(count_tps(tps)); bool ok = true; for (std::vector< std::string >::const_iterator iter = tps.begin(); iter != tps.end(); iter++) { - const bool result = run_test(atf::fs::path(*iter), w, - impl::merge_configs(af.conf(), test_suite_vars)); + const bool result = run_test(tools::fs::path(*iter), w, + tools::config_file::merge_configs(af.conf(), test_suite_vars)); ok &= (result == EXIT_SUCCESS); } diff --git a/unit/atf-src/atf-run/integration_test.sh b/unit/atf-src/tools/atf-run_test.sh similarity index 100% rename from unit/atf-src/atf-run/integration_test.sh rename to unit/atf-src/tools/atf-run_test.sh diff --git a/unit/atf-src/atf-version/atf-version.1 b/unit/atf-src/tools/atf-version.1 similarity index 100% rename from unit/atf-src/atf-version/atf-version.1 rename to unit/atf-src/tools/atf-version.1 diff --git a/unit/atf-src/atf-version/atf-version.cpp b/unit/atf-src/tools/atf-version.cpp similarity index 92% rename from unit/atf-src/atf-version/atf-version.cpp rename to unit/atf-src/tools/atf-version.cpp index dfd092c749..b93f33c260 100644 --- a/unit/atf-src/atf-version/atf-version.cpp +++ b/unit/atf-src/tools/atf-version.cpp @@ -28,18 +28,17 @@ // #if defined(HAVE_CONFIG_H) -#include "bconfig.h" +#include "config.h" #endif #include #include -#include "atf-c++/detail/application.hpp" -#include "atf-c++/detail/ui.hpp" - +#include "application.hpp" #include "revision.h" +#include "ui.hpp" -class atf_version : public atf::application::app { +class atf_version : public tools::application::app { static const char* m_description; public: @@ -60,8 +59,8 @@ atf_version::atf_version(void) : int atf_version::main(void) { - using atf::ui::format_text; - using atf::ui::format_text_with_tag; + using tools::ui::format_text; + using tools::ui::format_text_with_tag; std::cout << PACKAGE_STRING " (" PACKAGE_TARNAME "-" PACKAGE_VERSION ")\n" PACKAGE_COPYRIGHT "\n\n"; diff --git a/unit/atf-src/tools/atf.7.in b/unit/atf-src/tools/atf.7.in new file mode 100644 index 0000000000..b11054cc47 --- /dev/null +++ b/unit/atf-src/tools/atf.7.in @@ -0,0 +1,192 @@ +.\" +.\" Automated Testing Framework (atf) +.\" +.\" Copyright (c) 2007 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd August 28, 2010 +.Dt ATF 7 +.Os +.Sh NAME +.Nm ATF +.Nd introduction to the Automated Testing Framework +.Sh DESCRIPTION +.Em IMPORTANT: If you are here because you want to know how to run the tests in +.Pa __TESTSDIR__ , +.Em you most likely want to read the +.Xr tests 7 +.Em manual page instead. +.Pp +The Automated Testing Framework +.Pf ( Nm ) +is a collection of libraries and utilities designed to ease unattended +application testing in the hands of developers and end users of a specific +piece of software. +.Pp +As regards developers, +.Nm +provides the necessary means to easily create +test suites composed of multiple test programs, which in turn are a +collection of test cases. +It also attempts to simplify the debugging of problems when these test +cases detect an error by providing as much information as possible +about the failure. +.Pp +As regards users, it simplifies the process of running the test suites and, +in special, encourages end users to run them often: they do not need to +have source trees around nor any other development tools installed to be +able to certify that a given piece of software works on their machine as +advertised. +.Pp +If your operating systems distributes +.Nm , +it is possible that it provides an introductory +.Xr tests 7 +manual page. +You are encouraged to read it now. +.Ss License +.Nm +is distributed under the terms of the TNF License, a 2-clause BSD license. +For more details please see: +.Bd -literal -offset indent +.Pa __DOCDIR__/COPYING +.Ed +.Ss Components +.Nm +is a highly modular piece of software. +It provides a couple of libraries to ease the implementation of test +programs: one for the C and C++ languages and another one for shell +scripts. +It also includes multiple small utilities that follow the principle of +doing a single thing but doing it right. +This section outlines which these components are. +.Pp +Public utilities: +.Bl -tag -width atfXtestXprogramXXXXX +.It Xr atf-check 1 +Executes a command and checks that its exit code, its standard output +and its standard error output match pre-specified expected values. +.It Xr atf-config 1 +Queries static configuration information. +.It Xr atf-report 1 +Converts the output of +.Nm atf-run +to user-friendly and/or machine-parseable reports. +.It Xr atf-run 1 +Automates the execution of a series of test programs and collects their +results in a unified report. +.It Xr atf-sh 1 +Shell interpreter for shell-based test programs. +.El +.Pp +Programming interfaces: +.Bl -tag -width atfXtestXprogramXXXXX +.It Xr atf-c-api 3 +C programming interface for test programs. +.It Xr atf-c++-api 3 +C++ programming interface for test programs. +.It Xr atf-sh-api 3 +POSIX shell programming interface for test programs. +.El +.Pp +Other: +.Bl -tag -width atfXtestXprogramXXXXX +.It Xr atf-formats 5 +Description of the machine-parseable data formats used by the tools. +.It Xr atf-test-case 4 +Generic description of test cases, independent of the language they are +implemented in. +.It Xr atf-test-program 1 +Common interface provided by the test programs written using the +.Nm +libraries. +.El +.Ss Recommended reading order +For end users wishing to run tests: +.Bl -enum -compact +.It +.Xr tests 7 +(only if provided by your operating system). +.It +.Xr atf-test-program 1 +.It +.Xr atf-run 1 +.It +.Xr atf-report 1 +.It +.Xr atf-config 1 +.El +.Pp +For developers wanting to write their own tests: +.Bl -enum -compact +.It +Everything recommended to users. +.It +.Xr atf-test-case 4 +.It +.Xr atf-c-api 3 +.It +.Xr atf-c++-api 3 +.It +.Xr atf-sh-api 3 +.It +.Xr atf-sh 1 +.It +.Xr atf-check 1 +.El +.Pp +For those interested in +.Nm +internals: +.Bl -enum -compact +.It +Everything recommended to users. +.It +Everything recommended to developers. +.It +.Xr atf-formats 5 +.El +.Sh SEE ALSO +.Xr tests 7 +.Sh HISTORY +.Nm +started as a Google Summer of Code 2007 project mentored by The NetBSD +Foundation. +Its original goal was to provide a testing framework for The NetBSD +Operating System, but it grew as an independent project because the +framework itself did not need to be tied to a specific operating system. +.Pp +For more details on this subject, please see: +.Bd -literal -offset indent +.Pa __DOCDIR__/NEWS +.Pa __DOCDIR__/ROADMAP +.Ed +.Sh AUTHORS +For more details on the people that made +.Nm +possible, please see: +.Bd -literal -offset indent +.Pa __DOCDIR__/AUTHORS +.Ed diff --git a/unit/atf-src/atf-run/atffile.cpp b/unit/atf-src/tools/atffile.cpp similarity index 79% rename from unit/atf-src/atf-run/atffile.cpp rename to unit/atf-src/tools/atffile.cpp index 22ece645d5..b04c59ed3b 100644 --- a/unit/atf-src/atf-run/atffile.cpp +++ b/unit/atf-src/tools/atffile.cpp @@ -27,19 +27,24 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // +#include +#include #include -#include "atf-c/defs.h" - -#include "atf-c++/detail/exceptions.hpp" -#include "atf-c++/detail/expand.hpp" -#include "atf-c++/detail/parser.hpp" -#include "atf-c++/detail/sanity.hpp" - #include "atffile.hpp" +#include "defs.hpp" +#include "exceptions.hpp" +#include "expand.hpp" +#include "parser.hpp" -namespace impl = atf::atf_run; -namespace detail = atf::atf_run::detail; +namespace impl = tools; +namespace detail = tools::detail; + +namespace { + +typedef std::map< std::string, std::string > vars_map; + +} // anonymous namespace // ------------------------------------------------------------------------ // The "atf_atffile" auxiliary parser. @@ -47,22 +52,22 @@ namespace detail = atf::atf_run::detail; namespace atf_atffile { -static const atf::parser::token_type eof_type = 0; -static const atf::parser::token_type nl_type = 1; -static const atf::parser::token_type text_type = 2; -static const atf::parser::token_type colon_type = 3; -static const atf::parser::token_type conf_type = 4; -static const atf::parser::token_type dblquote_type = 5; -static const atf::parser::token_type equal_type = 6; -static const atf::parser::token_type hash_type = 7; -static const atf::parser::token_type prop_type = 8; -static const atf::parser::token_type tp_type = 9; -static const atf::parser::token_type tp_glob_type = 10; +static const tools::parser::token_type eof_type = 0; +static const tools::parser::token_type nl_type = 1; +static const tools::parser::token_type text_type = 2; +static const tools::parser::token_type colon_type = 3; +static const tools::parser::token_type conf_type = 4; +static const tools::parser::token_type dblquote_type = 5; +static const tools::parser::token_type equal_type = 6; +static const tools::parser::token_type hash_type = 7; +static const tools::parser::token_type prop_type = 8; +static const tools::parser::token_type tp_type = 9; +static const tools::parser::token_type tp_glob_type = 10; -class tokenizer : public atf::parser::tokenizer< std::istream > { +class tokenizer : public tools::parser::tokenizer< std::istream > { public: tokenizer(std::istream& is, size_t curline) : - atf::parser::tokenizer< std::istream > + tools::parser::tokenizer< std::istream > (is, true, eof_type, nl_type, text_type, curline) { add_delim(':', colon_type); @@ -120,20 +125,20 @@ detail::atf_atffile_reader::got_eof(void) void detail::atf_atffile_reader::read(void) { - using atf::parser::parse_error; + using tools::parser::parse_error; using namespace atf_atffile; - std::pair< size_t, atf::parser::headers_map > hml = - atf::parser::read_headers(m_is, 1); - atf::parser::validate_content_type(hml.second, + std::pair< size_t, tools::parser::headers_map > hml = + tools::parser::read_headers(m_is, 1); + tools::parser::validate_content_type(hml.second, "application/X-atf-atffile", 1); tokenizer tkz(m_is, hml.first); - atf::parser::parser< tokenizer > p(tkz); + tools::parser::parser< tokenizer > p(tkz); for (;;) { try { - atf::parser::token t = + tools::parser::token t = p.expect(conf_type, hash_type, prop_type, tp_type, tp_glob_type, nl_type, eof_type, "conf, #, prop, tp, tp-glob, a new line or eof"); @@ -175,7 +180,7 @@ detail::atf_atffile_reader::read(void) } else if (t.type() == nl_type) { continue; } else - UNREACHABLE; + std::abort(); t = p.expect(nl_type, hash_type, eof_type, "new line or comment"); @@ -198,8 +203,8 @@ detail::atf_atffile_reader::read(void) // ------------------------------------------------------------------------ class reader : public detail::atf_atffile_reader { - const atf::fs::directory& m_dir; - atf::tests::vars_map m_conf, m_props; + const tools::fs::directory& m_dir; + vars_map m_conf, m_props; std::vector< std::string > m_tps; void @@ -207,7 +212,7 @@ class reader : public detail::atf_atffile_reader { { if (isglob) { std::vector< std::string > ms = - atf::expand::expand_glob(name, m_dir.names()); + tools::expand::expand_glob(name, m_dir.names()); // Cannot use m_tps.insert(iterator, begin, end) here because it // does not work under Solaris. for (std::vector< std::string >::const_iterator iter = ms.begin(); @@ -215,9 +220,9 @@ class reader : public detail::atf_atffile_reader { m_tps.push_back(*iter); } else { if (m_dir.find(name) == m_dir.end()) - throw atf::not_found_error< atf::fs::path > + throw tools::not_found_error< tools::fs::path > ("Cannot locate the " + name + " file", - atf::fs::path(name)); + tools::fs::path(name)); m_tps.push_back(name); } } @@ -235,20 +240,20 @@ class reader : public detail::atf_atffile_reader { } public: - reader(std::istream& is, const atf::fs::directory& dir) : + reader(std::istream& is, const tools::fs::directory& dir) : detail::atf_atffile_reader(is), m_dir(dir) { } - const atf::tests::vars_map& + const vars_map& conf(void) const { return m_conf; } - const atf::tests::vars_map& + const vars_map& props(void) const { @@ -267,14 +272,14 @@ public: // The "atffile" class. // ------------------------------------------------------------------------ -impl::atffile::atffile(const atf::tests::vars_map& config_vars, +impl::atffile::atffile(const vars_map& config_vars, const std::vector< std::string >& test_program_names, - const atf::tests::vars_map& properties) : + const vars_map& properties) : m_conf(config_vars), m_tps(test_program_names), m_props(properties) { - PRE(properties.find("test-suite") != properties.end()); + assert(properties.find("test-suite") != properties.end()); } const std::vector< std::string >& @@ -284,14 +289,14 @@ impl::atffile::tps(void) return m_tps; } -const atf::tests::vars_map& +const vars_map& impl::atffile::conf(void) const { return m_conf; } -const atf::tests::vars_map& +const vars_map& impl::atffile::props(void) const { @@ -305,16 +310,16 @@ impl::atffile::props(void) // XXX Glob expansion and file existance checks certainly do not belong in // a *parser*. This needs to be taken out... impl::atffile -impl::read_atffile(const atf::fs::path& filename) +impl::read_atffile(const tools::fs::path& filename) { // Scan the directory where the atffile lives in to gather a list of // all possible test programs in it. - fs::directory dir(filename.branch_path()); + tools::fs::directory dir(filename.branch_path()); dir.erase(filename.leaf_name()); - fs::directory::iterator iter = dir.begin(); + tools::fs::directory::iterator iter = dir.begin(); while (iter != dir.end()) { const std::string& name = (*iter).first; - const fs::file_info& fi = (*iter).second; + const tools::fs::file_info& fi = (*iter).second; // Discard hidden files and non-executable ones so that they are // not candidates for glob matching. @@ -328,7 +333,7 @@ impl::read_atffile(const atf::fs::path& filename) // Parse the atffile. std::ifstream is(filename.c_str()); if (!is) - throw atf::not_found_error< fs::path > + throw tools::not_found_error< tools::fs::path > ("Cannot open Atffile", filename); reader r(is, dir); r.read(); @@ -336,7 +341,7 @@ impl::read_atffile(const atf::fs::path& filename) // Sanity checks. if (r.props().find("test-suite") == r.props().end()) - throw atf::not_found_error< std::string > + throw tools::not_found_error< std::string > ("Undefined property `test-suite'", "test-suite"); return atffile(r.conf(), r.tps(), r.props()); diff --git a/unit/atf-src/atf-run/atffile.hpp b/unit/atf-src/tools/atffile.hpp similarity index 82% rename from unit/atf-src/atf-run/atffile.hpp rename to unit/atf-src/tools/atffile.hpp index 8c915c24cf..f326b241d7 100644 --- a/unit/atf-src/atf-run/atffile.hpp +++ b/unit/atf-src/tools/atffile.hpp @@ -27,18 +27,16 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#if !defined(_ATF_RUN_ATFFILE_HPP_) -#define _ATF_RUN_ATFFILE_HPP_ +#if !defined(TOOLS_ATFFILE_HPP) +#define TOOLS_ATFFILE_HPP +#include #include #include -#include "atf-c++/tests.hpp" +#include "fs.hpp" -#include "atf-c++/detail/fs.hpp" - -namespace atf { -namespace atf_run { +namespace tools { // ------------------------------------------------------------------------ // The "atf_atffile_reader" class. @@ -69,27 +67,26 @@ public: // ------------------------------------------------------------------------ class atffile { - atf::tests::vars_map m_conf; + std::map< std::string, std::string > m_conf; std::vector< std::string > m_tps; - atf::tests::vars_map m_props; + std::map< std::string, std::string > m_props; public: - atffile(const atf::tests::vars_map&, + atffile(const std::map< std::string, std::string >&, const std::vector< std::string >&, - const atf::tests::vars_map&); + const std::map< std::string, std::string >&); - const atf::tests::vars_map& conf(void) const; + const std::map< std::string, std::string >& conf(void) const; const std::vector< std::string >& tps(void) const; - const atf::tests::vars_map& props(void) const; + const std::map< std::string, std::string >& props(void) const; }; // ------------------------------------------------------------------------ // Free functions. // ------------------------------------------------------------------------ -atffile read_atffile(const fs::path&); +atffile read_atffile(const tools::fs::path&); -} // namespace atf_run -} // namespace atf +} // namespace tools -#endif // !defined(_ATF_RUN_ATFFILE_HPP_) +#endif // !defined(TOOLS_ATFFILE_HPP) diff --git a/unit/atf-src/atf-run/atffile_test.cpp b/unit/atf-src/tools/atffile_test.cpp similarity index 95% rename from unit/atf-src/atf-run/atffile_test.cpp rename to unit/atf-src/tools/atffile_test.cpp index e5781a3370..cb358dfa8b 100644 --- a/unit/atf-src/atf-run/atffile_test.cpp +++ b/unit/atf-src/tools/atffile_test.cpp @@ -36,14 +36,13 @@ extern "C" { #include #include -#include "atf-c++/macros.hpp" - -#include "atf-c++/detail/exceptions.hpp" -#include "atf-c++/detail/test_helpers.hpp" +#include #include "atffile.hpp" +#include "exceptions.hpp" +#include "test_helpers.hpp" -namespace detail = atf::atf_run::detail; +namespace detail = tools::detail; // ------------------------------------------------------------------------ // Auxiliary functions. @@ -51,6 +50,8 @@ namespace detail = atf::atf_run::detail; namespace { +typedef std::map< std::string, std::string > vars_map; + static std::auto_ptr< std::ofstream > new_atffile(void) @@ -497,17 +498,16 @@ ATF_TEST_CASE_BODY(atffile_54) ATF_TEST_CASE(atffile_getters); ATF_TEST_CASE_HEAD(atffile_getters) {} ATF_TEST_CASE_BODY(atffile_getters) { - atf::tests::vars_map config_vars; + vars_map config_vars; config_vars["config-var-1"] = "value 1"; std::vector< std::string > test_program_names; test_program_names.push_back("test-program-1"); - atf::tests::vars_map properties; + vars_map properties; properties["test-suite"] = "a test name"; - const atf::atf_run::atffile atffile(config_vars, test_program_names, - properties); + const tools::atffile atffile(config_vars, test_program_names, properties); ATF_REQUIRE(config_vars == atffile.conf()); ATF_REQUIRE(test_program_names == atffile.tps()); ATF_REQUIRE(properties == atffile.props()); @@ -533,8 +533,8 @@ ATF_TEST_CASE_BODY(read_ok_simple) { touch_exec("tp-2"); touch_exec("tp-3"); - const atf::atf_run::atffile atffile = atf::atf_run::read_atffile( - atf::fs::path("Atffile")); + const tools::atffile atffile = tools::read_atffile( + tools::fs::path("Atffile")); ATF_REQUIRE_EQ(2, atffile.conf().size()); ATF_REQUIRE_EQ("value1", atffile.conf().find("var1")->second); ATF_REQUIRE_EQ("value2", atffile.conf().find("var2")->second); @@ -564,8 +564,8 @@ ATF_TEST_CASE_BODY(read_ok_some_globs) { touch_exec("t_hello"); touch_exec("zzzt_hello"); - const atf::atf_run::atffile atffile = atf::atf_run::read_atffile( - atf::fs::path("Atffile")); + const tools::atffile atffile = tools::read_atffile( + tools::fs::path("Atffile")); ATF_REQUIRE_EQ(5, atffile.tps().size()); ATF_REQUIRE(is_in("foo", atffile.tps())); ATF_REQUIRE(is_in("bar", atffile.tps())); @@ -580,9 +580,9 @@ ATF_TEST_CASE_BODY(read_missing_test_suite) { (*os).close(); try { - (void)atf::atf_run::read_atffile(atf::fs::path("Atffile")); + (void)tools::read_atffile(tools::fs::path("Atffile")); ATF_FAIL("Missing property 'test-suite' did not raise an error"); - } catch (const atf::not_found_error< std::string >& e) { + } catch (const tools::not_found_error< std::string >& e) { ATF_REQUIRE_EQ("test-suite", e.get_value()); } } @@ -599,9 +599,9 @@ ATF_TEST_CASE_BODY(read_missing_test_program) { touch_exec("baz"); try { - (void)atf::atf_run::read_atffile(atf::fs::path("Atffile")); + (void)tools::read_atffile(tools::fs::path("Atffile")); ATF_FAIL("Missing file 'bar' did not raise an error"); - } catch (const atf::not_found_error< atf::fs::path >& e) { + } catch (const tools::not_found_error< tools::fs::path >& e) { ATF_REQUIRE_EQ("bar", e.get_value().str()); } } diff --git a/unit/atf-src/tools/auto_array.hpp b/unit/atf-src/tools/auto_array.hpp new file mode 100644 index 0000000000..773f875524 --- /dev/null +++ b/unit/atf-src/tools/auto_array.hpp @@ -0,0 +1,179 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#if !defined(TOOLS_AUTO_ARRAY_HPP) +#define TOOLS_AUTO_ARRAY_HPP + +#include + +namespace tools { + +// ------------------------------------------------------------------------ +// The "auto_array" class. +// ------------------------------------------------------------------------ + +template< class T > +struct auto_array_ref { + T* m_ptr; + + explicit auto_array_ref(T*); +}; + +template< class T > +auto_array_ref< T >::auto_array_ref(T* ptr) : + m_ptr(ptr) +{ +} + +template< class T > +class auto_array { + T* m_ptr; + +public: + auto_array(T* = NULL) throw(); + auto_array(auto_array< T >&) throw(); + auto_array(auto_array_ref< T >) throw(); + ~auto_array(void) throw(); + + T* get(void) throw(); + const T* get(void) const throw(); + T* release(void) throw(); + void reset(T* = NULL) throw(); + + auto_array< T >& operator=(auto_array< T >&) throw(); + auto_array< T >& operator=(auto_array_ref< T >) throw(); + + T& operator[](int) throw(); + operator auto_array_ref< T >(void) throw(); +}; + +template< class T > +auto_array< T >::auto_array(T* ptr) + throw() : + m_ptr(ptr) +{ +} + +template< class T > +auto_array< T >::auto_array(auto_array< T >& ptr) + throw() : + m_ptr(ptr.release()) +{ +} + +template< class T > +auto_array< T >::auto_array(auto_array_ref< T > ref) + throw() : + m_ptr(ref.m_ptr) +{ +} + +template< class T > +auto_array< T >::~auto_array(void) + throw() +{ + if (m_ptr != NULL) + delete [] m_ptr; +} + +template< class T > +T* +auto_array< T >::get(void) + throw() +{ + return m_ptr; +} + +template< class T > +const T* +auto_array< T >::get(void) + const throw() +{ + return m_ptr; +} + +template< class T > +T* +auto_array< T >::release(void) + throw() +{ + T* ptr = m_ptr; + m_ptr = NULL; + return ptr; +} + +template< class T > +void +auto_array< T >::reset(T* ptr) + throw() +{ + if (m_ptr != NULL) + delete [] m_ptr; + m_ptr = ptr; +} + +template< class T > +auto_array< T >& +auto_array< T >::operator=(auto_array< T >& ptr) + throw() +{ + reset(ptr.release()); + return *this; +} + +template< class T > +auto_array< T >& +auto_array< T >::operator=(auto_array_ref< T > ref) + throw() +{ + if (m_ptr != ref.m_ptr) { + delete [] m_ptr; + m_ptr = ref.m_ptr; + } + return *this; +} + +template< class T > +T& +auto_array< T >::operator[](int pos) + throw() +{ + return m_ptr[pos]; +} + +template< class T > +auto_array< T >::operator auto_array_ref< T >(void) + throw() +{ + return auto_array_ref< T >(release()); +} + +} // namespace tools + +#endif // !defined(TOOLS_AUTO_ARRAY_HPP) diff --git a/unit/atf-src/tools/auto_array_test.cpp b/unit/atf-src/tools/auto_array_test.cpp new file mode 100644 index 0000000000..56bbae5360 --- /dev/null +++ b/unit/atf-src/tools/auto_array_test.cpp @@ -0,0 +1,303 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +extern "C" { +#include +} + +#include + +#include + +#include "auto_array.hpp" +#include "defs.hpp" + +// ------------------------------------------------------------------------ +// Tests for the "auto_array" class. +// ------------------------------------------------------------------------ + +class test_array { +public: + int m_value; + + static ssize_t m_nblocks; + + static + tools::auto_array< test_array > + do_copy(tools::auto_array< test_array >& ta) + { + return tools::auto_array< test_array >(ta); + } + + void* operator new(size_t size ATF_DEFS_ATTRIBUTE_UNUSED) + { + ATF_FAIL("New called but should have been new[]"); + return new int(5); + } + + void* operator new[](size_t size) + { + m_nblocks++; + void* mem = ::operator new(size); + std::cout << "Allocated 'test_array' object " << mem << "\n"; + return mem; + } + + void operator delete(void* mem ATF_DEFS_ATTRIBUTE_UNUSED) + { + ATF_FAIL("Delete called but should have been delete[]"); + } + + void operator delete[](void* mem) + { + std::cout << "Releasing 'test_array' object " << mem << "\n"; + if (m_nblocks == 0) + ATF_FAIL("Unbalanced delete[]"); + m_nblocks--; + ::operator delete(mem); + } +}; + +ssize_t test_array::m_nblocks = 0; + +ATF_TEST_CASE(auto_array_scope); +ATF_TEST_CASE_HEAD(auto_array_scope) +{ + set_md_var("descr", "Tests the automatic scope handling in the " + "auto_array smart pointer class"); +} +ATF_TEST_CASE_BODY(auto_array_scope) +{ + using tools::auto_array; + + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + { + auto_array< test_array > t(new test_array[10]); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); +} + +ATF_TEST_CASE(auto_array_copy); +ATF_TEST_CASE_HEAD(auto_array_copy) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' copy " + "constructor"); +} +ATF_TEST_CASE_BODY(auto_array_copy) +{ + using tools::auto_array; + + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + { + auto_array< test_array > t1(new test_array[10]); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + + { + auto_array< test_array > t2(t1); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); +} + +ATF_TEST_CASE(auto_array_copy_ref); +ATF_TEST_CASE_HEAD(auto_array_copy_ref) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' copy " + "constructor through the auxiliary auto_array_ref object"); +} +ATF_TEST_CASE_BODY(auto_array_copy_ref) +{ + using tools::auto_array; + + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + { + auto_array< test_array > t1(new test_array[10]); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + + { + auto_array< test_array > t2 = test_array::do_copy(t1); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); +} + +ATF_TEST_CASE(auto_array_get); +ATF_TEST_CASE_HEAD(auto_array_get) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' get " + "method"); +} +ATF_TEST_CASE_BODY(auto_array_get) +{ + using tools::auto_array; + + test_array* ta = new test_array[10]; + auto_array< test_array > t(ta); + ATF_REQUIRE_EQ(t.get(), ta); +} + +ATF_TEST_CASE(auto_array_release); +ATF_TEST_CASE_HEAD(auto_array_release) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' release " + "method"); +} +ATF_TEST_CASE_BODY(auto_array_release) +{ + using tools::auto_array; + + test_array* ta1 = new test_array[10]; + { + auto_array< test_array > t(ta1); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + test_array* ta2 = t.release(); + ATF_REQUIRE_EQ(ta2, ta1); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + delete [] ta1; +} + +ATF_TEST_CASE(auto_array_reset); +ATF_TEST_CASE_HEAD(auto_array_reset) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' reset " + "method"); +} +ATF_TEST_CASE_BODY(auto_array_reset) +{ + using tools::auto_array; + + test_array* ta1 = new test_array[10]; + test_array* ta2 = new test_array[10]; + ATF_REQUIRE_EQ(test_array::m_nblocks, 2); + + { + auto_array< test_array > t(ta1); + ATF_REQUIRE_EQ(test_array::m_nblocks, 2); + t.reset(ta2); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + t.reset(); + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); +} + +ATF_TEST_CASE(auto_array_assign); +ATF_TEST_CASE_HEAD(auto_array_assign) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' " + "assignment operator"); +} +ATF_TEST_CASE_BODY(auto_array_assign) +{ + using tools::auto_array; + + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + { + auto_array< test_array > t1(new test_array[10]); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + + { + auto_array< test_array > t2; + t2 = t1; + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); +} + +ATF_TEST_CASE(auto_array_assign_ref); +ATF_TEST_CASE_HEAD(auto_array_assign_ref) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' " + "assignment operator through the auxiliary auto_array_ref " + "object"); +} +ATF_TEST_CASE_BODY(auto_array_assign_ref) +{ + using tools::auto_array; + + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + { + auto_array< test_array > t1(new test_array[10]); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + + { + auto_array< test_array > t2; + t2 = test_array::do_copy(t1); + ATF_REQUIRE_EQ(test_array::m_nblocks, 1); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); + } + ATF_REQUIRE_EQ(test_array::m_nblocks, 0); +} + +ATF_TEST_CASE(auto_array_access); +ATF_TEST_CASE_HEAD(auto_array_access) +{ + set_md_var("descr", "Tests the auto_array smart pointer class' access " + "operator"); +} +ATF_TEST_CASE_BODY(auto_array_access) +{ + using tools::auto_array; + + auto_array< test_array > t(new test_array[10]); + + for (int i = 0; i < 10; i++) + t[i].m_value = i * 2; + + for (int i = 0; i < 10; i++) + ATF_REQUIRE_EQ(t[i].m_value, i * 2); +} + +// ------------------------------------------------------------------------ +// Main. +// ------------------------------------------------------------------------ + +ATF_INIT_TEST_CASES(tcs) +{ + // Add the test for the "auto_array" class. + ATF_ADD_TEST_CASE(tcs, auto_array_scope); + ATF_ADD_TEST_CASE(tcs, auto_array_copy); + ATF_ADD_TEST_CASE(tcs, auto_array_copy_ref); + ATF_ADD_TEST_CASE(tcs, auto_array_get); + ATF_ADD_TEST_CASE(tcs, auto_array_release); + ATF_ADD_TEST_CASE(tcs, auto_array_reset); + ATF_ADD_TEST_CASE(tcs, auto_array_assign); + ATF_ADD_TEST_CASE(tcs, auto_array_assign_ref); + ATF_ADD_TEST_CASE(tcs, auto_array_access); +} diff --git a/unit/atf-src/atf-run/bad_metadata_helper.c b/unit/atf-src/tools/bad_metadata_helper.c similarity index 100% rename from unit/atf-src/atf-run/bad_metadata_helper.c rename to unit/atf-src/tools/bad_metadata_helper.c diff --git a/unit/atf-src/atf-c++/config.cpp b/unit/atf-src/tools/config.cpp similarity index 57% rename from unit/atf-src/atf-c++/config.cpp rename to unit/atf-src/tools/config.cpp index 7b7d6416c3..95bcf55993 100644 --- a/unit/atf-src/atf-c++/config.cpp +++ b/unit/atf-src/tools/config.cpp @@ -27,19 +27,38 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // +#include #include -extern "C" { -#include "atf-c/config.h" -} - #include "config.hpp" - -#include "detail/env.hpp" -#include "detail/sanity.hpp" +#include "env.hpp" +#include "text.hpp" static std::map< std::string, std::string > m_variables; +static struct var { + const char *name; + const char *default_value; + bool can_be_empty; +} vars[] = { + { "ATF_ARCH", ATF_ARCH, false, }, + { "ATF_BUILD_CC", ATF_BUILD_CC, false, }, + { "ATF_BUILD_CFLAGS", ATF_BUILD_CFLAGS, true, }, + { "ATF_BUILD_CPP", ATF_BUILD_CPP, false, }, + { "ATF_BUILD_CPPFLAGS", ATF_BUILD_CPPFLAGS, true, }, + { "ATF_BUILD_CXX", ATF_BUILD_CXX, false, }, + { "ATF_BUILD_CXXFLAGS", ATF_BUILD_CXXFLAGS, true, }, + { "ATF_CONFDIR", ATF_CONFDIR, false, }, + { "ATF_INCLUDEDIR", ATF_INCLUDEDIR, false, }, + { "ATF_LIBDIR", ATF_LIBDIR, false, }, + { "ATF_LIBEXECDIR", ATF_LIBEXECDIR, false, }, + { "ATF_MACHINE", ATF_MACHINE, false, }, + { "ATF_PKGDATADIR", ATF_PKGDATADIR, false, }, + { "ATF_SHELL", ATF_SHELL, false, }, + { "ATF_WORKDIR", ATF_WORKDIR, false, }, + { NULL, NULL, false, }, +}; + // // Adds all predefined standard build-time variables to the m_variables // map, considering the values a user may have provided in the environment. @@ -50,39 +69,37 @@ static void init_variables(void) { - PRE(m_variables.empty()); + assert(m_variables.empty()); - m_variables["atf_arch"] = atf_config_get("atf_arch"); - m_variables["atf_build_cc"] = atf_config_get("atf_build_cc"); - m_variables["atf_build_cflags"] = atf_config_get("atf_build_cflags"); - m_variables["atf_build_cpp"] = atf_config_get("atf_build_cpp"); - m_variables["atf_build_cppflags"] = atf_config_get("atf_build_cppflags"); - m_variables["atf_build_cxx"] = atf_config_get("atf_build_cxx"); - m_variables["atf_build_cxxflags"] = atf_config_get("atf_build_cxxflags"); - m_variables["atf_confdir"] = atf_config_get("atf_confdir"); - m_variables["atf_includedir"] = atf_config_get("atf_includedir"); - m_variables["atf_libdir"] = atf_config_get("atf_libdir"); - m_variables["atf_libexecdir"] = atf_config_get("atf_libexecdir"); - m_variables["atf_machine"] = atf_config_get("atf_machine"); - m_variables["atf_pkgdatadir"] = atf_config_get("atf_pkgdatadir"); - m_variables["atf_shell"] = atf_config_get("atf_shell"); - m_variables["atf_workdir"] = atf_config_get("atf_workdir"); + for (struct var* v = vars; v->name != NULL; v++) { + const std::string varname = tools::text::to_lower(v->name); - POST(!m_variables.empty()); + if (tools::env::has(v->name)) { + const std::string envval = tools::env::get(v->name); + if (envval.empty() && !v->can_be_empty) + m_variables[varname] = v->default_value; + else + m_variables[varname] = envval; + } else { + m_variables[varname] = v->default_value; + } + } + + assert(!m_variables.empty()); } const std::string& -atf::config::get(const std::string& varname) +tools::config::get(const std::string& varname) { if (m_variables.empty()) init_variables(); - PRE(has(varname)); + assert(has(varname)); return m_variables[varname]; } const std::map< std::string, std::string >& -atf::config::get_all(void) +tools::config::get_all(void) { if (m_variables.empty()) init_variables(); @@ -91,7 +108,7 @@ atf::config::get_all(void) } bool -atf::config::has(const std::string& varname) +tools::config::has(const std::string& varname) { if (m_variables.empty()) init_variables(); @@ -99,11 +116,7 @@ atf::config::has(const std::string& varname) return m_variables.find(varname) != m_variables.end(); } -extern "C" { -void __atf_config_reinit(void); -} - -namespace atf { +namespace tools { namespace config { // // Auxiliary function for the t_config test program so that it can @@ -116,8 +129,7 @@ namespace config { void __reinit(void) { - __atf_config_reinit(); m_variables.clear(); } } // namespace config -} // namespace atf +} // namespace tools diff --git a/unit/atf-src/atf-c++/config.hpp b/unit/atf-src/tools/config.hpp similarity index 94% rename from unit/atf-src/atf-c++/config.hpp rename to unit/atf-src/tools/config.hpp index e11b9bb21d..0a43873d7b 100644 --- a/unit/atf-src/atf-c++/config.hpp +++ b/unit/atf-src/tools/config.hpp @@ -27,13 +27,13 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#if !defined(_ATF_CXX_CONFIG_HPP_) -#define _ATF_CXX_CONFIG_HPP_ +#if !defined(TOOLS_CONFIG_HPP) +#define TOOLS_CONFIG_HPP #include #include -namespace atf { +namespace tools { namespace config { @@ -70,6 +70,6 @@ bool has(const std::string&); } // namespace config -} // namespace atf +} // namespace tools -#endif // !defined(_ATF_CXX_CONFIG_HPP_) +#endif // !defined(TOOLS_CONFIG_HPP) diff --git a/unit/atf-src/atf-run/config.cpp b/unit/atf-src/tools/config_file.cpp similarity index 69% rename from unit/atf-src/atf-run/config.cpp rename to unit/atf-src/tools/config_file.cpp index 0ea240fe20..3802c0679e 100644 --- a/unit/atf-src/atf-run/config.cpp +++ b/unit/atf-src/tools/config_file.cpp @@ -27,38 +27,37 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // +#include #include #include -#include "atf-c/defs.h" - -#include "atf-c++/config.hpp" - -#include "atf-c++/detail/env.hpp" -#include "atf-c++/detail/fs.hpp" -#include "atf-c++/detail/sanity.hpp" -#include "atf-c++/detail/parser.hpp" - #include "config.hpp" +#include "config_file.hpp" +#include "defs.hpp" +#include "env.hpp" +#include "fs.hpp" +#include "parser.hpp" -namespace impl = atf::atf_run; -namespace detail = atf::atf_run::detail; +namespace impl = tools::config_file; +namespace detail = tools::config_file::detail; namespace { +typedef std::map< std::string, std::string > vars_map; + namespace atf_config { -static const atf::parser::token_type eof_type = 0; -static const atf::parser::token_type nl_type = 1; -static const atf::parser::token_type text_type = 2; -static const atf::parser::token_type dblquote_type = 3; -static const atf::parser::token_type equal_type = 4; -static const atf::parser::token_type hash_type = 5; +static const tools::parser::token_type eof_type = 0; +static const tools::parser::token_type nl_type = 1; +static const tools::parser::token_type text_type = 2; +static const tools::parser::token_type dblquote_type = 3; +static const tools::parser::token_type equal_type = 4; +static const tools::parser::token_type hash_type = 5; -class tokenizer : public atf::parser::tokenizer< std::istream > { +class tokenizer : public tools::parser::tokenizer< std::istream > { public: tokenizer(std::istream& is, size_t curline) : - atf::parser::tokenizer< std::istream > + tools::parser::tokenizer< std::istream > (is, true, eof_type, nl_type, text_type, curline) { add_delim('=', equal_type); @@ -70,7 +69,7 @@ public: } // namespace atf_config class config_reader : public detail::atf_config_reader { - atf::tests::vars_map m_vars; + vars_map m_vars; void got_var(const std::string& var, const std::string& name) @@ -84,7 +83,7 @@ public: { } - const atf::tests::vars_map& + const vars_map& get_vars(void) const { @@ -104,8 +103,8 @@ merge_maps(std::map< K, V >& dest, const std::map< K, V >& src) static void -merge_config_file(const atf::fs::path& config_path, - atf::tests::vars_map& config) +merge_config_file(const tools::fs::path& config_path, + vars_map& config) { std::ifstream is(config_path.c_str()); if (is) { @@ -116,13 +115,13 @@ merge_config_file(const atf::fs::path& config_path, } static -std::vector< atf::fs::path > +std::vector< tools::fs::path > get_config_dirs(void) { - std::vector< atf::fs::path > dirs; - dirs.push_back(atf::fs::path(atf::config::get("atf_confdir"))); - if (atf::env::has("HOME")) - dirs.push_back(atf::fs::path(atf::env::get("HOME")) / ".atf"); + std::vector< tools::fs::path > dirs; + dirs.push_back(tools::fs::path(tools::config::get("atf_confdir"))); + if (tools::env::has("HOME")) + dirs.push_back(tools::fs::path(tools::env::get("HOME")) / ".atf"); return dirs; } @@ -152,22 +151,22 @@ detail::atf_config_reader::got_eof(void) void detail::atf_config_reader::read(void) { - using atf::parser::parse_error; + using tools::parser::parse_error; using namespace atf_config; - std::pair< size_t, atf::parser::headers_map > hml = - atf::parser::read_headers(m_is, 1); - atf::parser::validate_content_type(hml.second, + std::pair< size_t, tools::parser::headers_map > hml = + tools::parser::read_headers(m_is, 1); + tools::parser::validate_content_type(hml.second, "application/X-atf-config", 1); tokenizer tkz(m_is, hml.first); - atf::parser::parser< tokenizer > p(tkz); + tools::parser::parser< tokenizer > p(tkz); for (;;) { try { - atf::parser::token t = p.expect(eof_type, hash_type, text_type, - nl_type, - "eof, #, new line or text"); + tools::parser::token t = p.expect(eof_type, hash_type, text_type, + nl_type, + "eof, #, new line or text"); if (t.type() == eof_type) break; @@ -189,7 +188,7 @@ detail::atf_config_reader::read(void) } } else if (t.type() == nl_type) { } else - UNREACHABLE; + std::abort(); } catch (const parse_error& pe) { p.add_error(pe); p.reset(nl_type); @@ -199,22 +198,22 @@ detail::atf_config_reader::read(void) ATF_PARSER_CALLBACK(p, got_eof()); } -atf::tests::vars_map -impl::merge_configs(const atf::tests::vars_map& lower, - const atf::tests::vars_map& upper) +vars_map +impl::merge_configs(const vars_map& lower, + const vars_map& upper) { - atf::tests::vars_map merged = lower; + vars_map merged = lower; merge_maps(merged, upper); return merged; } -atf::tests::vars_map +vars_map impl::read_config_files(const std::string& test_suite_name) { - atf::tests::vars_map config; + vars_map config; - const std::vector< atf::fs::path > dirs = get_config_dirs(); - for (std::vector< atf::fs::path >::const_iterator iter = dirs.begin(); + const std::vector< tools::fs::path > dirs = get_config_dirs(); + for (std::vector< tools::fs::path >::const_iterator iter = dirs.begin(); iter != dirs.end(); iter++) { merge_config_file((*iter) / "common.conf", config); merge_config_file((*iter) / (test_suite_name + ".conf"), config); diff --git a/unit/atf-src/atf-run/config.hpp b/unit/atf-src/tools/config_file.hpp similarity index 80% rename from unit/atf-src/atf-run/config.hpp rename to unit/atf-src/tools/config_file.hpp index 2cefec9a5f..0c68bcb051 100644 --- a/unit/atf-src/atf-run/config.hpp +++ b/unit/atf-src/tools/config_file.hpp @@ -27,13 +27,15 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // +#if !defined(TOOLS_CONFIG_FILE_HPP) +#define TOOLS_CONFIG_FILE_HPP + +#include #include #include -#include "atf-c++/tests.hpp" - -namespace atf { -namespace atf_run { +namespace tools { +namespace config_file { namespace detail { @@ -53,9 +55,12 @@ public: } // namespace detail -atf::tests::vars_map merge_configs(const atf::tests::vars_map&, - const atf::tests::vars_map&); -atf::tests::vars_map read_config_files(const std::string&); +std::map< std::string, std::string > merge_configs( + const std::map< std::string, std::string >&, + const std::map< std::string, std::string >&); +std::map< std::string, std::string > read_config_files(const std::string&); -} // namespace atf_run -} // namespace atf +} // namespace config_file +} // namespace tools + +#endif // !defined(TOOLS_CONFIG_FILE_HPP) diff --git a/unit/atf-src/atf-run/config_test.cpp b/unit/atf-src/tools/config_file_test.cpp similarity index 96% rename from unit/atf-src/atf-run/config_test.cpp rename to unit/atf-src/tools/config_file_test.cpp index 5b103a78ac..f042634303 100644 --- a/unit/atf-src/atf-run/config_test.cpp +++ b/unit/atf-src/tools/config_file_test.cpp @@ -27,19 +27,23 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#include "atf-c++/detail/env.hpp" -#include "atf-c++/detail/test_helpers.hpp" -#include "atf-c++/config.hpp" -#include "atf-c++/macros.hpp" +#include #include "config.hpp" +#include "config_file.hpp" +#include "env.hpp" +#include "test_helpers.hpp" -namespace impl = atf::atf_run; -namespace detail = atf::atf_run::detail; +namespace impl = tools::config_file; +namespace detail = tools::config_file::detail; -using atf::tests::vars_map; +namespace { -namespace atf { +typedef std::map< std::string, std::string > vars_map; + +} // anonymous namespace + +namespace tools { namespace config { void __reinit(void); @@ -361,8 +365,8 @@ ATF_TEST_CASE_BODY(merge_configs_mixed) { ATF_TEST_CASE(read_config_files_none); ATF_TEST_CASE_HEAD(read_config_files_none) {} ATF_TEST_CASE_BODY(read_config_files_none) { - atf::env::set("ATF_CONFDIR", "."); - atf::config::__reinit(); + tools::env::set("ATF_CONFDIR", "."); + tools::config::__reinit(); ATF_REQUIRE(vars_map() == impl::read_config_files("test-suite")); } diff --git a/unit/atf-src/atf-c++/config_test.cpp b/unit/atf-src/tools/config_test.cpp similarity index 79% rename from unit/atf-src/atf-c++/config_test.cpp rename to unit/atf-src/tools/config_test.cpp index a3cd2bb511..d7d67199b5 100644 --- a/unit/atf-src/atf-c++/config_test.cpp +++ b/unit/atf-src/tools/config_test.cpp @@ -30,12 +30,11 @@ #include #include -#include "config.hpp" -#include "macros.hpp" +#include -#include "detail/env.hpp" -#include "detail/exceptions.hpp" -#include "detail/test_helpers.hpp" +#include "config.hpp" +#include "env.hpp" +#include "exceptions.hpp" static const char *test_value = "env-value"; @@ -66,7 +65,7 @@ static struct varnames { // Auxiliary functions. // ------------------------------------------------------------------------ -namespace atf { +namespace tools { namespace config { void __reinit(void); } @@ -77,8 +76,8 @@ void set_env_var(const char* name, const char* val) { try { - atf::env::set(name, val); - } catch (const atf::system_error&) { + tools::env::set(name, val); + } catch (const tools::system_error&) { ATF_FAIL(std::string("set_env_var(") + name + ", " + val + ") failed"); } @@ -89,8 +88,8 @@ void unset_env_var(const char* name) { try { - atf::env::unset(name); - } catch (const atf::system_error&) { + tools::env::unset(name); + } catch (const tools::system_error&) { ATF_FAIL(std::string("unset_env_var(") + name + ") failed"); } } @@ -121,9 +120,9 @@ compare_one(const char* var, const char* expvalue) for (const struct varnames* v = all_vars; v->lc != NULL; v++) { if (std::strcmp(v->lc, var) == 0) - ATF_REQUIRE_EQ(atf::config::get(v->lc), test_value); + ATF_REQUIRE_EQ(tools::config::get(v->lc), test_value); else - ATF_REQUIRE(atf::config::get(v->lc) != test_value); + ATF_REQUIRE(tools::config::get(v->lc) != test_value); } } @@ -141,20 +140,20 @@ ATF_TEST_CASE_BODY(get) // Unset all known environment variables and make sure the built-in // values do not match the bogus value we will use for testing. unset_all(); - atf::config::__reinit(); + tools::config::__reinit(); for (const struct varnames* v = all_vars; v->lc != NULL; v++) - ATF_REQUIRE(atf::config::get(v->lc) != test_value); + ATF_REQUIRE(tools::config::get(v->lc) != test_value); // Test the behavior of empty values. for (const struct varnames* v = all_vars; v->lc != NULL; v++) { unset_all(); - if (!atf::config::get(v->lc).empty()) { + if (!tools::config::get(v->lc).empty()) { set_env_var(v->uc, ""); - atf::config::__reinit(); + tools::config::__reinit(); if (v->can_be_empty) - ATF_REQUIRE(atf::config::get(v->lc).empty()); + ATF_REQUIRE(tools::config::get(v->lc).empty()); else - ATF_REQUIRE(!atf::config::get(v->lc).empty()); + ATF_REQUIRE(!tools::config::get(v->lc).empty()); } } @@ -162,7 +161,7 @@ ATF_TEST_CASE_BODY(get) for (const struct varnames* v = all_vars; v->lc != NULL; v++) { unset_all(); set_env_var(v->uc, test_value); - atf::config::__reinit(); + tools::config::__reinit(); compare_one(v->lc, test_value); } } @@ -174,10 +173,10 @@ ATF_TEST_CASE_HEAD(get_all) } ATF_TEST_CASE_BODY(get_all) { - atf::config::__reinit(); + tools::config::__reinit(); // Check that the valid variables, and only those, are returned. - std::map< std::string, std::string > vars = atf::config::get_all(); + std::map< std::string, std::string > vars = tools::config::get_all(); ATF_REQUIRE_EQ(vars.size(), all_vars_count()); for (const struct varnames* v = all_vars; v->lc != NULL; v++) ATF_REQUIRE(vars.find(v->lc) != vars.end()); @@ -190,31 +189,25 @@ ATF_TEST_CASE_HEAD(has) } ATF_TEST_CASE_BODY(has) { - atf::config::__reinit(); + tools::config::__reinit(); // Check for all the variables that must exist. for (const struct varnames* v = all_vars; v->lc != NULL; v++) - ATF_REQUIRE(atf::config::has(v->lc)); + ATF_REQUIRE(tools::config::has(v->lc)); // Same as above, but using uppercase (which is incorrect). for (const struct varnames* v = all_vars; v->lc != NULL; v++) - ATF_REQUIRE(!atf::config::has(v->uc)); + ATF_REQUIRE(!tools::config::has(v->uc)); // Check for some other variables that cannot exist. - ATF_REQUIRE(!atf::config::has("foo")); - ATF_REQUIRE(!atf::config::has("BAR")); - ATF_REQUIRE(!atf::config::has("atf_foo")); - ATF_REQUIRE(!atf::config::has("ATF_BAR")); - ATF_REQUIRE(!atf::config::has("atf_shel")); - ATF_REQUIRE(!atf::config::has("atf_shells")); + ATF_REQUIRE(!tools::config::has("foo")); + ATF_REQUIRE(!tools::config::has("BAR")); + ATF_REQUIRE(!tools::config::has("atf_foo")); + ATF_REQUIRE(!tools::config::has("ATF_BAR")); + ATF_REQUIRE(!tools::config::has("atf_shel")); + ATF_REQUIRE(!tools::config::has("atf_shells")); } -// ------------------------------------------------------------------------ -// Tests cases for the header file. -// ------------------------------------------------------------------------ - -HEADER_TC(include, "atf-c++/config.hpp"); - // ------------------------------------------------------------------------ // Main. // ------------------------------------------------------------------------ @@ -225,7 +218,4 @@ ATF_INIT_TEST_CASES(tcs) ATF_ADD_TEST_CASE(tcs, has); ATF_ADD_TEST_CASE(tcs, get); ATF_ADD_TEST_CASE(tcs, get_all); - - // Add the test cases for the header file. - ATF_ADD_TEST_CASE(tcs, include); } diff --git a/unit/atf-src/atf-c++/detail/sanity_test.cpp b/unit/atf-src/tools/defs.hpp.in similarity index 81% rename from unit/atf-src/atf-c++/detail/sanity_test.cpp rename to unit/atf-src/tools/defs.hpp.in index 8d3a07eb8b..9542795199 100644 --- a/unit/atf-src/atf-c++/detail/sanity_test.cpp +++ b/unit/atf-src/tools/defs.hpp.in @@ -1,7 +1,7 @@ // // Automated Testing Framework (atf) // -// Copyright (c) 2009 The NetBSD Foundation, Inc. +// Copyright (c) 2008 The NetBSD Foundation, Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -27,15 +27,11 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#include "../macros.hpp" +#if !defined(TOOLS_DEFS_HPP) +#define TOOLS_DEFS_HPP -ATF_TEST_CASE_WITHOUT_HEAD(nothing); -ATF_TEST_CASE_BODY(nothing) -{ - // TODO -} +#define ATF_DEFS_ATTRIBUTE_FORMAT_PRINTF(a, b) @ATTRIBUTE_FORMAT_PRINTF@ +#define ATF_DEFS_ATTRIBUTE_NORETURN @ATTRIBUTE_NORETURN@ +#define ATF_DEFS_ATTRIBUTE_UNUSED @ATTRIBUTE_UNUSED@ -ATF_INIT_TEST_CASES(tcs) -{ - ATF_ADD_TEST_CASE(tcs, nothing); -} +#endif /* !defined(TOOLS_DEFS_HPP) */ diff --git a/unit/atf-src/tools/env.cpp b/unit/atf-src/tools/env.cpp new file mode 100644 index 0000000000..856ef98206 --- /dev/null +++ b/unit/atf-src/tools/env.cpp @@ -0,0 +1,102 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif + +extern "C" { +#include +#include +#include +} + +#include + +#include "env.hpp" +#include "exceptions.hpp" + +namespace impl = tools::env; +#define IMPL_NAME "tools::env" + +// ------------------------------------------------------------------------ +// Free functions. +// ------------------------------------------------------------------------ + +std::string +impl::get(const std::string& name) +{ + const char* val = getenv(name.c_str()); + assert(val != NULL); + return val; +} + +bool +impl::has(const std::string& name) +{ + return getenv(name.c_str()) != NULL; +} + +void +impl::set(const std::string& name, const std::string& val) +{ +#if defined(HAVE_SETENV) + if (setenv(name.c_str(), val.c_str(), 1) == -1) + throw tools::system_error(IMPL_NAME "::set", + "Cannot set environment variable '" + name + + "' to '" + val + "'", + errno); +#elif defined(HAVE_PUTENV) + const std::string buf = name + "=" + val; + if (putenv(strdup(buf.c_str())) == -1) + throw tools::system_error(IMPL_NAME "::set", + "Cannot set environment variable '" + name + + "' to '" + val + "'", + errno); +#else +# error "Don't know how to set an environment variable." +#endif +} + +void +impl::unset(const std::string& name) +{ +#if defined(HAVE_UNSETENV) + unsetenv(name.c_str()); +#elif defined(HAVE_PUTENV) + const std::string buf = name + "="; + + if (putenv(strdup(buf.c_str())) == -1) + throw tools::system_error(IMPL_NAME "::unset", + "Cannot unset environment variable '" + + name + "'", errno); +#else +# error "Don't know how to unset an environment variable." +#endif +} diff --git a/unit/atf-src/tools/env.hpp b/unit/atf-src/tools/env.hpp new file mode 100644 index 0000000000..f87a58f92f --- /dev/null +++ b/unit/atf-src/tools/env.hpp @@ -0,0 +1,84 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#if !defined(TOOLS_ENV_HPP) +#define TOOLS_ENV_HPP + +#include + +namespace tools { +namespace env { + +// ------------------------------------------------------------------------ +// Free functions. +// ------------------------------------------------------------------------ + +//! +//! \brief Returns the value of an environment variable. +//! +//! Returns the value of the specified environment variable. The variable +//! must be defined. +//! +std::string get(const std::string&); + +//! +//! \brief Checks if the environment has a variable. +//! +//! Checks if the environment has a given variable. +//! +bool has(const std::string&); + +//! +//! \brief Sets an environment variable to a given value. +//! +//! Sets the specified environment variable to the given value. Note that +//! variables set to the empty string are different to undefined ones. +//! +//! Be aware that this alters the program's global status, which in general +//! is a bad thing to do due to the side-effects it may have. There are +//! some legitimate usages for this function, though. +//! +void set(const std::string&, const std::string&); + +//! +//! \brief Unsets an environment variable. +//! +//! Unsets the specified environment variable Note that undefined +//! variables are different to those defined but set to an empty value. +//! +//! Be aware that this alters the program's global status, which in general +//! is a bad thing to do due to the side-effects it may have. There are +//! some legitimate usages for this function, though. +//! +void unset(const std::string&); + +} // namespace env +} // namespace tools + +#endif // !defined(TOOLS_ENV_HPP) diff --git a/unit/atf-src/atf-report/misc_helpers.cpp b/unit/atf-src/tools/env_test.cpp similarity index 57% rename from unit/atf-src/atf-report/misc_helpers.cpp rename to unit/atf-src/tools/env_test.cpp index 6f14ce4cf1..441a16ff89 100644 --- a/unit/atf-src/atf-report/misc_helpers.cpp +++ b/unit/atf-src/tools/env_test.cpp @@ -27,34 +27,55 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#include +#include -#include "atf-c++/macros.hpp" +#include "env.hpp" // ------------------------------------------------------------------------ -// Helper tests for "t_integration". +// Test cases for the free functions. // ------------------------------------------------------------------------ -ATF_TEST_CASE(diff); -ATF_TEST_CASE_HEAD(diff) +ATF_TEST_CASE(has_get); +ATF_TEST_CASE_HEAD(has_get) { - set_md_var("descr", "Helper test case for the t_integration program"); + set_md_var("descr", "Tests the has and get functions"); } -ATF_TEST_CASE_BODY(diff) +ATF_TEST_CASE_BODY(has_get) { - std::cout << "--- a 2007-11-04 14:00:41.000000000 +0100\n"; - std::cout << "+++ b 2007-11-04 14:00:48.000000000 +0100\n"; - std::cout << "@@ -1,7 +1,7 @@\n"; - std::cout << " This test is meant to simulate a diff.\n"; - std::cout << " Blank space at beginning of context lines must be " - "preserved.\n"; - std::cout << " \n"; - std::cout << "-First original line.\n"; - std::cout << "-Second original line.\n"; - std::cout << "+First modified line.\n"; - std::cout << "+Second modified line.\n"; - std::cout << " \n"; - std::cout << " EOF\n"; + ATF_REQUIRE(tools::env::has("PATH")); + ATF_REQUIRE(!tools::env::get("PATH").empty()); + + ATF_REQUIRE(!tools::env::has("_UNDEFINED_VARIABLE_")); +} + +ATF_TEST_CASE(set); +ATF_TEST_CASE_HEAD(set) +{ + set_md_var("descr", "Tests the set function"); +} +ATF_TEST_CASE_BODY(set) +{ + ATF_REQUIRE(tools::env::has("PATH")); + const std::string& oldval = tools::env::get("PATH"); + tools::env::set("PATH", "foo-bar"); + ATF_REQUIRE(tools::env::get("PATH") != oldval); + ATF_REQUIRE_EQ(tools::env::get("PATH"), "foo-bar"); + + ATF_REQUIRE(!tools::env::has("_UNDEFINED_VARIABLE_")); + tools::env::set("_UNDEFINED_VARIABLE_", "foo2-bar2"); + ATF_REQUIRE_EQ(tools::env::get("_UNDEFINED_VARIABLE_"), "foo2-bar2"); +} + +ATF_TEST_CASE(unset); +ATF_TEST_CASE_HEAD(unset) +{ + set_md_var("descr", "Tests the unset function"); +} +ATF_TEST_CASE_BODY(unset) +{ + ATF_REQUIRE(tools::env::has("PATH")); + tools::env::unset("PATH"); + ATF_REQUIRE(!tools::env::has("PATH")); } // ------------------------------------------------------------------------ @@ -63,6 +84,8 @@ ATF_TEST_CASE_BODY(diff) ATF_INIT_TEST_CASES(tcs) { - // Add helper tests for t_integration. - ATF_ADD_TEST_CASE(tcs, diff); + // Add the test cases for the free functions. + ATF_ADD_TEST_CASE(tcs, has_get); + ATF_ADD_TEST_CASE(tcs, set); + ATF_ADD_TEST_CASE(tcs, unset); } diff --git a/unit/atf-src/atf-c++/noncopyable.hpp b/unit/atf-src/tools/exceptions.cpp similarity index 65% rename from unit/atf-src/atf-c++/noncopyable.hpp rename to unit/atf-src/tools/exceptions.cpp index a885a668cb..8587121cef 100644 --- a/unit/atf-src/atf-c++/noncopyable.hpp +++ b/unit/atf-src/tools/exceptions.cpp @@ -27,30 +27,48 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#if !defined(_ATF_CXX_NONCOPYABLE_HPP_) -#define _ATF_CXX_NONCOPYABLE_HPP_ +#include -namespace atf { +#include "exceptions.hpp" // ------------------------------------------------------------------------ -// The "noncopyable" class. +// The "system_error" type. // ------------------------------------------------------------------------ -class noncopyable { - // The class cannot be empty; otherwise we get ABI-stability warnings - // during the build, which will break it due to strict checking. - int m_noncopyable_dummy; +tools::system_error::system_error(const std::string& who, + const std::string& message, + int sys_err) : + std::runtime_error(who + ": " + message), + m_sys_err(sys_err) +{ +} - noncopyable(const noncopyable& nc); - noncopyable& operator=(const noncopyable& nc); +tools::system_error::~system_error(void) + throw() +{ +} -protected: - // Explicitly needed to provide some non-private functions. Otherwise - // we also get some warnings during the build. - noncopyable(void) {} - ~noncopyable(void) {} -}; +int +tools::system_error::code(void) + const + throw() +{ + return m_sys_err; +} -} // namespace atf +const char* +tools::system_error::what(void) + const + throw() +{ + try { + if (m_message.length() == 0) { + m_message = std::string(std::runtime_error::what()) + ": "; + m_message += ::strerror(m_sys_err); + } -#endif // !defined(_ATF_CXX_NONCOPYABLE_HPP_) + return m_message.c_str(); + } catch (...) { + return "Unable to format system_error message"; + } +} diff --git a/unit/atf-src/atf-run/fs.hpp b/unit/atf-src/tools/exceptions.hpp similarity index 55% rename from unit/atf-src/atf-run/fs.hpp rename to unit/atf-src/tools/exceptions.hpp index 37382684b5..4346b7b54f 100644 --- a/unit/atf-src/atf-run/fs.hpp +++ b/unit/atf-src/tools/exceptions.hpp @@ -27,31 +27,67 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#if !defined(_ATF_RUN_FS_HPP_) -#define _ATF_RUN_FS_HPP_ +#if !defined(TOOLS_EXCEPTIONS_HPP) +#define TOOLS_EXCEPTIONS_HPP -#include +#include +#include -#include "atf-c++/detail/fs.hpp" +namespace tools { -namespace atf { -namespace atf_run { - -class temp_dir { - std::auto_ptr< atf::fs::path > m_path; +template< class T > +class not_found_error : + public std::runtime_error +{ + T m_value; public: - temp_dir(const atf::fs::path&); - ~temp_dir(void); + not_found_error(const std::string& message, const T& value) throw(); - const atf::fs::path& get_path(void) const; + virtual ~not_found_error(void) throw(); + + const T& get_value(void) const throw(); }; -atf::fs::path change_directory(const atf::fs::path&); -void cleanup(const atf::fs::path&); -atf::fs::path get_current_dir(void); +template< class T > +inline +not_found_error< T >::not_found_error(const std::string& message, + const T& value) + throw() : + std::runtime_error(message), + m_value(value) +{ +} -} // namespace atf_run -} // namespace atf +template< class T > +inline +not_found_error< T >::~not_found_error(void) + throw() +{ +} -#endif // !defined(_ATF_RUN_FS_HPP_) +template< class T > +inline +const T& +not_found_error< T >::get_value(void) + const + throw() +{ + return m_value; +} + +class system_error : public std::runtime_error { + int m_sys_err; + mutable std::string m_message; + +public: + system_error(const std::string&, const std::string&, int); + ~system_error(void) throw(); + + int code(void) const throw(); + const char* what(void) const throw(); +}; + +} // namespace tools + +#endif // !defined(TOOLS_EXCEPTIONS_HPP) diff --git a/unit/atf-src/atf-c++/detail/expand.cpp b/unit/atf-src/tools/expand.cpp similarity index 95% rename from unit/atf-src/atf-c++/detail/expand.cpp rename to unit/atf-src/tools/expand.cpp index f6f9b6882e..3ae27d05e5 100644 --- a/unit/atf-src/atf-c++/detail/expand.cpp +++ b/unit/atf-src/tools/expand.cpp @@ -32,8 +32,8 @@ #include "expand.hpp" #include "text.hpp" -namespace impl = atf::expand; -#define IMPL_NAME "atf::expand" +namespace impl = tools::expand; +#define IMPL_NAME "tools::expand" // ------------------------------------------------------------------------ // Auxiliary functions. @@ -77,5 +77,5 @@ impl::is_glob(const std::string& glob) bool impl::matches_glob(const std::string& glob, const std::string& candidate) { - return atf::text::match(candidate, glob_to_regex(glob)); + return tools::text::match(candidate, glob_to_regex(glob)); } diff --git a/unit/atf-src/atf-c++/detail/expand.hpp b/unit/atf-src/tools/expand.hpp similarity index 95% rename from unit/atf-src/atf-c++/detail/expand.hpp rename to unit/atf-src/tools/expand.hpp index 7f4071ee84..b8135445af 100644 --- a/unit/atf-src/atf-c++/detail/expand.hpp +++ b/unit/atf-src/tools/expand.hpp @@ -27,13 +27,13 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#if !defined(_ATF_CXX_EXPAND_HPP_) -#define _ATF_CXX_EXPAND_HPP_ +#if !defined(TOOLS_EXPAND_HPP) +#define TOOLS_EXPAND_HPP #include #include -namespace atf { +namespace tools { namespace expand { // ------------------------------------------------------------------------ @@ -77,6 +77,6 @@ std::vector< std::string > expand_glob(const std::string& glob, } } // namespace expand -} // namespace atf +} // namespace tools -#endif // !defined(_ATF_CXX_EXPAND_HPP_) +#endif // !defined(TOOLS_EXPAND_HPP) diff --git a/unit/atf-src/atf-c++/detail/expand_test.cpp b/unit/atf-src/tools/expand_test.cpp similarity index 97% rename from unit/atf-src/atf-c++/detail/expand_test.cpp rename to unit/atf-src/tools/expand_test.cpp index 222ab3a92c..fb59de8db2 100644 --- a/unit/atf-src/atf-c++/detail/expand_test.cpp +++ b/unit/atf-src/tools/expand_test.cpp @@ -29,7 +29,7 @@ #include -#include "../macros.hpp" +#include #include "expand.hpp" @@ -47,7 +47,7 @@ ATF_TEST_CASE_HEAD(is_glob) } ATF_TEST_CASE_BODY(is_glob) { - using atf::expand::is_glob; + using tools::expand::is_glob; ATF_REQUIRE(!is_glob("")); ATF_REQUIRE(!is_glob("a")); @@ -72,7 +72,7 @@ ATF_TEST_CASE_HEAD(matches_glob_plain) } ATF_TEST_CASE_BODY(matches_glob_plain) { - using atf::expand::matches_glob; + using tools::expand::matches_glob; ATF_REQUIRE( matches_glob("", "")); ATF_REQUIRE(!matches_glob("a", "")); @@ -91,7 +91,7 @@ ATF_TEST_CASE_HEAD(matches_glob_star) } ATF_TEST_CASE_BODY(matches_glob_star) { - using atf::expand::matches_glob; + using tools::expand::matches_glob; ATF_REQUIRE( matches_glob("*", "")); ATF_REQUIRE( matches_glob("*", "a")); @@ -131,7 +131,7 @@ ATF_TEST_CASE_HEAD(matches_glob_question) } ATF_TEST_CASE_BODY(matches_glob_question) { - using atf::expand::matches_glob; + using tools::expand::matches_glob; ATF_REQUIRE(!matches_glob("?", "")); ATF_REQUIRE( matches_glob("?", "a")); @@ -159,7 +159,7 @@ ATF_TEST_CASE_HEAD(expand_glob_base) } ATF_TEST_CASE_BODY(expand_glob_base) { - using atf::expand::expand_glob; + using tools::expand::expand_glob; std::vector< std::string > candidates; candidates.push_back("foo"); @@ -228,7 +228,7 @@ ATF_TEST_CASE_HEAD(expand_glob_tps) } ATF_TEST_CASE_BODY(expand_glob_tps) { - using atf::expand::expand_glob; + using tools::expand::expand_glob; std::vector< std::string > candidates; candidates.push_back("Atffile"); diff --git a/unit/atf-src/atf-run/expect_helpers.c b/unit/atf-src/tools/expect_helpers.c similarity index 100% rename from unit/atf-src/atf-run/expect_helpers.c rename to unit/atf-src/tools/expect_helpers.c diff --git a/unit/atf-src/atf-report/fail_helper.cpp b/unit/atf-src/tools/fail_helper.cpp similarity index 98% rename from unit/atf-src/atf-report/fail_helper.cpp rename to unit/atf-src/tools/fail_helper.cpp index 1009f0e479..736b5e8be0 100644 --- a/unit/atf-src/atf-report/fail_helper.cpp +++ b/unit/atf-src/tools/fail_helper.cpp @@ -27,7 +27,7 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#include "atf-c++/macros.hpp" +#include ATF_TEST_CASE(main); ATF_TEST_CASE_HEAD(main) diff --git a/unit/atf-src/tools/fs.cpp b/unit/atf-src/tools/fs.cpp new file mode 100644 index 0000000000..deed28c72b --- /dev/null +++ b/unit/atf-src/tools/fs.cpp @@ -0,0 +1,744 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif + +extern "C" { +#include +#include +#include +#include +#include + +#include +#include +#include +} + +#include +#include +#include +#include + +#include "auto_array.hpp" +#include "env.hpp" +#include "exceptions.hpp" +#include "fs.hpp" +#include "process.hpp" +#include "text.hpp" +#include "user.hpp" + +namespace impl = tools::fs; +#define IMPL_NAME "tools::fs" + +// ------------------------------------------------------------------------ +// Auxiliary functions. +// ------------------------------------------------------------------------ + +static void cleanup_aux(const impl::path&, dev_t, bool); +static void cleanup_aux_dir(const impl::path&, const impl::file_info&, + bool); +static void do_unmount(const impl::path&); +static bool safe_access(const impl::path&, int, int); + +static const int access_f = 1 << 0; +static const int access_r = 1 << 1; +static const int access_w = 1 << 2; +static const int access_x = 1 << 3; + +//! +//! An implementation of access(2) but using the effective user value +//! instead of the real one. Also avoids false positives for root when +//! asking for execute permissions, which appear in SunOS. +//! +static +void +eaccess(const tools::fs::path& p, int mode) +{ + assert(mode & access_f || mode & access_r || + mode & access_w || mode & access_x); + + struct stat st; + if (lstat(p.c_str(), &st) == -1) + throw tools::system_error(IMPL_NAME "::eaccess", + "Cannot get information from file " + + p.str(), errno); + + /* Early return if we are only checking for existence and the file + * exists (stat call returned). */ + if (mode & access_f) + return; + + bool ok = false; + if (tools::user::is_root()) { + if (!ok && !(mode & access_x)) { + /* Allow root to read/write any file. */ + ok = true; + } + + if (!ok && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) { + /* Allow root to execute the file if any of its execution bits + * are set. */ + ok = true; + } + } else { + if (!ok && (tools::user::euid() == st.st_uid)) { + ok = ((mode & access_r) && (st.st_mode & S_IRUSR)) || + ((mode & access_w) && (st.st_mode & S_IWUSR)) || + ((mode & access_x) && (st.st_mode & S_IXUSR)); + } + if (!ok && tools::user::is_member_of_group(st.st_gid)) { + ok = ((mode & access_r) && (st.st_mode & S_IRGRP)) || + ((mode & access_w) && (st.st_mode & S_IWGRP)) || + ((mode & access_x) && (st.st_mode & S_IXGRP)); + } + if (!ok && ((tools::user::euid() != st.st_uid) && + !tools::user::is_member_of_group(st.st_gid))) { + ok = ((mode & access_r) && (st.st_mode & S_IROTH)) || + ((mode & access_w) && (st.st_mode & S_IWOTH)) || + ((mode & access_x) && (st.st_mode & S_IXOTH)); + } + } + + if (!ok) + throw tools::system_error(IMPL_NAME "::eaccess", "Access check failed", + EACCES); +} + +//! +//! \brief A controlled version of access(2). +//! +//! This function reimplements the standard access(2) system call to +//! safely control its exit status and raise an exception in case of +//! failure. +//! +static +bool +safe_access(const impl::path& p, int mode, int experr) +{ + try { + eaccess(p, mode); + return true; + } catch (const tools::system_error& e) { + if (e.code() == experr) + return false; + else + throw e; + } +} + +// The cleanup routines below are tricky: they are executed immediately after +// a test case's death, and after we have forcibly killed any stale processes. +// However, even if the processes are dead, this does not mean that the file +// system we are scanning is stable. In particular, if the test case has +// mounted file systems through fuse/puffs, the fact that the processes died +// does not mean that the file system is truly unmounted. +// +// The code below attempts to cope with this by catching errors and either +// ignoring them or retrying the actions on the same file/directory a few times +// before giving up. +static const int max_retries = 5; +static const int retry_delay_in_seconds = 1; + +// The erase parameter in this routine is to control nested mount points. +// We want to descend into a mount point to unmount anything that is +// mounted under it, but we do not want to delete any files while doing +// this traversal. In other words, we erase files until we cross the +// first mount point, and after that point we only scan and unmount. +static +void +cleanup_aux(const impl::path& p, dev_t parent_device, bool erase) +{ + try { + impl::file_info fi(p); + + if (fi.get_type() == impl::file_info::dir_type) + cleanup_aux_dir(p, fi, fi.get_device() == parent_device); + + if (fi.get_device() != parent_device) + do_unmount(p); + + if (erase) { + if (fi.get_type() == impl::file_info::dir_type) + impl::rmdir(p); + else + impl::remove(p); + } + } catch (const tools::system_error& e) { + if (e.code() != ENOENT && e.code() != ENOTDIR) + throw e; + } +} + +static +void +cleanup_aux_dir(const impl::path& p, const impl::file_info& fi, + bool erase) +{ + if (erase && ((fi.get_mode() & S_IRWXU) != S_IRWXU)) { + int retries = max_retries; +retry_chmod: + if (chmod(p.c_str(), fi.get_mode() | S_IRWXU) == -1) { + if (retries > 0) { + retries--; + ::sleep(retry_delay_in_seconds); + goto retry_chmod; + } else { + throw tools::system_error(IMPL_NAME "::cleanup(" + + p.str() + ")", "chmod(2) failed", + errno); + } + } + } + + std::set< std::string > subdirs; + { + bool ok = false; + int retries = max_retries; + while (!ok) { + assert(retries > 0); + try { + const impl::directory d(p); + subdirs = d.names(); + ok = true; + } catch (const tools::system_error& e) { + retries--; + if (retries == 0) + throw e; + ::sleep(retry_delay_in_seconds); + } + } + assert(ok); + } + + for (std::set< std::string >::const_iterator iter = subdirs.begin(); + iter != subdirs.end(); iter++) { + const std::string& name = *iter; + if (name != "." && name != "..") + cleanup_aux(p / name, fi.get_device(), erase); + } +} + +static +void +do_unmount(const impl::path& in_path) +{ + // At least, FreeBSD's unmount(2) requires the path to be absolute. + // Let's make it absolute in all cases just to be safe that this does + // not affect other systems. + const impl::path& abs_path = in_path.is_absolute() ? + in_path : in_path.to_absolute(); + +#if defined(HAVE_UNMOUNT) + int retries = max_retries; +retry_unmount: + if (unmount(abs_path.c_str(), 0) == -1) { + if (errno == EBUSY && retries > 0) { + retries--; + ::sleep(retry_delay_in_seconds); + goto retry_unmount; + } else { + throw tools::system_error(IMPL_NAME "::cleanup(" + in_path.str() + + ")", "unmount(2) failed", errno); + } + } +#else + // We could use umount(2) instead if it was available... but + // trying to do so under, e.g. Linux, is a nightmare because we + // also have to update /etc/mtab to match what we did. It is + // stools::fser to just leave the system-specific umount(8) tool deal + // with it, at least for now. + + const impl::path prog("umount"); + tools::process::argv_array argv("umount", abs_path.c_str(), NULL); + + tools::process::status s = tools::process::exec(prog, argv, + tools::process::stream_inherit(), tools::process::stream_inherit()); + if (!s.exited() || s.exitstatus() != EXIT_SUCCESS) + throw std::runtime_error("Call to unmount failed"); +#endif +} + +static +std::string +normalize(const std::string& in) +{ + assert(!in.empty()); + + std::string out; + + std::string::size_type pos = 0; + do { + const std::string::size_type next_pos = in.find('/', pos); + + const std::string component = in.substr(pos, next_pos - pos); + if (!component.empty()) { + if (pos == 0) + out += component; + else if (component != ".") + out += "/" + component; + } + + if (next_pos == std::string::npos) + pos = next_pos; + else + pos = next_pos + 1; + } while (pos != std::string::npos); + + return out.empty() ? "/" : out; +} + +// ------------------------------------------------------------------------ +// The "path" class. +// ------------------------------------------------------------------------ + +impl::path::path(const std::string& s) : + m_data(normalize(s)) +{ +} + +impl::path::~path(void) +{ +} + +const char* +impl::path::c_str(void) + const +{ + return m_data.c_str(); +} + +std::string +impl::path::str(void) + const +{ + return m_data; +} + +bool +impl::path::is_absolute(void) + const +{ + return !m_data.empty() && m_data[0] == '/'; +} + +bool +impl::path::is_root(void) + const +{ + return m_data == "/"; +} + +impl::path +impl::path::branch_path(void) + const +{ + const std::string::size_type endpos = m_data.rfind('/'); + if (endpos == std::string::npos) + return path("."); + else if (endpos == 0) + return path("/"); + else + return path(m_data.substr(0, endpos)); +} + +std::string +impl::path::leaf_name(void) + const +{ + std::string::size_type begpos = m_data.rfind('/'); + if (begpos == std::string::npos) + begpos = 0; + else + begpos++; + + return m_data.substr(begpos); +} + +impl::path +impl::path::to_absolute(void) + const +{ + assert(!is_absolute()); + return get_current_dir() / m_data; +} + +bool +impl::path::operator==(const path& p) + const +{ + return m_data == p.m_data; +} + +bool +impl::path::operator!=(const path& p) + const +{ + return m_data != p.m_data; +} + +impl::path +impl::path::operator/(const std::string& p) + const +{ + return path(m_data + "/" + normalize(p)); +} + +impl::path +impl::path::operator/(const path& p) + const +{ + return path(m_data) / p.m_data; +} + +bool +impl::path::operator<(const path& p) + const +{ + return std::strcmp(m_data.c_str(), p.m_data.c_str()) < 0; +} + +// ------------------------------------------------------------------------ +// The "file_info" class. +// ------------------------------------------------------------------------ + +const int impl::file_info::blk_type = 1; +const int impl::file_info::chr_type = 2; +const int impl::file_info::dir_type = 3; +const int impl::file_info::fifo_type = 4; +const int impl::file_info::lnk_type = 5; +const int impl::file_info::reg_type = 6; +const int impl::file_info::sock_type = 7; +const int impl::file_info::wht_type = 8; + +impl::file_info::file_info(const path& p) +{ + if (lstat(p.c_str(), &m_sb) == -1) + throw system_error(IMPL_NAME "::file_info", + "Cannot get information of " + p.str() + "; " + + "lstat(2) failed", errno); + + int type = m_sb.st_mode & S_IFMT; + switch (type) { + case S_IFBLK: m_type = blk_type; break; + case S_IFCHR: m_type = chr_type; break; + case S_IFDIR: m_type = dir_type; break; + case S_IFIFO: m_type = fifo_type; break; + case S_IFLNK: m_type = lnk_type; break; + case S_IFREG: m_type = reg_type; break; + case S_IFSOCK: m_type = sock_type; break; +#if defined(S_IFWHT) + case S_IFWHT: m_type = wht_type; break; +#endif + default: + throw system_error(IMPL_NAME "::file_info", "Unknown file type " + "error", EINVAL); + } +} + +impl::file_info::~file_info(void) +{ +} + +dev_t +impl::file_info::get_device(void) + const +{ + return m_sb.st_dev; +} + +ino_t +impl::file_info::get_inode(void) + const +{ + return m_sb.st_ino; +} + +mode_t +impl::file_info::get_mode(void) + const +{ + return m_sb.st_mode & ~S_IFMT; +} + +off_t +impl::file_info::get_size(void) + const +{ + return m_sb.st_size; +} + +int +impl::file_info::get_type(void) + const +{ + return m_type; +} + +bool +impl::file_info::is_owner_readable(void) + const +{ + return m_sb.st_mode & S_IRUSR; +} + +bool +impl::file_info::is_owner_writable(void) + const +{ + return m_sb.st_mode & S_IWUSR; +} + +bool +impl::file_info::is_owner_executable(void) + const +{ + return m_sb.st_mode & S_IXUSR; +} + +bool +impl::file_info::is_group_readable(void) + const +{ + return m_sb.st_mode & S_IRGRP; +} + +bool +impl::file_info::is_group_writable(void) + const +{ + return m_sb.st_mode & S_IWGRP; +} + +bool +impl::file_info::is_group_executable(void) + const +{ + return m_sb.st_mode & S_IXGRP; +} + +bool +impl::file_info::is_other_readable(void) + const +{ + return m_sb.st_mode & S_IROTH; +} + +bool +impl::file_info::is_other_writable(void) + const +{ + return m_sb.st_mode & S_IWOTH; +} + +bool +impl::file_info::is_other_executable(void) + const +{ + return m_sb.st_mode & S_IXOTH; +} + +// ------------------------------------------------------------------------ +// The "directory" class. +// ------------------------------------------------------------------------ + +impl::directory::directory(const path& p) +{ + DIR* dp = ::opendir(p.c_str()); + if (dp == NULL) + throw system_error(IMPL_NAME "::directory::directory(" + + p.str() + ")", "opendir(3) failed", errno); + + struct dirent* dep; + while ((dep = ::readdir(dp)) != NULL) { + path entryp = p / dep->d_name; + insert(value_type(dep->d_name, file_info(entryp))); + } + + if (::closedir(dp) == -1) + throw system_error(IMPL_NAME "::directory::directory(" + + p.str() + ")", "closedir(3) failed", errno); +} + +std::set< std::string > +impl::directory::names(void) + const +{ + std::set< std::string > ns; + + for (const_iterator iter = begin(); iter != end(); iter++) + ns.insert((*iter).first); + + return ns; +} + +// ------------------------------------------------------------------------ +// The "temp_dir" class. +// ------------------------------------------------------------------------ + +impl::temp_dir::temp_dir(const path& p) +{ + tools::auto_array< char > buf(new char[p.str().length() + 1]); + std::strcpy(buf.get(), p.c_str()); + if (::mkdtemp(buf.get()) == NULL) + throw tools::system_error(IMPL_NAME "::temp_dir::temp_dir(" + + p.str() + ")", "mkdtemp(3) failed", + errno); + + m_path.reset(new path(buf.get())); +} + +impl::temp_dir::~temp_dir(void) +{ + cleanup(*m_path); +} + +const impl::path& +impl::temp_dir::get_path(void) + const +{ + return *m_path; +} + +// ------------------------------------------------------------------------ +// Free functions. +// ------------------------------------------------------------------------ + +bool +impl::exists(const path& p) +{ + try { + eaccess(p, access_f); + return true; + } catch (const system_error& e) { + if (e.code() == ENOENT) + return false; + else + throw; + } +} + +bool +impl::have_prog_in_path(const std::string& prog) +{ + assert(prog.find('/') == std::string::npos); + + // Do not bother to provide a default value for PATH. If it is not + // there something is broken in the user's environment. + if (!tools::env::has("PATH")) + throw std::runtime_error("PATH not defined in the environment"); + std::vector< std::string > dirs = + tools::text::split(tools::env::get("PATH"), ":"); + + bool found = false; + for (std::vector< std::string >::const_iterator iter = dirs.begin(); + !found && iter != dirs.end(); iter++) { + const path& dir = path(*iter); + + if (is_executable(dir / prog)) + found = true; + } + return found; +} + +bool +impl::is_executable(const path& p) +{ + if (!exists(p)) + return false; + return safe_access(p, access_x, EACCES); +} + +void +impl::remove(const path& p) +{ + if (file_info(p).get_type() == file_info::dir_type) + throw tools::system_error(IMPL_NAME "::remove(" + p.str() + ")", + "Is a directory", + EPERM); + if (::unlink(p.c_str()) == -1) + throw tools::system_error(IMPL_NAME "::remove(" + p.str() + ")", + "unlink(" + p.str() + ") failed", + errno); +} + +void +impl::rmdir(const path& p) +{ + if (::rmdir(p.c_str())) { + if (errno == EEXIST) { + /* Some operating systems (e.g. OpenSolaris 200906) return + * EEXIST instead of ENOTEMPTY for non-empty directories. + * Homogenize the return value so that callers don't need + * to bother about differences in operating systems. */ + errno = ENOTEMPTY; + } + throw system_error(IMPL_NAME "::rmdir", "Cannot remove directory", + errno); + } +} + +impl::path +impl::change_directory(const path& dir) +{ + path olddir = get_current_dir(); + + if (olddir != dir) { + if (::chdir(dir.c_str()) == -1) + throw tools::system_error(IMPL_NAME "::chdir(" + dir.str() + ")", + "chdir(2) failed", errno); + } + + return olddir; +} + +void +impl::cleanup(const path& p) +{ + impl::file_info fi(p); + cleanup_aux(p, fi.get_device(), true); +} + +impl::path +impl::get_current_dir(void) +{ + std::auto_ptr< char > cwd; +#if defined(HAVE_GETCWD_DYN) + cwd.reset(getcwd(NULL, 0)); +#else + cwd.reset(getcwd(NULL, MAXPATHLEN)); +#endif + if (cwd.get() == NULL) + throw tools::system_error(IMPL_NAME "::get_current_dir()", + "getcwd() failed", errno); + + return path(cwd.get()); +} diff --git a/unit/atf-src/tools/fs.hpp b/unit/atf-src/tools/fs.hpp new file mode 100644 index 0000000000..f45f8f1f27 --- /dev/null +++ b/unit/atf-src/tools/fs.hpp @@ -0,0 +1,377 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#if !defined(TOOLS_FS_HPP) +#define TOOLS_FS_HPP + +extern "C" { +#include +#include +} + +#include +#include +#include +#include +#include +#include + +namespace tools { +namespace fs { + +// ------------------------------------------------------------------------ +// The "path" class. +// ------------------------------------------------------------------------ + +//! +//! \brief A class to represent a path to a file. +//! +//! The path class represents the route to a file or directory in the +//! file system. All file manipulation operations use this class to +//! represent their arguments as it takes care of normalizing user-provided +//! strings and ensures they are valid. +//! +//! It is important to note that the file pointed to by a path need not +//! exist. +//! +class path { + //! + //! \brief Internal representation of a path. + //! + std::string m_data; + +public: + //! \brief Constructs a new path from a user-provided string. + //! + //! This constructor takes a string, either provided by the program's + //! code or by the user and constructs a new path object. The string + //! is normalized to not contain multiple delimiters together and to + //! remove any trailing one. + //! + //! The input string cannot be empty. + //! + explicit path(const std::string&); + + //! + //! \brief Destructor for the path class. + //! + ~path(void); + + //! + //! \brief Returns a pointer to a C-style string representing this path. + //! + const char* c_str(void) const; + + //! + //! \brief Returns a string representing this path. + //! XXX Really needed? + //! + std::string str(void) const; + + //! + //! \brief Returns the branch path of this path. + //! + //! Calculates and returns the branch path of this path. In other + //! words, it returns what the standard ::dirname function would return. + //! + path branch_path(void) const; + + //! + //! \brief Returns the leaf name of this path. + //! + //! Calculates and returns the leaf name of this path. In other words, + //! it returns what the standard ::basename function would return. + //! + std::string leaf_name(void) const; + + //! + //! \brief Checks whether this path is absolute or not. + //! + //! Returns a boolean indicating if this is an absolute path or not; + //! i.e. if it starts with a slash. + //! + bool is_absolute(void) const; + + //! + //! \brief Checks whether this path points to the root directory or not. + //! + //! Returns a boolean indicating if this is path points to the root + //! directory or not. The checks made by this are extremely simple (so + //! the results cannot always be trusted) but they are enough for our + //! modest sanity-checking needs. I.e. "/../" could return false. + //! + bool is_root(void) const; + + //! + //! \brief Converts the path to be absolute. + //! + //! \pre The path was not absolute. + //! + path to_absolute(void) const; + + //! + //! \brief Checks if two paths are equal. + //! + bool operator==(const path&) const; + + //! + //! \brief Checks if two paths are different. + //! + bool operator!=(const path&) const; + + //! + //! \brief Concatenates a path with a string. + //! + //! Constructs a new path object that is the concatenation of the + //! left-hand path with the right-hand string. The string is normalized + //! before the concatenation, and a path delimiter is introduced between + //! the two components if needed. + //! + path operator/(const std::string&) const; + + //! + //! \brief Concatenates a path with another path. + //! + //! Constructs a new path object that is the concatenation of the + //! left-hand path with the right-hand one. A path delimiter is + //! introduced between the two components if needed. + //! + path operator/(const path&) const; + + //! + //! \brief Checks if a path has to be sorted before another one + //! lexicographically. + //! + bool operator<(const path&) const; +}; + +// ------------------------------------------------------------------------ +// The "file_info" class. +// ------------------------------------------------------------------------ + +class directory; + +//! +//! \brief A class that contains information about a file. +//! +//! The file_info class holds information about an specific file that +//! exists in the file system. +//! +class file_info { + int m_type; + struct stat m_sb; + +public: + //! + //! \brief The file's type. + //! + static const int blk_type; + static const int chr_type; + static const int dir_type; + static const int fifo_type; + static const int lnk_type; + static const int reg_type; + static const int sock_type; + static const int wht_type; + + //! + //! \brief Constructs a new file_info based on a given file. + //! + //! This constructor creates a new file_info object and fills it with + //! the data returned by ::stat when run on the given file, which must + //! exist. + //! + explicit file_info(const path&); + + //! + //! \brief The destructor. + //! + ~file_info(void); + + //! + //! \brief Returns the device containing the file. + //! + dev_t get_device(void) const; + + //! + //! \brief Returns the file's inode. + //! + ino_t get_inode(void) const; + + //! + //! \brief Returns the file's permissions. + //! + mode_t get_mode(void) const; + + //! + //! \brief Returns the file's size. + //! + off_t get_size(void) const; + + //! + //! \brief Returns the file's type. + //! + int get_type(void) const; + + //! + //! \brief Returns whether the file is readable by its owner or not. + //! + bool is_owner_readable(void) const; + + //! + //! \brief Returns whether the file is writable by its owner or not. + //! + bool is_owner_writable(void) const; + + //! + //! \brief Returns whether the file is executable by its owner or not. + //! + bool is_owner_executable(void) const; + + //! + //! \brief Returns whether the file is readable by the users belonging + //! to its group or not. + //! + bool is_group_readable(void) const; + + //! + //! \brief Returns whether the file is writable the users belonging to + //! its group or not. + //! + bool is_group_writable(void) const; + + //! + //! \brief Returns whether the file is executable by the users + //! belonging to its group or not. + //! + bool is_group_executable(void) const; + + //! + //! \brief Returns whether the file is readable by people different + //! than the owner and those belonging to the group or not. + //! + bool is_other_readable(void) const; + + //! + //! \brief Returns whether the file is write by people different + //! than the owner and those belonging to the group or not. + //! + bool is_other_writable(void) const; + + //! + //! \brief Returns whether the file is executable by people different + //! than the owner and those belonging to the group or not. + //! + bool is_other_executable(void) const; +}; + +// ------------------------------------------------------------------------ +// The "directory" class. +// ------------------------------------------------------------------------ + +//! +//! \brief A class representing a file system directory. +//! +//! The directory class represents a group of files in the file system and +//! corresponds to exactly one directory. +//! +class directory : public std::map< std::string, file_info > { +public: + //! + //! \brief Constructs a new directory. + //! + //! Constructs a new directory object representing the given path. + //! The directory must exist at creation time as the contents of the + //! class are gathered from it. + //! + directory(const path&); + + //! + //! \brief Returns the file names of the files in the directory. + //! + //! Returns the leaf names of all files contained in the directory. + //! I.e. the keys of the directory map. + //! + std::set< std::string > names(void) const; +}; + +// ------------------------------------------------------------------------ +// The "temp_dir" class. +// ------------------------------------------------------------------------ + +class temp_dir { + std::auto_ptr< tools::fs::path > m_path; + +public: + temp_dir(const tools::fs::path&); + ~temp_dir(void); + + const tools::fs::path& get_path(void) const; +}; + +// ------------------------------------------------------------------------ +// Free functions. +// ------------------------------------------------------------------------ + +//! +//! \brief Checks if the given path exists. +//! +bool exists(const path&); + +//! +//! \brief Looks for the given program in the PATH. +//! +//! Given a program name (without slashes) looks for it in the path and +//! returns its full path name if found, otherwise an empty path. +//! +bool have_prog_in_path(const std::string&); + +//! +//! \brief Checks if the given path exists, is accessible and is executable. +//! +bool is_executable(const path&); + +//! +//! \brief Removes a given file. +//! +void remove(const path&); + +//! +//! \brief Removes an empty directory. +//! +void rmdir(const path&); + +tools::fs::path change_directory(const tools::fs::path&); +void cleanup(const tools::fs::path&); +tools::fs::path get_current_dir(void); + +} // namespace fs +} // namespace tools + +#endif // !defined(TOOLS_FS_HPP) diff --git a/unit/atf-src/tools/fs_test.cpp b/unit/atf-src/tools/fs_test.cpp new file mode 100644 index 0000000000..5f482a4cdb --- /dev/null +++ b/unit/atf-src/tools/fs_test.cpp @@ -0,0 +1,743 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +extern "C" { +#include +#include +} + +#include +#include +#include + +#include + +#include "exceptions.hpp" +#include "fs.hpp" +#include "user.hpp" + +// ------------------------------------------------------------------------ +// Auxiliary functions. +// ------------------------------------------------------------------------ + +static +void +create_file(const char *name) +{ + std::ofstream os(name); + os.close(); +} + +static +void +create_files(void) +{ + ::mkdir("files", 0755); + ::mkdir("files/dir", 0755); + + std::ofstream os("files/reg"); + os.close(); + + // TODO: Should create all other file types (blk, chr, fifo, lnk, sock) + // and test for them... but the underlying file system may not support + // most of these. Specially as we are working on /tmp, which can be + // mounted with flags such as "nodev". See how to deal with this + // situation. +} + +// ------------------------------------------------------------------------ +// Test cases for the "path" class. +// ------------------------------------------------------------------------ + +ATF_TEST_CASE(path_normalize); +ATF_TEST_CASE_HEAD(path_normalize) +{ + set_md_var("descr", "Tests the path's normalization"); +} +ATF_TEST_CASE_BODY(path_normalize) +{ + using tools::fs::path; + + ATF_REQUIRE_EQ(path(".").str(), "."); + ATF_REQUIRE_EQ(path("..").str(), ".."); + + ATF_REQUIRE_EQ(path("foo").str(), "foo"); + ATF_REQUIRE_EQ(path("foo/bar").str(), "foo/bar"); + ATF_REQUIRE_EQ(path("foo/bar/").str(), "foo/bar"); + + ATF_REQUIRE_EQ(path("/foo").str(), "/foo"); + ATF_REQUIRE_EQ(path("/foo/bar").str(), "/foo/bar"); + ATF_REQUIRE_EQ(path("/foo/bar/").str(), "/foo/bar"); + + ATF_REQUIRE_EQ(path("///foo").str(), "/foo"); + ATF_REQUIRE_EQ(path("///foo///bar").str(), "/foo/bar"); + ATF_REQUIRE_EQ(path("///foo///bar///").str(), "/foo/bar"); +} + +ATF_TEST_CASE(path_is_absolute); +ATF_TEST_CASE_HEAD(path_is_absolute) +{ + set_md_var("descr", "Tests the path::is_absolute function"); +} +ATF_TEST_CASE_BODY(path_is_absolute) +{ + using tools::fs::path; + + ATF_REQUIRE( path("/").is_absolute()); + ATF_REQUIRE( path("////").is_absolute()); + ATF_REQUIRE( path("////a").is_absolute()); + ATF_REQUIRE( path("//a//").is_absolute()); + ATF_REQUIRE(!path("a////").is_absolute()); + ATF_REQUIRE(!path("../foo").is_absolute()); +} + +ATF_TEST_CASE(path_is_root); +ATF_TEST_CASE_HEAD(path_is_root) +{ + set_md_var("descr", "Tests the path::is_root function"); +} +ATF_TEST_CASE_BODY(path_is_root) +{ + using tools::fs::path; + + ATF_REQUIRE( path("/").is_root()); + ATF_REQUIRE( path("////").is_root()); + ATF_REQUIRE(!path("////a").is_root()); + ATF_REQUIRE(!path("//a//").is_root()); + ATF_REQUIRE(!path("a////").is_root()); + ATF_REQUIRE(!path("../foo").is_root()); +} + +ATF_TEST_CASE(path_branch_path); +ATF_TEST_CASE_HEAD(path_branch_path) +{ + set_md_var("descr", "Tests the path::branch_path function"); +} +ATF_TEST_CASE_BODY(path_branch_path) +{ + using tools::fs::path; + + ATF_REQUIRE_EQ(path(".").branch_path().str(), "."); + ATF_REQUIRE_EQ(path("foo").branch_path().str(), "."); + ATF_REQUIRE_EQ(path("foo/bar").branch_path().str(), "foo"); + ATF_REQUIRE_EQ(path("/foo").branch_path().str(), "/"); + ATF_REQUIRE_EQ(path("/foo/bar").branch_path().str(), "/foo"); +} + +ATF_TEST_CASE(path_leaf_name); +ATF_TEST_CASE_HEAD(path_leaf_name) +{ + set_md_var("descr", "Tests the path::leaf_name function"); +} +ATF_TEST_CASE_BODY(path_leaf_name) +{ + using tools::fs::path; + + ATF_REQUIRE_EQ(path(".").leaf_name(), "."); + ATF_REQUIRE_EQ(path("foo").leaf_name(), "foo"); + ATF_REQUIRE_EQ(path("foo/bar").leaf_name(), "bar"); + ATF_REQUIRE_EQ(path("/foo").leaf_name(), "foo"); + ATF_REQUIRE_EQ(path("/foo/bar").leaf_name(), "bar"); +} + +ATF_TEST_CASE(path_compare_equal); +ATF_TEST_CASE_HEAD(path_compare_equal) +{ + set_md_var("descr", "Tests the comparison for equality between paths"); +} +ATF_TEST_CASE_BODY(path_compare_equal) +{ + using tools::fs::path; + + ATF_REQUIRE(path("/") == path("///")); + ATF_REQUIRE(path("/a") == path("///a")); + ATF_REQUIRE(path("/a") == path("///a///")); + + ATF_REQUIRE(path("a/b/c") == path("a//b//c")); + ATF_REQUIRE(path("a/b/c") == path("a//b//c///")); +} + +ATF_TEST_CASE(path_compare_different); +ATF_TEST_CASE_HEAD(path_compare_different) +{ + set_md_var("descr", "Tests the comparison for difference between paths"); +} +ATF_TEST_CASE_BODY(path_compare_different) +{ + using tools::fs::path; + + ATF_REQUIRE(path("/") != path("//a/")); + ATF_REQUIRE(path("/a") != path("a///")); + + ATF_REQUIRE(path("a/b/c") != path("a/b")); + ATF_REQUIRE(path("a/b/c") != path("a//b")); + ATF_REQUIRE(path("a/b/c") != path("/a/b/c")); + ATF_REQUIRE(path("a/b/c") != path("/a//b//c")); +} + +ATF_TEST_CASE(path_concat); +ATF_TEST_CASE_HEAD(path_concat) +{ + set_md_var("descr", "Tests the concatenation of multiple paths"); +} +ATF_TEST_CASE_BODY(path_concat) +{ + using tools::fs::path; + + ATF_REQUIRE_EQ((path("foo") / "bar").str(), "foo/bar"); + ATF_REQUIRE_EQ((path("foo/") / "/bar").str(), "foo/bar"); + ATF_REQUIRE_EQ((path("foo/") / "/bar/baz").str(), "foo/bar/baz"); + ATF_REQUIRE_EQ((path("foo/") / "///bar///baz").str(), "foo/bar/baz"); +} + +ATF_TEST_CASE(path_to_absolute); +ATF_TEST_CASE_HEAD(path_to_absolute) +{ + set_md_var("descr", "Tests the conversion of a relative path to an " + "absolute one"); +} +ATF_TEST_CASE_BODY(path_to_absolute) +{ + using tools::fs::file_info; + using tools::fs::path; + + create_files(); + + { + const path p("."); + path pa = p.to_absolute(); + ATF_REQUIRE(pa.is_absolute()); + + file_info fi(p); + file_info fia(pa); + ATF_REQUIRE_EQ(fi.get_device(), fia.get_device()); + ATF_REQUIRE_EQ(fi.get_inode(), fia.get_inode()); + } + + { + const path p("files/reg"); + path pa = p.to_absolute(); + ATF_REQUIRE(pa.is_absolute()); + + file_info fi(p); + file_info fia(pa); + ATF_REQUIRE_EQ(fi.get_device(), fia.get_device()); + ATF_REQUIRE_EQ(fi.get_inode(), fia.get_inode()); + } +} + +ATF_TEST_CASE(path_op_less); +ATF_TEST_CASE_HEAD(path_op_less) +{ + set_md_var("descr", "Tests that the path's less-than operator works"); +} +ATF_TEST_CASE_BODY(path_op_less) +{ + using tools::fs::path; + + create_files(); + + ATF_REQUIRE(!(path("aaa") < path("aaa"))); + + ATF_REQUIRE( path("aab") < path("abc")); + ATF_REQUIRE(!(path("abc") < path("aab"))); +} + +// ------------------------------------------------------------------------ +// Test cases for the "directory" class. +// ------------------------------------------------------------------------ + +ATF_TEST_CASE(directory_read); +ATF_TEST_CASE_HEAD(directory_read) +{ + set_md_var("descr", "Tests the directory class creation, which reads " + "the contents of a directory"); +} +ATF_TEST_CASE_BODY(directory_read) +{ + using tools::fs::directory; + using tools::fs::path; + + create_files(); + + directory d(path("files")); + ATF_REQUIRE_EQ(d.size(), 4); + ATF_REQUIRE(d.find(".") != d.end()); + ATF_REQUIRE(d.find("..") != d.end()); + ATF_REQUIRE(d.find("dir") != d.end()); + ATF_REQUIRE(d.find("reg") != d.end()); +} + +ATF_TEST_CASE(directory_file_info); +ATF_TEST_CASE_HEAD(directory_file_info) +{ + set_md_var("descr", "Tests that the file_info objects attached to the " + "directory are valid"); +} +ATF_TEST_CASE_BODY(directory_file_info) +{ + using tools::fs::directory; + using tools::fs::file_info; + using tools::fs::path; + + create_files(); + + directory d(path("files")); + + { + directory::const_iterator iter = d.find("dir"); + ATF_REQUIRE(iter != d.end()); + const file_info& fi = (*iter).second; + ATF_REQUIRE(fi.get_type() == file_info::dir_type); + } + + { + directory::const_iterator iter = d.find("reg"); + ATF_REQUIRE(iter != d.end()); + const file_info& fi = (*iter).second; + ATF_REQUIRE(fi.get_type() == file_info::reg_type); + } +} + +ATF_TEST_CASE(directory_names); +ATF_TEST_CASE_HEAD(directory_names) +{ + set_md_var("descr", "Tests the directory's names method"); +} +ATF_TEST_CASE_BODY(directory_names) +{ + using tools::fs::directory; + using tools::fs::path; + + create_files(); + + directory d(path("files")); + std::set< std::string > ns = d.names(); + ATF_REQUIRE_EQ(ns.size(), 4); + ATF_REQUIRE(ns.find(".") != ns.end()); + ATF_REQUIRE(ns.find("..") != ns.end()); + ATF_REQUIRE(ns.find("dir") != ns.end()); + ATF_REQUIRE(ns.find("reg") != ns.end()); +} + +// ------------------------------------------------------------------------ +// Test cases for the "file_info" class. +// ------------------------------------------------------------------------ + +ATF_TEST_CASE(file_info_stat); +ATF_TEST_CASE_HEAD(file_info_stat) +{ + set_md_var("descr", "Tests the file_info creation and its basic contents"); +} +ATF_TEST_CASE_BODY(file_info_stat) +{ + using tools::fs::file_info; + using tools::fs::path; + + create_files(); + + { + path p("files/dir"); + file_info fi(p); + ATF_REQUIRE(fi.get_type() == file_info::dir_type); + } + + { + path p("files/reg"); + file_info fi(p); + ATF_REQUIRE(fi.get_type() == file_info::reg_type); + } +} + +ATF_TEST_CASE(file_info_perms); +ATF_TEST_CASE_HEAD(file_info_perms) +{ + set_md_var("descr", "Tests the file_info methods to get the file's " + "permissions"); +} +ATF_TEST_CASE_BODY(file_info_perms) +{ + using tools::fs::file_info; + using tools::fs::path; + + path p("file"); + + std::ofstream os(p.c_str()); + os.close(); + +#define perms(ur, uw, ux, gr, gw, gx, othr, othw, othx) \ + { \ + file_info fi(p); \ + ATF_REQUIRE(fi.is_owner_readable() == ur); \ + ATF_REQUIRE(fi.is_owner_writable() == uw); \ + ATF_REQUIRE(fi.is_owner_executable() == ux); \ + ATF_REQUIRE(fi.is_group_readable() == gr); \ + ATF_REQUIRE(fi.is_group_writable() == gw); \ + ATF_REQUIRE(fi.is_group_executable() == gx); \ + ATF_REQUIRE(fi.is_other_readable() == othr); \ + ATF_REQUIRE(fi.is_other_writable() == othw); \ + ATF_REQUIRE(fi.is_other_executable() == othx); \ + } + + ::chmod(p.c_str(), 0000); + perms(false, false, false, false, false, false, false, false, false); + + ::chmod(p.c_str(), 0001); + perms(false, false, false, false, false, false, false, false, true); + + ::chmod(p.c_str(), 0010); + perms(false, false, false, false, false, true, false, false, false); + + ::chmod(p.c_str(), 0100); + perms(false, false, true, false, false, false, false, false, false); + + ::chmod(p.c_str(), 0002); + perms(false, false, false, false, false, false, false, true, false); + + ::chmod(p.c_str(), 0020); + perms(false, false, false, false, true, false, false, false, false); + + ::chmod(p.c_str(), 0200); + perms(false, true, false, false, false, false, false, false, false); + + ::chmod(p.c_str(), 0004); + perms(false, false, false, false, false, false, true, false, false); + + ::chmod(p.c_str(), 0040); + perms(false, false, false, true, false, false, false, false, false); + + ::chmod(p.c_str(), 0400); + perms(true, false, false, false, false, false, false, false, false); + + ::chmod(p.c_str(), 0644); + perms(true, true, false, true, false, false, true, false, false); + + ::chmod(p.c_str(), 0755); + perms(true, true, true, true, false, true, true, false, true); + + ::chmod(p.c_str(), 0777); + perms(true, true, true, true, true, true, true, true, true); + +#undef perms +} + +// ------------------------------------------------------------------------ +// Test cases for the "temp_dir" class. +// ------------------------------------------------------------------------ + +ATF_TEST_CASE(temp_dir_raii); +ATF_TEST_CASE_HEAD(temp_dir_raii) +{ + set_md_var("descr", "Tests the RAII behavior of the temp_dir class"); +} +ATF_TEST_CASE_BODY(temp_dir_raii) +{ + tools::fs::path t1("non-existent"); + tools::fs::path t2("non-existent"); + + { + tools::fs::path tmpl("testdir.XXXXXX"); + tools::fs::temp_dir td1(tmpl); + tools::fs::temp_dir td2(tmpl); + t1 = td1.get_path(); + t2 = td2.get_path(); + ATF_REQUIRE(t1.str().find("XXXXXX") == std::string::npos); + ATF_REQUIRE(t2.str().find("XXXXXX") == std::string::npos); + ATF_REQUIRE(t1 != t2); + ATF_REQUIRE(!tools::fs::exists(tmpl)); + ATF_REQUIRE( tools::fs::exists(t1)); + ATF_REQUIRE( tools::fs::exists(t2)); + + tools::fs::file_info fi1(t1); + ATF_REQUIRE( fi1.is_owner_readable()); + ATF_REQUIRE( fi1.is_owner_writable()); + ATF_REQUIRE( fi1.is_owner_executable()); + ATF_REQUIRE(!fi1.is_group_readable()); + ATF_REQUIRE(!fi1.is_group_writable()); + ATF_REQUIRE(!fi1.is_group_executable()); + ATF_REQUIRE(!fi1.is_other_readable()); + ATF_REQUIRE(!fi1.is_other_writable()); + ATF_REQUIRE(!fi1.is_other_executable()); + + tools::fs::file_info fi2(t2); + ATF_REQUIRE( fi2.is_owner_readable()); + ATF_REQUIRE( fi2.is_owner_writable()); + ATF_REQUIRE( fi2.is_owner_executable()); + ATF_REQUIRE(!fi2.is_group_readable()); + ATF_REQUIRE(!fi2.is_group_writable()); + ATF_REQUIRE(!fi2.is_group_executable()); + ATF_REQUIRE(!fi2.is_other_readable()); + ATF_REQUIRE(!fi2.is_other_writable()); + ATF_REQUIRE(!fi2.is_other_executable()); + } + + ATF_REQUIRE(t1.str() != "non-existent"); + ATF_REQUIRE(!tools::fs::exists(t1)); + ATF_REQUIRE(t2.str() != "non-existent"); + ATF_REQUIRE(!tools::fs::exists(t2)); +} + + +// ------------------------------------------------------------------------ +// Test cases for the free functions. +// ------------------------------------------------------------------------ + +ATF_TEST_CASE(exists); +ATF_TEST_CASE_HEAD(exists) +{ + set_md_var("descr", "Tests the exists function"); +} +ATF_TEST_CASE_BODY(exists) +{ + using tools::fs::exists; + using tools::fs::path; + + create_files(); + + ATF_REQUIRE( exists(path("files"))); + ATF_REQUIRE(!exists(path("file"))); + ATF_REQUIRE(!exists(path("files2"))); + + ATF_REQUIRE( exists(path("files/."))); + ATF_REQUIRE( exists(path("files/.."))); + ATF_REQUIRE( exists(path("files/dir"))); + ATF_REQUIRE( exists(path("files/reg"))); + ATF_REQUIRE(!exists(path("files/foo"))); +} + +ATF_TEST_CASE(is_executable); +ATF_TEST_CASE_HEAD(is_executable) +{ + set_md_var("descr", "Tests the is_executable function"); +} +ATF_TEST_CASE_BODY(is_executable) +{ + using tools::fs::is_executable; + using tools::fs::path; + + create_files(); + + ATF_REQUIRE( is_executable(path("files"))); + ATF_REQUIRE( is_executable(path("files/."))); + ATF_REQUIRE( is_executable(path("files/.."))); + ATF_REQUIRE( is_executable(path("files/dir"))); + + ATF_REQUIRE(!is_executable(path("non-existent"))); + + ATF_REQUIRE(!is_executable(path("files/reg"))); + ATF_REQUIRE(::chmod("files/reg", 0755) != -1); + ATF_REQUIRE( is_executable(path("files/reg"))); +} + +ATF_TEST_CASE(remove); +ATF_TEST_CASE_HEAD(remove) +{ + set_md_var("descr", "Tests the remove function"); +} +ATF_TEST_CASE_BODY(remove) +{ + using tools::fs::exists; + using tools::fs::path; + using tools::fs::remove; + + create_files(); + + ATF_REQUIRE( exists(path("files/reg"))); + remove(path("files/reg")); + ATF_REQUIRE(!exists(path("files/reg"))); + + ATF_REQUIRE( exists(path("files/dir"))); + ATF_REQUIRE_THROW(tools::system_error, remove(path("files/dir"))); + ATF_REQUIRE( exists(path("files/dir"))); +} + +ATF_TEST_CASE(cleanup); +ATF_TEST_CASE_HEAD(cleanup) +{ + set_md_var("descr", "Tests the cleanup function"); +} +ATF_TEST_CASE_BODY(cleanup) +{ + using tools::fs::cleanup; + + ::mkdir("root", 0755); + ::mkdir("root/dir", 0755); + ::mkdir("root/dir/1", 0100); + ::mkdir("root/dir/2", 0644); + create_file("root/reg"); + + tools::fs::path p("root"); + ATF_REQUIRE(tools::fs::exists(p)); + ATF_REQUIRE(tools::fs::exists(p / "dir")); + ATF_REQUIRE(tools::fs::exists(p / "dir/1")); + ATF_REQUIRE(tools::fs::exists(p / "dir/2")); + ATF_REQUIRE(tools::fs::exists(p / "reg")); + cleanup(p); + ATF_REQUIRE(!tools::fs::exists(p)); +} + +ATF_TEST_CASE(cleanup_eacces_on_root); +ATF_TEST_CASE_HEAD(cleanup_eacces_on_root) +{ + set_md_var("descr", "Tests the cleanup function"); +} +ATF_TEST_CASE_BODY(cleanup_eacces_on_root) +{ + using tools::fs::cleanup; + + ::mkdir("aux", 0755); + ::mkdir("aux/root", 0755); + ATF_REQUIRE(::chmod("aux", 0555) != -1); + + try { + cleanup(tools::fs::path("aux/root")); + ATF_REQUIRE(tools::user::is_root()); + } catch (const tools::system_error& e) { + ATF_REQUIRE(!tools::user::is_root()); + ATF_REQUIRE_EQ(EACCES, e.code()); + } +} + +ATF_TEST_CASE(cleanup_eacces_on_subdir); +ATF_TEST_CASE_HEAD(cleanup_eacces_on_subdir) +{ + set_md_var("descr", "Tests the cleanup function"); +} +ATF_TEST_CASE_BODY(cleanup_eacces_on_subdir) +{ + using tools::fs::cleanup; + + ::mkdir("root", 0755); + ::mkdir("root/1", 0755); + ::mkdir("root/1/2", 0755); + ::mkdir("root/1/2/3", 0755); + ATF_REQUIRE(::chmod("root/1/2", 0555) != -1); + ATF_REQUIRE(::chmod("root/1", 0555) != -1); + + const tools::fs::path p("root"); + cleanup(p); + ATF_REQUIRE(!tools::fs::exists(p)); +} + +ATF_TEST_CASE(change_directory); +ATF_TEST_CASE_HEAD(change_directory) +{ + set_md_var("descr", "Tests the change_directory function"); +} +ATF_TEST_CASE_BODY(change_directory) +{ + using tools::fs::change_directory; + using tools::fs::get_current_dir; + + ::mkdir("files", 0755); + ::mkdir("files/dir", 0755); + create_file("files/reg"); + + const tools::fs::path old = get_current_dir(); + + ATF_REQUIRE_THROW(tools::system_error, + change_directory(tools::fs::path("files/reg"))); + ATF_REQUIRE(get_current_dir() == old); + + tools::fs::path old2 = change_directory(tools::fs::path("files")); + ATF_REQUIRE(old2 == old); + tools::fs::path old3 = change_directory(tools::fs::path("dir")); + ATF_REQUIRE(old3 == old2 / "files"); + tools::fs::path old4 = change_directory(tools::fs::path("../..")); + ATF_REQUIRE(old4 == old3 / "dir"); + ATF_REQUIRE(get_current_dir() == old); +} + +ATF_TEST_CASE(get_current_dir); +ATF_TEST_CASE_HEAD(get_current_dir) +{ + set_md_var("descr", "Tests the get_current_dir function"); +} +ATF_TEST_CASE_BODY(get_current_dir) +{ + using tools::fs::change_directory; + using tools::fs::get_current_dir; + + ::mkdir("files", 0755); + ::mkdir("files/dir", 0755); + create_file("files/reg"); + + tools::fs::path curdir = get_current_dir(); + change_directory(tools::fs::path(".")); + ATF_REQUIRE(get_current_dir() == curdir); + change_directory(tools::fs::path("files")); + ATF_REQUIRE(get_current_dir() == curdir / "files"); + change_directory(tools::fs::path("dir")); + ATF_REQUIRE(get_current_dir() == curdir / "files/dir"); + change_directory(tools::fs::path("..")); + ATF_REQUIRE(get_current_dir() == curdir / "files"); + change_directory(tools::fs::path("..")); + ATF_REQUIRE(get_current_dir() == curdir); +} + +// ------------------------------------------------------------------------ +// Main. +// ------------------------------------------------------------------------ + +ATF_INIT_TEST_CASES(tcs) +{ + // Add the tests for the "path" class. + ATF_ADD_TEST_CASE(tcs, path_normalize); + ATF_ADD_TEST_CASE(tcs, path_is_absolute); + ATF_ADD_TEST_CASE(tcs, path_is_root); + ATF_ADD_TEST_CASE(tcs, path_branch_path); + ATF_ADD_TEST_CASE(tcs, path_leaf_name); + ATF_ADD_TEST_CASE(tcs, path_compare_equal); + ATF_ADD_TEST_CASE(tcs, path_compare_different); + ATF_ADD_TEST_CASE(tcs, path_concat); + ATF_ADD_TEST_CASE(tcs, path_to_absolute); + ATF_ADD_TEST_CASE(tcs, path_op_less); + + // Add the tests for the "file_info" class. + ATF_ADD_TEST_CASE(tcs, file_info_stat); + ATF_ADD_TEST_CASE(tcs, file_info_perms); + + // Add the tests for the "directory" class. + ATF_ADD_TEST_CASE(tcs, directory_read); + ATF_ADD_TEST_CASE(tcs, directory_names); + ATF_ADD_TEST_CASE(tcs, directory_file_info); + + // Add the tests for the "temp_dir" class. + ATF_ADD_TEST_CASE(tcs, temp_dir_raii); + + // Add the tests for the free functions. + ATF_ADD_TEST_CASE(tcs, exists); + ATF_ADD_TEST_CASE(tcs, is_executable); + ATF_ADD_TEST_CASE(tcs, remove); + ATF_ADD_TEST_CASE(tcs, cleanup); + ATF_ADD_TEST_CASE(tcs, cleanup_eacces_on_root); + ATF_ADD_TEST_CASE(tcs, cleanup_eacces_on_subdir); + ATF_ADD_TEST_CASE(tcs, change_directory); + ATF_ADD_TEST_CASE(tcs, get_current_dir); +} diff --git a/unit/atf-src/atf-version/generate-revision.sh b/unit/atf-src/tools/generate-revision.sh similarity index 100% rename from unit/atf-src/atf-version/generate-revision.sh rename to unit/atf-src/tools/generate-revision.sh diff --git a/unit/atf-src/atf-run/io.cpp b/unit/atf-src/tools/io.cpp similarity index 87% rename from unit/atf-src/atf-run/io.cpp rename to unit/atf-src/tools/io.cpp index c99ee34ef2..4cf8f6a4bf 100644 --- a/unit/atf-src/atf-run/io.cpp +++ b/unit/atf-src/tools/io.cpp @@ -34,21 +34,16 @@ extern "C" { #include } +#include #include #include -extern "C" { -#include "../atf-c/error.h" -} - -#include "../atf-c++/detail/auto_array.hpp" -#include "../atf-c++/detail/exceptions.hpp" -#include "../atf-c++/detail/sanity.hpp" - +#include "auto_array.hpp" +#include "exceptions.hpp" #include "io.hpp" -namespace impl = atf::atf_run; -#define IMPL_NAME "atf::atf_run" +namespace impl = tools::io; +#define IMPL_NAME "tools::io" // ------------------------------------------------------------------------ // The "file_handle" class. @@ -62,7 +57,7 @@ impl::file_handle::file_handle(void) : impl::file_handle::file_handle(handle_type h) : m_handle(h) { - PRE(m_handle != invalid_value()); + assert(m_handle != invalid_value()); } impl::file_handle::file_handle(const file_handle& fh) : @@ -96,7 +91,7 @@ impl::file_handle::is_valid(void) void impl::file_handle::close(void) { - PRE(is_valid()); + assert(is_valid()); ::close(m_handle); @@ -106,7 +101,7 @@ impl::file_handle::close(void) impl::file_handle::handle_type impl::file_handle::disown(void) { - PRE(is_valid()); + assert(is_valid()); handle_type h = m_handle; m_handle = invalid_value(); @@ -117,7 +112,7 @@ impl::file_handle::handle_type impl::file_handle::get(void) const { - PRE(is_valid()); + assert(is_valid()); return m_handle; } @@ -125,19 +120,19 @@ impl::file_handle::get(void) void impl::file_handle::posix_remap(handle_type h) { - PRE(is_valid()); + assert(is_valid()); if (m_handle == h) return; if (::dup2(m_handle, h) == -1) - throw system_error(IMPL_NAME "::file_handle::posix_remap", - "dup2(2) failed", errno); + throw tools::system_error(IMPL_NAME "::file_handle::posix_remap", + "dup2(2) failed", errno); if (::close(m_handle) == -1) { ::close(h); - throw system_error(IMPL_NAME "::file_handle::posix_remap", - "close(2) failed", errno); + throw tools::system_error(IMPL_NAME "::file_handle::posix_remap", + "close(2) failed", errno); } m_handle = h; @@ -159,8 +154,8 @@ impl::systembuf::systembuf(handle_type h, std::size_t bufsize) : m_read_buf(NULL), m_write_buf(NULL) { - PRE(m_handle >= 0); - PRE(m_bufsize > 0); + assert(m_handle >= 0); + assert(m_bufsize > 0); try { m_read_buf = new char[bufsize]; @@ -185,7 +180,7 @@ impl::systembuf::~systembuf(void) impl::systembuf::int_type impl::systembuf::underflow(void) { - PRE(gptr() >= egptr()); + assert(gptr() >= egptr()); bool ok; ssize_t cnt = ::read(m_handle, m_read_buf, m_bufsize); @@ -202,7 +197,7 @@ impl::systembuf::underflow(void) impl::systembuf::int_type impl::systembuf::overflow(int c) { - PRE(pptr() >= epptr()); + assert(pptr() >= epptr()); if (sync() == -1) return traits_type::eof(); if (!traits_type::eq_int_type(c, traits_type::eof())) { @@ -248,10 +243,10 @@ safe_poll(struct pollfd fds[], nfds_t nfds, int timeout) if (errno == EINTR) ret = 0; else - throw atf::system_error(IMPL_NAME "::safe_poll", "poll(2) failed", + throw tools::system_error(IMPL_NAME "::safe_poll", "poll(2) failed", errno); } - INV(ret >= 0); + assert(ret >= 0); return ret; } @@ -262,15 +257,15 @@ safe_read(const int fd, void* buffer, const size_t nbytes, int ret; while ((ret = ::read(fd, buffer, nbytes)) == -1 && errno == EINTR) {} if (ret == -1) { - INV(errno != EINTR); + assert(errno != EINTR); if (report_errors) - throw atf::system_error(IMPL_NAME "::safe_read", "read(2) failed", + throw tools::system_error(IMPL_NAME "::safe_read", "read(2) failed", errno); else ret = 0; } - INV(ret >= 0); + assert(ret >= 0); return static_cast< size_t >(ret); } @@ -290,10 +285,10 @@ size_t impl::muxer::read_one(const size_t index, const int fd, std::string& accum, const bool report_errors) { - atf::auto_array< char > buffer(new char[m_bufsize]); + tools::auto_array< char > buffer(new char[m_bufsize]); const size_t nbytes = safe_read(fd, buffer.get(), m_bufsize - 1, report_errors); - INV(nbytes < m_bufsize); + assert(nbytes < m_bufsize); buffer[nbytes] = '\0'; std::string line(accum); @@ -319,7 +314,7 @@ impl::muxer::read_one(const size_t index, const int fd, std::string& accum, void impl::muxer::mux(volatile const bool& terminate) { - atf::auto_array< struct pollfd > poll_fds(new struct pollfd[m_nfds]); + tools::auto_array< struct pollfd > poll_fds(new struct pollfd[m_nfds]); for (size_t i = 0; i < m_nfds; i++) { poll_fds[i].fd = m_fds[i]; poll_fds[i].events = POLLIN; @@ -339,7 +334,7 @@ impl::muxer::mux(volatile const bool& terminate) // a call to the flush method. poll_fds[i].events = 0; - INV(nactive >= 1); + assert(nactive >= 1); nactive--; } else if (poll_fds[i].revents & (POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI)) { diff --git a/unit/atf-src/atf-run/io.hpp b/unit/atf-src/tools/io.hpp similarity index 96% rename from unit/atf-src/atf-run/io.hpp rename to unit/atf-src/tools/io.hpp index b8ff59a808..3fb417b8db 100644 --- a/unit/atf-src/atf-run/io.hpp +++ b/unit/atf-src/tools/io.hpp @@ -27,20 +27,18 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#if !defined(_ATF_RUN_IO_HPP_) -#define _ATF_RUN_IO_HPP_ +#if !defined(TOOLS_IO_HPP) +#define TOOLS_IO_HPP #include #include #include +#include "auto_array.hpp" #include "fs.hpp" -#include "../atf-c++/detail/auto_array.hpp" -#include "../atf-c++/noncopyable.hpp" - -namespace atf { -namespace atf_run { +namespace tools { +namespace io { // ------------------------------------------------------------------------ // The "file_handle" class. @@ -254,8 +252,12 @@ private: //! However, it is not copyable to avoid introducing inconsistences with //! the on-disk file and the in-memory buffers. //! -class systembuf : public std::streambuf, atf::noncopyable +class systembuf : public std::streambuf { + // Non-copyable. + systembuf(const systembuf&); + systembuf& operator=(const systembuf&); + public: typedef int handle_type; @@ -374,8 +376,12 @@ protected: //! this happens, the buffer eventually empties and the system blocks //! until the writer generates some data. //! -class pistream : public std::istream, noncopyable +class pistream : public std::istream { + // Non-copyable. + pistream(const pistream&); + pistream& operator=(const pistream&); + //! //! \brief The systembuf object used to manage this stream's data. //! @@ -400,12 +406,16 @@ public: // The "muxer" class. // ------------------------------------------------------------------------ -class muxer : noncopyable { +class muxer { + // Non-copyable. + muxer(const muxer&); + muxer& operator=(const muxer&); + const int* m_fds; const size_t m_nfds; const size_t m_bufsize; - atf::auto_array< std::string > m_buffers; + tools::auto_array< std::string > m_buffers; protected: virtual void line_callback(const size_t, const std::string&) = 0; @@ -420,7 +430,7 @@ public: void flush(void); }; -} // namespace atf_run -} // namespace atf +} // namespace io +} // namespace tools -#endif // !defined(_ATF_RUN_IO_HPP_) +#endif // !defined(TOOLS_IO_HPP) diff --git a/unit/atf-src/atf-run/io_test.cpp b/unit/atf-src/tools/io_test.cpp similarity index 95% rename from unit/atf-src/atf-run/io_test.cpp rename to unit/atf-src/tools/io_test.cpp index 03fc97e82e..b55428f282 100644 --- a/unit/atf-src/atf-run/io_test.cpp +++ b/unit/atf-src/tools/io_test.cpp @@ -35,6 +35,7 @@ extern "C" { #include } +#include #include #include #include @@ -44,8 +45,7 @@ extern "C" { #include #include -#include "../atf-c++/detail/sanity.hpp" -#include "../atf-c++/macros.hpp" +#include #include "io.hpp" #include "signals.hpp" @@ -90,7 +90,7 @@ static void systembuf_test_read(std::size_t length, std::size_t bufsize) { - using atf::atf_run::systembuf; + using tools::io::systembuf; std::ofstream f("test_read.txt"); systembuf_write_data(f, length); @@ -109,7 +109,7 @@ static void systembuf_test_write(std::size_t length, std::size_t bufsize) { - using atf::atf_run::systembuf; + using tools::io::systembuf; int fd = ::open("test_write.txt", O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); @@ -136,7 +136,7 @@ ATF_TEST_CASE_HEAD(file_handle_ctor) } ATF_TEST_CASE_BODY(file_handle_ctor) { - using atf::atf_run::file_handle; + using tools::io::file_handle; file_handle fh1; ATF_REQUIRE(!fh1.is_valid()); @@ -153,7 +153,7 @@ ATF_TEST_CASE_HEAD(file_handle_copy) } ATF_TEST_CASE_BODY(file_handle_copy) { - using atf::atf_run::file_handle; + using tools::io::file_handle; file_handle fh1; file_handle fh2(STDOUT_FILENO); @@ -176,7 +176,7 @@ ATF_TEST_CASE_HEAD(file_handle_get) } ATF_TEST_CASE_BODY(file_handle_get) { - using atf::atf_run::file_handle; + using tools::io::file_handle; file_handle fh1(STDOUT_FILENO); ATF_REQUIRE_EQ(fh1.get(), STDOUT_FILENO); @@ -189,7 +189,7 @@ ATF_TEST_CASE_HEAD(file_handle_posix_remap) } ATF_TEST_CASE_BODY(file_handle_posix_remap) { - using atf::atf_run::file_handle; + using tools::io::file_handle; int pfd[2]; @@ -282,9 +282,9 @@ ATF_TEST_CASE_HEAD(pistream) } ATF_TEST_CASE_BODY(pistream) { - using atf::atf_run::file_handle; - using atf::atf_run::pistream; - using atf::atf_run::systembuf; + using tools::io::file_handle; + using tools::io::pistream; + using tools::io::systembuf; int fds[2]; ATF_REQUIRE(::pipe(fds) != -1); @@ -321,7 +321,7 @@ check_stream(std::ostream& os) os.clear(); } -class mock_muxer : public atf::atf_run::muxer { +class mock_muxer : public tools::io::muxer { void line_callback(const size_t index, const std::string& line) { // The following should be enabled but causes the output to be so big @@ -349,7 +349,7 @@ public: static bool child_finished = false; static void sigchld_handler(int signo) { - INV(signo == SIGCHLD); + assert(signo == SIGCHLD); child_finished = true; } @@ -381,7 +381,7 @@ muxer_test(const size_t bufsize, const size_t iterations) ATF_REQUIRE(pipe(pipeout) != -1); ATF_REQUIRE(pipe(pipeerr) != -1); - atf::atf_run::signal_programmer sigchld(SIGCHLD, sigchld_handler); + tools::signals::signal_programmer sigchld(SIGCHLD, sigchld_handler); std::cout.flush(); std::cerr.flush(); @@ -391,7 +391,7 @@ muxer_test(const size_t bufsize, const size_t iterations) if (pid == 0) { sigchld.unprogram(); child_printer(pipeout, pipeerr, iterations); - UNREACHABLE; + std::abort(); } ::close(pipeout[1]); ::close(pipeerr[1]); diff --git a/unit/atf-src/atf-run/misc_helpers.cpp b/unit/atf-src/tools/misc_helpers.cpp similarity index 86% rename from unit/atf-src/atf-run/misc_helpers.cpp rename to unit/atf-src/tools/misc_helpers.cpp index abc9a4a945..8ec4ddefcd 100644 --- a/unit/atf-src/atf-run/misc_helpers.cpp +++ b/unit/atf-src/tools/misc_helpers.cpp @@ -41,12 +41,11 @@ extern "C" { #include #include -#include "atf-c++/macros.hpp" +#include -#include "atf-c++/detail/env.hpp" -#include "atf-c++/detail/fs.hpp" -#include "atf-c++/detail/process.hpp" -#include "atf-c++/detail/sanity.hpp" +#include "env.hpp" +#include "fs.hpp" +#include "process.hpp" // ------------------------------------------------------------------------ // Auxiliary functions. @@ -63,7 +62,7 @@ touch(const std::string& path) } // ------------------------------------------------------------------------ -// Helper tests for "t_integration". +// Helper tests for "atf-run_test". // ------------------------------------------------------------------------ ATF_TEST_CASE(pass); @@ -127,7 +126,7 @@ ATF_TEST_CASE_BODY(mux_streams) std::cerr << "stderr " << i << "\n"; break; default: - UNREACHABLE; + std::abort(); } } } @@ -151,11 +150,11 @@ ATF_TEST_CASE_HEAD(env_list) } ATF_TEST_CASE_BODY(env_list) { - const atf::process::status s = - atf::process::exec(atf::fs::path("env"), - atf::process::argv_array("env", NULL), - atf::process::stream_inherit(), - atf::process::stream_inherit()); + const tools::process::status s = + tools::process::exec(tools::fs::path("env"), + tools::process::argv_array("env", NULL), + tools::process::stream_inherit(), + tools::process::stream_inherit()); ATF_REQUIRE(s.exited()); ATF_REQUIRE(s.exitstatus() == EXIT_SUCCESS); } @@ -167,10 +166,10 @@ ATF_TEST_CASE_HEAD(env_home) } ATF_TEST_CASE_BODY(env_home) { - ATF_REQUIRE(atf::env::has("HOME")); - atf::fs::path p(atf::env::get("HOME")); - atf::fs::file_info fi1(p); - atf::fs::file_info fi2(atf::fs::path(".")); + ATF_REQUIRE(tools::env::has("HOME")); + tools::fs::path p(tools::env::get("HOME")); + tools::fs::file_info fi1(p); + tools::fs::file_info fi2(tools::fs::path(".")); ATF_REQUIRE_EQ(fi1.get_device(), fi2.get_device()); ATF_REQUIRE_EQ(fi1.get_inode(), fi2.get_inode()); } @@ -225,7 +224,7 @@ ATF_TEST_CASE_BODY(cleanup_states) } ATF_TEST_CASE_CLEANUP(cleanup_states) { - atf::fs::remove(atf::fs::path(get_config_var("statedir") + "/to-delete")); + tools::fs::remove(tools::fs::path(get_config_var("statedir") + "/to-delete")); } ATF_TEST_CASE_WITH_CLEANUP(cleanup_curdir); @@ -367,15 +366,41 @@ ATF_TEST_CASE_BODY(use_fs) touch("test-file"); } +// ------------------------------------------------------------------------ +// Helper tests for "atf-report_test". +// ------------------------------------------------------------------------ + +ATF_TEST_CASE(diff); +ATF_TEST_CASE_HEAD(diff) +{ + set_md_var("descr", "Helper test case for the t_integration program"); +} +ATF_TEST_CASE_BODY(diff) +{ + std::cout << "--- a 2007-11-04 14:00:41.000000000 +0100\n"; + std::cout << "+++ b 2007-11-04 14:00:48.000000000 +0100\n"; + std::cout << "@@ -1,7 +1,7 @@\n"; + std::cout << " This test is meant to simulate a diff.\n"; + std::cout << " Blank space at beginning of context lines must be " + "preserved.\n"; + std::cout << " \n"; + std::cout << "-First original line.\n"; + std::cout << "-Second original line.\n"; + std::cout << "+First modified line.\n"; + std::cout << "+Second modified line.\n"; + std::cout << " \n"; + std::cout << " EOF\n"; +} + // ------------------------------------------------------------------------ // Main. // ------------------------------------------------------------------------ ATF_INIT_TEST_CASES(tcs) { - std::string which = atf::env::get("TESTCASE"); + std::string which = tools::env::get("TESTCASE"); - // Add helper tests for t_integration. + // Add helper tests for atf-run_test. if (which == "pass") ATF_ADD_TEST_CASE(tcs, pass); if (which == "config") @@ -416,4 +441,8 @@ ATF_INIT_TEST_CASES(tcs) ATF_ADD_TEST_CASE(tcs, timeout_forkexit); if (which == "use_fs") ATF_ADD_TEST_CASE(tcs, use_fs); + + // Add helper tests for atf-report_test. + if (which == "diff") + ATF_ADD_TEST_CASE(tcs, diff); } diff --git a/unit/atf-src/atf-c++/detail/parser.cpp b/unit/atf-src/tools/parser.cpp similarity index 95% rename from unit/atf-src/atf-c++/detail/parser.cpp rename to unit/atf-src/tools/parser.cpp index 7e7f680c57..e6b3a3b750 100644 --- a/unit/atf-src/atf-c++/detail/parser.cpp +++ b/unit/atf-src/tools/parser.cpp @@ -27,14 +27,14 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // +#include #include #include "parser.hpp" -#include "sanity.hpp" #include "text.hpp" -namespace impl = atf::parser; -#define IMPL_NAME "atf::parser" +namespace impl = tools::parser; +#define IMPL_NAME "tools::parser" // ------------------------------------------------------------------------ // The "parse_error" class. @@ -68,7 +68,7 @@ impl::parse_error::what(void) impl::parse_error::operator std::string(void) const { - return atf::text::to_string(first) + ": " + second; + return tools::text::to_string(first) + ": " + second; } // ------------------------------------------------------------------------ @@ -91,7 +91,7 @@ impl::parse_errors::what(void) const throw() { try { - m_msg = atf::text::join(*this, "\n"); + m_msg = tools::text::join(*this, "\n"); return m_msg.c_str(); } catch (...) { return "Could not format messages for parsing errors."; @@ -204,7 +204,7 @@ const std::string& impl::header_entry::get_attr(const std::string& n) const { attrs_map::const_iterator iter = m_attrs.find(n); - PRE(iter != m_attrs.end()); + assert(iter != m_attrs.end()); return (*iter).second; } @@ -284,7 +284,7 @@ write(std::ostream& os, const impl::header_entry& he) impl::attrs_map as = he.attrs(); for (impl::attrs_map::const_iterator iter = as.begin(); iter != as.end(); iter++) { - PRE((*iter).second.find('\"') == std::string::npos); + assert((*iter).second.find('\"') == std::string::npos); line += "; " + (*iter).first + "=\"" + (*iter).second + "\""; } @@ -347,9 +347,9 @@ impl::read_headers(std::istream& is, size_t curline) void impl::write_headers(const impl::headers_map& hm, std::ostream& os) { - PRE(!hm.empty()); + assert(!hm.empty()); headers_map::const_iterator ct = hm.find("Content-Type"); - PRE(ct != hm.end()); + assert(ct != hm.end()); header::write(os, (*ct).second); for (headers_map::const_iterator iter = hm.begin(); iter != hm.end(); iter++) { @@ -376,7 +376,7 @@ impl::validate_content_type(const impl::headers_map& hm, const std::string& fmt, if (!he.has_attr("version")) throw format_error("Could not determine version"); - const std::string& vstr = atf::text::to_string(version); + const std::string& vstr = tools::text::to_string(version); if (he.get_attr("version") != vstr) throw format_error("Mismatched version: expected `" + vstr + "' but got `" + diff --git a/unit/atf-src/atf-c++/detail/parser.hpp b/unit/atf-src/tools/parser.hpp similarity index 98% rename from unit/atf-src/atf-c++/detail/parser.hpp rename to unit/atf-src/tools/parser.hpp index f1595f531f..eb00cb466d 100644 --- a/unit/atf-src/atf-c++/detail/parser.hpp +++ b/unit/atf-src/tools/parser.hpp @@ -27,8 +27,8 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#if !defined(_ATF_CXX_PARSER_HPP_) -#define _ATF_CXX_PARSER_HPP_ +#if !defined(TOOLS_PARSER_HPP) +#define TOOLS_PARSER_HPP #include #include @@ -38,7 +38,7 @@ #include #include -namespace atf { +namespace tools { namespace parser { // ------------------------------------------------------------------------ @@ -259,7 +259,7 @@ tokenizer< IS >::next(void) t = token(m_lineno, m_text_type, text); quoted = true; } else { - m_is.unget(); + m_is.putback(ch); done = true; } } else { @@ -271,13 +271,13 @@ tokenizer< IS >::next(void) t = token(m_lineno, (*idelim).second, std::string("") + ch); else - m_is.unget(); + m_is.putback(ch); } else if (ch == '\n') { done = true; if (text.empty()) t = token(m_lineno, m_nl_type, "<>"); else - m_is.unget(); + m_is.putback(ch); } else if (m_skipws && (ch == ' ' || ch == '\t')) { if (!text.empty()) done = true; @@ -602,6 +602,6 @@ void write_headers(const headers_map&, std::ostream&); void validate_content_type(const headers_map&, const std::string&, int); } // namespace parser -} // namespace atf +} // namespace tools -#endif // !defined(_ATF_CXX_PARSER_HPP_) +#endif // !defined(TOOLS_PARSER_HPP) diff --git a/unit/atf-src/atf-c++/detail/parser_test.cpp b/unit/atf-src/tools/parser_test.cpp similarity index 93% rename from unit/atf-src/atf-c++/detail/parser_test.cpp rename to unit/atf-src/tools/parser_test.cpp index 491c014579..434a1a6780 100644 --- a/unit/atf-src/atf-c++/detail/parser_test.cpp +++ b/unit/atf-src/tools/parser_test.cpp @@ -29,7 +29,7 @@ #include -#include "../macros.hpp" +#include #include "parser.hpp" #include "test_helpers.hpp" @@ -45,7 +45,7 @@ ATF_TEST_CASE_HEAD(parse_error_to_string) } ATF_TEST_CASE_BODY(parse_error_to_string) { - using atf::parser::parse_error; + using tools::parser::parse_error; const parse_error e(123, "This is the message"); ATF_REQUIRE_EQ("123: This is the message", std::string(e)); @@ -62,8 +62,8 @@ ATF_TEST_CASE_HEAD(parse_errors_what) } ATF_TEST_CASE_BODY(parse_errors_what) { - using atf::parser::parse_error; - using atf::parser::parse_errors; + using tools::parser::parse_error; + using tools::parser::parse_errors; parse_errors es; es.push_back(parse_error(2, "Second error")); @@ -83,7 +83,7 @@ ATF_TEST_CASE_HEAD(token_getters) } ATF_TEST_CASE_BODY(token_getters) { - using atf::parser::token; + using tools::parser::token; { token t(10, 0); @@ -120,21 +120,21 @@ ATF_TEST_CASE_BODY(token_getters) #define EXPECT(tkz, ttype, ttext) \ do { \ - atf::parser::token t = tkz.next(); \ + tools::parser::token t = tkz.next(); \ ATF_REQUIRE(t.type() == ttype); \ ATF_REQUIRE_EQ(t.text(), ttext); \ } while (false); namespace minimal { - static const atf::parser::token_type eof_type = 0; - static const atf::parser::token_type nl_type = 1; - static const atf::parser::token_type word_type = 2; + static const tools::parser::token_type eof_type = 0; + static const tools::parser::token_type nl_type = 1; + static const tools::parser::token_type word_type = 2; - class tokenizer : public atf::parser::tokenizer< std::istream > { + class tokenizer : public tools::parser::tokenizer< std::istream > { public: tokenizer(std::istream& is, bool skipws) : - atf::parser::tokenizer< std::istream > + tools::parser::tokenizer< std::istream > (is, skipws, eof_type, nl_type, word_type) { } @@ -144,17 +144,17 @@ namespace minimal { namespace delims { - static const atf::parser::token_type eof_type = 0; - static const atf::parser::token_type nl_type = 1; - static const atf::parser::token_type word_type = 2; - static const atf::parser::token_type plus_type = 3; - static const atf::parser::token_type minus_type = 4; - static const atf::parser::token_type equal_type = 5; + static const tools::parser::token_type eof_type = 0; + static const tools::parser::token_type nl_type = 1; + static const tools::parser::token_type word_type = 2; + static const tools::parser::token_type plus_type = 3; + static const tools::parser::token_type minus_type = 4; + static const tools::parser::token_type equal_type = 5; - class tokenizer : public atf::parser::tokenizer< std::istream > { + class tokenizer : public tools::parser::tokenizer< std::istream > { public: tokenizer(std::istream& is, bool skipws) : - atf::parser::tokenizer< std::istream > + tools::parser::tokenizer< std::istream > (is, skipws, eof_type, nl_type, word_type) { add_delim('+', plus_type); @@ -167,17 +167,17 @@ namespace delims { namespace keywords { - static const atf::parser::token_type eof_type = 0; - static const atf::parser::token_type nl_type = 1; - static const atf::parser::token_type word_type = 2; - static const atf::parser::token_type var_type = 3; - static const atf::parser::token_type loop_type = 4; - static const atf::parser::token_type endloop_type = 5; + static const tools::parser::token_type eof_type = 0; + static const tools::parser::token_type nl_type = 1; + static const tools::parser::token_type word_type = 2; + static const tools::parser::token_type var_type = 3; + static const tools::parser::token_type loop_type = 4; + static const tools::parser::token_type endloop_type = 5; - class tokenizer : public atf::parser::tokenizer< std::istream > { + class tokenizer : public tools::parser::tokenizer< std::istream > { public: tokenizer(std::istream& is, bool skipws) : - atf::parser::tokenizer< std::istream > + tools::parser::tokenizer< std::istream > (is, skipws, eof_type, nl_type, word_type) { add_keyword("var", var_type); @@ -190,15 +190,15 @@ namespace keywords { namespace quotes { - static const atf::parser::token_type eof_type = 0; - static const atf::parser::token_type nl_type = 1; - static const atf::parser::token_type word_type = 2; - static const atf::parser::token_type dblquote_type = 3; + static const tools::parser::token_type eof_type = 0; + static const tools::parser::token_type nl_type = 1; + static const tools::parser::token_type word_type = 2; + static const tools::parser::token_type dblquote_type = 3; - class tokenizer : public atf::parser::tokenizer< std::istream > { + class tokenizer : public tools::parser::tokenizer< std::istream > { public: tokenizer(std::istream& is, bool skipws) : - atf::parser::tokenizer< std::istream > + tools::parser::tokenizer< std::istream > (is, skipws, eof_type, nl_type, word_type) { add_quote('"', dblquote_type); @@ -739,9 +739,9 @@ public: void read(void) { - std::pair< size_t, atf::parser::headers_map > hml = - atf::parser::read_headers(m_is, 1); - atf::parser::validate_content_type(hml.second, + std::pair< size_t, tools::parser::headers_map > hml = + tools::parser::read_headers(m_is, 1); + tools::parser::validate_content_type(hml.second, "application/X-atf-headers-test", 1234); } diff --git a/unit/atf-src/atf-run/pass_helper.cpp b/unit/atf-src/tools/pass_helper.cpp similarity index 98% rename from unit/atf-src/atf-run/pass_helper.cpp rename to unit/atf-src/tools/pass_helper.cpp index b752b131b3..4fa75b4e93 100644 --- a/unit/atf-src/atf-run/pass_helper.cpp +++ b/unit/atf-src/tools/pass_helper.cpp @@ -27,7 +27,7 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#include "atf-c++/macros.hpp" +#include ATF_TEST_CASE(main); ATF_TEST_CASE_HEAD(main) diff --git a/unit/atf-src/tools/process.cpp b/unit/atf-src/tools/process.cpp new file mode 100644 index 0000000000..987a60e14e --- /dev/null +++ b/unit/atf-src/tools/process.cpp @@ -0,0 +1,492 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2008 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +extern "C" { +#include +#include + +#include +#include +} + +#include +#include +#include +#include +#include + +#include "defs.hpp" +#include "exceptions.hpp" +#include "text.hpp" +#include "process.hpp" + +namespace detail = tools::process::detail; +namespace impl = tools::process; +#define IMPL_NAME "tools::process" + +// ------------------------------------------------------------------------ +// Auxiliary functions. +// ------------------------------------------------------------------------ + +template< class C > +tools::auto_array< const char* > +collection_to_argv(const C& c) +{ + tools::auto_array< const char* > argv(new const char*[c.size() + 1]); + + std::size_t pos = 0; + for (typename C::const_iterator iter = c.begin(); iter != c.end(); + iter++) { + argv[pos] = (*iter).c_str(); + pos++; + } + assert(pos == c.size()); + argv[pos] = NULL; + + return argv; +} + +template< class C > +C +argv_to_collection(const char* const* argv) +{ + C c; + + for (const char* const* iter = argv; *iter != NULL; iter++) + c.push_back(std::string(*iter)); + + return c; +} + +static +void +safe_dup(const int oldfd, const int newfd) +{ + if (oldfd != newfd) { + if (dup2(oldfd, newfd) == -1) { + throw tools::system_error(IMPL_NAME "::safe_dup", + "Could not allocate file descriptor", + errno); + } else { + ::close(oldfd); + } + } +} + +static +int +const_execvp(const char *file, const char *const *argv) +{ +#define UNCONST(a) ((void *)(unsigned long)(const void *)(a)) + return ::execvp(file, (char* const*)(UNCONST(argv))); +#undef UNCONST +} + +void +detail::do_exec(void *v) +{ + struct exec_args *ea = reinterpret_cast(v); + + if (ea->m_prehook != NULL) + ea->m_prehook(); + + const int ret = const_execvp(ea->m_prog.c_str(), ea->m_argv.exec_argv()); + const int errnocopy = errno; + assert(ret == -1); + std::cerr << "exec(" << ea->m_prog.str() << ") failed: " + << std::strerror(errnocopy) << "\n"; + std::exit(EXIT_FAILURE); +} + +// ------------------------------------------------------------------------ +// The "argv_array" type. +// ------------------------------------------------------------------------ + +impl::argv_array::argv_array(void) : + m_exec_argv(collection_to_argv(m_args)) +{ +} + +impl::argv_array::argv_array(const char* arg1, ...) +{ + m_args.push_back(arg1); + + { + va_list ap; + const char* nextarg; + + va_start(ap, arg1); + while ((nextarg = va_arg(ap, const char*)) != NULL) + m_args.push_back(nextarg); + va_end(ap); + } + + ctor_init_exec_argv(); +} + +impl::argv_array::argv_array(const char* const* ca) : + m_args(argv_to_collection< args_vector >(ca)), + m_exec_argv(collection_to_argv(m_args)) +{ +} + +impl::argv_array::argv_array(const argv_array& a) : + m_args(a.m_args), + m_exec_argv(collection_to_argv(m_args)) +{ +} + +void +impl::argv_array::ctor_init_exec_argv(void) +{ + m_exec_argv = collection_to_argv(m_args); +} + +const char* const* +impl::argv_array::exec_argv(void) + const +{ + return m_exec_argv.get(); +} + +impl::argv_array::size_type +impl::argv_array::size(void) + const +{ + return m_args.size(); +} + +const char* +impl::argv_array::operator[](int idx) + const +{ + return m_args[idx].c_str(); +} + +impl::argv_array::const_iterator +impl::argv_array::begin(void) + const +{ + return m_args.begin(); +} + +impl::argv_array::const_iterator +impl::argv_array::end(void) + const +{ + return m_args.end(); +} + +impl::argv_array& +impl::argv_array::operator=(const argv_array& a) +{ + if (this != &a) { + m_args = a.m_args; + m_exec_argv = collection_to_argv(m_args); + } + return *this; +} + +// ------------------------------------------------------------------------ +// The "stream" types. +// ------------------------------------------------------------------------ + +impl::stream_capture::stream_capture(void) +{ + for (int i = 0; i < 2; i++) + m_pipefds[i] = -1; +} + +impl::stream_capture::~stream_capture(void) +{ + for (int i = 0; i < 2; i++) + if (m_pipefds[i] != -1) + ::close(m_pipefds[i]); +} + +void +impl::stream_capture::prepare(void) +{ + if (pipe(m_pipefds) == -1) + throw system_error(IMPL_NAME "::stream_capture::prepare", + "Failed to create pipe", errno); +} + +int +impl::stream_capture::connect_parent(void) +{ + ::close(m_pipefds[1]); m_pipefds[1] = -1; + const int fd = m_pipefds[0]; + m_pipefds[0] = -1; + return fd; +} + +void +impl::stream_capture::connect_child(const int fd) +{ + ::close(m_pipefds[0]); m_pipefds[0] = -1; + if (m_pipefds[1] != fd) { + safe_dup(m_pipefds[1], fd); + } + m_pipefds[1] = -1; +} + +impl::stream_connect::stream_connect(const int src_fd, const int tgt_fd) : + m_src_fd(src_fd), m_tgt_fd(tgt_fd) +{ +} + +void +impl::stream_connect::prepare(void) +{ +} + +int +impl::stream_connect::connect_parent(void) +{ + return -1; +} + +void +impl::stream_connect::connect_child(const int fd ATF_DEFS_ATTRIBUTE_UNUSED) +{ + safe_dup(m_tgt_fd, m_src_fd); +} + +impl::stream_inherit::stream_inherit(void) +{ +} + +void +impl::stream_inherit::prepare(void) +{ +} + +int +impl::stream_inherit::connect_parent(void) +{ + return -1; +} + +void +impl::stream_inherit::connect_child(const int fd ATF_DEFS_ATTRIBUTE_UNUSED) +{ +} + +impl::stream_redirect_fd::stream_redirect_fd(const int fd) : + m_fd(fd) +{ +} + +void +impl::stream_redirect_fd::prepare(void) +{ +} + +int +impl::stream_redirect_fd::connect_parent(void) +{ + return -1; +} + +void +impl::stream_redirect_fd::connect_child(const int fd) +{ + safe_dup(m_fd, fd); +} + +impl::stream_redirect_path::stream_redirect_path(const tools::fs::path& p) : + m_path(p) +{ +} + +void +impl::stream_redirect_path::prepare(void) +{ +} + +int +impl::stream_redirect_path::connect_parent(void) +{ + return -1; +} + +void +impl::stream_redirect_path::connect_child(const int fd) +{ + const int aux = ::open(m_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (aux == -1) + throw system_error(IMPL_NAME "::stream_redirect_path::connect_child", + "Could not create " + m_path.str(), errno); + else + safe_dup(aux, fd); +} + +// ------------------------------------------------------------------------ +// The "status" type. +// ------------------------------------------------------------------------ + +impl::status::status(int s) : + m_status(s) +{ +} + +impl::status::~status(void) +{ +} + +bool +impl::status::exited(void) + const +{ + int mutable_status = m_status; + return WIFEXITED(mutable_status); +} + +int +impl::status::exitstatus(void) + const +{ + assert(exited()); + int mutable_status = m_status; + return WEXITSTATUS(mutable_status); +} + +bool +impl::status::signaled(void) + const +{ + int mutable_status = m_status; + return WIFSIGNALED(mutable_status); +} + +int +impl::status::termsig(void) + const +{ + assert(signaled()); + int mutable_status = m_status; + return WTERMSIG(mutable_status); +} + +bool +impl::status::coredump(void) + const +{ + assert(signaled()); +#if defined(WCOREDUMP) + int mutable_status = m_status; + return WCOREDUMP(mutable_status); +#else + return false; +#endif +} + +// ------------------------------------------------------------------------ +// The "child" type. +// ------------------------------------------------------------------------ + +impl::child::child(const pid_t pid_arg, const int stdout_fd_arg, + const int stderr_fd_arg) : + m_pid(pid_arg), + m_stdout(stdout_fd_arg), + m_stderr(stderr_fd_arg), + m_waited(false) +{ +} + +impl::child::~child(void) +{ + if (!m_waited) { + ::kill(m_pid, SIGTERM); + (void)wait(); + + if (m_stdout != -1) + ::close(m_stdout); + if (m_stderr != -1) + ::close(m_stderr); + } +} + +impl::status +impl::child::wait(void) +{ + int s; + + if (::waitpid(m_pid, &s, 0) == -1) + throw system_error(IMPL_NAME "::child::wait", "Failed waiting for " + "process " + text::to_string(m_pid), errno); + + if (m_stdout != -1) + ::close(m_stdout); m_stdout = -1; + if (m_stderr != -1) + ::close(m_stderr); m_stderr = -1; + + m_waited = true; + return status(s); +} + +pid_t +impl::child::pid(void) + const +{ + return m_pid; +} + +int +impl::child::stdout_fd(void) +{ + return m_stdout; +} + +int +impl::child::stderr_fd(void) +{ + return m_stderr; +} + +// ------------------------------------------------------------------------ +// Free functions. +// ------------------------------------------------------------------------ + +void +detail::flush_streams(void) +{ + // This is a weird hack to ensure that the output of the parent process + // is flushed before executing a child which prevents, for example, the + // output of the atf-run hooks to appear before the output of atf-run + // itself. + // + // TODO: This should only be executed when inheriting the stdout or + // stderr file descriptors. However, the flushing is specific to the + // iostreams, so we cannot do it from the C library where all the process + // logic is performed. Come up with a better design. + std::cout.flush(); + std::cerr.flush(); +} diff --git a/unit/atf-src/tools/process.hpp b/unit/atf-src/tools/process.hpp new file mode 100644 index 0000000000..2ebd865a8d --- /dev/null +++ b/unit/atf-src/tools/process.hpp @@ -0,0 +1,324 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2008 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#if !defined(TOOLS_PROCESS_HPP) +#define TOOLS_PROCESS_HPP + +extern "C" { +#include + +#include +} + +#include +#include +#include +#include +#include + +#include "auto_array.hpp" +#include "exceptions.hpp" +#include "fs.hpp" + +namespace tools { +namespace process { + +class child; +class status; + +// ------------------------------------------------------------------------ +// The "argv_array" type. +// ------------------------------------------------------------------------ + +class argv_array { + typedef std::vector< std::string > args_vector; + args_vector m_args; + + // TODO: This is immutable, so we should be able to use + // std::tr1::shared_array instead when it becomes widely available. + // The reason would be to remove all copy constructors and assignment + // operators from this class. + auto_array< const char* > m_exec_argv; + void ctor_init_exec_argv(void); + +public: + typedef args_vector::const_iterator const_iterator; + typedef args_vector::size_type size_type; + + argv_array(void); + argv_array(const char*, ...); + explicit argv_array(const char* const*); + template< class C > explicit argv_array(const C&); + argv_array(const argv_array&); + + const char* const* exec_argv(void) const; + size_type size(void) const; + const char* operator[](int) const; + + const_iterator begin(void) const; + const_iterator end(void) const; + + argv_array& operator=(const argv_array&); +}; + +template< class C > +argv_array::argv_array(const C& c) +{ + for (typename C::const_iterator iter = c.begin(); iter != c.end(); + iter++) + m_args.push_back(*iter); + ctor_init_exec_argv(); +} + +// ------------------------------------------------------------------------ +// The "stream" types. +// ------------------------------------------------------------------------ + +class stream_capture { + int m_pipefds[2]; + + // Allow access to the getters. + template< class OutStream, class ErrStream > friend + child fork(void (*)(void*), OutStream, ErrStream, void*); + template< class OutStream, class ErrStream > friend + status exec(const tools::fs::path&, const argv_array&, + const OutStream&, const ErrStream&, void (*)(void)); + + void prepare(void); + int connect_parent(void); + void connect_child(const int); + +public: + stream_capture(void); + ~stream_capture(void); +}; + +class stream_connect { + int m_src_fd; + int m_tgt_fd; + + // Allow access to the getters. + template< class OutStream, class ErrStream > friend + child fork(void (*)(void*), OutStream, ErrStream, void*); + template< class OutStream, class ErrStream > friend + status exec(const tools::fs::path&, const argv_array&, + const OutStream&, const ErrStream&, void (*)(void)); + + void prepare(void); + int connect_parent(void); + void connect_child(const int); + +public: + stream_connect(const int, const int); +}; + +class stream_inherit { + // Allow access to the getters. + template< class OutStream, class ErrStream > friend + child fork(void (*)(void*), OutStream, ErrStream, void*); + template< class OutStream, class ErrStream > friend + status exec(const tools::fs::path&, const argv_array&, + const OutStream&, const ErrStream&, void (*)(void)); + + void prepare(void); + int connect_parent(void); + void connect_child(const int); + +public: + stream_inherit(void); +}; + +class stream_redirect_fd { + int m_fd; + + // Allow access to the getters. + template< class OutStream, class ErrStream > friend + child fork(void (*)(void*), OutStream, ErrStream, void*); + template< class OutStream, class ErrStream > friend + status exec(const tools::fs::path&, const argv_array&, + const OutStream&, const ErrStream&, void (*)(void)); + + void prepare(void); + int connect_parent(void); + void connect_child(const int); + +public: + stream_redirect_fd(const int); +}; + +class stream_redirect_path { + const tools::fs::path m_path; + + // Allow access to the getters. + template< class OutStream, class ErrStream > friend + child fork(void (*)(void*), OutStream, ErrStream, void*); + template< class OutStream, class ErrStream > friend + status exec(const tools::fs::path&, const argv_array&, + const OutStream&, const ErrStream&, void (*)(void)); + + void prepare(void); + int connect_parent(void); + void connect_child(const int); + +public: + stream_redirect_path(const tools::fs::path&); +}; + +// ------------------------------------------------------------------------ +// The "status" type. +// ------------------------------------------------------------------------ + +class status { + int m_status; + + friend class child; + template< class OutStream, class ErrStream > friend + status exec(const tools::fs::path&, const argv_array&, + const OutStream&, const ErrStream&, void (*)(void)); + + status(int); + +public: + ~status(void); + + bool exited(void) const; + int exitstatus(void) const; + + bool signaled(void) const; + int termsig(void) const; + bool coredump(void) const; +}; + +// ------------------------------------------------------------------------ +// The "child" type. +// ------------------------------------------------------------------------ + +class child { + pid_t m_pid; + + int m_stdout; + int m_stderr; + + bool m_waited; + + template< class OutStream, class ErrStream > friend + child fork(void (*)(void*), OutStream, ErrStream, void*); + + child(const pid_t, const int, const int); + +public: + ~child(void); + + status wait(void); + + pid_t pid(void) const; + int stdout_fd(void); + int stderr_fd(void); +}; + +// ------------------------------------------------------------------------ +// Free functions. +// ------------------------------------------------------------------------ + +namespace detail { +void flush_streams(void); + +struct exec_args { + const tools::fs::path m_prog; + const argv_array& m_argv; + void (*m_prehook)(void); +}; + +void do_exec(void *); +} // namespace detail + +// TODO: The void* cookie can probably be templatized, thus also allowing +// const data structures. +template< class OutStream, class ErrStream > +child +fork(void (*start)(void*), OutStream outsb, ErrStream errsb, void* v) +{ + detail::flush_streams(); + + outsb.prepare(); + errsb.prepare(); + + pid_t pid = ::fork(); + if (pid == -1) { + throw system_error("tools::process::child::fork", + "Failed to fork", errno); + } else if (pid == 0) { + try { + outsb.connect_child(STDOUT_FILENO); + errsb.connect_child(STDERR_FILENO); + start(v); + std::abort(); + } catch (...) { + std::cerr << "Unhandled error while running subprocess\n"; + std::exit(EXIT_FAILURE); + } + } else { + const int stdout_fd = outsb.connect_parent(); + const int stderr_fd = errsb.connect_parent(); + return child(pid, stdout_fd, stderr_fd); + } +} + +template< class OutStream, class ErrStream > +status +exec(const tools::fs::path& prog, const argv_array& argv, + const OutStream& outsb, const ErrStream& errsb, + void (*prehook)(void)) +{ + struct detail::exec_args ea = { prog, argv, prehook }; + child c = fork(detail::do_exec, outsb, errsb, &ea); + +again: + try { + return c.wait(); + } catch (const system_error& e) { + if (e.code() == EINTR) + goto again; + else + throw e; + } +} + +template< class OutStream, class ErrStream > +status +exec(const tools::fs::path& prog, const argv_array& argv, + const OutStream& outsb, const ErrStream& errsb) +{ + return exec(prog, argv, outsb, errsb, NULL); +} + +} // namespace process +} // namespace tools + +#endif // !defined(TOOLS_PROCESS_HPP) diff --git a/unit/atf-src/tools/process_helpers.c b/unit/atf-src/tools/process_helpers.c new file mode 100644 index 0000000000..61f1b67c98 --- /dev/null +++ b/unit/atf-src/tools/process_helpers.c @@ -0,0 +1,117 @@ +/* + * Automated Testing Framework (atf) + * + * Copyright (c) 2008 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND + * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +#include /* NO_CHECK_STYLE */ +#include +#include +#include +#include +#include + +static +int +h_echo(const char *msg) +{ + printf("%s\n", msg); + return EXIT_SUCCESS; +} + +static +int +h_exit_failure(void) +{ + return EXIT_FAILURE; +} + +static +int +h_exit_signal(void) +{ + kill(getpid(), SIGKILL); + assert(0); /* NO_CHECK_STYLE */ + return EXIT_FAILURE; +} + +static +int +h_exit_success(void) +{ + return EXIT_SUCCESS; +} + +static +int +h_stdout_stderr(const char *id) +{ + fprintf(stdout, "Line 1 to stdout for %s\n", id); + fprintf(stdout, "Line 2 to stdout for %s\n", id); + fprintf(stderr, "Line 1 to stderr for %s\n", id); + fprintf(stderr, "Line 2 to stderr for %s\n", id); + + return EXIT_SUCCESS; +} + +static +void +check_args(const int argc, const char *const argv[], const int required) +{ + if (argc < required) { + fprintf(stderr, "Usage: %s helper-name [args]\n", argv[0]); + exit(EXIT_FAILURE); + } +} + +int +main(int argc, const char *const argv[]) +{ + int exitcode; + + check_args(argc, argv, 2); + + if (strcmp(argv[1], "echo") == 0) { + check_args(argc, argv, 3); + exitcode = h_echo(argv[2]); + } else if (strcmp(argv[1], "exit-failure") == 0) + exitcode = h_exit_failure(); + else if (strcmp(argv[1], "exit-signal") == 0) + exitcode = h_exit_signal(); + else if (strcmp(argv[1], "exit-success") == 0) + exitcode = h_exit_success(); + else if (strcmp(argv[1], "stdout-stderr") == 0) { + check_args(argc, argv, 3); + exitcode = h_stdout_stderr(argv[2]); + } else { + fprintf(stderr, "%s: Unknown helper %s\n", argv[0], argv[1]); + exitcode = EXIT_FAILURE; + } + + return exitcode; +} diff --git a/unit/atf-src/tools/process_test.cpp b/unit/atf-src/tools/process_test.cpp new file mode 100644 index 0000000000..70da919dd0 --- /dev/null +++ b/unit/atf-src/tools/process_test.cpp @@ -0,0 +1,360 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2008 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#include +#include + +#include + +#include "process.hpp" +#include "test_helpers.hpp" + +// TODO: Testing the fork function is a huge task and I'm afraid of +// copy/pasting tons of stuff from the C version. I'd rather not do that +// until some code can be shared, which cannot happen until the C++ binding +// is cleaned by a fair amount. Instead... just rely (at the moment) on +// the system tests for the tools using this module. + +// ------------------------------------------------------------------------ +// Auxiliary functions. +// ------------------------------------------------------------------------ + +static +std::size_t +array_size(const char* const* array) +{ + std::size_t size = 0; + + for (const char* const* ptr = array; *ptr != NULL; ptr++) + size++; + + return size; +} + +static +tools::process::status +exec_process_helpers(const atf::tests::tc& tc, const char* helper_name) +{ + using tools::process::exec; + + const tools::fs::path helpers = tools::fs::path(tc.get_config_var("srcdir")) / + "process_helpers"; + + std::vector< std::string > argv; + argv.push_back(helpers.leaf_name()); + argv.push_back(helper_name); + + return exec(helpers, + tools::process::argv_array(argv), + tools::process::stream_inherit(), + tools::process::stream_inherit()); +} + +// ------------------------------------------------------------------------ +// Tests for the "argv_array" type. +// ------------------------------------------------------------------------ + +ATF_TEST_CASE(argv_array_init_carray); +ATF_TEST_CASE_HEAD(argv_array_init_carray) +{ + set_md_var("descr", "Tests that argv_array is correctly constructed " + "from a C-style array of strings"); +} +ATF_TEST_CASE_BODY(argv_array_init_carray) +{ + { + const char* const carray[] = { NULL }; + tools::process::argv_array argv(carray); + + ATF_REQUIRE_EQ(argv.size(), 0); + } + + { + const char* const carray[] = { "arg0", NULL }; + tools::process::argv_array argv(carray); + + ATF_REQUIRE_EQ(argv.size(), 1); + ATF_REQUIRE(std::strcmp(argv[0], carray[0]) == 0); + } + + { + const char* const carray[] = { "arg0", "arg1", "arg2", NULL }; + tools::process::argv_array argv(carray); + + ATF_REQUIRE_EQ(argv.size(), 3); + ATF_REQUIRE(std::strcmp(argv[0], carray[0]) == 0); + ATF_REQUIRE(std::strcmp(argv[1], carray[1]) == 0); + ATF_REQUIRE(std::strcmp(argv[2], carray[2]) == 0); + } +} + +ATF_TEST_CASE(argv_array_init_col); +ATF_TEST_CASE_HEAD(argv_array_init_col) +{ + set_md_var("descr", "Tests that argv_array is correctly constructed " + "from a string collection"); +} +ATF_TEST_CASE_BODY(argv_array_init_col) +{ + { + std::vector< std::string > col; + tools::process::argv_array argv(col); + + ATF_REQUIRE_EQ(argv.size(), 0); + } + + { + std::vector< std::string > col; + col.push_back("arg0"); + tools::process::argv_array argv(col); + + ATF_REQUIRE_EQ(argv.size(), 1); + ATF_REQUIRE_EQ(argv[0], col[0]); + } + + { + std::vector< std::string > col; + col.push_back("arg0"); + col.push_back("arg1"); + col.push_back("arg2"); + tools::process::argv_array argv(col); + + ATF_REQUIRE_EQ(argv.size(), 3); + ATF_REQUIRE_EQ(argv[0], col[0]); + ATF_REQUIRE_EQ(argv[1], col[1]); + ATF_REQUIRE_EQ(argv[2], col[2]); + } +} + +ATF_TEST_CASE(argv_array_init_empty); +ATF_TEST_CASE_HEAD(argv_array_init_empty) +{ + set_md_var("descr", "Tests that argv_array is correctly constructed " + "by the default constructor"); +} +ATF_TEST_CASE_BODY(argv_array_init_empty) +{ + tools::process::argv_array argv; + + ATF_REQUIRE_EQ(argv.size(), 0); +} + +ATF_TEST_CASE(argv_array_init_varargs); +ATF_TEST_CASE_HEAD(argv_array_init_varargs) +{ + set_md_var("descr", "Tests that argv_array is correctly constructed " + "from a variable list of arguments"); +} +ATF_TEST_CASE_BODY(argv_array_init_varargs) +{ + { + tools::process::argv_array argv("arg0", NULL); + + ATF_REQUIRE_EQ(argv.size(), 1); + ATF_REQUIRE_EQ(argv[0], std::string("arg0")); + } + + { + tools::process::argv_array argv("arg0", "arg1", "arg2", NULL); + + ATF_REQUIRE_EQ(argv.size(), 3); + ATF_REQUIRE_EQ(argv[0], std::string("arg0")); + ATF_REQUIRE_EQ(argv[1], std::string("arg1")); + ATF_REQUIRE_EQ(argv[2], std::string("arg2")); + } +} + +ATF_TEST_CASE(argv_array_assign); +ATF_TEST_CASE_HEAD(argv_array_assign) +{ + set_md_var("descr", "Tests that assigning an argv_array works"); +} +ATF_TEST_CASE_BODY(argv_array_assign) +{ + using tools::process::argv_array; + + const char* const carray1[] = { "arg1", NULL }; + const char* const carray2[] = { "arg1", "arg2", NULL }; + + std::auto_ptr< argv_array > argv1(new argv_array(carray1)); + std::auto_ptr< argv_array > argv2(new argv_array(carray2)); + + *argv2 = *argv1; + ATF_REQUIRE_EQ(argv2->size(), argv1->size()); + ATF_REQUIRE(std::strcmp((*argv2)[0], (*argv1)[0]) == 0); + + ATF_REQUIRE(argv2->exec_argv() != argv1->exec_argv()); + argv1.release(); + { + const char* const* eargv2 = argv2->exec_argv(); + ATF_REQUIRE(std::strcmp(eargv2[0], carray1[0]) == 0); + ATF_REQUIRE_EQ(eargv2[1], static_cast< const char* >(NULL)); + } + + argv2.release(); +} + +ATF_TEST_CASE(argv_array_copy); +ATF_TEST_CASE_HEAD(argv_array_copy) +{ + set_md_var("descr", "Tests that copying an argv_array constructed from " + "a C-style array of strings works"); +} +ATF_TEST_CASE_BODY(argv_array_copy) +{ + using tools::process::argv_array; + + const char* const carray[] = { "arg0", NULL }; + + std::auto_ptr< argv_array > argv1(new argv_array(carray)); + std::auto_ptr< argv_array > argv2(new argv_array(*argv1)); + + ATF_REQUIRE_EQ(argv2->size(), argv1->size()); + ATF_REQUIRE(std::strcmp((*argv2)[0], (*argv1)[0]) == 0); + + ATF_REQUIRE(argv2->exec_argv() != argv1->exec_argv()); + argv1.release(); + { + const char* const* eargv2 = argv2->exec_argv(); + ATF_REQUIRE(std::strcmp(eargv2[0], carray[0]) == 0); + ATF_REQUIRE_EQ(eargv2[1], static_cast< const char* >(NULL)); + } + + argv2.release(); +} + +ATF_TEST_CASE(argv_array_exec_argv); +ATF_TEST_CASE_HEAD(argv_array_exec_argv) +{ + set_md_var("descr", "Tests that the exec argv provided by an argv_array " + "is correct"); +} +ATF_TEST_CASE_BODY(argv_array_exec_argv) +{ + using tools::process::argv_array; + + { + argv_array argv; + const char* const* eargv = argv.exec_argv(); + ATF_REQUIRE_EQ(array_size(eargv), 0); + ATF_REQUIRE_EQ(eargv[0], static_cast< const char* >(NULL)); + } + + { + const char* const carray[] = { "arg0", NULL }; + argv_array argv(carray); + const char* const* eargv = argv.exec_argv(); + ATF_REQUIRE_EQ(array_size(eargv), 1); + ATF_REQUIRE(std::strcmp(eargv[0], "arg0") == 0); + ATF_REQUIRE_EQ(eargv[1], static_cast< const char* >(NULL)); + } + + { + std::vector< std::string > col; + col.push_back("arg0"); + argv_array argv(col); + const char* const* eargv = argv.exec_argv(); + ATF_REQUIRE_EQ(array_size(eargv), 1); + ATF_REQUIRE(std::strcmp(eargv[0], "arg0") == 0); + ATF_REQUIRE_EQ(eargv[1], static_cast< const char* >(NULL)); + } +} + +ATF_TEST_CASE(argv_array_iter); +ATF_TEST_CASE_HEAD(argv_array_iter) +{ + set_md_var("descr", "Tests that an argv_array can be iterated"); +} +ATF_TEST_CASE_BODY(argv_array_iter) +{ + using tools::process::argv_array; + + std::vector< std::string > vector; + vector.push_back("arg0"); + vector.push_back("arg1"); + vector.push_back("arg2"); + + argv_array argv(vector); + ATF_REQUIRE_EQ(argv.size(), 3); + std::vector< std::string >::size_type pos = 0; + for (argv_array::const_iterator iter = argv.begin(); iter != argv.end(); + iter++) { + ATF_REQUIRE_EQ(*iter, vector[pos]); + pos++; + } +} + +// ------------------------------------------------------------------------ +// Tests cases for the free functions. +// ------------------------------------------------------------------------ + +ATF_TEST_CASE(exec_failure); +ATF_TEST_CASE_HEAD(exec_failure) +{ + set_md_var("descr", "Tests execing a command that reports failure"); +} +ATF_TEST_CASE_BODY(exec_failure) +{ + const tools::process::status s = exec_process_helpers(*this, "exit-failure"); + ATF_REQUIRE(s.exited()); + ATF_REQUIRE_EQ(s.exitstatus(), EXIT_FAILURE); +} + +ATF_TEST_CASE(exec_success); +ATF_TEST_CASE_HEAD(exec_success) +{ + set_md_var("descr", "Tests execing a command that reports success"); +} +ATF_TEST_CASE_BODY(exec_success) +{ + const tools::process::status s = exec_process_helpers(*this, "exit-success"); + ATF_REQUIRE(s.exited()); + ATF_REQUIRE_EQ(s.exitstatus(), EXIT_SUCCESS); +} + +// ------------------------------------------------------------------------ +// Main. +// ------------------------------------------------------------------------ + +ATF_INIT_TEST_CASES(tcs) +{ + // Add the test cases for the "argv_array" type. + ATF_ADD_TEST_CASE(tcs, argv_array_assign); + ATF_ADD_TEST_CASE(tcs, argv_array_copy); + ATF_ADD_TEST_CASE(tcs, argv_array_exec_argv); + ATF_ADD_TEST_CASE(tcs, argv_array_init_carray); + ATF_ADD_TEST_CASE(tcs, argv_array_init_col); + ATF_ADD_TEST_CASE(tcs, argv_array_init_empty); + ATF_ADD_TEST_CASE(tcs, argv_array_init_varargs); + ATF_ADD_TEST_CASE(tcs, argv_array_iter); + + // Add the test cases for the free functions. + ATF_ADD_TEST_CASE(tcs, exec_failure); + ATF_ADD_TEST_CASE(tcs, exec_success); +} diff --git a/unit/atf-src/atf-report/reader.cpp b/unit/atf-src/tools/reader.cpp similarity index 78% rename from unit/atf-src/atf-report/reader.cpp rename to unit/atf-src/tools/reader.cpp index 8f5fde791c..67fce662a1 100644 --- a/unit/atf-src/atf-report/reader.cpp +++ b/unit/atf-src/tools/reader.cpp @@ -31,20 +31,19 @@ extern "C" { #include } +#include +#include #include #include #include -#include "atf-c/defs.h" - -#include "atf-c++/detail/parser.hpp" -#include "atf-c++/detail/sanity.hpp" -#include "atf-c++/detail/text.hpp" - +#include "defs.hpp" +#include "parser.hpp" #include "reader.hpp" +#include "text.hpp" -namespace impl = atf::atf_report; -#define IMPL_NAME "atf::atf_report" +namespace impl = tools::atf_report; +#define IMPL_NAME "tools::atf_report" // ------------------------------------------------------------------------ // Auxiliary functions. @@ -67,32 +66,32 @@ string_to_int(const std::string& str) namespace atf_tps { -static const atf::parser::token_type eof_type = 0; -static const atf::parser::token_type nl_type = 1; -static const atf::parser::token_type text_type = 2; -static const atf::parser::token_type colon_type = 3; -static const atf::parser::token_type comma_type = 4; -static const atf::parser::token_type tps_count_type = 5; -static const atf::parser::token_type tp_start_type = 6; -static const atf::parser::token_type tp_end_type = 7; -static const atf::parser::token_type tc_start_type = 8; -static const atf::parser::token_type tc_so_type = 9; -static const atf::parser::token_type tc_se_type = 10; -static const atf::parser::token_type tc_end_type = 11; -static const atf::parser::token_type passed_type = 12; -static const atf::parser::token_type failed_type = 13; -static const atf::parser::token_type skipped_type = 14; -static const atf::parser::token_type info_type = 16; -static const atf::parser::token_type expected_death_type = 17; -static const atf::parser::token_type expected_exit_type = 18; -static const atf::parser::token_type expected_failure_type = 19; -static const atf::parser::token_type expected_signal_type = 20; -static const atf::parser::token_type expected_timeout_type = 21; +static const tools::parser::token_type eof_type = 0; +static const tools::parser::token_type nl_type = 1; +static const tools::parser::token_type text_type = 2; +static const tools::parser::token_type colon_type = 3; +static const tools::parser::token_type comma_type = 4; +static const tools::parser::token_type tps_count_type = 5; +static const tools::parser::token_type tp_start_type = 6; +static const tools::parser::token_type tp_end_type = 7; +static const tools::parser::token_type tc_start_type = 8; +static const tools::parser::token_type tc_so_type = 9; +static const tools::parser::token_type tc_se_type = 10; +static const tools::parser::token_type tc_end_type = 11; +static const tools::parser::token_type passed_type = 12; +static const tools::parser::token_type failed_type = 13; +static const tools::parser::token_type skipped_type = 14; +static const tools::parser::token_type info_type = 16; +static const tools::parser::token_type expected_death_type = 17; +static const tools::parser::token_type expected_exit_type = 18; +static const tools::parser::token_type expected_failure_type = 19; +static const tools::parser::token_type expected_signal_type = 20; +static const tools::parser::token_type expected_timeout_type = 21; -class tokenizer : public atf::parser::tokenizer< std::istream > { +class tokenizer : public tools::parser::tokenizer< std::istream > { public: tokenizer(std::istream& is, size_t curline) : - atf::parser::tokenizer< std::istream > + tools::parser::tokenizer< std::istream > (is, true, eof_type, nl_type, text_type, curline) { add_delim(':', colon_type); @@ -119,15 +118,15 @@ public: } // namespace atf_tps struct timeval -read_timeval(atf::parser::parser< atf_tps::tokenizer >& parser) +read_timeval(tools::parser::parser< atf_tps::tokenizer >& parser) { using namespace atf_tps; - atf::parser::token t = parser.expect(text_type, "timestamp"); + tools::parser::token t = parser.expect(text_type, "timestamp"); const std::string::size_type divider = t.text().find('.'); if (divider == std::string::npos || divider == 0 || divider == t.text().length() - 1) - throw atf::parser::parse_error(t.lineno(), + throw tools::parser::parse_error(t.lineno(), "Malformed timestamp value " + t.text()); struct timeval tv; @@ -209,18 +208,18 @@ impl::atf_tps_reader::got_eof(void) void impl::atf_tps_reader::read_info(void* pptr) { - using atf::parser::parse_error; + using tools::parser::parse_error; using namespace atf_tps; - atf::parser::parser< tokenizer >& p = - *reinterpret_cast< atf::parser::parser< tokenizer >* > + tools::parser::parser< tokenizer >& p = + *reinterpret_cast< tools::parser::parser< tokenizer >* > (pptr); (void)p.expect(colon_type, "`:'"); - atf::parser::token t = p.expect(text_type, "info property name"); + tools::parser::token t = p.expect(text_type, "info property name"); (void)p.expect(comma_type, "`,'"); - got_info(t.text(), atf::text::trim(p.rest_of_line())); + got_info(t.text(), tools::text::trim(p.rest_of_line())); (void)p.expect(nl_type, "new line"); } @@ -228,14 +227,14 @@ impl::atf_tps_reader::read_info(void* pptr) void impl::atf_tps_reader::read_tp(void* pptr) { - using atf::parser::parse_error; + using tools::parser::parse_error; using namespace atf_tps; - atf::parser::parser< tokenizer >& p = - *reinterpret_cast< atf::parser::parser< tokenizer >* > + tools::parser::parser< tokenizer >& p = + *reinterpret_cast< tools::parser::parser< tokenizer >* > (pptr); - atf::parser::token t = p.expect(tp_start_type, + tools::parser::token t = p.expect(tp_start_type, "start of test program"); t = p.expect(colon_type, "`:'"); @@ -287,7 +286,7 @@ impl::atf_tps_reader::read_tp(void* pptr) "new line or comma_type"); std::string reason; if (t.type() == comma_type) { - reason = text::trim(p.rest_of_line()); + reason = tools::text::trim(p.rest_of_line()); if (reason.empty()) throw parse_error(t.lineno(), "Empty reason for failed test program"); @@ -300,14 +299,14 @@ impl::atf_tps_reader::read_tp(void* pptr) void impl::atf_tps_reader::read_tc(void* pptr) { - using atf::parser::parse_error; + using tools::parser::parse_error; using namespace atf_tps; - atf::parser::parser< tokenizer >& p = - *reinterpret_cast< atf::parser::parser< tokenizer >* > + tools::parser::parser< tokenizer >& p = + *reinterpret_cast< tools::parser::parser< tokenizer >* > (pptr); - atf::parser::token t = p.expect(tc_start_type, "start of test case"); + tools::parser::token t = p.expect(tc_start_type, "start of test case"); t = p.expect(colon_type, "`:'"); @@ -326,7 +325,7 @@ impl::atf_tps_reader::read_tc(void* pptr) "end of test case or test case's stdout/stderr line"); while (t.type() != tc_end_type && (t.type() == tc_so_type || t.type() == tc_se_type)) { - atf::parser::token t2 = t; + tools::parser::token t2 = t; t = p.expect(colon_type, "`:'"); @@ -335,7 +334,7 @@ impl::atf_tps_reader::read_tc(void* pptr) if (t2.type() == tc_so_type) { ATF_PARSER_CALLBACK(p, got_tc_stdout_line(line)); } else { - INV(t2.type() == tc_se_type); + assert(t2.type() == tc_se_type); ATF_PARSER_CALLBACK(p, got_tc_stderr_line(line)); } @@ -377,10 +376,10 @@ impl::atf_tps_reader::read_tc(void* pptr) else if (t.type() == expected_timeout_type) state = "expected_timeout"; else if (t.type() == failed_type) state = "failed"; else if (t.type() == skipped_type) state = "skipped"; - else UNREACHABLE; + else std::abort(); t = p.expect(comma_type, "`,'"); - std::string reason = text::trim(p.rest_of_line()); + std::string reason = tools::text::trim(p.rest_of_line()); if (reason.empty()) throw parse_error(t.lineno(), "Empty reason for " + state + " test case result"); @@ -393,18 +392,19 @@ impl::atf_tps_reader::read_tc(void* pptr) void impl::atf_tps_reader::read(void) { - using atf::parser::parse_error; + using tools::parser::parse_error; using namespace atf_tps; - std::pair< size_t, atf::parser::headers_map > hml = - atf::parser::read_headers(m_is, 1); - atf::parser::validate_content_type(hml.second, "application/X-atf-tps", 3); + std::pair< size_t, tools::parser::headers_map > hml = + tools::parser::read_headers(m_is, 1); + tools::parser::validate_content_type(hml.second, + "application/X-atf-tps", 3); tokenizer tkz(m_is, hml.first); - atf::parser::parser< tokenizer > p(tkz); + tools::parser::parser< tokenizer > p(tkz); try { - atf::parser::token t; + tools::parser::token t; while ((t = p.expect(tps_count_type, info_type, "tps-count or info " "field")).type() == info_type) diff --git a/unit/atf-src/atf-report/reader.hpp b/unit/atf-src/tools/reader.hpp similarity index 93% rename from unit/atf-src/atf-report/reader.hpp rename to unit/atf-src/tools/reader.hpp index 2ef038a0de..34d5d25f01 100644 --- a/unit/atf-src/atf-report/reader.hpp +++ b/unit/atf-src/tools/reader.hpp @@ -27,8 +27,8 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#if !defined(_ATF_REPORT_FORMATS_HPP_) -#define _ATF_REPORT_FORMATS_HPP_ +#if !defined(TOOLS_FORMATS_HPP) +#define TOOLS_FORMATS_HPP extern "C" { #include @@ -37,9 +37,7 @@ extern "C" { #include #include -#include - -namespace atf { +namespace tools { namespace atf_report { struct test_case_result { @@ -86,6 +84,6 @@ public: }; } // namespace atf_report -} // namespace atf +} // namespace tools -#endif // !defined(_ATF_REPORT_FORMATS_HPP_) +#endif // !defined(TOOLS_FORMATS_HPP) diff --git a/unit/atf-src/atf-report/reader_test.cpp b/unit/atf-src/tools/reader_test.cpp similarity index 98% rename from unit/atf-src/atf-report/reader_test.cpp rename to unit/atf-src/tools/reader_test.cpp index 59e4059efc..745b0bb8cc 100644 --- a/unit/atf-src/atf-report/reader_test.cpp +++ b/unit/atf-src/tools/reader_test.cpp @@ -33,16 +33,14 @@ #include #include -#include "atf-c++/macros.hpp" - -#include "atf-c++/detail/parser.hpp" -#include "atf-c++/detail/sanity.hpp" -#include "atf-c++/detail/test_helpers.hpp" -#include "atf-c++/detail/text.hpp" +#include +#include "parser.hpp" #include "reader.hpp" +#include "test_helpers.hpp" +#include "text.hpp" -namespace impl = atf::atf_report; +namespace impl = tools::atf_report; class tps_reader : protected impl::atf_tps_reader { void @@ -54,14 +52,14 @@ class tps_reader : protected impl::atf_tps_reader { void got_ntps(size_t ntps) { - m_calls.push_back("got_ntps(" + atf::text::to_string(ntps) + ")"); + m_calls.push_back("got_ntps(" + tools::text::to_string(ntps) + ")"); } void got_tp_start(const std::string& tpname, size_t ntcs) { m_calls.push_back("got_tp_start(" + tpname + ", " + - atf::text::to_string(ntcs) + ")"); + tools::text::to_string(ntcs) + ")"); } void @@ -986,4 +984,3 @@ ATF_INIT_TEST_CASES(tcs) ATF_ADD_TEST_CASE(tcs, tps_65); ATF_ADD_TEST_CASE(tcs, tps_66); } - diff --git a/unit/atf-src/atf-run/requirements.cpp b/unit/atf-src/tools/requirements.cpp similarity index 73% rename from unit/atf-src/atf-run/requirements.cpp rename to unit/atf-src/tools/requirements.cpp index 75537d5ea5..97fcdc8b5e 100644 --- a/unit/atf-src/atf-run/requirements.cpp +++ b/unit/atf-src/tools/requirements.cpp @@ -32,48 +32,46 @@ extern "C" { #include } +#include #include +#include #include #include -extern "C" { -#include "atf-c/defs.h" -} - -#include "atf-c++/config.hpp" - -#include "atf-c++/detail/fs.hpp" -#include "atf-c++/detail/env.hpp" -#include "atf-c++/detail/sanity.hpp" -#include "atf-c++/detail/text.hpp" - +#include "config.hpp" +#include "defs.hpp" +#include "env.hpp" +#include "fs.hpp" #include "requirements.hpp" +#include "text.hpp" #include "user.hpp" -namespace impl = atf::atf_run; +namespace impl = tools; namespace { +typedef std::map< std::string, std::string > vars_map; + static bool -has_program(const atf::fs::path& program) +has_program(const tools::fs::path& program) { bool found = false; if (program.is_absolute()) { - found = atf::fs::is_executable(program); + found = tools::fs::is_executable(program); } else { if (program.str().find('/') != std::string::npos) throw std::runtime_error("Relative paths are not allowed " "when searching for a program (" + program.str() + ")"); - const std::vector< std::string > dirs = atf::text::split( - atf::env::get("PATH"), ":"); + const std::vector< std::string > dirs = tools::text::split( + tools::env::get("PATH"), ":"); for (std::vector< std::string >::const_iterator iter = dirs.begin(); !found && iter != dirs.end(); iter++) { - const atf::fs::path& p = atf::fs::path(*iter) / program; - if (atf::fs::is_executable(p)) + const tools::fs::path& p = tools::fs::path(*iter) / program; + if (tools::fs::is_executable(p)) found = true; } } @@ -85,11 +83,11 @@ static std::string check_arch(const std::string& arches) { - const std::vector< std::string > v = atf::text::split(arches, " "); + const std::vector< std::string > v = tools::text::split(arches, " "); for (std::vector< std::string >::const_iterator iter = v.begin(); iter != v.end(); iter++) { - if ((*iter) == atf::config::get("atf_arch")) + if ((*iter) == tools::config::get("atf_arch")) return ""; } @@ -101,9 +99,9 @@ check_arch(const std::string& arches) static std::string -check_config(const std::string& variables, const atf::tests::vars_map& config) +check_config(const std::string& variables, const vars_map& config) { - const std::vector< std::string > v = atf::text::split(variables, " "); + const std::vector< std::string > v = tools::text::split(variables, " "); for (std::vector< std::string >::const_iterator iter = v.begin(); iter != v.end(); iter++) { if (config.find((*iter)) == config.end()) @@ -117,14 +115,14 @@ static std::string check_files(const std::string& progs) { - const std::vector< std::string > v = atf::text::split(progs, " "); + const std::vector< std::string > v = tools::text::split(progs, " "); for (std::vector< std::string >::const_iterator iter = v.begin(); iter != v.end(); iter++) { - const atf::fs::path file(*iter); + const tools::fs::path file(*iter); if (!file.is_absolute()) throw std::runtime_error("Relative paths are not allowed when " "checking for a required file (" + file.str() + ")"); - if (!atf::fs::exists(file)) + if (!tools::fs::exists(file)) return "Required file '" + file.str() + "' not found"; } return ""; @@ -134,11 +132,11 @@ static std::string check_machine(const std::string& machines) { - const std::vector< std::string > v = atf::text::split(machines, " "); + const std::vector< std::string > v = tools::text::split(machines, " "); for (std::vector< std::string >::const_iterator iter = v.begin(); iter != v.end(); iter++) { - if ((*iter) == atf::config::get("atf_machine")) + if ((*iter) == tools::config::get("atf_machine")) return ""; } @@ -148,7 +146,7 @@ check_machine(const std::string& machines) return "Requires one of the '" + machines + "' machine types"; } -#if defined(__APPLE__) || defined(__NetBSD__) +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) static std::string check_memory_sysctl(const int64_t needed, const char* sysctl_variable) @@ -162,8 +160,8 @@ check_memory_sysctl(const int64_t needed, const char* sysctl_variable) } if (available < needed) { - return "Not enough memory; needed " + atf::text::to_string(needed) + - ", available " + atf::text::to_string(available); + return "Not enough memory; needed " + tools::text::to_string(needed) + + ", available " + tools::text::to_string(available); } else return ""; } @@ -174,6 +172,13 @@ check_memory_darwin(const int64_t needed) { return check_memory_sysctl(needed, "hw.usermem"); } +# elif defined(__FreeBSD__) +static +std::string +check_memory_freebsd(const int64_t needed) +{ + return check_memory_sysctl(needed, "hw.usermem"); +} # elif defined(__NetBSD__) static std::string @@ -197,10 +202,12 @@ static std::string check_memory(const std::string& raw_memory) { - const int64_t needed = atf::text::to_bytes(raw_memory); + const int64_t needed = tools::text::to_bytes(raw_memory); #if defined(__APPLE__) return check_memory_darwin(needed); +#elif defined(__FreeBSD__) + return check_memory_freebsd(needed); #elif defined(__NetBSD__) return check_memory_netbsd(needed); #else @@ -212,10 +219,10 @@ static std::string check_progs(const std::string& progs) { - const std::vector< std::string > v = atf::text::split(progs, " "); + const std::vector< std::string > v = tools::text::split(progs, " "); for (std::vector< std::string >::const_iterator iter = v.begin(); iter != v.end(); iter++) { - if (!has_program(atf::fs::path(*iter))) + if (!has_program(tools::fs::path(*iter))) return "Required program '" + (*iter) + "' not found in the PATH"; } return ""; @@ -223,16 +230,16 @@ check_progs(const std::string& progs) static std::string -check_user(const std::string& user, const atf::tests::vars_map& config) +check_user(const std::string& user, const vars_map& config) { if (user == "root") { - if (!impl::is_root()) + if (!tools::user::is_root()) return "Requires root privileges"; else return ""; } else if (user == "unprivileged") { - if (impl::is_root()) { - const atf::tests::vars_map::const_iterator iter = config.find( + if (tools::user::is_root()) { + const vars_map::const_iterator iter = config.find( "unprivileged-user"); if (iter == config.end()) return "Requires an unprivileged user and the " @@ -240,7 +247,7 @@ check_user(const std::string& user, const atf::tests::vars_map& config) else { const std::string& unprivileged_user = (*iter).second; try { - (void)impl::get_user_ids(unprivileged_user); + (void)tools::user::get_user_ids(unprivileged_user); return ""; } catch (const std::runtime_error& e) { return "Failed to get information for user " + @@ -257,16 +264,16 @@ check_user(const std::string& user, const atf::tests::vars_map& config) } // anonymous namespace std::string -impl::check_requirements(const atf::tests::vars_map& metadata, - const atf::tests::vars_map& config) +impl::check_requirements(const vars_map& metadata, + const vars_map& config) { std::string failure_reason = ""; - for (atf::tests::vars_map::const_iterator iter = metadata.begin(); + for (vars_map::const_iterator iter = metadata.begin(); failure_reason.empty() && iter != metadata.end(); iter++) { const std::string& name = (*iter).first; const std::string& value = (*iter).second; - INV(!value.empty()); // Enforced by application/X-atf-tp parser. + assert(!value.empty()); // Enforced by application/X-atf-tp parser. if (name == "require.arch") failure_reason = check_arch(value); @@ -285,7 +292,7 @@ impl::check_requirements(const atf::tests::vars_map& metadata, else { // Unknown require.* properties are forbidden by the // application/X-atf-tp parser. - INV(failure_reason.find("require.") != 0); + assert(failure_reason.find("require.") != 0); } } @@ -293,23 +300,22 @@ impl::check_requirements(const atf::tests::vars_map& metadata, } std::pair< int, int > -impl::get_required_user(const atf::tests::vars_map& metadata, - const atf::tests::vars_map& config) +impl::get_required_user(const vars_map& metadata, + const vars_map& config) { - const atf::tests::vars_map::const_iterator user = metadata.find( + const vars_map::const_iterator user = metadata.find( "require.user"); if (user == metadata.end()) return std::make_pair(-1, -1); if ((*user).second == "unprivileged") { - if (impl::is_root()) { - const atf::tests::vars_map::const_iterator iter = config.find( + if (tools::user::is_root()) { + const vars_map::const_iterator iter = config.find( "unprivileged-user"); try { - return impl::get_user_ids((*iter).second); + return tools::user::get_user_ids((*iter).second); } catch (const std::exception& e) { - UNREACHABLE; // This has been validated by check_user. - throw e; + std::abort(); // This has been validated by check_user. } } else { return std::make_pair(-1, -1); diff --git a/unit/atf-src/atf-run/requirements.hpp b/unit/atf-src/tools/requirements.hpp similarity index 76% rename from unit/atf-src/atf-run/requirements.hpp rename to unit/atf-src/tools/requirements.hpp index 62c072d5fa..1eefdaf555 100644 --- a/unit/atf-src/atf-run/requirements.hpp +++ b/unit/atf-src/tools/requirements.hpp @@ -27,18 +27,21 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // +#if !defined(TOOLS_REQUIREMENTS_HPP) +#define TOOLS_REQUIREMENTS_HPP + +#include #include #include -#include "atf-c++/tests.hpp" +namespace tools { -namespace atf { -namespace atf_run { +std::string check_requirements(const std::map< std::string, std::string >&, + const std::map< std::string, std::string >&); +std::pair< int, int > get_required_user( + const std::map< std::string, std::string >&, + const std::map< std::string, std::string >&); -std::string check_requirements(const atf::tests::vars_map&, - const atf::tests::vars_map&); -std::pair< int, int > get_required_user(const atf::tests::vars_map&, - const atf::tests::vars_map&); +} // namespace tools -} // namespace atf_run -} // namespace atf +#endif // !defined(TOOLS_REQUIREMENTS_HPP) diff --git a/unit/atf-src/atf-run/requirements_test.cpp b/unit/atf-src/tools/requirements_test.cpp similarity index 87% rename from unit/atf-src/atf-run/requirements_test.cpp rename to unit/atf-src/tools/requirements_test.cpp index ef72b411d9..6d37d758cb 100644 --- a/unit/atf-src/atf-run/requirements_test.cpp +++ b/unit/atf-src/tools/requirements_test.cpp @@ -27,14 +27,14 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#include "atf-c++/config.hpp" -#include "atf-c++/detail/text.hpp" -#include "atf-c++/macros.hpp" +#include +#include "config.hpp" #include "requirements.hpp" +#include "text.hpp" #include "user.hpp" -namespace impl = atf::atf_run; +namespace impl = tools; // ------------------------------------------------------------------------- // Auxiliary functions. @@ -42,14 +42,16 @@ namespace impl = atf::atf_run; namespace { -const atf::tests::vars_map no_config; +typedef std::map< std::string, std::string > vars_map; + +const vars_map no_config; void -do_check(const std::string& expected, const atf::tests::vars_map& metadata, - const atf::tests::vars_map& config = no_config) +do_check(const std::string& expected, const vars_map& metadata, + const vars_map& config = no_config) { const std::string actual = impl::check_requirements(metadata, config); - if (!atf::text::match(actual, expected)) + if (!tools::text::match(actual, expected)) ATF_FAIL("Requirements failure reason \"" + actual + "\" does not " "match \"" + expected + "\""); } @@ -63,15 +65,15 @@ do_check(const std::string& expected, const atf::tests::vars_map& metadata, ATF_TEST_CASE(require_arch_one_ok); ATF_TEST_CASE_HEAD(require_arch_one_ok) {} ATF_TEST_CASE_BODY(require_arch_one_ok) { - atf::tests::vars_map metadata; - metadata["require.arch"] = atf::config::get("atf_arch"); + vars_map metadata; + metadata["require.arch"] = tools::config::get("atf_arch"); do_check("", metadata); } ATF_TEST_CASE(require_arch_one_fail); ATF_TEST_CASE_HEAD(require_arch_one_fail) {} ATF_TEST_CASE_BODY(require_arch_one_fail) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.arch"] = "__fake_arch__"; do_check("Requires the '__fake_arch__' architecture", metadata); } @@ -79,8 +81,8 @@ ATF_TEST_CASE_BODY(require_arch_one_fail) { ATF_TEST_CASE(require_arch_many_ok); ATF_TEST_CASE_HEAD(require_arch_many_ok) {} ATF_TEST_CASE_BODY(require_arch_many_ok) { - atf::tests::vars_map metadata; - metadata["require.arch"] = "__foo__ " + atf::config::get("atf_arch") + + vars_map metadata; + metadata["require.arch"] = "__foo__ " + tools::config::get("atf_arch") + " __bar__"; do_check("", metadata); } @@ -88,7 +90,7 @@ ATF_TEST_CASE_BODY(require_arch_many_ok) { ATF_TEST_CASE(require_arch_many_fail); ATF_TEST_CASE_HEAD(require_arch_many_fail) {} ATF_TEST_CASE_BODY(require_arch_many_fail) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.arch"] = "__foo__ __bar__ __baz__"; do_check("Requires one of the '__foo__ __bar__ __baz__' architectures", metadata); @@ -101,7 +103,7 @@ ATF_TEST_CASE_BODY(require_arch_many_fail) { ATF_TEST_CASE(require_config_one_ok); ATF_TEST_CASE_HEAD(require_config_one_ok) {} ATF_TEST_CASE_BODY(require_config_one_ok) { - atf::tests::vars_map metadata, config; + vars_map metadata, config; metadata["require.config"] = "var1"; config["var1"] = "some-value"; do_check("", metadata, config); @@ -110,7 +112,7 @@ ATF_TEST_CASE_BODY(require_config_one_ok) { ATF_TEST_CASE(require_config_one_fail); ATF_TEST_CASE_HEAD(require_config_one_fail) {} ATF_TEST_CASE_BODY(require_config_one_fail) { - atf::tests::vars_map metadata, config; + vars_map metadata, config; metadata["require.config"] = "var1"; do_check("Required configuration variable 'var1' not defined", metadata, config); @@ -119,7 +121,7 @@ ATF_TEST_CASE_BODY(require_config_one_fail) { ATF_TEST_CASE(require_config_many_ok); ATF_TEST_CASE_HEAD(require_config_many_ok) {} ATF_TEST_CASE_BODY(require_config_many_ok) { - atf::tests::vars_map metadata, config; + vars_map metadata, config; metadata["require.config"] = "var1 var2 var3"; config["var1"] = "first-value"; config["var2"] = "second-value"; @@ -130,7 +132,7 @@ ATF_TEST_CASE_BODY(require_config_many_ok) { ATF_TEST_CASE(require_config_many_fail); ATF_TEST_CASE_HEAD(require_config_many_fail) {} ATF_TEST_CASE_BODY(require_config_many_fail) { - atf::tests::vars_map metadata, config; + vars_map metadata, config; metadata["require.config"] = "var1 var2 var3"; config["var1"] = "first-value"; config["var3"] = "third-value"; @@ -144,21 +146,21 @@ ATF_TEST_CASE_BODY(require_config_many_fail) { ATF_TEST_CASE_WITHOUT_HEAD(require_files_one_ok); ATF_TEST_CASE_BODY(require_files_one_ok) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.files"] = "/bin/ls"; do_check("", metadata); } ATF_TEST_CASE_WITHOUT_HEAD(require_files_one_missing); ATF_TEST_CASE_BODY(require_files_one_missing) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.files"] = "/non-existent/foo"; do_check("Required file '/non-existent/foo' not found", metadata); } ATF_TEST_CASE_WITHOUT_HEAD(require_files_one_fail); ATF_TEST_CASE_BODY(require_files_one_fail) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.files"] = "/bin/cp this-is-relative"; ATF_REQUIRE_THROW_RE(std::runtime_error, "Relative.*(this-is-relative)", impl::check_requirements(metadata, no_config)); @@ -166,21 +168,21 @@ ATF_TEST_CASE_BODY(require_files_one_fail) { ATF_TEST_CASE_WITHOUT_HEAD(require_files_many_ok); ATF_TEST_CASE_BODY(require_files_many_ok) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.files"] = "/bin/ls /bin/cp"; do_check("", metadata); } ATF_TEST_CASE_WITHOUT_HEAD(require_files_many_missing); ATF_TEST_CASE_BODY(require_files_many_missing) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.files"] = "/bin/ls /non-existent/bar /bin/cp"; do_check("Required file '/non-existent/bar' not found", metadata); } ATF_TEST_CASE_WITHOUT_HEAD(require_files_many_fail); ATF_TEST_CASE_BODY(require_files_many_fail) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.files"] = "/bin/cp also-relative"; ATF_REQUIRE_THROW_RE(std::runtime_error, "Relative.*(also-relative)", impl::check_requirements(metadata, no_config)); @@ -193,15 +195,15 @@ ATF_TEST_CASE_BODY(require_files_many_fail) { ATF_TEST_CASE(require_machine_one_ok); ATF_TEST_CASE_HEAD(require_machine_one_ok) {} ATF_TEST_CASE_BODY(require_machine_one_ok) { - atf::tests::vars_map metadata; - metadata["require.machine"] = atf::config::get("atf_machine"); + vars_map metadata; + metadata["require.machine"] = tools::config::get("atf_machine"); do_check("", metadata); } ATF_TEST_CASE(require_machine_one_fail); ATF_TEST_CASE_HEAD(require_machine_one_fail) {} ATF_TEST_CASE_BODY(require_machine_one_fail) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.machine"] = "__fake_machine__"; do_check("Requires the '__fake_machine__' machine type", metadata); } @@ -209,16 +211,16 @@ ATF_TEST_CASE_BODY(require_machine_one_fail) { ATF_TEST_CASE(require_machine_many_ok); ATF_TEST_CASE_HEAD(require_machine_many_ok) {} ATF_TEST_CASE_BODY(require_machine_many_ok) { - atf::tests::vars_map metadata; - metadata["require.machine"] = "__foo__ " + atf::config::get("atf_machine") + - " __bar__"; + vars_map metadata; + metadata["require.machine"] = "__foo__ " + + tools::config::get("atf_machine") + " __bar__"; do_check("", metadata); } ATF_TEST_CASE(require_machine_many_fail); ATF_TEST_CASE_HEAD(require_machine_many_fail) {} ATF_TEST_CASE_BODY(require_machine_many_fail) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.machine"] = "__foo__ __bar__ __baz__"; do_check("Requires one of the '__foo__ __bar__ __baz__' machine types", metadata); @@ -230,16 +232,16 @@ ATF_TEST_CASE_BODY(require_machine_many_fail) { ATF_TEST_CASE_WITHOUT_HEAD(require_memory_ok); ATF_TEST_CASE_BODY(require_memory_ok) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.memory"] = "1m"; do_check("", metadata); } ATF_TEST_CASE_WITHOUT_HEAD(require_memory_not_enough); ATF_TEST_CASE_BODY(require_memory_not_enough) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.memory"] = "128t"; -#if defined(__APPLE__) || defined(__NetBSD__) +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) do_check("Not enough memory; needed 140737488355328, available [0-9]*", metadata); #else @@ -249,7 +251,7 @@ ATF_TEST_CASE_BODY(require_memory_not_enough) { ATF_TEST_CASE_WITHOUT_HEAD(require_memory_fail); ATF_TEST_CASE_BODY(require_memory_fail) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.memory"] = "foo"; ATF_REQUIRE_THROW(std::runtime_error, impl::check_requirements(metadata, no_config)); @@ -262,7 +264,7 @@ ATF_TEST_CASE_BODY(require_memory_fail) { ATF_TEST_CASE(require_progs_one_ok); ATF_TEST_CASE_HEAD(require_progs_one_ok) {} ATF_TEST_CASE_BODY(require_progs_one_ok) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.progs"] = "cp"; do_check("", metadata); } @@ -270,7 +272,7 @@ ATF_TEST_CASE_BODY(require_progs_one_ok) { ATF_TEST_CASE(require_progs_one_missing); ATF_TEST_CASE_HEAD(require_progs_one_missing) {} ATF_TEST_CASE_BODY(require_progs_one_missing) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.progs"] = "cp __non-existent__"; do_check("Required program '__non-existent__' not found in the PATH", metadata); @@ -279,7 +281,7 @@ ATF_TEST_CASE_BODY(require_progs_one_missing) { ATF_TEST_CASE(require_progs_one_fail); ATF_TEST_CASE_HEAD(require_progs_one_fail) {} ATF_TEST_CASE_BODY(require_progs_one_fail) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.progs"] = "bin/cp"; ATF_REQUIRE_THROW(std::runtime_error, impl::check_requirements(metadata, no_config)); @@ -288,7 +290,7 @@ ATF_TEST_CASE_BODY(require_progs_one_fail) { ATF_TEST_CASE(require_progs_many_ok); ATF_TEST_CASE_HEAD(require_progs_many_ok) {} ATF_TEST_CASE_BODY(require_progs_many_ok) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.progs"] = "cp ls mv"; do_check("", metadata); } @@ -296,7 +298,7 @@ ATF_TEST_CASE_BODY(require_progs_many_ok) { ATF_TEST_CASE(require_progs_many_missing); ATF_TEST_CASE_HEAD(require_progs_many_missing) {} ATF_TEST_CASE_BODY(require_progs_many_missing) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.progs"] = "mv ls __foo__ cp"; do_check("Required program '__foo__' not found in the PATH", metadata); } @@ -304,7 +306,7 @@ ATF_TEST_CASE_BODY(require_progs_many_missing) { ATF_TEST_CASE(require_progs_many_fail); ATF_TEST_CASE_HEAD(require_progs_many_fail) {} ATF_TEST_CASE_BODY(require_progs_many_fail) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.progs"] = "ls cp ../bin/cp"; ATF_REQUIRE_THROW(std::runtime_error, impl::check_requirements(metadata, no_config)); @@ -317,9 +319,9 @@ ATF_TEST_CASE_BODY(require_progs_many_fail) { ATF_TEST_CASE(require_user_root); ATF_TEST_CASE_HEAD(require_user_root) {} ATF_TEST_CASE_BODY(require_user_root) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.user"] = "root"; - if (atf::atf_run::is_root()) + if (tools::user::is_root()) do_check("", metadata); else do_check("Requires root privileges", metadata); @@ -328,9 +330,9 @@ ATF_TEST_CASE_BODY(require_user_root) { ATF_TEST_CASE(require_user_unprivileged); ATF_TEST_CASE_HEAD(require_user_unprivileged) {} ATF_TEST_CASE_BODY(require_user_unprivileged) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.user"] = "unprivileged"; - if (atf::atf_run::is_root()) + if (tools::user::is_root()) do_check("Requires an unprivileged user and the 'unprivileged-user' " "configuration variable is not set", metadata); else @@ -340,7 +342,7 @@ ATF_TEST_CASE_BODY(require_user_unprivileged) { ATF_TEST_CASE(require_user_fail); ATF_TEST_CASE_HEAD(require_user_fail) {} ATF_TEST_CASE_BODY(require_user_fail) { - atf::tests::vars_map metadata; + vars_map metadata; metadata["require.user"] = "nobody"; ATF_REQUIRE_THROW(std::runtime_error, impl::check_requirements(metadata, no_config)); diff --git a/unit/atf-src/atf-run/sample/atf-run.hooks b/unit/atf-src/tools/sample/atf-run.hooks similarity index 100% rename from unit/atf-src/atf-run/sample/atf-run.hooks rename to unit/atf-src/tools/sample/atf-run.hooks diff --git a/unit/atf-src/atf-run/sample/common.conf b/unit/atf-src/tools/sample/common.conf similarity index 100% rename from unit/atf-src/atf-run/sample/common.conf rename to unit/atf-src/tools/sample/common.conf diff --git a/unit/atf-src/atf-run/several_tcs_helper.c b/unit/atf-src/tools/several_tcs_helper.c similarity index 100% rename from unit/atf-src/atf-run/several_tcs_helper.c rename to unit/atf-src/tools/several_tcs_helper.c diff --git a/unit/atf-src/atf-run/share/atf-run.hooks b/unit/atf-src/tools/share/atf-run.hooks similarity index 100% rename from unit/atf-src/atf-run/share/atf-run.hooks rename to unit/atf-src/tools/share/atf-run.hooks diff --git a/unit/atf-src/atf-run/signals.cpp b/unit/atf-src/tools/signals.cpp similarity index 93% rename from unit/atf-src/atf-run/signals.cpp rename to unit/atf-src/tools/signals.cpp index 851c8f02c2..1e6c1ff37e 100644 --- a/unit/atf-src/atf-run/signals.cpp +++ b/unit/atf-src/tools/signals.cpp @@ -28,7 +28,7 @@ // #if defined(HAVE_CONFIG_H) -#include "bconfig.h" +#include "config.h" #endif extern "C" { @@ -37,14 +37,13 @@ extern "C" { } #include +#include -#include "atf-c++/detail/exceptions.hpp" -#include "atf-c++/detail/sanity.hpp" - +#include "exceptions.hpp" #include "signals.hpp" -namespace impl = atf::atf_run; -#define IMPL_NAME "atf::atf_run" +namespace impl = tools::signals; +#define IMPL_NAME "tools::signals" const int impl::last_signo = LAST_SIGNO; @@ -110,7 +109,7 @@ impl::signal_programmer::signal_programmer(const int signo, const handler h) : sa.sa_flags = 0; if (::sigaction(m_signo, &sa, &m_oldsa) == -1) - throw atf::system_error(IMPL_NAME, "Could not install handler for " + throw tools::system_error(IMPL_NAME, "Could not install handler for " "signal", errno); m_programmed = true; } @@ -125,7 +124,7 @@ impl::signal_programmer::unprogram(void) { if (m_programmed) { if (::sigaction(m_signo, &m_oldsa, NULL) == -1) - UNREACHABLE; + std::abort(); m_programmed = false; } } diff --git a/unit/atf-src/atf-run/signals.hpp b/unit/atf-src/tools/signals.hpp similarity index 93% rename from unit/atf-src/atf-run/signals.hpp rename to unit/atf-src/tools/signals.hpp index 8765ac9ec5..549a2cad09 100644 --- a/unit/atf-src/atf-run/signals.hpp +++ b/unit/atf-src/tools/signals.hpp @@ -27,15 +27,15 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#if !defined(_ATF_RUN_SIGNALS_HPP_) -#define _ATF_RUN_SIGNALS_HPP_ +#if !defined(TOOLS_SIGNALS_HPP) +#define TOOLS_SIGNALS_HPP extern "C" { #include } -namespace atf { -namespace atf_run { +namespace tools { +namespace signals { extern const int last_signo; typedef void (*handler)(const int); @@ -86,7 +86,7 @@ public: void reset(const int); -} // namespace atf_run -} // namespace atf +} // namespace signals +} // namespace tools -#endif // !defined(_ATF_RUN_SIGNALS_HPP_) +#endif // !defined(TOOLS_SIGNALS_HPP) diff --git a/unit/atf-src/atf-run/signals_test.cpp b/unit/atf-src/tools/signals_test.cpp similarity index 91% rename from unit/atf-src/atf-run/signals_test.cpp rename to unit/atf-src/tools/signals_test.cpp index 358c8a8ab5..aa6a8e5a8e 100644 --- a/unit/atf-src/atf-run/signals_test.cpp +++ b/unit/atf-src/tools/signals_test.cpp @@ -37,13 +37,11 @@ extern "C" { #include #include -#include "atf-c/defs.h" - -#include "atf-c++/macros.hpp" - -#include "atf-c++/detail/exceptions.hpp" -#include "atf-c++/detail/process.hpp" +#include +#include "defs.hpp" +#include "exceptions.hpp" +#include "process.hpp" #include "signals.hpp" // ------------------------------------------------------------------------ @@ -69,7 +67,7 @@ namespace sigusr1 { sigemptyset(&sa.sa_mask); sa.sa_flags = 0; if (::sigaction(SIGUSR1, &sa, NULL) == -1) - throw atf::system_error("sigusr1::program", + throw tools::system_error("sigusr1::program", "sigaction(2) failed", errno); } } // namespace sigusr1 @@ -97,7 +95,7 @@ ATF_TEST_CASE_HEAD(signal_holder_preserve) } ATF_TEST_CASE_BODY(signal_holder_preserve) { - using atf::atf_run::signal_holder; + using tools::signals::signal_holder; sigusr1::program(); @@ -123,7 +121,7 @@ ATF_TEST_CASE_HEAD(signal_holder_destructor) } ATF_TEST_CASE_BODY(signal_holder_destructor) { - using atf::atf_run::signal_holder; + using tools::signals::signal_holder; sigusr1::program(); @@ -149,7 +147,7 @@ ATF_TEST_CASE_HEAD(signal_holder_process) } ATF_TEST_CASE_BODY(signal_holder_process) { - using atf::atf_run::signal_holder; + using tools::signals::signal_holder; sigusr1::program(); @@ -184,7 +182,7 @@ ATF_TEST_CASE_HEAD(signal_programmer_program) } ATF_TEST_CASE_BODY(signal_programmer_program) { - using atf::atf_run::signal_programmer; + using tools::signals::signal_programmer; signal_programmer sp(SIGUSR1, sigusr1_2::handler); @@ -201,7 +199,7 @@ ATF_TEST_CASE_HEAD(signal_programmer_preserve) } ATF_TEST_CASE_BODY(signal_programmer_preserve) { - using atf::atf_run::signal_programmer; + using tools::signals::signal_programmer; sigusr1::program(); sigusr1::happened = false; @@ -230,7 +228,7 @@ reset_child(void *v ATF_DEFS_ATTRIBUTE_UNUSED) sigusr1::program(); sigusr1::happened = false; - atf::atf_run::reset(SIGUSR1); + tools::signals::reset(SIGUSR1); kill(::getpid(), SIGUSR1); if (sigusr1::happened) { @@ -248,11 +246,11 @@ ATF_TEST_CASE_HEAD(reset) } ATF_TEST_CASE_BODY(reset) { - atf::process::child c = - atf::process::fork(reset_child, atf::process::stream_inherit(), - atf::process::stream_inherit(), NULL); + tools::process::child c = + tools::process::fork(reset_child, tools::process::stream_inherit(), + tools::process::stream_inherit(), NULL); - const atf::process::status s = c.wait(); + const tools::process::status s = c.wait(); ATF_REQUIRE(s.exited() || s.signaled()); ATF_REQUIRE(!s.signaled() || s.termsig() == SIGUSR1); } diff --git a/unit/atf-src/atf-run/test-program.cpp b/unit/atf-src/tools/test-program.cpp similarity index 78% rename from unit/atf-src/atf-run/test-program.cpp rename to unit/atf-src/tools/test-program.cpp index 14647c2f78..91ad78acb4 100644 --- a/unit/atf-src/atf-run/test-program.cpp +++ b/unit/atf-src/tools/test-program.cpp @@ -37,34 +37,34 @@ extern "C" { #include } +#include #include #include #include #include #include -#include "atf-c/defs.h" - -#include "atf-c++/detail/env.hpp" -#include "atf-c++/detail/parser.hpp" -#include "atf-c++/detail/process.hpp" -#include "atf-c++/detail/sanity.hpp" -#include "atf-c++/detail/text.hpp" - -#include "config.hpp" +#include "config_file.hpp" +#include "defs.hpp" +#include "env.hpp" #include "fs.hpp" #include "io.hpp" +#include "parser.hpp" +#include "process.hpp" #include "requirements.hpp" #include "signals.hpp" #include "test-program.hpp" -#include "timer.hpp" +#include "text.hpp" +#include "timers.hpp" #include "user.hpp" -namespace impl = atf::atf_run; -namespace detail = atf::atf_run::detail; +namespace impl = tools::test_program; +namespace detail = tools::test_program::detail; namespace { +typedef std::map< std::string, std::string > vars_map; + static void check_stream(std::ostream& os) { @@ -81,16 +81,16 @@ check_stream(std::ostream& os) namespace atf_tp { -static const atf::parser::token_type eof_type = 0; -static const atf::parser::token_type nl_type = 1; -static const atf::parser::token_type text_type = 2; -static const atf::parser::token_type colon_type = 3; -static const atf::parser::token_type dblquote_type = 4; +static const tools::parser::token_type eof_type = 0; +static const tools::parser::token_type nl_type = 1; +static const tools::parser::token_type text_type = 2; +static const tools::parser::token_type colon_type = 3; +static const tools::parser::token_type dblquote_type = 4; -class tokenizer : public atf::parser::tokenizer< std::istream > { +class tokenizer : public tools::parser::tokenizer< std::istream > { public: tokenizer(std::istream& is, size_t curline) : - atf::parser::tokenizer< std::istream > + tools::parser::tokenizer< std::istream > (is, true, eof_type, nl_type, text_type, curline) { add_delim(':', colon_type); @@ -103,7 +103,7 @@ public: class metadata_reader : public detail::atf_tp_reader { impl::test_cases_map m_tcs; - void got_tc(const std::string& ident, const atf::tests::vars_map& props) + void got_tc(const std::string& ident, const vars_map& props) { if (m_tcs.find(ident) != m_tcs.end()) throw(std::runtime_error("Duplicate test case " + ident + @@ -132,11 +132,11 @@ public: }; struct get_metadata_params { - const atf::fs::path& executable; - const atf::tests::vars_map& config; + const tools::fs::path& executable; + const vars_map& config; - get_metadata_params(const atf::fs::path& p_executable, - const atf::tests::vars_map& p_config) : + get_metadata_params(const tools::fs::path& p_executable, + const vars_map& p_config) : executable(p_executable), config(p_config) { @@ -144,21 +144,21 @@ struct get_metadata_params { }; struct test_case_params { - const atf::fs::path& executable; + const tools::fs::path& executable; const std::string& test_case_name; const std::string& test_case_part; - const atf::tests::vars_map& metadata; - const atf::tests::vars_map& config; - const atf::fs::path& resfile; - const atf::fs::path& workdir; + const vars_map& metadata; + const vars_map& config; + const tools::fs::path& resfile; + const tools::fs::path& workdir; - test_case_params(const atf::fs::path& p_executable, + test_case_params(const tools::fs::path& p_executable, const std::string& p_test_case_name, const std::string& p_test_case_part, - const atf::tests::vars_map& p_metadata, - const atf::tests::vars_map& p_config, - const atf::fs::path& p_resfile, - const atf::fs::path& p_workdir) : + const vars_map& p_metadata, + const vars_map& p_config, + const tools::fs::path& p_resfile, + const tools::fs::path& p_workdir) : executable(p_executable), test_case_name(p_test_case_name), test_case_part(p_test_case_part), @@ -211,7 +211,7 @@ vector_to_argv(const std::vector< std::string >& v) static void -exec_or_exit(const atf::fs::path& executable, +exec_or_exit(const tools::fs::path& executable, const std::vector< std::string >& argv) { // This leaks memory in case of a failure, but it is OK. Exiting will @@ -229,11 +229,11 @@ exec_or_exit(const atf::fs::path& executable, static std::vector< std::string > -config_to_args(const atf::tests::vars_map& config) +config_to_args(const vars_map& config) { std::vector< std::string > args; - for (atf::tests::vars_map::const_iterator iter = config.begin(); + for (vars_map::const_iterator iter = config.begin(); iter != config.end(); iter++) args.push_back("-v" + (*iter).first + "=" + (*iter).second); @@ -248,35 +248,35 @@ silence_stdin(void) int fd = ::open("/dev/null", O_RDONLY); if (fd == -1) throw std::runtime_error("Could not open /dev/null"); - INV(fd == STDIN_FILENO); + assert(fd == STDIN_FILENO); } static void -prepare_child(const atf::fs::path& workdir) +prepare_child(const tools::fs::path& workdir) { const int ret = ::setpgid(::getpid(), 0); - INV(ret != -1); + assert(ret != -1); ::umask(S_IWGRP | S_IWOTH); - for (int i = 1; i <= impl::last_signo; i++) - impl::reset(i); + for (int i = 1; i <= tools::signals::last_signo; i++) + tools::signals::reset(i); - atf::env::set("HOME", workdir.str()); - atf::env::unset("LANG"); - atf::env::unset("LC_ALL"); - atf::env::unset("LC_COLLATE"); - atf::env::unset("LC_CTYPE"); - atf::env::unset("LC_MESSAGES"); - atf::env::unset("LC_MONETARY"); - atf::env::unset("LC_NUMERIC"); - atf::env::unset("LC_TIME"); - atf::env::set("TZ", "UTC"); + tools::env::set("HOME", workdir.str()); + tools::env::unset("LANG"); + tools::env::unset("LC_ALL"); + tools::env::unset("LC_COLLATE"); + tools::env::unset("LC_CTYPE"); + tools::env::unset("LC_MESSAGES"); + tools::env::unset("LC_MONETARY"); + tools::env::unset("LC_NUMERIC"); + tools::env::unset("LC_TIME"); + tools::env::set("TZ", "UTC"); - atf::env::set("__RUNNING_INSIDE_ATF_RUN", "internal-yes-value"); + tools::env::set("__RUNNING_INSIDE_ATF_RUN", "internal-yes-value"); - impl::change_directory(workdir); + tools::fs::change_directory(workdir); silence_stdin(); } @@ -303,14 +303,14 @@ run_test_case_child(void* raw_params) const test_case_params* params = static_cast< const test_case_params* >(raw_params); - const std::pair< int, int > user = impl::get_required_user( + const std::pair< int, int > user = tools::get_required_user( params->metadata, params->config); if (user.first != -1 && user.second != -1) - impl::drop_privileges(user); + tools::user::drop_privileges(user); // The input 'tp' parameter may be relative and become invalid once // we change the current working directory. - const atf::fs::path absolute_executable = params->executable.to_absolute(); + const tools::fs::path absolute_executable = params->executable.to_absolute(); // Prepare the test program's arguments. We use dynamic memory and // do not care to release it. We are going to die anyway very soon, @@ -338,7 +338,7 @@ tokenize_result(const std::string& line, std::string& out_state, } else if (line[pos] == ':') { out_state = line.substr(0, pos); out_arg = ""; - out_reason = atf::text::trim(line.substr(pos + 1)); + out_reason = tools::text::trim(line.substr(pos + 1)); } else if (line[pos] == '(') { const std::string::size_type pos2 = line.find("):", pos); if (pos2 == std::string::npos) @@ -346,16 +346,16 @@ tokenize_result(const std::string& line, std::string& out_state, "': unclosed optional argument"); out_state = line.substr(0, pos); out_arg = line.substr(pos + 1, pos2 - pos - 1); - out_reason = atf::text::trim(line.substr(pos2 + 2)); + out_reason = tools::text::trim(line.substr(pos2 + 2)); } else - UNREACHABLE; + std::abort(); } static impl::test_case_result handle_result(const std::string& state, const std::string& arg, const std::string& reason) { - PRE(state == "passed"); + assert(state == "passed"); if (!arg.empty() || !reason.empty()) throw std::runtime_error("The test case result '" + state + "' cannot " @@ -368,7 +368,7 @@ static impl::test_case_result handle_result_with_reason(const std::string& state, const std::string& arg, const std::string& reason) { - PRE(state == "expected_death" || state == "expected_failure" || + assert(state == "expected_death" || state == "expected_failure" || state == "expected_timeout" || state == "failed" || state == "skipped"); if (!arg.empty() || reason.empty()) @@ -383,7 +383,7 @@ handle_result_with_reason_and_arg(const std::string& state, const std::string& arg, const std::string& reason) { - PRE(state == "expected_exit" || state == "expected_signal"); + assert(state == "expected_exit" || state == "expected_signal"); if (reason.empty()) throw std::runtime_error("The test case result '" + state + "' must " @@ -394,7 +394,7 @@ handle_result_with_reason_and_arg(const std::string& state, value = -1; } else { try { - value = atf::text::to_type< int >(arg); + value = tools::text::to_type< int >(arg); } catch (const std::runtime_error&) { throw std::runtime_error("The value '" + arg + "' passed to the '" + state + "' state must be an integer"); @@ -432,7 +432,7 @@ detail::atf_tp_reader::validate_and_insert(const std::string& name, const std::string& value, const size_t lineno, std::map< std::string, std::string >& md) { - using atf::parser::parse_error; + using tools::parser::parse_error; if (value.empty()) throw parse_error(lineno, "The value for '" + name +"' cannot be " @@ -445,13 +445,13 @@ detail::atf_tp_reader::validate_and_insert(const std::string& name, // Any non-empty value is valid. } else if (name == "has.cleanup") { try { - (void)atf::text::to_bool(value); + (void)tools::text::to_bool(value); } catch (const std::runtime_error&) { throw parse_error(lineno, "The has.cleanup property requires a" " boolean value"); } } else if (name == "ident") { - if (!atf::text::match(value, ident_regex)) + if (!tools::text::match(value, ident_regex)) throw parse_error(lineno, "The identifier must match " + ident_regex + "; was '" + value + "'"); } else if (name == "require.arch") { @@ -460,7 +460,7 @@ detail::atf_tp_reader::validate_and_insert(const std::string& name, } else if (name == "require.machine") { } else if (name == "require.memory") { try { - (void)atf::text::to_bytes(value); + (void)tools::text::to_bytes(value); } catch (const std::runtime_error&) { throw parse_error(lineno, "The require.memory property requires an " "integer value representing an amount of bytes"); @@ -468,7 +468,7 @@ detail::atf_tp_reader::validate_and_insert(const std::string& name, } else if (name == "require.progs") { } else if (name == "require.user") { } else if (name == "timeout") { - if (!atf::text::match(value, integer_regex)) + if (!tools::text::match(value, integer_regex)) throw parse_error(lineno, "The timeout property requires an integer" " value"); } else if (name == "use.fs") { @@ -485,19 +485,19 @@ detail::atf_tp_reader::validate_and_insert(const std::string& name, void detail::atf_tp_reader::read(void) { - using atf::parser::parse_error; + using tools::parser::parse_error; using namespace atf_tp; - std::pair< size_t, atf::parser::headers_map > hml = - atf::parser::read_headers(m_is, 1); - atf::parser::validate_content_type(hml.second, + std::pair< size_t, tools::parser::headers_map > hml = + tools::parser::read_headers(m_is, 1); + tools::parser::validate_content_type(hml.second, "application/X-atf-tp", 1); tokenizer tkz(m_is, hml.first); - atf::parser::parser< tokenizer > p(tkz); + tools::parser::parser< tokenizer > p(tkz); try { - atf::parser::token t = p.expect(text_type, "property name"); + tools::parser::token t = p.expect(text_type, "property name"); if (t.text() != "ident") throw parse_error(t.lineno(), "First property of a test case " "must be 'ident'"); @@ -506,7 +506,7 @@ detail::atf_tp_reader::read(void) do { const std::string name = t.text(); t = p.expect(colon_type, "`:'"); - const std::string value = atf::text::trim(p.rest_of_line()); + const std::string value = tools::text::trim(p.rest_of_line()); t = p.expect(nl_type, "new line"); validate_and_insert(name, value, t.lineno(), props); @@ -565,13 +565,13 @@ detail::parse_test_case_result(const std::string& line) impl::atf_tps_writer::atf_tps_writer(std::ostream& os) : m_os(os) { - atf::parser::headers_map hm; - atf::parser::attrs_map ct_attrs; + tools::parser::headers_map hm; + tools::parser::attrs_map ct_attrs; ct_attrs["version"] = "3"; hm["Content-Type"] = - atf::parser::header_entry("Content-Type", "application/X-atf-tps", + tools::parser::header_entry("Content-Type", "application/X-atf-tps", ct_attrs); - atf::parser::write_headers(hm, m_os); + tools::parser::write_headers(hm, m_os); } void @@ -600,7 +600,7 @@ impl::atf_tps_writer::start_tp(const std::string& tp, size_t ntcs) void impl::atf_tps_writer::end_tp(const std::string& reason) { - PRE(reason.find('\n') == std::string::npos); + assert(reason.find('\n') == std::string::npos); if (reason.empty()) m_os << "tp-end: " << generate_timestamp() << ", " << m_tpname << "\n"; else @@ -647,31 +647,31 @@ impl::atf_tps_writer::end_tc(const std::string& state, } impl::metadata -impl::get_metadata(const atf::fs::path& executable, - const atf::tests::vars_map& config) +impl::get_metadata(const tools::fs::path& executable, + const vars_map& config) { get_metadata_params params(executable, config); - atf::process::child child = - atf::process::fork(get_metadata_child, - atf::process::stream_capture(), - atf::process::stream_inherit(), + tools::process::child child = + tools::process::fork(get_metadata_child, + tools::process::stream_capture(), + tools::process::stream_inherit(), static_cast< void * >(¶ms)); - impl::pistream outin(child.stdout_fd()); + tools::io::pistream outin(child.stdout_fd()); metadata_reader parser(outin); parser.read(); - const atf::process::status status = child.wait(); + const tools::process::status status = child.wait(); if (!status.exited() || status.exitstatus() != EXIT_SUCCESS) - throw atf::parser::format_error("Test program returned failure " + throw tools::parser::format_error("Test program returned failure " "exit status for test case list"); return metadata(parser.get_tcs()); } impl::test_case_result -impl::read_test_case_result(const atf::fs::path& results_path) +impl::read_test_case_result(const tools::fs::path& results_path) { std::ifstream results_file(results_path.c_str()); if (!results_file) @@ -700,7 +700,7 @@ sigchld_handler(const int signo ATF_DEFS_ATTRIBUTE_UNUSED) terminate_poll = true; } -class child_muxer : public impl::muxer { +class child_muxer : public tools::io::muxer { impl::atf_tps_writer& m_writer; void @@ -709,7 +709,7 @@ class child_muxer : public impl::muxer { switch (index) { case 0: m_writer.stdout_tc(line); break; case 1: m_writer.stderr_tc(line); break; - default: UNREACHABLE; + default: std::abort(); } } @@ -724,14 +724,14 @@ public: } // anonymous namespace -std::pair< std::string, atf::process::status > -impl::run_test_case(const atf::fs::path& executable, +std::pair< std::string, tools::process::status > +impl::run_test_case(const tools::fs::path& executable, const std::string& test_case_name, const std::string& test_case_part, - const atf::tests::vars_map& metadata, - const atf::tests::vars_map& config, - const atf::fs::path& resfile, - const atf::fs::path& workdir, + const vars_map& metadata, + const vars_map& config, + const tools::fs::path& resfile, + const tools::fs::path& workdir, atf_tps_writer& writer) { // TODO: Capture termination signals and deliver them to the subprocess @@ -739,23 +739,23 @@ impl::run_test_case(const atf::fs::path& executable, test_case_params params(executable, test_case_name, test_case_part, metadata, config, resfile, workdir); - atf::process::child child = - atf::process::fork(run_test_case_child, - atf::process::stream_capture(), - atf::process::stream_capture(), + tools::process::child child = + tools::process::fork(run_test_case_child, + tools::process::stream_capture(), + tools::process::stream_capture(), static_cast< void * >(¶ms)); terminate_poll = false; - const atf::tests::vars_map::const_iterator iter = metadata.find("timeout"); - INV(iter != metadata.end()); + const vars_map::const_iterator iter = metadata.find("timeout"); + assert(iter != metadata.end()); const unsigned int timeout = - atf::text::to_type< unsigned int >((*iter).second); + tools::text::to_type< unsigned int >((*iter).second); const pid_t child_pid = child.pid(); // Get the input stream of stdout and stderr. - impl::file_handle outfh = child.stdout_fd(); - impl::file_handle errfh = child.stderr_fd(); + tools::io::file_handle outfh = child.stdout_fd(); + tools::io::file_handle errfh = child.stderr_fd(); bool timed_out = false; @@ -764,17 +764,17 @@ impl::run_test_case(const atf::fs::path& executable, int fds[2] = {outfh.get(), errfh.get()}; child_muxer mux(fds, 2, writer); try { - child_timer timeout_timer(timeout, child_pid, terminate_poll); - signal_programmer sigchld(SIGCHLD, sigchld_handler); + timers::child_timer timeout_timer(timeout, child_pid, terminate_poll); + signals::signal_programmer sigchld(SIGCHLD, sigchld_handler); mux.mux(terminate_poll); timed_out = timeout_timer.fired(); } catch (...) { - UNREACHABLE; + std::abort(); } ::killpg(child_pid, SIGKILL); mux.flush(); - atf::process::status status = child.wait(); + tools::process::status status = child.wait(); std::string reason; @@ -782,7 +782,7 @@ impl::run_test_case(const atf::fs::path& executable, // Don't assume the child process has been signaled due to the timeout // expiration as older versions did. The child process may have exited // but we may have timed out due to a subchild process getting stuck. - reason = "Test case timed out after " + atf::text::to_string(timeout) + + reason = "Test case timed out after " + tools::text::to_string(timeout) + " " + (timeout == 1 ? "second" : "seconds"); } diff --git a/unit/atf-src/atf-run/test-program.hpp b/unit/atf-src/tools/test-program.hpp similarity index 80% rename from unit/atf-src/atf-run/test-program.hpp rename to unit/atf-src/tools/test-program.hpp index daba3ce01f..f2f1972896 100644 --- a/unit/atf-src/atf-run/test-program.hpp +++ b/unit/atf-src/tools/test-program.hpp @@ -27,15 +27,17 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // +#if !defined(TOOLS_TEST_PROGRAM_HPP) +#define TOOLS_TEST_PROGRAM_HPP + #include +#include -#include "atf-c++/tests.hpp" +#include "fs.hpp" +#include "process.hpp" -#include "atf-c++/detail/fs.hpp" -#include "atf-c++/detail/process.hpp" - -namespace atf { -namespace atf_run { +namespace tools { +namespace test_program { struct test_case_result { std::string m_state; @@ -122,7 +124,8 @@ public: void end_tc(const std::string&, const std::string&); }; -typedef std::map< std::string, atf::tests::vars_map > test_cases_map; +typedef std::map< std::string, std::map< std::string, std::string > > + test_cases_map; struct metadata { test_cases_map test_cases; @@ -139,12 +142,16 @@ struct metadata { class atf_tps_writer; -metadata get_metadata(const atf::fs::path&, const atf::tests::vars_map&); -test_case_result read_test_case_result(const atf::fs::path&); -std::pair< std::string, atf::process::status > run_test_case( - const atf::fs::path&, const std::string&, const std::string&, - const atf::tests::vars_map&, const atf::tests::vars_map&, - const atf::fs::path&, const atf::fs::path&, atf_tps_writer&); +metadata get_metadata(const tools::fs::path&, + const std::map< std::string, std::string >&); +test_case_result read_test_case_result(const tools::fs::path&); +std::pair< std::string, tools::process::status > run_test_case( + const tools::fs::path&, const std::string&, const std::string&, + const std::map< std::string, std::string >&, + const std::map< std::string, std::string >&, + const tools::fs::path&, const tools::fs::path&, atf_tps_writer&); -} // namespace atf_run -} // namespace atf +} // namespace test_program +} // namespace tools + +#endif // !defined(TOOLS_TEST_PROGRAM_HPP) diff --git a/unit/atf-src/tools/test_helpers.hpp b/unit/atf-src/tools/test_helpers.hpp new file mode 100644 index 0000000000..3ac92d0ea7 --- /dev/null +++ b/unit/atf-src/tools/test_helpers.hpp @@ -0,0 +1,116 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2009 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#if defined(TOOLS_TEST_HELPERS_H) +# error "Cannot include test_helpers.hpp more than once." +#else +# define TOOLS_TEST_HELPERS_H +#endif + +#include +#include +#include + +#include + +#include "parser.hpp" +#include "text.hpp" + +namespace test_helpers_detail { + +typedef std::vector< std::string > string_vector; + +template< class Reader > +std::pair< string_vector, string_vector > +do_read(const char* input) +{ + string_vector errors; + + std::istringstream is(input); + Reader reader(is); + try { + reader.read(); + } catch (const tools::parser::parse_errors& pes) { + for (std::vector< tools::parser::parse_error >::const_iterator iter = + pes.begin(); iter != pes.end(); iter++) + errors.push_back(*iter); + } catch (const tools::parser::parse_error& pe) { + ATF_FAIL("Raised a lonely parse error: " + + tools::text::to_string(pe.first) + ": " + pe.second); + } + + return std::make_pair(reader.m_calls, errors); +} + +void +check_equal(const char* expected[], const string_vector& actual) +{ + const char** expected_iter = expected; + string_vector::const_iterator actual_iter = actual.begin(); + + bool equals = true; + while (equals && *expected_iter != NULL && actual_iter != actual.end()) { + if (*expected_iter != *actual_iter) { + equals = false; + } else { + expected_iter++; + actual_iter++; + } + } + if (equals && ((*expected_iter == NULL && actual_iter != actual.end()) || + (*expected_iter != NULL && actual_iter == actual.end()))) + equals = false; + + if (!equals) { + std::cerr << "EXPECTED:\n"; + for (expected_iter = expected; *expected_iter != NULL; expected_iter++) + std::cerr << *expected_iter << "\n"; + + std::cerr << "ACTUAL:\n"; + for (actual_iter = actual.begin(); actual_iter != actual.end(); + actual_iter++) + std::cerr << *actual_iter << "\n"; + + ATF_FAIL("Expected results differ to actual values"); + } +} + +} // namespace test_helpers_detail + +template< class Reader > +void +do_parser_test(const char* input, const char* exp_calls[], + const char* exp_errors[]) +{ + const std::pair< test_helpers_detail::string_vector, + test_helpers_detail::string_vector > + actual = test_helpers_detail::do_read< Reader >(input); + test_helpers_detail::check_equal(exp_calls, actual.first); + test_helpers_detail::check_equal(exp_errors, actual.second); +} diff --git a/unit/atf-src/atf-run/test_program_test.cpp b/unit/atf-src/tools/test_program_test.cpp similarity index 95% rename from unit/atf-src/atf-run/test_program_test.cpp rename to unit/atf-src/tools/test_program_test.cpp index 444dc3e4d8..693790d8d4 100644 --- a/unit/atf-src/atf-run/test_program_test.cpp +++ b/unit/atf-src/tools/test_program_test.cpp @@ -30,28 +30,29 @@ #include #include -#include "atf-c++/macros.hpp" - -#include "atf-c++/detail/parser.hpp" -#include "atf-c++/detail/test_helpers.hpp" -#include "atf-c++/detail/text.hpp" +#include +#include "parser.hpp" #include "test-program.hpp" +#include "test_helpers.hpp" +#include "text.hpp" -namespace impl = atf::atf_run; -namespace detail = atf::atf_run::detail; - -using atf::tests::vars_map; +namespace impl = tools::test_program; +namespace detail = tools::test_program::detail; // ------------------------------------------------------------------------- // Auxiliary functions. // ------------------------------------------------------------------------- +namespace { + +typedef std::map< std::string, std::string > vars_map; + static -atf::fs::path +tools::fs::path get_helper(const atf::tests::tc& tc, const char* name) { - return atf::fs::path(tc.get_config_var("srcdir")) / name; + return tools::fs::path(tc.get_config_var("srcdir")) / name; } static @@ -86,7 +87,7 @@ static void print_indented(const std::string& str) { - std::vector< std::string > ws = atf::text::split(str, "\n"); + std::vector< std::string > ws = tools::text::split(str, "\n"); for (std::vector< std::string >::const_iterator iter = ws.begin(); iter != ws.end(); iter++) std::cout << ">>" << *iter << "<<\n"; @@ -101,7 +102,7 @@ void check_match(const atf::tests::tc& tc, const std::string& str, const std::string& exp) { - if (!atf::text::match(str, exp)) { + if (!tools::text::match(str, exp)) { std::cout << "String match check failed.\n" << "Adding >> and << to delimit the string boundaries " "below.\n"; @@ -113,6 +114,8 @@ check_match(const atf::tests::tc& tc, const std::string& str, } } +} // anonymous namespace + // ------------------------------------------------------------------------- // Tests for the "tp" reader. // ------------------------------------------------------------------------- @@ -758,23 +761,23 @@ ATF_TEST_CASE_BODY(atf_tps_writer) ATF_TEST_CASE(get_metadata_bad); ATF_TEST_CASE_HEAD(get_metadata_bad) {} ATF_TEST_CASE_BODY(get_metadata_bad) { - const atf::fs::path executable = get_helper(*this, "bad_metadata_helper"); - ATF_REQUIRE_THROW(atf::parser::parse_errors, - impl::get_metadata(executable, vars_map())); + const tools::fs::path executable = get_helper(*this, "bad_metadata_helper"); + ATF_REQUIRE_THROW(tools::parser::parse_errors, + impl::get_metadata(executable, vars_map())); } ATF_TEST_CASE(get_metadata_zero_tcs); ATF_TEST_CASE_HEAD(get_metadata_zero_tcs) {} ATF_TEST_CASE_BODY(get_metadata_zero_tcs) { - const atf::fs::path executable = get_helper(*this, "zero_tcs_helper"); - ATF_REQUIRE_THROW(atf::parser::parse_errors, - impl::get_metadata(executable, vars_map())); + const tools::fs::path executable = get_helper(*this, "zero_tcs_helper"); + ATF_REQUIRE_THROW(tools::parser::parse_errors, + impl::get_metadata(executable, vars_map())); } ATF_TEST_CASE(get_metadata_several_tcs); ATF_TEST_CASE_HEAD(get_metadata_several_tcs) {} ATF_TEST_CASE_BODY(get_metadata_several_tcs) { - const atf::fs::path executable = get_helper(*this, "several_tcs_helper"); + const tools::fs::path executable = get_helper(*this, "several_tcs_helper"); const impl::metadata md = impl::get_metadata(executable, vars_map()); ATF_REQUIRE_EQ(3, md.test_cases.size()); @@ -925,7 +928,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(read_test_case_result_failed); ATF_TEST_CASE_BODY(read_test_case_result_failed) { write_test_case_result("resfile", "failed: foo bar\n"); const impl::test_case_result tcr = impl::read_test_case_result( - atf::fs::path("resfile")); + tools::fs::path("resfile")); ATF_REQUIRE_EQ("failed", tcr.state()); ATF_REQUIRE_EQ("foo bar", tcr.reason()); } @@ -934,7 +937,7 @@ ATF_TEST_CASE_WITHOUT_HEAD(read_test_case_result_skipped); ATF_TEST_CASE_BODY(read_test_case_result_skipped) { write_test_case_result("resfile", "skipped: baz bar\n"); const impl::test_case_result tcr = impl::read_test_case_result( - atf::fs::path("resfile")); + tools::fs::path("resfile")); ATF_REQUIRE_EQ("skipped", tcr.state()); ATF_REQUIRE_EQ("baz bar", tcr.reason()); } @@ -944,28 +947,28 @@ ATF_TEST_CASE(read_test_case_result_no_file); ATF_TEST_CASE_HEAD(read_test_case_result_no_file) {} ATF_TEST_CASE_BODY(read_test_case_result_no_file) { ATF_REQUIRE_THROW(std::runtime_error, - impl::read_test_case_result(atf::fs::path("resfile"))); + impl::read_test_case_result(tools::fs::path("resfile"))); } ATF_TEST_CASE_WITHOUT_HEAD(read_test_case_result_empty_file); ATF_TEST_CASE_BODY(read_test_case_result_empty_file) { write_test_case_result("resfile", ""); ATF_REQUIRE_THROW(std::runtime_error, - impl::read_test_case_result(atf::fs::path("resfile"))); + impl::read_test_case_result(tools::fs::path("resfile"))); } ATF_TEST_CASE_WITHOUT_HEAD(read_test_case_result_invalid); ATF_TEST_CASE_BODY(read_test_case_result_invalid) { write_test_case_result("resfile", "passed: hello\n"); ATF_REQUIRE_THROW(std::runtime_error, - impl::read_test_case_result(atf::fs::path("resfile"))); + impl::read_test_case_result(tools::fs::path("resfile"))); } ATF_TEST_CASE_WITHOUT_HEAD(read_test_case_result_multiline); ATF_TEST_CASE_BODY(read_test_case_result_multiline) { write_test_case_result("resfile", "skipped: foo\nbar\n"); const impl::test_case_result tcr = impl::read_test_case_result( - atf::fs::path("resfile")); + tools::fs::path("resfile")); ATF_REQUIRE_EQ("skipped", tcr.state()); ATF_REQUIRE_EQ("foo<>bar", tcr.reason()); } diff --git a/unit/atf-src/atf-report/tests-results.css b/unit/atf-src/tools/tests-results.css similarity index 100% rename from unit/atf-src/atf-report/tests-results.css rename to unit/atf-src/tools/tests-results.css diff --git a/unit/atf-src/atf-report/tests-results.dtd b/unit/atf-src/tools/tests-results.dtd similarity index 100% rename from unit/atf-src/atf-report/tests-results.dtd rename to unit/atf-src/tools/tests-results.dtd diff --git a/unit/atf-src/atf-report/tests-results.xsl b/unit/atf-src/tools/tests-results.xsl similarity index 100% rename from unit/atf-src/atf-report/tests-results.xsl rename to unit/atf-src/tools/tests-results.xsl diff --git a/unit/atf-src/tools/text.cpp b/unit/atf-src/tools/text.cpp new file mode 100644 index 0000000000..9084f7e808 --- /dev/null +++ b/unit/atf-src/tools/text.cpp @@ -0,0 +1,158 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +extern "C" { +#include +} + +#include +#include +#include + +#include "exceptions.hpp" +#include "text.hpp" + +namespace impl = tools::text; +#define IMPL_NAME "tools::text" + +char* +impl::duplicate(const char* str) +{ + char* copy = new char[std::strlen(str) + 1]; + std::strcpy(copy, str); + return copy; +} + +bool +impl::match(const std::string& str, const std::string& regex) +{ + bool found; + + // Special case: regcomp does not like empty regular expressions. + if (regex.empty()) { + found = str.empty(); + } else { + ::regex_t preg; + + if (::regcomp(&preg, regex.c_str(), REG_EXTENDED) != 0) + throw std::runtime_error("Invalid regular expression '" + regex + + "'"); + + const int res = ::regexec(&preg, str.c_str(), 0, NULL, 0); + regfree(&preg); + if (res != 0 && res != REG_NOMATCH) + throw std::runtime_error("Invalid regular expression " + regex); + + found = res == 0; + } + + return found; +} + +std::string +impl::to_lower(const std::string& str) +{ + std::string lc; + for (std::string::const_iterator iter = str.begin(); iter != str.end(); + iter++) + lc += std::tolower(*iter); + return lc; +} + +std::vector< std::string > +impl::split(const std::string& str, const std::string& delim) +{ + std::vector< std::string > words; + + std::string::size_type pos = 0, newpos = 0; + while (pos < str.length() && newpos != std::string::npos) { + newpos = str.find(delim, pos); + if (newpos != pos) + words.push_back(str.substr(pos, newpos - pos)); + pos = newpos + delim.length(); + } + + return words; +} + +std::string +impl::trim(const std::string& str) +{ + std::string::size_type pos1 = str.find_first_not_of(" \t"); + std::string::size_type pos2 = str.find_last_not_of(" \t"); + + if (pos1 == std::string::npos && pos2 == std::string::npos) + return ""; + else if (pos1 == std::string::npos) + return str.substr(0, str.length() - pos2); + else if (pos2 == std::string::npos) + return str.substr(pos1); + else + return str.substr(pos1, pos2 - pos1 + 1); +} + +bool +impl::to_bool(const std::string& str) +{ + const std::string lower = to_lower(str); + if (lower == "yes" || lower == "true") + return true; + else if (lower == "no" || lower == "false") + return false; + else { + // XXX Not really a libc error. + throw system_error(IMPL_NAME "::to_bool", "Cannot convert string " + "'" + str + "' to boolean", EINVAL); + } +} + +int64_t +impl::to_bytes(std::string str) +{ + if (str.empty()) + throw std::runtime_error("Empty value"); + + const char unit = str[str.length() - 1]; + int64_t multiplier; + switch (unit) { + case 'k': case 'K': multiplier = 1 << 10; break; + case 'm': case 'M': multiplier = 1 << 20; break; + case 'g': case 'G': multiplier = 1 << 30; break; + case 't': case 'T': multiplier = int64_t(1) << 40; break; + default: + if (!std::isdigit(unit)) + throw std::runtime_error(std::string("Unknown size unit '") + unit + + "'"); + multiplier = 1; + } + if (multiplier != 1) + str.erase(str.length() - 1); + + return to_type< int64_t >(str) * multiplier; +} diff --git a/unit/atf-src/tools/text.hpp b/unit/atf-src/tools/text.hpp new file mode 100644 index 0000000000..0b3dbaad0f --- /dev/null +++ b/unit/atf-src/tools/text.hpp @@ -0,0 +1,153 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#if !defined(TOOLS_TEXT_HPP) +#define TOOLS_TEXT_HPP + +extern "C" { +#include +} + +#include +#include +#include +#include + +namespace tools { +namespace text { + +//! +//! \brief Duplicates a C string using the new[] allocator. +//! +//! Replaces the functionality of strdup by using the new[] allocator and +//! thus allowing the resulting memory to be managed by utils::auto_array. +//! +char* duplicate(const char*); + +//! +//! \brief Joins multiple words into a string. +//! +//! Joins a list of words into a string, separating them using the provided +//! separator. Empty words are not omitted. +//! +template< class T > +std::string +join(const T& words, const std::string& separator) +{ + std::string str; + + typename T::const_iterator iter = words.begin(); + bool done = iter == words.end(); + while (!done) { + str += *iter; + iter++; + if (iter != words.end()) + str += separator; + else + done = true; + } + + return str; +} + +//! +//! \brief Checks if the string matches a regular expression. +//! +bool match(const std::string&, const std::string&); + +//! +//! \brief Splits a string into words. +//! +//! Splits the given string into multiple words, all separated by the +//! given delimiter. Multiple occurrences of the same delimiter are +//! not condensed so that rejoining the words later on using the same +//! delimiter results in the original string. +//! +std::vector< std::string > split(const std::string&, const std::string&); + +//! +//! \brief Removes whitespace from the beginning and end of a string. +//! +std::string trim(const std::string&); + +//! +//! \brief Converts a string to a boolean value. +//! +bool to_bool(const std::string&); + +//! +//! \brief Converts the given string to a bytes size. +//! +int64_t to_bytes(std::string); + +//! +//! \brief Changes the case of a string to lowercase. +//! +//! Returns a new string that is a lowercased version of the original +//! one. +//! +std::string to_lower(const std::string&); + +//! +//! \brief Converts the given object to a string. +//! +//! Returns a string with the representation of the given object. There +//! must exist an operator<< method for that object. +//! +template< class T > +std::string +to_string(const T& ob) +{ + std::ostringstream ss; + ss << ob; + return ss.str(); +} + +//! +//! \brief Converts the given string to another type. +//! +//! Attempts to convert the given string to the requested type. Throws +//! an exception if the conversion failed. +//! +template< class T > +T +to_type(const std::string& str) +{ + std::istringstream ss(str); + T value; + ss >> value; + if (!ss.eof() || (ss.eof() && (ss.fail() || ss.bad()))) + throw std::runtime_error("Cannot convert string to requested type"); + return value; +} + +} // namespace text +} // namespace tools + +#endif // !defined(TOOLS_TEXT_HPP) diff --git a/unit/atf-src/tools/text_test.cpp b/unit/atf-src/tools/text_test.cpp new file mode 100644 index 0000000000..0fa31d8273 --- /dev/null +++ b/unit/atf-src/tools/text_test.cpp @@ -0,0 +1,390 @@ +// +// Automated Testing Framework (atf) +// +// Copyright (c) 2007 The NetBSD Foundation, Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +#include +#include +#include + +#include + +#include "text.hpp" + +// ------------------------------------------------------------------------ +// Test cases for the free functions. +// ------------------------------------------------------------------------ + +ATF_TEST_CASE(duplicate); +ATF_TEST_CASE_HEAD(duplicate) +{ + set_md_var("descr", "Tests the duplicate function"); +} +ATF_TEST_CASE_BODY(duplicate) +{ + using tools::text::duplicate; + + const char* orig = "foo"; + + char* copy = duplicate(orig); + ATF_REQUIRE_EQ(std::strlen(copy), 3); + ATF_REQUIRE(std::strcmp(copy, "foo") == 0); + + std::strcpy(copy, "bar"); + ATF_REQUIRE(std::strcmp(copy, "bar") == 0); + ATF_REQUIRE(std::strcmp(orig, "foo") == 0); +} + +ATF_TEST_CASE(join); +ATF_TEST_CASE_HEAD(join) +{ + set_md_var("descr", "Tests the join function"); +} +ATF_TEST_CASE_BODY(join) +{ + using tools::text::join; + + // First set of tests using a non-sorted collection, std::vector. + { + std::vector< std::string > words; + std::string str; + + words.clear(); + str = join(words, ","); + ATF_REQUIRE_EQ(str, ""); + + words.clear(); + words.push_back(""); + str = join(words, ","); + ATF_REQUIRE_EQ(str, ""); + + words.clear(); + words.push_back(""); + words.push_back(""); + str = join(words, ","); + ATF_REQUIRE_EQ(str, ","); + + words.clear(); + words.push_back("foo"); + words.push_back(""); + words.push_back("baz"); + str = join(words, ","); + ATF_REQUIRE_EQ(str, "foo,,baz"); + + words.clear(); + words.push_back("foo"); + words.push_back("bar"); + words.push_back("baz"); + str = join(words, ","); + ATF_REQUIRE_EQ(str, "foo,bar,baz"); + } + + // Second set of tests using a sorted collection, std::set. + { + std::set< std::string > words; + std::string str; + + words.clear(); + str = join(words, ","); + ATF_REQUIRE_EQ(str, ""); + + words.clear(); + words.insert(""); + str = join(words, ","); + ATF_REQUIRE_EQ(str, ""); + + words.clear(); + words.insert("foo"); + words.insert(""); + words.insert("baz"); + str = join(words, ","); + ATF_REQUIRE_EQ(str, ",baz,foo"); + + words.clear(); + words.insert("foo"); + words.insert("bar"); + words.insert("baz"); + str = join(words, ","); + ATF_REQUIRE_EQ(str, "bar,baz,foo"); + } +} + +ATF_TEST_CASE(match); +ATF_TEST_CASE_HEAD(match) +{ + set_md_var("descr", "Tests the match function"); +} +ATF_TEST_CASE_BODY(match) +{ + using tools::text::match; + + ATF_REQUIRE_THROW(std::runtime_error, match("", "[")); + + ATF_REQUIRE(match("", "")); + ATF_REQUIRE(!match("foo", "")); + + ATF_REQUIRE(match("", ".*")); + ATF_REQUIRE(match("", "[a-z]*")); + + ATF_REQUIRE(match("hello", "hello")); + ATF_REQUIRE(match("hello", "[a-z]+")); + ATF_REQUIRE(match("hello", "^[a-z]+$")); + + ATF_REQUIRE(!match("hello", "helooo")); + ATF_REQUIRE(!match("hello", "[a-z]+5")); + ATF_REQUIRE(!match("hello", "^ [a-z]+$")); +} + +ATF_TEST_CASE(split); +ATF_TEST_CASE_HEAD(split) +{ + set_md_var("descr", "Tests the split function"); +} +ATF_TEST_CASE_BODY(split) +{ + using tools::text::split; + + std::vector< std::string > words; + + words = split("", " "); + ATF_REQUIRE_EQ(words.size(), 0); + + words = split(" ", " "); + ATF_REQUIRE_EQ(words.size(), 0); + + words = split(" ", " "); + ATF_REQUIRE_EQ(words.size(), 0); + + words = split("a b", " "); + ATF_REQUIRE_EQ(words.size(), 2); + ATF_REQUIRE_EQ(words[0], "a"); + ATF_REQUIRE_EQ(words[1], "b"); + + words = split("a b c d", " "); + ATF_REQUIRE_EQ(words.size(), 4); + ATF_REQUIRE_EQ(words[0], "a"); + ATF_REQUIRE_EQ(words[1], "b"); + ATF_REQUIRE_EQ(words[2], "c"); + ATF_REQUIRE_EQ(words[3], "d"); + + words = split("foo bar", " "); + ATF_REQUIRE_EQ(words.size(), 2); + ATF_REQUIRE_EQ(words[0], "foo"); + ATF_REQUIRE_EQ(words[1], "bar"); + + words = split("foo bar baz foobar", " "); + ATF_REQUIRE_EQ(words.size(), 4); + ATF_REQUIRE_EQ(words[0], "foo"); + ATF_REQUIRE_EQ(words[1], "bar"); + ATF_REQUIRE_EQ(words[2], "baz"); + ATF_REQUIRE_EQ(words[3], "foobar"); + + words = split(" foo bar", " "); + ATF_REQUIRE_EQ(words.size(), 2); + ATF_REQUIRE_EQ(words[0], "foo"); + ATF_REQUIRE_EQ(words[1], "bar"); + + words = split("foo bar", " "); + ATF_REQUIRE_EQ(words.size(), 2); + ATF_REQUIRE_EQ(words[0], "foo"); + ATF_REQUIRE_EQ(words[1], "bar"); + + words = split("foo bar ", " "); + ATF_REQUIRE_EQ(words.size(), 2); + ATF_REQUIRE_EQ(words[0], "foo"); + ATF_REQUIRE_EQ(words[1], "bar"); + + words = split(" foo bar ", " "); + ATF_REQUIRE_EQ(words.size(), 2); + ATF_REQUIRE_EQ(words[0], "foo"); + ATF_REQUIRE_EQ(words[1], "bar"); +} + +ATF_TEST_CASE(split_delims); +ATF_TEST_CASE_HEAD(split_delims) +{ + set_md_var("descr", "Tests the split function using different delimiters"); +} +ATF_TEST_CASE_BODY(split_delims) +{ + using tools::text::split; + + std::vector< std::string > words; + + words = split("", "/"); + ATF_REQUIRE_EQ(words.size(), 0); + + words = split(" ", "/"); + ATF_REQUIRE_EQ(words.size(), 1); + ATF_REQUIRE_EQ(words[0], " "); + + words = split(" ", "/"); + ATF_REQUIRE_EQ(words.size(), 1); + ATF_REQUIRE_EQ(words[0], " "); + + words = split("a/b", "/"); + ATF_REQUIRE_EQ(words.size(), 2); + ATF_REQUIRE_EQ(words[0], "a"); + ATF_REQUIRE_EQ(words[1], "b"); + + words = split("aLONGDELIMbcdLONGDELIMef", "LONGDELIM"); + ATF_REQUIRE_EQ(words.size(), 3); + ATF_REQUIRE_EQ(words[0], "a"); + ATF_REQUIRE_EQ(words[1], "bcd"); + ATF_REQUIRE_EQ(words[2], "ef"); +} + +ATF_TEST_CASE(trim); +ATF_TEST_CASE_HEAD(trim) +{ + set_md_var("descr", "Tests the trim function"); +} +ATF_TEST_CASE_BODY(trim) +{ + using tools::text::trim; + + ATF_REQUIRE_EQ(trim(""), ""); + ATF_REQUIRE_EQ(trim(" "), ""); + ATF_REQUIRE_EQ(trim("\t"), ""); + + ATF_REQUIRE_EQ(trim(" foo"), "foo"); + ATF_REQUIRE_EQ(trim("\t foo"), "foo"); + ATF_REQUIRE_EQ(trim(" \tfoo"), "foo"); + ATF_REQUIRE_EQ(trim("foo\t "), "foo"); + ATF_REQUIRE_EQ(trim("foo \t"), "foo"); + + ATF_REQUIRE_EQ(trim("foo bar"), "foo bar"); + ATF_REQUIRE_EQ(trim("\t foo bar"), "foo bar"); + ATF_REQUIRE_EQ(trim(" \tfoo bar"), "foo bar"); + ATF_REQUIRE_EQ(trim("foo bar\t "), "foo bar"); + ATF_REQUIRE_EQ(trim("foo bar \t"), "foo bar"); +} + +ATF_TEST_CASE(to_bool); +ATF_TEST_CASE_HEAD(to_bool) +{ + set_md_var("descr", "Tests the to_string function"); +} +ATF_TEST_CASE_BODY(to_bool) +{ + using tools::text::to_bool; + + ATF_REQUIRE(to_bool("true")); + ATF_REQUIRE(to_bool("TRUE")); + ATF_REQUIRE(to_bool("yes")); + ATF_REQUIRE(to_bool("YES")); + + ATF_REQUIRE(!to_bool("false")); + ATF_REQUIRE(!to_bool("FALSE")); + ATF_REQUIRE(!to_bool("no")); + ATF_REQUIRE(!to_bool("NO")); + + ATF_REQUIRE_THROW(std::runtime_error, to_bool("")); + ATF_REQUIRE_THROW(std::runtime_error, to_bool("tru")); + ATF_REQUIRE_THROW(std::runtime_error, to_bool("true2")); + ATF_REQUIRE_THROW(std::runtime_error, to_bool("fals")); + ATF_REQUIRE_THROW(std::runtime_error, to_bool("false2")); +} + +ATF_TEST_CASE(to_bytes); +ATF_TEST_CASE_HEAD(to_bytes) +{ + set_md_var("descr", "Tests the to_bytes function"); +} +ATF_TEST_CASE_BODY(to_bytes) +{ + using tools::text::to_bytes; + + ATF_REQUIRE_EQ(0, to_bytes("0")); + ATF_REQUIRE_EQ(12345, to_bytes("12345")); + ATF_REQUIRE_EQ(2 * 1024, to_bytes("2k")); + ATF_REQUIRE_EQ(4 * 1024 * 1024, to_bytes("4m")); + ATF_REQUIRE_EQ(int64_t(8) * 1024 * 1024 * 1024, to_bytes("8g")); + ATF_REQUIRE_EQ(int64_t(16) * 1024 * 1024 * 1024 * 1024, to_bytes("16t")); + + ATF_REQUIRE_THROW_RE(std::runtime_error, "Empty", to_bytes("")); + ATF_REQUIRE_THROW_RE(std::runtime_error, "Unknown size unit 'd'", + to_bytes("12d")); + ATF_REQUIRE_THROW(std::runtime_error, to_bytes(" ")); + ATF_REQUIRE_THROW(std::runtime_error, to_bytes(" k")); +} + +ATF_TEST_CASE(to_string); +ATF_TEST_CASE_HEAD(to_string) +{ + set_md_var("descr", "Tests the to_string function"); +} +ATF_TEST_CASE_BODY(to_string) +{ + using tools::text::to_string; + + ATF_REQUIRE_EQ(to_string('a'), "a"); + ATF_REQUIRE_EQ(to_string("a"), "a"); + ATF_REQUIRE_EQ(to_string(5), "5"); +} + +ATF_TEST_CASE(to_type); +ATF_TEST_CASE_HEAD(to_type) +{ + set_md_var("descr", "Tests the to_type function"); +} +ATF_TEST_CASE_BODY(to_type) +{ + using tools::text::to_type; + + ATF_REQUIRE_EQ(to_type< int >("0"), 0); + ATF_REQUIRE_EQ(to_type< int >("1234"), 1234); + ATF_REQUIRE_THROW(std::runtime_error, to_type< int >(" ")); + ATF_REQUIRE_THROW(std::runtime_error, to_type< int >("0 a")); + ATF_REQUIRE_THROW(std::runtime_error, to_type< int >("a")); + + ATF_REQUIRE_EQ(to_type< float >("0.5"), 0.5); + ATF_REQUIRE_EQ(to_type< float >("1234.5"), 1234.5); + ATF_REQUIRE_THROW(std::runtime_error, to_type< float >("0.5 a")); + ATF_REQUIRE_THROW(std::runtime_error, to_type< float >("a")); + + ATF_REQUIRE_EQ(to_type< std::string >("a"), "a"); +} + +// ------------------------------------------------------------------------ +// Main. +// ------------------------------------------------------------------------ + +ATF_INIT_TEST_CASES(tcs) +{ + // Add the test cases for the free functions. + ATF_ADD_TEST_CASE(tcs, duplicate); + ATF_ADD_TEST_CASE(tcs, join); + ATF_ADD_TEST_CASE(tcs, match); + ATF_ADD_TEST_CASE(tcs, split); + ATF_ADD_TEST_CASE(tcs, split_delims); + ATF_ADD_TEST_CASE(tcs, trim); + ATF_ADD_TEST_CASE(tcs, to_bool); + ATF_ADD_TEST_CASE(tcs, to_bytes); + ATF_ADD_TEST_CASE(tcs, to_string); + ATF_ADD_TEST_CASE(tcs, to_type); +} diff --git a/unit/atf-src/atf-run/timer.cpp b/unit/atf-src/tools/timers.cpp similarity index 86% rename from unit/atf-src/atf-run/timer.cpp rename to unit/atf-src/tools/timers.cpp index 6ed70d97f6..a5334f4921 100644 --- a/unit/atf-src/atf-run/timer.cpp +++ b/unit/atf-src/tools/timers.cpp @@ -28,29 +28,25 @@ // #if defined(HAVE_CONFIG_H) -# include +# include #endif extern "C" { #include } +#include #include #include #include -extern "C" { -#include "atf-c/defs.h" -} - -#include "atf-c++/detail/exceptions.hpp" -#include "atf-c++/detail/sanity.hpp" - +#include "defs.hpp" +#include "exceptions.hpp" #include "signals.hpp" -#include "timer.hpp" +#include "timers.hpp" -namespace impl = atf::atf_run; -#define IMPL_NAME "atf::atf_run" +namespace impl = tools::timers; +#define IMPL_NAME "tools::timers" #if !defined(HAVE_TIMER_T) static impl::timer* compat_handle; @@ -110,8 +106,8 @@ impl::timer::timer(const unsigned int seconds) : sa.sa_flags = SA_SIGINFO; sa.sa_sigaction = ::handler; if (::sigaction(SIGALRM, &sa, &m_pimpl->m_old_sa) == -1) - throw system_error(IMPL_NAME "::timer::timer", - "Failed to set signal handler", errno); + throw tools::system_error(IMPL_NAME "::timer::timer", + "Failed to set signal handler", errno); #if defined(HAVE_TIMER_T) struct ::sigevent se; @@ -122,8 +118,8 @@ impl::timer::timer(const unsigned int seconds) : se.sigev_notify_attributes = NULL; if (::timer_create(CLOCK_MONOTONIC, &se, &m_pimpl->m_timer) == -1) { ::sigaction(SIGALRM, &m_pimpl->m_old_sa, NULL); - throw system_error(IMPL_NAME "::timer::timer", - "Failed to create timer", errno); + throw tools::system_error(IMPL_NAME "::timer::timer", + "Failed to create timer", errno); } struct ::itimerspec it; @@ -134,8 +130,8 @@ impl::timer::timer(const unsigned int seconds) : if (::timer_settime(m_pimpl->m_timer, 0, &it, &m_pimpl->m_old_it) == -1) { ::sigaction(SIGALRM, &m_pimpl->m_old_sa, NULL); ::timer_delete(m_pimpl->m_timer); - throw system_error(IMPL_NAME "::timer::timer", - "Failed to program timer", errno); + throw tools::system_error(IMPL_NAME "::timer::timer", + "Failed to program timer", errno); } #else ::itimerval it; @@ -145,10 +141,10 @@ impl::timer::timer(const unsigned int seconds) : it.it_value.tv_usec = 0; if (::setitimer(ITIMER_REAL, &it, &m_pimpl->m_old_it) == -1) { ::sigaction(SIGALRM, &m_pimpl->m_old_sa, NULL); - throw system_error(IMPL_NAME "::timer::timer", - "Failed to program timer", errno); + throw tools::system_error(IMPL_NAME "::timer::timer", + "Failed to program timer", errno); } - INV(compat_handle == NULL); + assert(compat_handle == NULL); compat_handle = this; #endif } @@ -158,16 +154,16 @@ impl::timer::~timer(void) #if defined(HAVE_TIMER_T) { const int ret = ::timer_delete(m_pimpl->m_timer); - INV(ret != -1); + assert(ret != -1); } #else { const int ret = ::setitimer(ITIMER_REAL, &m_pimpl->m_old_it, NULL); - INV(ret != -1); + assert(ret != -1); } #endif const int ret = ::sigaction(SIGALRM, &m_pimpl->m_old_sa, NULL); - INV(ret != -1); + assert(ret != -1); #if !defined(HAVE_TIMER_T) compat_handle = NULL; diff --git a/unit/atf-src/atf-run/timer.hpp b/unit/atf-src/tools/timers.hpp similarity index 89% rename from unit/atf-src/atf-run/timer.hpp rename to unit/atf-src/tools/timers.hpp index 8eb7228409..bf43ffb03f 100644 --- a/unit/atf-src/atf-run/timer.hpp +++ b/unit/atf-src/tools/timers.hpp @@ -27,8 +27,8 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#if !defined(_ATF_RUN_ALARM_HPP_) -#define _ATF_RUN_ALARM_HPP_ +#if !defined(TOOLS_TIMERS_HPP) +#define TOOLS_TIMERS_HPP extern "C" { #include @@ -36,10 +36,8 @@ extern "C" { #include -#include "atf-c++/noncopyable.hpp" - -namespace atf { -namespace atf_run { +namespace tools { +namespace timers { class signal_programmer; @@ -47,7 +45,11 @@ class signal_programmer; // The "timer" class. // ------------------------------------------------------------------------ -class timer : noncopyable { +class timer { + // Non-copyable. + timer(const timer&); + timer& operator=(const timer&); + struct impl; std::auto_ptr< impl > m_pimpl; @@ -75,7 +77,7 @@ public: void timeout_callback(void); }; -} // namespace atf_run -} // namespace atf +} // namespace timers +} // namespace tools -#endif // !defined(_ATF_RUN_ALARM_HPP_) +#endif // !defined(TOOLS_TIMERS_HPP) diff --git a/unit/atf-src/atf-c++/detail/ui.cpp b/unit/atf-src/tools/ui.cpp similarity index 89% rename from unit/atf-src/atf-c++/detail/ui.cpp rename to unit/atf-src/tools/ui.cpp index 07bde4f87d..56426ec486 100644 --- a/unit/atf-src/atf-c++/detail/ui.cpp +++ b/unit/atf-src/tools/ui.cpp @@ -34,16 +34,15 @@ extern "C" { #include } +#include #include #include "env.hpp" #include "text.hpp" -#include "sanity.hpp" -#include "text.hpp" #include "ui.hpp" -namespace impl = atf::ui; -#define IMPL_NAME "atf::ui" +namespace impl = tools::ui; +#define IMPL_NAME "tools::ui" static size_t @@ -53,10 +52,10 @@ terminal_width(void) static size_t width = 0; if (!done) { - if (atf::env::has("COLUMNS")) { - const std::string cols = atf::env::get("COLUMNS"); + if (tools::env::has("COLUMNS")) { + const std::string cols = tools::env::get("COLUMNS"); if (cols.length() > 0) { - width = atf::text::to_type< size_t >(cols); + width = tools::text::to_type< size_t >(cols); } } else { struct winsize ws; @@ -81,7 +80,7 @@ format_paragraph(const std::string& text, const bool repeat, const size_t col) { - PRE(text.find('\n') == std::string::npos); + assert(text.find('\n') == std::string::npos); const std::string pad(col - tag.length(), ' '); const std::string fullpad(col, ' '); @@ -91,12 +90,12 @@ format_paragraph(const std::string& text, formatted = tag + pad; else formatted = fullpad; - INV(formatted.length() == col); + assert(formatted.length() == col); size_t curcol = col; const size_t maxcol = terminal_width(); - std::vector< std::string > words = atf::text::split(text, " "); + std::vector< std::string > words = tools::text::split(text, " "); for (std::vector< std::string >::const_iterator iter = words.begin(); iter != words.end(); iter++) { const std::string& word = *iter; @@ -142,13 +141,13 @@ std::string impl::format_text_with_tag(const std::string& text, const std::string& tag, bool repeat, size_t col) { - PRE(col == 0 || col >= tag.length()); + assert(col == 0 || col >= tag.length()); if (col == 0) col = tag.length(); std::string formatted; - std::vector< std::string > lines = atf::text::split(text, "\n"); + std::vector< std::string > lines = tools::text::split(text, "\n"); for (std::vector< std::string >::const_iterator iter = lines.begin(); iter != lines.end(); iter++) { const std::string& line = *iter; diff --git a/unit/atf-src/atf-c++/detail/ui.hpp b/unit/atf-src/tools/ui.hpp similarity index 96% rename from unit/atf-src/atf-c++/detail/ui.hpp rename to unit/atf-src/tools/ui.hpp index 1c81c56a96..4e0e4318be 100644 --- a/unit/atf-src/atf-c++/detail/ui.hpp +++ b/unit/atf-src/tools/ui.hpp @@ -27,12 +27,12 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#if !defined(_ATF_CXX_UI_HPP_) -#define _ATF_CXX_UI_HPP_ +#if !defined(TOOLS_UI_HPP) +#define TOOLS_UI_HPP #include -namespace atf { +namespace tools { namespace ui { //! @@ -100,6 +100,6 @@ std::string format_text_with_tag(const std::string&, const std::string&, std::string format_warning(const std::string&, const std::string&); } // namespace ui -} // namespace atf +} // namespace tools -#endif // !defined(_ATF_CXX_UI_HPP_) +#endif // !defined(TOOLS_UI_HPP) diff --git a/unit/atf-src/atf-c++/detail/ui_test.cpp b/unit/atf-src/tools/ui_test.cpp similarity index 98% rename from unit/atf-src/atf-c++/detail/ui_test.cpp rename to unit/atf-src/tools/ui_test.cpp index 918d028de1..e4d9050eab 100644 --- a/unit/atf-src/atf-c++/detail/ui_test.cpp +++ b/unit/atf-src/tools/ui_test.cpp @@ -30,7 +30,7 @@ #include #include -#include "../macros.hpp" +#include #include "env.hpp" #include "ui.hpp" @@ -363,7 +363,7 @@ run_tests(const char *tc) std::cout << "Running tests for " << tc << "\n"; - atf::env::set("COLUMNS", "15"); + tools::env::set("COLUMNS", "15"); for (t = &tests[0]; t->tc != NULL; t++) { if (std::strcmp(t->tc, tc) == 0) { @@ -374,7 +374,7 @@ run_tests(const char *tc) std::cout << "Input: >>>" << t->fmt << "<<<\n"; std::cout << "Expected output: >>>" << t->result << "<<<\n"; - std::string result = atf::ui::format_text_with_tag(t->fmt, t->tag, + std::string result = tools::ui::format_text_with_tag(t->fmt, t->tag, t->repeat, t->col); std::cout << "Output : >>>" << result << "<<<\n"; ATF_REQUIRE_EQ(t->result, result); diff --git a/unit/atf-src/atf-run/user.cpp b/unit/atf-src/tools/user.cpp similarity index 80% rename from unit/atf-src/atf-run/user.cpp rename to unit/atf-src/tools/user.cpp index 37329f1666..85d7e501d1 100644 --- a/unit/atf-src/atf-run/user.cpp +++ b/unit/atf-src/tools/user.cpp @@ -28,28 +28,27 @@ // extern "C" { +#include #include +#include #include #include - -#include "../atf-c/detail/user.h" } +#include #include #include -#include "../atf-c++/detail/sanity.hpp" - #include "user.hpp" -namespace impl = atf::atf_run; -#define IMPL_NAME "atf::atf_run" +namespace impl = tools::user; +#define IMPL_NAME "tools::user" uid_t impl::euid(void) { - return atf_user_euid(); + return ::geteuid(); } void @@ -73,17 +72,31 @@ impl::get_user_ids(const std::string& user) bool impl::is_member_of_group(gid_t gid) { - return atf_user_is_member_of_group(gid); + static gid_t groups[NGROUPS_MAX]; + static int ngroups = -1; + bool found; + int i; + + if (ngroups == -1) { + ngroups = getgroups(NGROUPS_MAX, groups); + assert(ngroups >= 0); + } + + found = false; + for (i = 0; !found && i < ngroups; i++) + if (groups[i] == gid) + found = true; + return found; } bool impl::is_root(void) { - return atf_user_is_root(); + return ::geteuid() == 0; } bool impl::is_unprivileged(void) { - return atf_user_is_unprivileged(); + return ::geteuid() != 0; } diff --git a/unit/atf-src/atf-run/user.hpp b/unit/atf-src/tools/user.hpp similarity index 90% rename from unit/atf-src/atf-run/user.hpp rename to unit/atf-src/tools/user.hpp index 11b3e5546d..1758eb01a5 100644 --- a/unit/atf-src/atf-run/user.hpp +++ b/unit/atf-src/tools/user.hpp @@ -27,8 +27,8 @@ // IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#if !defined(_ATF_RUN_USER_HPP_) -#define _ATF_RUN_USER_HPP_ +#if !defined(TOOLS_USER_HPP) +#define TOOLS_USER_HPP extern "C" { #include @@ -36,8 +36,8 @@ extern "C" { #include -namespace atf { -namespace atf_run { +namespace tools { +namespace user { uid_t euid(void); void drop_privileges(const std::pair< int, int >); @@ -46,7 +46,7 @@ bool is_member_of_group(gid_t); bool is_root(void); bool is_unprivileged(void); -} // namespace atf_run -} // namespace atf +} // namespace user +} // namespace tools -#endif // !defined(_ATF_RUN_USER_HPP_) +#endif // !defined(TOOLS_USER_HPP) diff --git a/unit/atf-src/atf-run/user_test.cpp b/unit/atf-src/tools/user_test.cpp similarity index 95% rename from unit/atf-src/atf-run/user_test.cpp rename to unit/atf-src/tools/user_test.cpp index 7218ba6553..4c385d311e 100644 --- a/unit/atf-src/atf-run/user_test.cpp +++ b/unit/atf-src/tools/user_test.cpp @@ -37,7 +37,7 @@ extern "C" { #include #include -#include "../atf-c++/macros.hpp" +#include #include "user.hpp" @@ -52,7 +52,7 @@ ATF_TEST_CASE_HEAD(euid) } ATF_TEST_CASE_BODY(euid) { - using atf::atf_run::euid; + using tools::user::euid; ATF_REQUIRE_EQ(euid(), ::geteuid()); } @@ -64,7 +64,7 @@ ATF_TEST_CASE_HEAD(is_member_of_group) } ATF_TEST_CASE_BODY(is_member_of_group) { - using atf::atf_run::is_member_of_group; + using tools::user::is_member_of_group; std::set< gid_t > groups; gid_t maxgid = 0; @@ -109,7 +109,7 @@ ATF_TEST_CASE_HEAD(is_root) } ATF_TEST_CASE_BODY(is_root) { - using atf::atf_run::is_root; + using tools::user::is_root; if (::geteuid() == 0) { ATF_REQUIRE(is_root()); @@ -125,7 +125,7 @@ ATF_TEST_CASE_HEAD(is_unprivileged) } ATF_TEST_CASE_BODY(is_unprivileged) { - using atf::atf_run::is_unprivileged; + using tools::user::is_unprivileged; if (::geteuid() != 0) { ATF_REQUIRE(is_unprivileged()); diff --git a/unit/atf-src/atf-run/zero_tcs_helper.c b/unit/atf-src/tools/zero_tcs_helper.c similarity index 100% rename from unit/atf-src/atf-run/zero_tcs_helper.c rename to unit/atf-src/tools/zero_tcs_helper.c